Categories
Programming Programming Philosophy Teaching Programming

Zen Programming – 2

I thought about this a long time ago with Erez:

To fully grasp structured control flow – you must first learn to program without it.

Saw it happen, with myself and with others. Only after writing some hand-written conditionals and loops in assembly, do you really learn what do they mean, and how to make the code do what you want it do.

Categories
Programming Philosophy

Zen Programming – 1

To achieve correctness of code, you must first realize that your code is incorrect.

Too many times I’ve reviewed code that was written with only the obvious cases in mind. A small step towards writing better code is to think to yourself during (and even before!) coding: “what if?”.