Hacker News new | ask | show | jobs
by stackzero 2654 days ago
Some practical things that have helped me, by no means an expert:

1. Practice writing new project's from scratch. not so much todo apps but challenge yourself e.g. I wrote my own function as a service engine

The main point of the exercise is to show: - Best practice is contextual, so first you need context ;) - Think about the big picture and all the pieces to get there - Repetition. It will help you improve your development flow and process, and become better at your craft

You can borrow design/implementation ideas from current projects that you're familiar with or use a design pattern you found on a blog etc. it will help you recognize when certain practices are the "best".

2. Rewrite this code continually. Is there a better way? more concise? faster? easier to test? It seems there's many ways to do the same thing. Which one is best depends on the situation.

3. Optimize last. No seriously. If I could count, the amount of times I've thrown away code because I optimized to early...

tl;dr best practice needs context. This requires big picture thinking. Learn to recognize contexts and the best practices are alot clearer