Steps involved in writing a good program
Solving programming task has been a huge burden to beginners developer, from my experience the only thing that could explain this is lack of fundamentals arrangement of programs. Many beginner developers don't know the fundamental steps that are involved in writing a good program. In solving any type of problem whether by computer or manually solved, knowing and understanding exactly what the problem to be solved is. This problem is common to students when they are given a problem to solve, many do not understand the problem talk less about designing a solution and am going to highlight it one after the other.
1)Problem definition
As a programmer you should always try to identify and understand a problem precisely, If the problem is not totally defined, then you must analyse the problem carefully, eliminate the things that are not important and zero in on the root problem. No one solves a problem he did not understand so if you are given a problem try as much as possible to understand it first.
2)Understand the problem
Identify what information is supplied as problem data and what results should be computed and displayed.
3)Develop an Algorithm
Formulate a list of steps that must be followed to derive the desired problem outputs. Represent your algorithm using pseudocode or flowchart, but I will recommend you use a flowchart to represent your algorithms as it is a diagrammatical or symbolic representation of algorithms and 60% of the human brain is attached to the image, so if you represent your algorithm with flowchart it will give you a broad view on it.
4)Write the program
Implement the algorithm as a program that satisfies the syntax(rules) of the programming language you are using.
5)Test and Debugging
Just because a program runs and generates results doesn't always mean that the program is correct. Text the program by comparing its results to hand calculations for several different sets of data and if you find a bug go for debugging.