Coding Philosophy Thu, 07 Dec 2006, 11:24 EST

  • Before writing code, ask “How will I debug this when it doesn’t work right?”
  • Compartmentalize the project into small, self-contained modules, which can be tested and debugged independently.
  • Save programmer time first; save CPU time second
    • Don’t optimize prematurely.
    • Write code in a high-level language first, such as Python.
    • Rewrite code in a faster, low-level language, such as C, only as needed and only after all the algorithms are debugged.
  • If the code is hard to understand, unravel it and rewrite it.

permalink | home | Send email

Older Entries