External Exam Download Resources Web Applications Games Recycle Bin

Conventions

Algorithms can be designed using pseudocode (i.e., a simplified programming language, made up of of everyday language and programming conventions).

Pseudocode can copied and pasted as comments into later programmed code.

Naming conventions:

  • BOLDCAPITAL (use for keywords)
  • UpperCamelCase
  • camelCase (use for variables and functions)
  • snake_case

Names should be meaningful, e.g., score2 vs opponentScore

Layout conventions:

  • indentation: spaces at start of each line must be consistent for each code block level

  • modularity: functionality should be separated into independent, interchangeable modules