It's been 10 years since I started my first job in the software industry. Here are 20 principles that I have learned and try to follow in my day-to-day life.
- Be humble - No engineer in the world knows everything, the same applies to you.
- Make it work, make it right (and sometimes make it fast).
- Optimize for change - Prefer duplication over the wrong abstraction.
- Always write tests - If you're not writing tests, you're testing manually.
- Solve 80% of use cases - You never gonna solve everyone’s problem.
- Prefer functional programming - It's easier to understand. If your code requires a Ph.D. to understand, you’re most likely doing it wrong.
- Delete as much code as you can
- Good Enough is Better than Perfect - Don't discard meaningful improvement just because it's not perfect.
- Criticize in private, praise in public
- Make notes - If you think you will remember it, you're lying to yourself.
- Talk to your users - The best software is built by engineers who have empathy for their users.
- Learn with intention - Practice with a clear and specific goal in mind - what you want to improve and exactly how (deliberate practice).
- Do not generalize early - Wait until you have at least 3 duplicates of code before you make an abstraction (aka. Rule Of Three).
- Fix broken windows - One hack in code leads to another hack. Soon your code will become unmanageable.
- Fix the problem - doesn't matter whose fault it is, it is your problem.
- Do what works, not what's fashionable - Try it first with a small team. If it works, expand. If not, abort.
- The best work requires a good rest - Regular time off is essential for top performance. You also don’t expect professional sprinters to sprint all the time.
- Take small steps - Big rewrites don't work. You will lose motivation and focus along the way. Aim to release daily. It gives you the freedom to change focus when necessary.
- Praise for good work - Something we've observed in animals, but works for people too. You will get better results when you praise people for good work rather than punishing them for a bad one.
- Perfect code doesn't exist - It's better to accept this as a fact rather than wasting time and chasing the impossible.