Skip to main content
CS Teaching Tips

Main navigation

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

CS 1

Introduce object states early when teaching object-oriented programming.

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.

Ensure young CS students check their functions with a variety of inputs, as well as with edge cases.

Have students keep a “bug collection” in a journal so they can more easily recognize and eliminate bugs in the future.

Have students break their code into smaller pieces to find out where the bug might be.

As a debugging technique, have students write out their programs in their spoken language and compare their description to the code in order to find bugs.

Help students find bugs by drawing or writing out what their code does at each step.

Talk through your code as you write it so students learn how to approach problems.

Use Practice-It as supplementary Java problems for an introductory programming course to give students more practice.

Pagination

  • Previous page ‹‹
  • Page 18
  • Next page ››
Subscribe to CS 1

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

Privacy Policy