Three Program Templates for Working with Arrays, Lists, or Vectors

These templates make working with sequenced data automatic All programming languages provide some means of storing data sequentially. Some languages use arrays for this purpose. Some languages use the term list rather than array. Some languages provide both arrays and another sequenced data collection type – the vector (C++) or the ArrayList (Java and C#). …

4 More Program Templates Every Beginning Programmer Should Learn

Learning program templates leads to programming expertise In an earlier article I discussed four program templates every beginning programmer should learn. I also discussed why learning program templates is so important. Briefly, program templates are chunks of knowledge that programmers use to develop solutions to problems. Learning and practicing these templates allow programmers to more …

4 Program Templates Every Beginning Programmer Needs to Learn

Program templates are the key mental representation for successful programming Program templates are common patterns of programming code usage that come up again and again as solutions to programming problems. A key skill in computer programming is learning to recognize these patterns and then applying them to unique situations. In this article I’m going to …

How to Learn to Program: Writing Code Templates

Programming expertise requires knowing and using hundreds of templates This article is the fourth in a series of articles on a sequenced instructional approach to teaching computer programming. The steps in the sequence are: 1) Learning how to read code and understand what it does; 2) Learning how to write code from clear instructions; 3) …

How to Learn to Program: Reading Program Templates

Recognizing templates makes you a more expert programmer The third step in a sequential instructional approach to learning computer programming is learning how to read program templates. A template is a set of programming instructions that represent a common code use pattern. Templates provide a means of moving from learning how to write code to …

How to Learn to Program: Writing Code

You can’t write code before you can read code The four steps in a sequenced instructional approach to teaching programming are: 1) reading and understanding code; 2) writing code; 3) reading and understanding program templates; and 4) applying program templates to unique situations. I discussed the first step in the process in a previous article …

How to Learn to Program: Variable and Program Tracing

There are four main steps to learning any new programming construct. The first step is learning how to read code by doing variable and code traces. The second step is writing code from pseudocode. The third step is to learn how to read code templates, such as a template for swapping two variables or a …

How Introductory Computer Programming Should Be Taught

Hint: It’s not by writing Hello, world! first Computer programming has been taught in the same manner for thirty or forty years, or at least since I entered the field. Have the student open an interpreter or compiler and write a program that displays Hello, world! on the screen. Then teach a few concepts, have …