Programming Difficulties
Background
The work in this section is being done in a slightly different order. In most sections I have you READ first and then WRITE second. In this section I want to reverse those. I want you to think about the problem before the "experts" tell you what they think
The end goal of this topic is for each participant to possess an annotated list of common programming errors. The annotations should include names and explanations that provide understanding and alternatives for "fixing" them. I firmly believe that by the process of developing this list (in addition to the actual finished product) will enhance both your understanding of programming and your ability to respond to student difficulties.
Write
I would ask you to START this process before you attempt the readings. I want your first pass at this idea to come from your own memories and experiences rather than from research literature.
Your first task is to individually identify difficulties that a novice programmer might encounter. You may remember some that you have encountered. You can, of course, examine your email conversations with instructors or review the videos from Fundamentals of Programming to identify additional ones. You may use whatever format seems most useful to you, but I recommend including name, error message (for syntax errors) or difficulty (for logic errors), cause(s) of the problem, and fix(es) for the problem. Note: syntax errors will have error messages and logic errors will not.
Sample items are included below.
- Uninitialized variable
- Cause(s)
- A variable on the right-hand-side of an assignment statement was not initialized
- totalĀ in this example
- A variable on the right-hand-side of an assignment statement was not initialized
- Fix(es)
- Be sure to initialize all accumulator variables, e.g.,
- total = 0
- Be sure to initialize all accumulator variables, e.g.,
- Misplaced initialization
- The accumulator variable doesn't get all the values
- Cause(s)
- The initialize statement is placed inside the loop that accumulates the values., e.g.
- The initialize statement is placed inside the loop that accumulates the values., e.g.
- Fix(es)
- Move the initialization outside (before) the loop so it only occurs once, e.g.,
- Move the initialization outside (before) the loop so it only occurs once, e.g.,
Read
I asked you to think through your experiences because I wanted you to put your own personal experiences on this first. Once you have a good starting list that comes from your own experiences, I want you to do some reading on what the "research literature" has identified as some of the common difficulties that new programmers have when learning how to program.
The list below is not a full assigned reading list. That is, I do not expect you to read every last detail in each of these papers. Instead, I would ask you to "browse" these three resources to start with so you understand what they are about. Don't worry about the details. Get the big picture first:
- (PDF) "A Study of the Difficulties of Novice Programmers"
- (PDF) "Novice programmer’s misconception of programming reflected on problem-solving plans"
- (PDF) Beginner Programmers' Mistakes
- Note, if you find an additional article you think fits this discussion PLEASE feel free to read it and share the link with me!
Once you have done this I would ask you to REVISIT each one focusing in more detail on the sections pointed out below:
- A Study of the Difficulties - focus on section 4 and the table
- Novice Programmer's misconceptions - Section 2.2 and all of section 4
- Beginner Programmers' Mistakes (Make sure you understand the main idea of all of the author's 25 points)
Revise/Add
Now that you have done some readings, it is likely that you are remembering some things you had forgotten on your first pass. Take the opportunity to extend your list or revise/clarify some of your initial ideas. In other words, feel free to add/update what you wrote about on in light of these new materials, thoughts, ideas, etc. from the readings.
Begin to think about this as something that you could hand to your students to help them work their way through difficulties you think they might experience as a novice programmer.