Skip to content

Instantly share code, notes, and snippets.

@devopsmariocom
Last active December 31, 2015 19:59
Show Gist options
  • Save devopsmariocom/8037153 to your computer and use it in GitHub Desktop.
Save devopsmariocom/8037153 to your computer and use it in GitHub Desktop.
Few thoughts on sustainable development
  1. Comment your code while you are coding, try to comment every line whit bit more complex logic, use http://yardoc.org/ and http://yui.github.com/yuidoc/

  2. Keep code structured to guide eye when one is looking thru the code

  3. Try to reuse things first, when you are about to do something first try to think if anyone has done that before(search current code base or google)

  4. Keep things modular and reusable, try to think about every method if it can be possibly useful for something else than what is your original purpose, if yes(even in future) then make it that way to allow reuse of such method

  5. Think simple after it’s done, when code is done look if it cannot be simpler, then refactor with primary focus on flow from top to bottom, eye start at top of code and goes thru logic till end(if possible)

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