Skip to main content
CS Teaching Tips

Main navigation

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

Prioritize straightforward, understandable code over unclear, shortcut-filled code to avoid confusion.

Share Prioritize straightforward, understandable code over unclear, shortcut-filled code to avoid confusion. with FacebookShare Prioritize straightforward, understandable code over unclear, shortcut-filled code to avoid confusion. with Twitter
  • If students cannot parse the code properly, they will not be able to understand what it is doing.
  • This is especially important for beginning students who miss fundamental concepts when trying to write elegant code without understanding the thinking behind it.

More about this tip

Tags

  • Development Methods
  • 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

Foreshadow arrays right after teaching for loops by showing students how to create a 1x6 grid using the rectangle object in the Java objectdraw library because visualizations built off of recently introduced material provide a useful transition.
Step through an accumulator pattern on board to make clear how variables change within a while loop to help students understand this confusing topic.
Show code where the name of the method’s actual arguments and formal parameters are different so students see first hand that these two items don’t have to match for code to execute and improve their understanding of scope.
  • 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