//
you're reading...
Digital Behaviour

What sort of a programmer are you?

There are two types of programmers – the inside-out and the outside-in.

Let me illustrate using an example. Consider the game of bulls-and-cows. For those not aware of this problem see here.

COWS-BULLSAssume that the program that needs to be written is a version where the player tries to guess what the computer has randomly generated.  At the core of the problem is the evaluator that compares two numbers, the generated number with the guessed number. Then there are other components, the interface, the random number generator, the user input and so on.

How do you begin? The inside-outer writes the core first and then does the rest. The outside-inner prepares the scaffolding and then writes the core. While there is no wrong or a right answer, the approach does indicate the thinking process going on within the programmer.

The inside-outer revels in the actual problem solving aspect of the code. Often having achieved the core the scaffolding does not get built and he may just lose interest in the problem. He programs for the thrill of solving a problem.

The outside-inner on the other hand builds the scaffolding, creates the super structure and the foundation and then attempts the core. He can show evidences of creationism as he goes along. The proof of the pudding takes a while to eat. There are possibilities that he may lose interest purely because of lethargy.

In both cases there is a distinct danger of non-completion. Which then is better? In the former case if the problem being solved is relatively difficult one, then even if the programmer disappears and program remains, there is a chance of salvage. At least the core is ready and can be used with some make-do.

In the latter case, this is not so. One has to get another fertile mind to complete the problem. So who is lurking inside you?

Some interesting problems, ye solvers can attempt.

  • Bulls and cows
  • Solving the Sudoku
  • Automatic jig saw solver – CSI like where the lab puts together torn pieces of a note.

 

Advertisements

Discussion

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 67 other followers

%d bloggers like this: