2015/12/12

Advice to programmers.

When you have even a slightly difficult problem you should switch off the computer, get a piece of paper and a pen, go away from your desk and solve it "manually".

The temptation to code a vague idea you have in your head directly at the keyboard is difficult to resist. I was reminded of this as I sat waiting in a sport's center for my daughter to finish her kickboxing. There was music booming out of hall where the 40 something skeletons were maintaining their skeletoness, as well as a radio station talking at me from the ceiling. 

I was bored and thought I might as well try to solve a stupid little graphics programming problem that had been bothering me. So I found a free page in my diary, and in less than a minute it was done:


The point is that sitting in front of the computer is not always the best way to write computer programs. The computer screen, and the keyboard, distract you from the concept you need to implement.

Often the concept is independent of the computer language. What you need to do is write down in plain English (or Italian Or Russian or Chinese etc...) what you are trying to do.

2 comments:

  1. I couldn't agree more. Straight to the computer often leads to many missed possibilities and coding yourself into a corner. Idea rewrites on paper are much quicker and easier to review.

    ReplyDelete
    Replies
    1. But why do I keep forgetting my own advice?!

      Delete