Joel is smart
Stumbled across this excellent article at Joel on Software today, via some tangential web surfing. (No relation to tantric web surfing)
I’ve been reading a lot of code lately, and I totally agree with him when he says “It’s harder to read code than to write it”. He argues that this is why programmers so often rewrite things rather than extend or even fork an existing implementation.
Of more interest to me, because as ambitious as I am, I’m not about to write my own kernel, are his comments on reading people’s code:
I think the best way to read somebody else’s code is just to SLOW DOWN… it’s like deciphering a code, not like reading.
Most people have trouble reading code because their eyes are used to reading at a certain speed from reading text written in human languages. But code is much more dense than English, and contains ‘secrets’ that need to be deciphered by looking elsewhere: for example, when you see that function call that says
UpdateData(FALSE)
, unless you remember howUpdateData()
works, you have to go look for it to figure out what the first argument is and what FALSE means.My emphasis
Posted by mike on Tuesday February 22nd, 2005, tagged with linux, plugs