Hacker News new | ask | show | jobs
by autokad 3559 days ago
"Now the question is: if comments solves the human to human communication problem, why would one has to write more comprehensible/readable code? To me the answer is: you don't write comprehensible code in order to better communicate with your fellow programmers"

I strongly disagree with that statement. coders spend more time reading code than coding it. being fast & bug free is important, but its not the only reason to write readable code, and simple is only one proxy for readable code. also important is following standards, easy to follow flow, choosing good variable names, etc.

sometimes a day for me is spending 6 hours reading code, and then maybe adding or changing one line.

1 comments

> simple is only one proxy for readable code

No, simple isn't a proxy for readable code. One can write in a readable manner a complex solution to a problem, but it isn't always right (using other "proxies" isn't, either).

It isn't always right because it's "a complex solution to a problem", not "a complex solution to a complex problem". What you made readable might even be "an overly complex solution to an actually simple problem"; meaning - to put it bluntly - that you have inadvertently spent your precious time on putting lipstick on a pig.

I didnt say simple was the only proxy, just that it is one. if you are at odds with that, then take it up with pretty much all the greatest minds in computer science.