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.