Programming Logic Key Ingredients

We can always learn from Nature the different ways to be a good Software Programmer, after all Nature is the greatest programmer of all. To develop different programming traits on can practice and learn also I do believe some are born programmer and see this world in a different way. As a kid I was always pondering over geometric shapes. I loved to play with a puzzle board. I used to think of all the combinations I can make with all the geometric shapes around me. This world of imagination in which I was constantly working around with shapes and objects to come up with new shapes was awesome. I would add different shape and size of rectangles and squares to come up with real world object shape like cars, chairs, bottles etc.

I developed My first great program to impress by QBasic programming teacher Sir JOHN. I developed a BGI program in which Circles move up the screen as bubbles and make the alphabets of the word JOHN. We don’t had computers at our home and access to compilers at that time was rare only in School lab. We were allowed only for few hours in their and so most of my programming compilations was done in my head and my Notebooks. In 8th standard when we had a separate Notebook for each subject, I was already having 4-5 Notebook for Computer science programming only.

Sir John, taught me the key or to say secret of programming skill. He said “Playing chess will help you build logic for programming.” Eventually I learned chess and now I consider the following checklist one should look for to help themselves or others in learning how to program better!

Chess: One who is not a good Chess player can rarely be a good programmer. Chess teaches a person to plan, pre-chess-smarterplan, think all the possible scenarios, future steps possible in the game. I believe the pawn, bishop, king, knight . etc are the tools/weapons one can use to win the game. It depends how wisely you use them to play and win. In the same manner but in different dimension For loop, While loop, Data structure, class, functions, OPPs etc are the tools/weapons by using them wisely you can build good logic. Programming can be like a war, fun, winner and loser in them. If your program crash unexpectedly then compiler has won. If you get correct output in all the cases then you are the supreme winner.

Flowcharts: I was very much into geometric shapes so most Flowcharts was the awesome way to build logic as flowcharts and convert them into programs. The start/stop box, processing box, input/output box.. were my toys to play with. Combining these boxes to develop small but tricky logic is possible and sometimes give you a different angle of looking towards the same thing. Truth table is also an awesome way to predict all the binary logic. While writing a program always start from pen and paper and come up with different boxes.

  • Program Window: Where you write your program. It can be in any language or even a flow chart.
  • Business logic Window: Write all the variable names and comparison blocks and while doing a smoke run of your program write down each and every values to them. Be very patience while doing this and keep a note of special cases.
  • Output Window: As the Business logic window will start filling up keep your outputs in separate window.

We have an old saying “Small drops merge to make Ocean.” All such small programs, functions, classes etc will combine together to make a beautiful program.


Nature: Always compare what you are about to develop with Real world scenarios. Objects like Train, Human, Dog, etc can have functions like run, drive, bark. Perceive everything as various individual separate objects, and then only you can understand the interaction between them.  Object oriented programming is way better than any procedural programming if you are about to develop a product or software to be used by everyone. Things close to Nature can be easily perceived and explained by everyone.

Author: AJ

Share This Post On

Submit a Comment

Your email address will not be published. Required fields are marked *

× How can I help you?