Anonymous Confessions from Programmers.
How compact and uncommented code is seems to be proportional to how tricky the algorithm is. Should be the other way around.
Share on Tumblr
I suspect this is because explaining stuff is hard, and explaining tricky stuff double hard. Doesn't excuse it though.
I disagree. Some algorithms are "tricky" enough that no explanation is going to help if you can't just read the code,
#2: I think it's more common that the person writing the code just isn't good at explaining stuff, or doesn't care about efficient communication. I used to assume I was just too dumb when I saw code like that, and that it would be clear enough to the people who need to understand it. That was before I actually dug into a bunch of "write-only" code though. More often than not, I can write a less buggy, more efficient, *and* much easier to understand version. The fact that it's so often buggy code tells me that other people struggled with reading and verifying it too. They just didn't want to admit it.
Or maybe they just didn't see how to make it clearer, because they themselves are bad at explaining stuff. I think it's connected to being on the autistic spectrum, with the deficiencies in understanding other people that that brings.