Skip to main content
CS Teaching Tips

Main navigation

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

Ensure loops and conditionals are consistently formatted.

  • This will help students to understand the basics of each loop and conditional statement.
  • It will also help students avoid unnecessary refactoring of code later on.

More about this tip

Tags

  • Programming Concepts
External Source

“The ugliest beautiful line of code” (blog post) by Neil Brown

Other Tips By
Other Tips By Neil Brown

Similar tips

Misconception: In C-based languages, students don’t know when to use and not use pointer derefrences (*) and reference-operators (&).
Encourage students to get the for-loop counter right before adding code inside the for loop this will reduce the amount of time spent troubleshooting for-loops and ensure students are scaffolded well.
Misconception: Students confuse conditionals and events in event-based languages such as Blockly.

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

Privacy Policy