Always use the keyword ‘this’ in Java, and trace through many examples, to help students understand it.
Teach simple Java with graphics first using the Draw/Roll Die activity, having students call objects and methods before defining their own, for an engaging way to reinforce material.
Spend extra time teaching Big O in intro classes that use Python because the underlying implementation of Python lists is a mystery to students that leads students to believe many operations are constant, O(1), that are not.
Misconception: With conditionals, students may try to compare the memory address of a function to a number, like x < foo, when they intended to compare x with the return value of foo.
When teaching null dereferences, show a call that dereferences a null pointer in a debugger to give students a snapshot of what is happening.
Use these 5 strategies to give students useful debugging strategies that will help them fix Segmentation Faults.
Misconception: Students believe that while loops tell the program when to stop rather than when to continue.
Find examples that help motivate difficult abstract concepts - like passing in a value to a function - to help students see their usefulness.
Draw attention to types when teaching students Python to help lay the groundwork for understanding types in lower-level programming languages they’ll learn about later.