Hacker News new | ask | show | jobs
by rrauenza 3808 days ago
I would add assertions in as well as you iterate. It will validate whether you understand the flow of information through the function.
1 comments

Absolutely this. Not only do assertions make it easier to validate your understanding, they capture and preserve that understanding for future developers (including yourself, 6 weeks from now).

Assertions are comments which can always be trusted and which never get out of date. It baffles me that there's so much reluctance to use them (especially in dynamic languages).