Hacker News new | ask | show | jobs
by onion2k 2813 days ago
Over the past 20something years of being a developer I've found there are a lot of things that seem obvious to me now that junior developers don't do by default. Looking back I wonder when I started doing all these obvious things. Presumably, if I didn't discover them myself, it was when I was told about them or I read about them. If no one is writing these "frivolous" things down then how will juniors learn?

If this helps a few new devs who don't have access to a good mentor (because, say, their mentor makes assumptions about what's obvious..) to tell them about this idea then it's automatically a useful post.

2 comments

The best habit that any developer can have is reading code. It’s shocking how few devs spend time reading code; whether the code is from library dependencies or entirely unrelated third party projects, I always learn something new just by reading it.

Not every developer is blogging their best practices. If you want to see them and learn from them, the best place to look is in the code.

Honestly I think we should be reading at least 10x the amount of code we write. For every novel an author writes, how many novels do you think they read? Certainly more than ten. Why shouldn’t we do the same? In a world awash with open source code, there is really no excuse not to be reading as much of it as possible.

There are two interesting parts to reading code.

  - Working out what it actually does, and why

  - Working out why somebody *wrote it in that way*
The former is usually not too bad. Occasionally there will be a comment to help with the latter (although rarely ime). The latter is basically impossible. I can ask 3 other devs, they'll all disagree. Some like the style, some hate it. Each will complain about different aspects, and none of them would write it quite the same for ~reasons~

Maybe it's just me vOv

Not sure if this is "obvious" or not, but a very simple thing I've been doing for the past 15 years is to write a short log entry every time I encounter an especially tricky bug.

I've found this to be a really good way to learn from bugs. There is something in the act of writing it down that makes the lessons of it stick better in my mind.

More details here: https://henrikwarne.com/2016/06/16/18-lessons-from-13-years-...