Skip to content

Instantly share code, notes, and snippets.

@matthewmccullough
Created August 13, 2012 02:56
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save matthewmccullough/3336547 to your computer and use it in GitHub Desktop.
Save matthewmccullough/3336547 to your computer and use it in GitHub Desktop.
Rules of Programming

Rules of Programming

  • All Development is Interface Driven Development, be it Web, Desktop, Mobile, or API.
  • statics or class methods should be inconsequential and isolated to be used in a production method. Inconsequential means that the method doesn’t go outside the VM to another system, doesn’t block, or requires a hard dependency that isn’t guaranteed.
  • The new keyword should be inconsequential and isolated to be used in a production method, unless it used inside of either a Builder or Factory pattern.
  • If a class has already met the requirements for it’s existence, leave it alone, use the Adapter, Observer pattern or AOP to enhance it’s functionality.
  • Using floating-point may not be a good solution, use an integral based number for the smallest unit in your domain (e.g. seconds, pennies, pence)
  • Copying and pasting the same thing multiple times is a sign that refactoring is in order, but do so after making sure your tests run.
  • Matthew McCullough: The tool you use the most should be the most helpful and least intrusive.
  • Matthew McCullough channeling Neal Ford: The third time you start to do something semi-tedious or annoying in a manual fashion, stop and immediately automate that task.
  • atthew McCullough: Always be in the mode of exploring tools and giving them a five-minute litmus test.

Sourced from:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment