Begining Programming - Part II

Section One, An Introduction to the Programming Process

Introduction to the Process of Programming

NewsLetter TOC

Newsletter Home

Blast

MDI

OS Editor

LBW Review

Fast Data

SQLite

Tsunami

Begin Prog II

Locate/LBCard

Learning to program can seem a daunting task - especially when one examines the projects of others, and observes the finished programs in operation. The task of creating the program that you imagine might seem unreachable as you are beginning your quest to become a programmer. Rest assured that it is not as difficult as one would imagine.

The art of programming is not in the language, the writing of code is the easy part. The art of programming is in the problem solving. Every program you write is the response to a problem or series of problems. The learning to write code - the commands that make the program - is the simple part. Learning how to put them all together to solve the problem is critical threshold that must be transcended to become a programmer.

Solving the problem takes a discipline of thought. What does it mean to think through a problem, how do you go from an idea or a challenge to a solution that will become code? There are many ways. We are going to examine two tools and the processes of going from idea to operational program.

First lets talk about problem solving in general. In programming, as in life, problems are generally complex. The good news it that most complex problems can be broken down into simpler, smaller sub-problems that can often be broken down again until the sub-problems are small and manageable. This is the first step to thinking through a program. We are in the phase of programming called analysis.

Analysis of a Process

Let examine for a moment the process of corresponding with your mom (you know she said you ought to write now and then...) Well the process is composed of several large steps:

1) Gathering materials

2) Preparing the work area

3) Writing the letter

4) Preparing the letter for posting

5) Posting the letter at the Post Office

Each of these larger steps can be further broken down. For instance we know we need paper, a pen, an envelope and a stamp in step one. Obtaining each of these is a sub-problem waiting to be solved. Lets look more closely at step 4 - Preparing the letter for posting. It can be broken down into the following steps:

4.1) Fold the completed letter

4.2) Get the envelope from the supplies

4.3) Write your mothers name and address on the face of the envelope

4.4) Write your own name and return address in the upper left of the envelope

4.5) Place a stamp in the upper right side of the envelope

4.6) Stuff the letter into the envelope

4.7) Lick the flap of the envelope

4.8) Seal the envelope closed

We could still further break the problem down if we chose and the problem were sufficiently complex. For instance, what if the step 4.5 required us to analyze the weight of the envelope and letter to determine the proper postage. This would require several more sub-processes to accomplish. However, for our purposes we have gone deep enough. How far to break a problem down depends on how complex the steps are at the current level. If they are too complex to think about or if your steps are too general to describe exactly how to accomplish the step, then you must go deeper.