Lessons learned from a career in software development.
- Don't overthink it. If you can think of a simple, brute-force approach and a more complex approach, try the simpler one first. Often it will be good enough.
- Read the error message. Every time.
- Validate the data before debugging your code.
- That is, if it could be a data problem or a code problem, suspect the data first. This can save you a lot of time.
- Make sure the code you're running is the code you think you're running.
- E.g. re-compile, re-install, clear caches as needed.
- Don't fail silently if you can avoid it.
- Don't run multiple versions in production. If you do, have a plan for when you come to regret it.
- If you are uncertain about how long some code will take to run, add some indicator of progress. Often you will wish you had done this after you have started a process and realized it will take a long time. Even better, do some back-of-the-envelope calculation ahead of time to estimate how long it will take.
- Even if it's a one-off script, make your data migrations idempotent. There's a good chance you will have to reuse it.
- Recurse Center Manual: This guide has many great tips, especially on the social front. For example: no feigning surprise.
- Quotations for Learning and Programming
- Ten Principles for Growth as an Engineer