4 ms·
I would add assertions in as well as you iterate. It will validate whether you understand the flow of information through the function.
by rrauenza 11y ago
I would add assertions in as well as you iterate. It will validate whether you understand the flow of information through the function.
- phpnode 11y agoAbsolutely 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).