Model writing code using the following techniques to show students how you think about constructing programs in order to support them in learning to independently think through algorithm development.
Get students paying attention to types in Python; although type declarations aren’t explicitly required in Python, they still exist and are crucial to understanding how Python manages data.
Forward students links to programs in Python Tutor and ask them to answer questions about how the code works to go over what happens during a function call to provide students in-depth practice.
Break down the structure of the internet and define keywords, even though students may have surface familiarity with them, to ensure that your class learns this crucial CSP material.
Misconception: Students struggle with the jump from writing code in one method to writing code in two methods.
Misconception: Return is a mystery to students because they may not understand that functions have an entry point and an exit point. This results in mistakes such as assuming Python will return the right thing.
Distinguish the differences between print statements and return statements to help students understand that these elements are not related because this conflation can cause a lot of confusion.
Show a variety of for loops conditionals (e.g., < vs. <=; different variable names, different start values, different increment operations) to avoid common misconceptions about loops.
Having students trace a simple program for drawing a set of squares in Processing to introduce loops and strengthen student understanding for-loops with a body of code through practice.
Motivate for-loops by having students informally describe how to draw a set of 5 shapes, then having them turn this description into pseudocode to practice for-loops.
Misconceptions: Students have difficulty with loops partially because the motivation for looping a small number of times seems insufficient.
Show students to separate the for-loop header from the for-loop content when discussing how many times a for-loop loops because students can get overwhelmed, but need to be able to separate the conditional from the loop’s content.
Encourage students to get the for-loop counter right before adding code inside the for loop this will reduce the amount of time spent troubleshooting for-loops and ensure students are scaffolded well.
Show students explicitly how objects and variables might have other names (i.e., aliasing) to help students understand that variable names don’t have to match parameter names because students often find this confusing.
Use puzzles, problem solving, and tinkering in assignments and activities to build students’ confidence and interest in pursuing Computer Science and to ensure that students understand and develop necessary skills for success.
Use Zyante programming textbooks so that reading assignments are integrated with frequent exercises to ensure students understand and have plenty of practice with a topic before moving forward.
Use small whiteboards for formative assessments during class instead of clickers because they have a low overhead to get up and running and they allow you to quickly gauge student progress.
Misconception: Students don’t realize that the keyword return causes Java to leave the current method.
Explain that Java’s return is like a platter where you can hand information between methods to help students create a concrete mental model for an often tricky subject.