Writing Great Code

These are some principles that I find make me a better programmer.

  • Write as much down as you can. Whenever you are stuck or are planning architecture, pick up the marker and draw it out.
  • Spend more time on naming that you think you should. Good names make everyone’s lives easier later on and allow you to think more clearly about the code.
  • Your tests will tell you if your code is bad. If the tests are hard to write and you have to mock/stub too much, you’re doing it wrong.
  • Find time for external inputs. Books, videos, anything that gives your brain extra blocks to build it’s model of technology on.
  • Do all you can go reduce the amount of time that code is in a “not working” when making changes state. Go green – red – green, not green -red – red- red – red red – green.
  • Follow the law of Demeter where reasonable.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s