Best-practice tips for programmers

I wrote this set of programming principles for my team to follow back in 2012. Iā€™m sure there are many like it, but this one is mine. May you find it useful.

Writing code

Try to write expressive code.

Beware code bloat - adhere to the YAGNI principle

Practicing Behaviour-Driven Development can help with both of these aims.

Do less: Before writing a new piece of functionality, go and look for similary solutions that already exist and extend them.

Code architecture

Namespace your classes, and code to an interface (this is an implementation of the Design by Contract principle), and make your interfaces (both programming interfaces and user-interfaces) as simple as possible.

Try to learn and comply with all 5 principles of SOLID (watch this great video).

Learn as many Design Patterns as you can to inform your coding, but beware of implementing them blindly. Developers can be over-zealous in their use of Design Patterns and may end up over-engineering a solution.

Some useful design patterns:

Tools

Try to learn an IDE with advanced features. These can really save you a lot of time:

Some suggestions:

By @nottrobin