Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Which is better than thinking you know what you don't know.

The most important thing impatient programmers need to learn is TO NOT BE IMPATIENT, not how to learn a programming language in X minutes.

Learning patience will help you in all aspects of life.

Do you really want to share the road with somebody who learned to drive in 5 minutes, and doesn't have the patience not to speed, tailgate, run stop signs, red lights, and pass you on the right by driving on the sidewalk?

More "real" advice: Read LOTS of other people's code.

Need to use a library? Then first read the documentation, then read the source code, so you actually understand what it can do, how it does it, that it's not magic, what its limitations are, how to use it, and if you actually need it.

I've been working on learning and reading the D3 data visualization library for several years, bit by bit. It's a wonderful library, there's a whole lot to it, the code is brilliant and expertly written, and I've learned a LOT about JavaScript programming in general by reading different parts of it again and again.

https://github.com/d3/d3

Mike Bostock: 10 Years of Open-Source Visualization: Did I learn anything from D3.js? Let’s see…

https://observablehq.com/@mbostock/10-years-of-open-source-v...

>In honor of D3 1.0’s tin anniversary, I thought I’d reflect on lessons learned. This isn’t intended to be too comprehensive or serious — just a handful of observations as I look ahead to the next ten years. But I hope a nugget or two will interest you, too.

HN discussion:

https://news.ycombinator.com/item?id=26240339



> Need to use a library? Then first read the documentation, then read the source code, so you actually understand what it can do, how it does it, that it's not magic, what its limitations are, how to use it, and if you actually need it.

That's the opposite of thread OP's advice. If you need to use a library and you're impatient, find the closest example to what you want to do and then hack away at it until it does what you want.


It's an elaboration of his advice, not the opposite. Please be patient enough to read all of the OP's advice:

>But read articles every once in a while on best practices so you aren't learning the "wrong" way to do things.

>The big drawback is that there are a lot of Google results that are outdated, novice, or flat-out wrong.

>My general advice: consult official docs whenever possible

After you read the official docs, and decide you actually want to use a library for something that's not trivial, one-off, or throw-away, it will benefit you to actually read the source code itself, which is by definition not out-of-date and incomplete, like so many of the articles about the library you can find by googling and reading stack overflow.

In my book, hacking away at using a library until it does what you want involves reading the source code in the developer tools by setting breakpoints and browsing the call stack, function definitions, local variables, and data structures, while the code is alive and running.

Once you've done that, it's a lot more interesting and easier to then read the entire source code on github front to back, to learn the library well, because you will have a lot more context about how it's actually used and fits together, its dynamic runtime behavior, and the shape and texture of its objects and data structures.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: