Decompose before you code

This tip submitted by Abhinandan Pandey on 2010-02-21 12:28:21. It has been viewed 9757 times.
Rating of 4.2 with 73 votes



Before coding into c language, identify what exactly you are coding. The following example will illustrate.

Consider if you are trying to make a digital watch program in C, first decompose it as follows

Digital Watch = Led panel + Timer

Keep on decomposing till you reach C's fundamental instruction set as follows

LED panel= Digit * 4
Digit= 8* leds
led= rectangle


This technique is called divide and conquer. The fundamental of this technique is, decompose the problem until it can be readily solved using basic functions you already know about.



More tips

Help your fellow programmers! Add a tip!