Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>How does it enter anyone's mind as a thing to do in the first place?

Because a lot of people make up code as they go a long.

Think of it as story telling vs. ordering. When story telling something happens and the your characters/code react to the outcome of that event, but stays in the same context.

Instead it would be better to write code as your being ordered around by an old drill sergeant. He'll always tell you to do one thing and one thing only. When you've completed that task, you given the next instruction and are no longer in the context of the previous action.

It's something I thought about often when reading code, both that of others and my own and it's the best explanation I've been able to come up with.



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

Search: