Hacker News new | past | comments | ask | show | jobs | submit login

Personally I find literate programming helpful not for simple programming tasks, but for really hard ones; if you can quickly scan a few lines of code and figure out what's going on, then you probably don't need it. But if it's the kind of code where I know even future-me is going to have a hard time understanding what I've implemented without copious comments, then I really like literate programming.

And it's more than just a different notation for comments. I find it psychologically elevates the narrative in a way that makes it feel like at least equal to the code in importance, therefore I end up being a lot more thoughtful and deliberate in writing the narrative.




For code maintenance I've long since given up on assuming the comments are correct and simply read code and try to understand what is going on (and maybe read the comments later to see if they correlate to my understanding of the code). Many times I see that when fixing code, people don't update comments and a few times I've seen the comment indicates good intentions, but the code doesn't live up to the intentions :-).

But I do see your point about it for more complex programs and maybe more complex programs of your own (that a future you will have to maintain).




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: