Have students work in small groups to solve logic puzzles so they develop algorithmic thinking and good problem-solving habits.
Start the day with students pair programming and then split them up; it makes later collaboration natural and reduces frustration.
Explain recursion with the example of determining your row in a stadium by asking the row in front of your what row it is… asking until you get to the first row, the base case.
When teaching introductory courses, teach students to use “top-down thinking” and “bottom-up implementation.”
Ensure that your courses have clear expectations about prerequisite knowledge so all students are well-equipped for class material.
Avoid using x and y as variable names to prevent students from confusing variable assignments with mathematical expressions.
Remind students that variable assignment occurs in the order assignments are given. This avoids the misconception that changing one value affects other variables assigned before it.