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 commentsSpecifically, how do you learn how to build a company around your product? Or how to build a board of advisors/directors? What are the best practices around managing those?
How do you shift your cash flow management thinking from spending out of the reserves built up, to spending out of future cash flows?
In other words, aside from building product, there are so many other skills that a founder has to learn as they grow their company. I assume most YC companies learn this stuff from YC or their batch mates that have done it before them.
But for those of us not in the Valley or in YC, how do we learn this stuff?
Also, I guess the main premise behind my question was how do we learn best practices in company building in general? Ie how do we build the machine that builds the machine using best practices for everything, or as many things as possible (for both tech and non-tech companies)?
Take Mongo for example: is the issue that your database keeps going down? If you frame it that way, it doesn't take long to discover clustering, replicasets, and monitoring. Is the issue that your queries are hammering the server? If so, googling that leads you down a months-long rabbit hole that ends in indexing, caching, and denormalizing strategies. Are you frustrated with the amount of boilerplate needed to get mongo data to the frontend? That's a good hint that you're in the market for a library/framework that might help with that.
Much in the same way that one of the hardest parts of solving a bug is knowing what to Google, specifically defining what "better" looks like is the first step towards getting there.
2. Experience pain in the form of late, buggy software and angry clients.
3. Read books and work on side projects. (Martin Fowler’s were my favorite).
4. Repeat for 5-10 years with hopefully ever-decreasing amounts of 1 and 2.
You probably think I'm kidding...
You can rattle off quotes and documents all day, but this doesn't teach 1% as much as the direct pain of dealing with st on the job.
If you made the same mistake twice, then you were in trouble.
I guess I’d be worried about classifying. “Play” part of discovery might have multiple cases of (nearly) identical “mistakes”.
“Experience: that most brutal of teachers. But you learn, my God do you learn.”
How Developers Stop Learning: Rise of the Expert Beginner https://daedtech.com/how-developers-stop-learning-rise-of-th...
How Software Groups Rot: Legacy of the Expert Beginner https://daedtech.com/how-software-groups-rot-legacy-of-the-e...
Continue this thread — 5 replies
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 right things through experience
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).
This, of course, coming from a person with burn marks :)
10K line UserManager classes “work”.
That’s how you get the “expert beginner”.
https://daedtech.com/how-developers-stop-learning-rise-of-th...
The only feedback you get as a sole developer are your compiler and errors in production. You would never know that it isn’t a good idea to write your own AcmeDatabaseManager or AcmeLogManager.
Reading. Plenty of books, blog posts, and forum posts point out that you shouldn't have "10 KLOC UserManager classes".
The thing is, one has to figure out how to integrate "book learning" AND real world experience, so that they're constantly synthesizing a newer, better understanding.
[1] I’ve noticed that in codebases of Apache Spark, Apache Oozie, Apache Cassandra, and Firefox.
Continue this thread — 3 replies
Keep looking at it and ask if you are doing something redundantly.
The only feedback you get as a sole developer are your compiler and errors in production.
False. There's plenty of resources online. There's plenty of code to read online. There's plenty of potential critics online.
You would never know that it isn’t a good idea to write your own AcmeDatabaseManager or AcmeLogManager.
Unless you've read the Internet. There are plenty of database and log utilities out there.
Because it hurts.
Continue this thread — 3 replies
It's a good question, one that's a good nod towards the principle that you will inevitably learn more slowly if your own mind is the only one you have to work with (and lately I've been thinking about how I can get in a professional position where I'm near the bottom end of the intelligence and/or domain knowledge range in the room for this very reason).
But one answer might be: you'll know. "Works" is shorthand for satisfying a certain set of expected conditions. There's a core of reliable behavior in the software that's the minimal working definition of "works" ... but there's also the question of relative ease when it comes to reading, understanding, and changing/augmenting the code you have, or how the code "works" as an expression of the system for the purpose of presenting an interface to the developer.
Chances are pretty good you know the feeling of writing something that you either (a) are uncertain is really adequate as far as the developer experience goes or (b) you know is probably not adequate but seems to get you to the minimal definition of "works" fastest.
Listen to that feeling. Interrogate it. Try something different. Observe the tradeoffs.
Continue this thread — 4 more replies
Continue this thread — 5 more replies
All comments shown.
Couldn't load more comments. Check your connection and try again.