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.

Share Have students pay special attention to “off by one” bugs to help them avoid common mistakes in their code. with FacebookShare Have students pay special attention to “off by one” bugs to help them avoid common mistakes in their code. with Twitter
  • 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

Ask students “Do we need a loop here?” to help them determine the appropriate loop to use without having to know the proper syntax to write that loop.
Provide specific ways to get additional practice on material (e.g., Linked lists) because teachers often underestimate the amount of practice students need to solidify course concepts.
Highlight key differences between math, CS, and engineering to give students context for why CS is a distinct field in itself. Let students know that you don’t necessarily have to excel in one field to excel in the others.
  • CSTT Facebook
  • CSTT Twitter

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

Privacy Policy

  • National Science Foundation
  • Sage Fox Group
  • Harvey Mudd College