you're reading...
Digital Behaviour

Approaches to coding

Much can be learnt from the way you keep your data in your laptop. The way your directory has been structure reveals how you think out and organise your daily activities. Life sometimes is most easy when everything is in a slot. At least that is what we have been taught as bright young management students.

I perhaps would like to look at a person and say to myself – “Here is a specimen belonging to A32CQ45 folder”. Which may mean I better be careful. The person is prone to kick your backside when angry. Unfortunately life is not so simple after all. It requires you to be 50 years old to come to that sad conclusion. The bishop disagrees and he says you must try harder and never lose hope. He was influenced by his nephew, King Bruce who if you remember was influenced in turn by a hard-working spider. The Battle of Bannockburn – well that is a different story and to come to the point once again – do not lose hope, keep trying.

So I decided to understand how people develop code. I am not here to talk about the waterfall or the agile. There are simply too many to talk about that.

In my mind I see that there are three broad approaches to coding – none of them guarantee results. They do satisfy your creative urge and at the end of the exercise you are probably happy that you got a piece of code working.

Now assuming that you have managed to break down you code and the work breakdown structure looks like something shown below.

The Divide and Rule Programmer will code the top brown rectangle and create three stubs for the light blue, green and dark blue. Then devote his energies for all the beans inside the light blue and systematically the next beans and so on. It is perhaps mechanical and nearer to goal – if such a thing exists. Chances are that he is not enjoying his work. Too well charted I would hasten to add. Such people do exist and sooner or later the work gets done. Software engineering gurus may also call this technique the top down approach.

The Build and Control Programmer does the opposite. He takes on small pieces of work at a time. He would address the little orange circle. He would develop it . Look at it from all sides and be happy that he has made a beginning. He takes a tea break, comes back and then addresses the brown bean. He builds a small bit at a time and spends focused energy and time on small pieces. He believes that he has a good control on the whole thing. Chances are that he is happy but has by now forgotten what he set out to do in the first place. No marks for guessing what the management gurus call this – The bottom up approach.

The third category is most interesting. He will begin by addressing what he thinks is the core challenge of the whole stuff. He decides that he must do the yellow bean first and spends all his time in perfecting it. He reads tomes of books on the best implementation of the yellow bean. In the process he like his previous brethren not only has forgotten what he set out to do but also why he is doing what he is doing . Yet he is perhaps the most happy of the lot. He has learnt a lot in the process and made himself really busy. Operation successful and patient has died is the management gurus verdict.

Where do you fit in?




3 thoughts on “Approaches to coding

  1. There are more ways to look at the problem:
    – Build the UI mock-up first and fill in the functionality later
    – Do part of orange & green & blue and keep improving them

    Posted by Udayan Banerjee | September 6, 2012, 3:36 pm
  2. good one…a quick way for someone to understand top down/bottom up

    Posted by MAHADEVAN | September 6, 2012, 3:52 pm
  3. What about creating the stubs and then deciding on what to name each parameter / structure & structure member that will be passed from the top brown (red?) rectangle down to the yellow beans while listening to your favorite music? (LMM: SSAD+SAS/C) 😉

    Posted by Sandeep | September 10, 2012, 8:02 pm

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

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

Join 71 other followers

%d bloggers like this: