Ask HN: How to learn best practices when you have no one to teach you?
131–140 of 209 posts
Re: Ask HN: How to learn best practices when you have no one to teach you?
#132Re: Ask HN: How to learn best practices when you have no one to teach you?
#133ps. using the youtube 2x playback speed option can really help digest lots of video content quickly [3]. I use this almost exclusively on youtube now.
[1] NodeConfEU 2018 - https://www.youtube.com/watch?v=UMgMSb7d-Os&list=PL0CdgOSSGl...
[2] MongoDB - https://www.youtube.com/user/MongoDB/videos
[3] https://sysadmincasts.com/episodes/52-video-playback-speed
Re: Ask HN: How to learn best practices when you have no one to teach you?
#134There is about five to ten books that will be commonly recommended to be a better programmer. Code complete, Smalltalk best practice patterns, clean code etc. You can find lists online. Read a few that seem interesting and at least you will have common ground with many other programmers.
Re: Ask HN: How to learn best practices when you have no one to teach you?
#135Reading articles and books will teach you things that sound good but may not hold up in real life. Code is battle tested and real. To learn about art, you can read volumes about form, shape, color, composition etc. but you really need to look at great art. Same with code.
Of course, you may wonder "how do I find good code?" I would just try to find high-profile OSS that deals with whatever kind of tech you are interested in. It may not all be good, but if you diversify the code bases you read, you will notice the differences and learn for yourself why some might be better than others.
Re: Ask HN: How to learn best practices when you have no one to teach you?
#136Re: Ask HN: How to learn best practices when you have no one to teach you?
#137For example, I built my first production application taking a database connection from the pool in middleware and then returning it to the pool at the end of the response. My much more experienced friend looked at my code and told me that connection pools are made for taking out connections and returning them to the pool as soon as you were finished with them. And that I should use timestamptz instead of timestamp. And so much more.
It makes me cringe to think how long I would've gone without figuring out these things had it not been for someone to set me straight early on.
Re: Ask HN: How to learn best practices when you have no one to teach you?
#138Earlier quoted context omitted.
This. I have been looking for a company to be mentored at for the past 8 years. They don't exist (well they do, but they are few and far in between - and it varies from team to team even in a company) The way I've learned is through books/talks, common sense (often things are clearly terrible for obvious reasons), people willing to take risks on giving me projects, and sweat/mistakes/learning how to focus on the righ…
They do but they're extremely rare. Before I started for myself I spent a lot of time mentoring my team. Most if it was building their confidence up so they could think critically themselves whilst reading the right books. I myself have never had a technical mentor. Never needed one. What I did need and have were mentors for the other 90% of being a successful professional (and people who built my self confidence up)…
Re: Ask HN: How to learn best practices when you have no one to teach you?
#139This is probably not popular advice, but of all the places I've worked, Google seemed to have the highest standards for best practices I've seen. I recommend paying attention to Google's best practices, in their blogs, certification programs (like the google cloud developer cert), Coursera courses, product docs, codelabs, style guides, git code, etc. Obviously everything they do won't be a right fit for your company, but it's something to aim for.
Enforce code style (be specific and use a linter), and write tests as you go. Try to keep bad code out of your repo before PRs can even be merged. I use Jenkins and git hooks to enforce this for the whole team.
Draw up design docs and understand business needs before diving into projects and features.
Understanding good architecture and operational principles will make you much more valuable as a developer than your peers. Read the Google SRE book, it's free. Also read http://highscalability.com/ articles and learn from other companies' triumphs and mistakes.
Books about architecture include the micro services book by Sam Newman. You may not ultimately be responsible for making these decisions, but demonstrate your value by being able to understand and provide quality feedback to your tech leads and architects.
Study and learn about project management techniques and craft/enforce your process. Not everything boils down to good code and architecture, if your development process sucks, everything else will definitely fall apart.
Be able to spot the flaws in your organization and offer ways to improve their process and quality. By doing so, you will also improve your own.
If you have a cloud provider and a support package, use it often. Most of what I know about best practices came from supporting Google Cloud customers, seeing what they were doing poorly, and working together to find better solutions.
Be sure you're not just abstracting your API libraries, but your use of 3rd party libraries and services as well. You don't want to have to refactor all of your code just because you need to swap out one technology for another.
If you're actually better than the rest of your team, you should be mentoring them. Teaching others is incredibly helpful at solidifying our own understanding of topics, and exposing the gaps in our knowledge.
Read "The Phoenix Project". It probably applies more for the DevOps/SRE/Management side of things, but I think there are VERY important lessons to be learned for everyone in there. Highly recommended.
Re: Ask HN: How to learn best practices when you have no one to teach you?
#140Earlier quoted context omitted.
My inner Northcote Parkinson sort of triggers on 'best practices'. Best tends to imply that all the other ways to skin the cat are 'bad.' Which is likely objectively untrue. Idiomatic is more neutral and means basically just do it the way everyone else tends to. The real advantage to that is you generally avoid pitfalls and annoying other coders.
They can mean very similar things so that the question could be: How to learn idioms when you have no one to teach you?