Friday, January 30, 2009

The Stupid Computer Maxim

I was building some scripts to help automate part of my work and I began to get bogged down while working out the design of my code. Then I remembered something I had realized about programming a few years back.
Here's the thing: computers are stupid. It's just that they're stupid really, really quickly and this makes most people think they're smart. This is what I refer to as my Stupid Computer Maxim.
I don't say this in a disparaging way. I like computers. I use them all day, every day. It's just that I like it when my computers do the boring, repetitive, stupid stuff and I get to do the creative stuff. Many beginning programmers get bogged down by not remembering the Stupid Computer Maxim (SCM).
Give a computer something stupid to do and they'll do the hell out of it. This is a very powerful, fundamental computer programming principle.
My problem was that I was trying to frame the task I was automating in too much of an abstract, high-level way and I got stuck trying to come up with a design. Once I recalled the SCM, all became much easier. I took the complex task and broke it down into a set of really stupid tasks and the scripts practically wrote themselves.
Reblog this post [with Zemanta]

No comments: