As programmers, who are we programming for? On the one hand, we're writing code to be interpreted by machines; considered this way, code should be logical, consistent, and machine readable. But unless you're writing code in Assembly, the fact of the matter is that the code you're writing will never be directly interpreted by the machine—a compiler will take that code and make it machine readable.So, in the case of interpreted languages, who is the code for, in the end? I'd argue it's for you, the developer, and those who will be maintaining it later.As such, I've always taken Larry Wall's aspiration for coding in natural language to be a lofty and noble goal (despite the fact that idiomatic Perl is considered a write-only language). Name variables meaningfully, instead of using short, cryptic names. Follow natural grammar when you can. Use white space to separate discrete ideas and concepts in your code.Code can be poetry, if you work at it.
01 May 2012