Hacker News new | ask | show | jobs
by marrs 4093 days ago

    this is not really code to learn from
I used to work with someone who could look over my shoulder, read and evaluate my code, and then tell me where my bug was within seconds. He knew the code better than I did, and I'd written it! I asked him about this mad skill of his and he directed me to easily the worst programme I've ever read in my entire life. [1]

It was a block of unformatted, uncommented, dangerously typecast old-style C, with meaningless single letter names for variables and functions.

So I read it. It took a lot of study and I didn't cheat and run it through a pretty printer. I never really got to the point where I grokked it but my ability to read other code has improved a lot.

So whilst I agree that it's important to write code in the way you describe, I think it's well worth reading code that takes you out of your comfort zone from time to time.

[1] http://keiapl.org/rhui/remember.htm