4.30.2017

Explaining How a Programmer Thinks to a Non-programmer




Being someone who has some knowledge on technology, I constantly get smacked with the same lines of questions from people who barely understand coding/programming such as “How complex is coding?“, “How do programmers think?” and the list goes on.  Well, most times I try not scare them away and tell them how easy it is, since it involves logical reasoning. But on the other hand, some people obviously tend to misinterpret it.

 I was going through a question on google when I found a similar question and I decided to compile the best suitable answer to this often asked question from answers found on the thread. 

Next time someone walks up to you and says “how complex is coding/programming?“, simply ask them the steps needed to make a cup of tea. The person would likely list the procedure as follows.

Boil Water
Put tea in a cup
When the water is boiled pour it into a pot
Wait 5 minutes
Pour the tea into cups
Add milk
And drink
Now here is where the fun begins as you’ll have to explain how a programmer thinks from their answers. Now start with:

Boiling water?

Ask the following questions.

where is the water coming from
where is the kettle
how do you get the water into the kettle
how do you know how much water to put into the kettle
what if there is no water/kettle/electricity?
what if you fill sensor fails?
what if your boiling sensor fails
Put tea in pot?

Obviously, since this is the next step, continue your questions from the point.

where’s the pot, what if there isn’t one? should we have thought of that before boiling the water?
where is the tea, which kind of tea? should we have asked first, perhaps we shouldn’t have started this if we don’t have the right tea?


Pouring boiling water?

Here is where it gets interesting.

are you sure its boiling? how can you make sure that the machine doing the pouring got the right ‘done’ signal from the kettle?
How do you make sure that the pouring machine knows where the pot is?
What if the pot tips over during pouring?
And that’s how the list should go on. Try to make questions for every step and you’ll have the person thinking like a programmer  . I hope you enjoyed this post. I’ll really appreciate your sharing it among your social circles, and don’t forget to let me know other ways you’ll explain programming to a non-programmer in the comment box below. 





No comments:

Post a Comment