Want to improve your thinking and problem-solving skills? Learn computer programming.
Computer programming methodology
In Develop thinking skills with computer programming we made a case for learning computer programming. We now take a look at the programming process.
Every program begins with a statement of the problem to be solved. Except for the most trivial programs, the journey from problem statement to finished program usually involves the following activities:
Define the problem.
Analyze the problem.
Develop an algorithm (a method) for solving the problem.
Write the computer program which implements the algorithm.
Test and debug (find the errors in) the program.
Document the program. (Explain how the program works and how to use it).
Each of these activities helps to develop its own set of skills. For example, defining the problem requires you to formulate a detailed statement of the problem. It teaches concise, precise expression—if the problem is not well-defined then a correct program cannot be written.
In the analysis phase, one considers options. Except for simple problems, there would normally be more than one method or algorithm for solving a problem. Which one should be chosen? Here, the programmer will have to think critically about all solutions, weighing the advantages and disadvantages, and choosing the one with the best cost-benefit ratio.
Developing an algorithm and writing the program require logical thinking skills and attention to detail. They also require knowledge of algorithms, programming principles and the programming language. Learning to write algorithms and code them in a programming language is a great way to develop these skills.
Testing and debugging a program teaches many skills, not the least of which is patience. It is not dissimilar to a detective game in which one uses the clues provided (e.g. messages, incorrect output) to try and nail the culprit (an error). Debugging skills are the same ones you use when trouble-shooting a problem in the workplace or at home.
Documenting a program teaches you to write in a clear, concise manner. One aspect of documentation is to write instructions explaining to a non-technical person how to use the program. To be effective, the instructions must be unambiguous and easy to follow.
Computer programming is a wonderful vehicle for teaching/learning problem solving, logical and critical thinking. It has the ability to nurture and develop thinking skills that are just not possible with other subjects.
While anyone, regardless of age, can benefit from learning programming, the earlier children are exposed to it, the better. The greatest benefits will be derived during the formative years of about eight to fifteen, before thinking patterns have become more established.
With all its advantages, no one should be denied (or deny themselves) the joy of learning computer programming.
Reference text: Java Programming - A Beginner’s Course
Related programming references
This post is part of the series: The Art of Computer Programming: Social Science and Computing
The ability to write computer programs goes much deeper than playing a video game, watching a DVD, using the internet or writing an email. Being able to program helps you every day - to think logically and solve problems. This series looks at computer programming and its role in developing society.