Hacker News new | past | comments | ask | show | jobs | submit login

This piece of advice is quite at odds with another classic piece:

http://www.joelonsoftware.com/articles/fog0000000069.html

Back to that two page function. Yes, I know, it's just a simple function to display a window, but it has grown little hairs and stuff on it and nobody knows why. Well, I'll tell you why: those are bug fixes. One of them fixes that bug that Nancy had when she tried to install the thing on a computer that didn't have Internet Explorer. Another one fixes that bug that occurs in low memory conditions. Another one fixes that bug that occurred when the file is on a floppy disk and the user yanks out the disk in the middle. That LoadLibrary call is ugly but it makes the code work on old versions of Windows 95.




That doesn't sound like it's at odds at all. The point of the article is that you should investigate why something was done in the past so that you don't keep repeating the same thing even when it isn't necessary anymore. All of the things in your quote are still required and shouldn't be removed.


It's at odds with the title, and in line with the content of TFA. OP used a title which has no bearing in the article he linked.


Well, "If you don't remember why onions are in there, investigate carefully as to why they were added in the first place, then take 'em out if they're no longer relevant" wouldn't fit in the title!


I like to say that these are the ugly nuances where code should be commented well.


I'd be stronger and say, if your code is going to have any comments whatsoever, this is where the comments need to be.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: