One of my biggest growth moments as a programmer was realizing that libraries I use are just code, and I could read them directly rather than puzzling it out from the docs. Even today, I am surprised how much faster I move every time I start reading a layer I'm building on.

Feb 20, 2022 · 7:19 PM UTC

70
273
49
3,392
Replying to @gdb @paulg
Is this a documentation problem? I often do this when documentation doesn't entail how things work under the hood. E.g. document doesn't unwrap all the magic logic.
2
4
Replying to @gdb
One of the biggest downsides of using python -- not that you can't look under the hood -- but often it's a bit scarier
4
10
Replying to @gdb
what a coincidence. recently had huge discussion at workplace regarding writing documenting APIs vs writing Really Obvious Code in monorepo. it is nice to dive into source if it's well written with good naming and SRP, but it's not always the case
1
1
Replying to @gdb
It's always amusing to me when I can identify from the docs that the lib is like 100 lines long. I'll usually just use those small ones as inspiration.
Replying to @gdb
I take it you've never worked with JAXB
1
Replying to @gdb
"Good design" partially means reading the docs is sufficient and you wouldn't need to look under the hood. Sometimes good docs can cover for bad design but usually not.
Replying to @gdb
Edited my first library this week and felt like a magician.
Replying to @gdb
it's really powerful if the compiler/interpreter of the language you are working with is itself written in that language. To really understand Ruby/PHP/Python, you have to study lots of C, with Go you don't have that problem.
8
Replying to @gdb @paulg
+1. Prob the most useful thing I learned at Google was how to read lots of code very quickly. It is a force multiplier to know exactly how your dependencies really work. It’s surprising to me how rare this trait is. I don’t think most eng proactively read code they didn’t write
1
1
35
Replying to @gdb
This isn't surprising given that documentation is either auto-generated and thus limited, done at the end to satisfy a to-do item and thus also limited, or passed off to an intern or third party and hence limited. Techies don't like documentation, so they de-prioritise it.
1