Skip to main content
CS Teaching Tips

Main navigation

  • Browse All Tips
  • Tags
  • 3D
  • About
  • Rate Tips
  • Tip Sheets

Have students pay special attention to “off by one” bugs to help them avoid common mistakes in their code.

  • These are errors that do not account for edge cases; most frequently, the first or last element.

More about this tip

Tags

  • Development Methods
External Source

Interview with Jim Huggins

Other Tips By
Other Tips By Jim Huggins

Similar tips

Give students constant exposure to code, even if they aren’t able to fully understand it right away, to develop their comfort with code over the long term.
Lay out what good programming style consists of for your class to encourage good style and make debugging easier.
Write an exception inside of a loop, then outside of a loop when live-coding so that students learn the effects of placement on exceptions.

For more information or to report a bug, contact us at admin@csteachingtips.org. Built with Bootstrap. Powered by Drupal.

Privacy Policy