A few weeks ago I came across an interview with an academic software researcher, now working for Microsoft. (Unfortunately the interview was in a non-English print publication, so I can’t link to it.) The interview was quite interesting, far better than I’d expect from a magazine targeted at a wider audience; it certainly wasn’t a trade publication.
Near the end of the interview, I had to stop reading and went “What?? That’s the stupidest thing I ever heard!” This was where the interviewee said that one distinguishing mark of good code is the lack of (inline) comments. Properly written code, the theory goes, is so clear and simple that it needs no comments.
This was a bit of a shocker for me. I have some software development experience, and in the fields I’ve worked in, lack of comments in code is a clear mark of poorly written, sloppy code. Even suggesting that code should not be commented would be an obvious sign of utter ignorance, perhaps too strange to even take seriously. Continue reading →