Lurker News
I 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 comments
marcamillion#
I love this question, but I would like to extend it a bit. Even though the body of the question the OP asked is about software dev specifically, how do you learn other non-software dev best practices when no one is there to teach you?

Specifically, 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)?

Townley#
It's hard to get "better" at something because it can mean so many things. Describing the attributes that makes you better with MongoDB, APIs, or software development gets you a lot of the way towards learning how to do it.

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.

johnwheeler14 replies#
1. Make lots of mistakes.

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...

satokema_work#
There's no substitute for direct experience.

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.

hprotagonist1 reply#
5. Ideally, make _unique_ mistakes.
reaperducer2 replies#
I had a boss once who called them "errors of enthusiasm," as long as they only happened once.

If you made the same mistake twice, then you were in trouble.

sawmurai#
Haha, I like that.
bch#
> ...as they only happened once. 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”.

jaclaz1 reply#
In one sentence (by C.S. Lewis ):

“Experience: that most brutal of teachers. But you learn, my God do you learn.”

beat2 replies#
Hopefully. A friend of mine once said "So do you have ten years of experience, or do you have one year of experience ten times?"
braindouche5 replies#
I've heard this old saw a million times, or maybe once a year for a million years, but what does it really mean? Nobody seems to be able to describe to me a developer with one year of experience ten times. What does this look like in practice?

Continue this thread — 5 replies

everdev#
This is the dirty secret of tech. We're almost all self-learning all the time. By the time it becomes more of a formula than an art, it'll be automated.
wolco#
repeat for new languages
smoe#
This I think makes the difference between people who follow "best practices" and people who understand why they apply certain practices or not dependent on the situation.
jb36891 reply#
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 right things through experience

radicalbyte1 reply#
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).

jamestimmins#
I think this is because "mentorship" is very hard to plan at the company level. My best mentors have been specific senior devs who were willing to share what they knew.
mrskitch#
++ to this. Experience is the best teacher, though I think it widely depends on the person learning. Some individuals will learn well from others' whereas others really need to feel the fire to know why it's hot.

This, of course, coming from a person with burn marks :)

scarface748 replies#
That really doesn’t help. How do you know that what you are doing is a “mistake” if it works?

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.

mindcrime2 replies#
How do you know that what you are doing is a “mistake” if it works?

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.

peller#
Yes. I would also include reading other more-experienced developers' code in bullet point #3. Pick a well-respected project from a language you're looking to get better at, and dive in.
badpun3 replies#
Funny thing is, if you look at codebases of some opensource projects [1] doing complex and ambitious stuff, written by some real experienced engineers, you’ll see the common „dogmas” (don’t have long classes, don’t have long methods etc. etc.) are not obeyed. And yet, they shipped very complex and successful software. It’s almost as if these rules are mostly arbitrary and don’t really matter.

[1] I’ve noticed that in codebases of Apache Spark, Apache Oozie, Apache Cassandra, and Firefox.

Continue this thread — 3 replies

stcredzero#
That really doesn’t help. How do you know that what you are doing is a “mistake” if it works?

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.

johnwheeler1 reply#
> How do you know that what you are doing is a “mistake” if it works?

Because it hurts.

scarface743 replies#
So even if you see that your 10K line UserManager class is hurting your velocity and you are spending more and more time maintaining your AcmeDatabaseManager and AcmeLogManager, you still don't why it's taking longer or what to do about it.

Continue this thread — 3 replies

wwweston#
> How do you know that what you are doing is a “mistake” if it works?

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

mikekchar#
I'll follow the pattern here of expressing incredulity on the fact that my personal way of dealing with this is different from everybody else's ;-) Read code. Look around the internet for projects similar to what you are working on. Try to find and fix a bug or two in each. Concentrate on how you feel working on these unfamiliar projects. Was it straightforward to work on it? Was it fun to poke into? Did you feel straight jacketed in your approach? When you submitted the fixes, how was the reaction? Was it easy to get a positive reaction? Did people thank your for your contribution but then rewrite everything you did? Did they tell you that you didn't understand the issue and reject your contribution? These are all big clues on the success (or lack thereof) in the approach taken on those projects.

Load more comments