You are the Cause of your own Suffering

As stated earlier in this text, most people make most things far more complicated than they need to be. Nowhere will you see this fact documented better than in a typical computer program. Most computer programs could be reduced to a fraction of their present size, made to run orders of magnitude faster, and made far easier to read and maintain. The majority of complexity in most code is due to bad decisions on the part of the programmer.

What this means for you as you begin to learn programming, is that the experience can be much simpler and more enjoyable than the typical case. You may have heard from other students that their computer programming class was really tough (often paraphrased in more colorful language). If so, their struggle was mostly a result of following bad practices, due either to poor teaching or failure to follow their teacher's advice.

Pain is not inherent in the programming process. If you are taught properly and have the basic self-discipline to follow those teachings, programming can be a fun creative process with minimal struggle. It will often be time-consuming, but time flies when you're having fun, which in software development typically means making steady progress. It ceases to be fun when you're stuck on a problem for a long time, but this will happen very rarely if you take an intelligent approach to the programming process. If you find yourself getting stuck often, you need to re-evaluate your coding procedures.

Depth before breadth. Take your time learning to program and PRACTICE the basics until you understand them well. Master variables before learning types. Master types before learning conditionals. Master conditionals before learning loops. Master loops before learning subprograms. Master subprograms before learning arrays. And so on... A little time invested early in the learning process will save you a lot of wasted time and frustration later.

This text focuses on good practices from the beginning and leads you down the right path so that your experience as a programming requires minimal effort and produces solid results: Simple, fast, readable, easily maintainable program code. We'll begin with some important background knowledge and then learn to program one step at a time, exploring relevant best practices and pitfalls along the way.



Be sure to thoroughly review the instructions in Section 2, “Practice Problem Instructions” before doing the practice problems below.
  1. How good is the quality of most existing software? Explain.

  2. If you are getting frustrated, struggling to make progress on a program, what should this tell you?