Ask HN: How to learn best practices when you have no one to teach you?
440 pointsI am currently working for a startup and am one of 3 developers. Most of my work revolves around building the API in Node + Express as well as some small projects with MongoDB. The other developers don't really assist me since they have their own projects to work on, and, honestly, they have less experience and knowledge than I do.
So my question is: What is the best way for me to go about learning best practices in API development, or using MongoDB, or even just being a better software developer in general?
Comments (197) 98 threads
Earlier commentsI google around for recommendation on books and get books and read them and do projects. Books will go over a concept but it won't be enough for me to get it in my head so I would google around for blogs about the concept and do the examples in those blogs. Here's an example of me practicing the GenServer concept (https://github.com/mythicalprogrammer/elixir_genserver_pract...). I also find code reviewing of library very helpful in writing better code. I used to do this with Scala and Javascript.
Most of the stuff I've learned is on my free time and something I'm passionate about. Currently it's Elixir. I spent sometime reading and then did a project. Currently burnt out from the project but I learned a lot and I'll come back to it.
I know many people just jump in and do stuff. What works for me is to read a bit do project then read a little bit more. My elixir project went through 3 authentication systems btw. I started with Coherence then Guardian then Coherence and now POW. I relearn session and learn a bit more about tokens and API.
Now, here are what I think is the most important: experience, planning and critical thinking. Experience you gain overtime, there is no shortcut. But you can plan from the beginning, and think hard before you commit.
You're already asking yourself the questions. The internet is vast, there are lots of answers. And guess what, someone's best practices are someone's else bad practices. It's about your company trade-offs.
Since you are in a startup, you'll probably need to do lots of modifications on your business logic. That means for you, API development best practices includes planning for the future, so probably having versionned API. Is your business logic mostly about CRUD? Read up about REST. Or mostly about RPC? Might want to read up about SOAP.
You also need to know what's the time expectency of your code. Is it just a POC? Go ahead with the fastest, dirtiest way to do it. Is it a MVP that is going to change quite a bit? A bit cleaner, but you can get away with a few shortcuts. Or are you building a well-defined product that isn't going to change much? Document, test, and do it as clean as you can. You are still going to need to refactor a bit every year or two anyway, when you get more experience.
Keep at it long enough, while thinking about better ways to do things every day, and eventually you'll learn all you wanted to know. Don't worry, you'll still have a ton to learn, given the opportunity.
Why would one use SOAP over grpc in a new stack? Understandable in an old stack though.
Rest is gold.
Also, we don’t always get to choose the technologies of 3rd party providers with whom we are required to interface.
——
If not, it pains me to know that there still isn’t an answer besides, “quit and be skilled enough at determining that a company is good at teaching best practices.”
> books
Are a way to absorb information that the author thought a broad audience would want to know and be able to digest. They don’t replace being able to get detailed individual feedback on your work and your particular questions.
> make mistakes
In my experience, mistakes have one big flaw: They don’t teach you a way to do something correctly. It is possible to go into a situation thinking, “I don’t know what to do here and I need help.” And to come out of the situation saying, “Yep, I did my best and I failed in pretty much the way I thought I would. New information learned: none.” Ideally, you would be able to shop for or come up with a workable solution yourself. In reality, humans benefit greatly by learning from the past solutions of others and from getting personal recommendations.
1. Consume external knowledge by reading books, watching videos, taking classes, etc.
2. Apply the new knowledge, plus your intrinsic store of knowledge to whatever problem you're working on.
3. Note mistakes, lessons learned, synthesis of ideas between "new" and "old" knowledge, etc. Update your bank of intrinsic knowledge.
Lather, rinse, repeat.
All comments shown.
Couldn't load more comments. Check your connection and try again.