You make a good point about separating the why and how with the comments and code. Your example is a lot cleaner and seems like it would be appropriate for more complex applications.
I've heard references to Getting Things Done (I go by the 2 minute rule when I can).
Thanks for sharing!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.