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

Be careful to introduce code that students are equipped to understand; otherwise, students may not be able to demonstrate their comprehension.
Misconception: students develop the habit of putting the type in front of variables; they don’t realize that this creates a new variable resulting in lots of variables with the same name.
Create a programmatic contract, a document that states students will break an assignment into smaller components, for a large programming project to give students experience with modular design.

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

Privacy Policy