I think read the docs is a fine advice. But docs rot, and most docs are bad. If possible, read the code?
Reading the code doesn’t mean grokking the entire cpp code base while reading by candlelight in 1000-day monk mode. Reading the code means understanding the code path—descending from your first contact point down to the stateless functions that does the heavy lifting. This can be done with an actual debugger and stepping through each stage and see how the sausage is made. Reading the code is slow, sometimes painful. The alternatives are worse.
A bad advice is to use a “better” language. I guess that Raemon uses weakly typed languages beyond the base rate of js/python users. Many of the complaints here don’t really make sense if you write in apl, haskell or even rust. When you create the right abstraction, or best, have no abstraction, there is no meta state of the program to keep in your mind.
Typescript is nice in that you can usually find the code published somewhere. So you usually can find the actual code flows in the nether regions of the library that’s tripping you up. Of course this isn’t that helpful when it’s in your code, and even less helpful when it turns out you’re using a slightly different version that the code you’re looking at (always check if the version makes sense!). But it’s usually better than reading the docs (which do rot).
Typescript is also nice in that it’s (annoyingly) opinionated. This works to your favour, as good that looks “right” is correlated with it actually being correct.
I think read the docs is a fine advice. But docs rot, and most docs are bad. If possible, read the code?
Reading the code doesn’t mean grokking the entire cpp code base while reading by candlelight in 1000-day monk mode. Reading the code means understanding the code path—descending from your first contact point down to the stateless functions that does the heavy lifting. This can be done with an actual debugger and stepping through each stage and see how the sausage is made. Reading the code is slow, sometimes painful. The alternatives are worse.
A bad advice is to use a “better” language. I guess that Raemon uses weakly typed languages beyond the base rate of js/python users. Many of the complaints here don’t really make sense if you write in apl, haskell or even rust. When you create the right abstraction, or best, have no abstraction, there is no meta state of the program to keep in your mind.
FYI I work in typescript
Typescript is nice in that you can usually find the code published somewhere. So you usually can find the actual code flows in the nether regions of the library that’s tripping you up. Of course this isn’t that helpful when it’s in your code, and even less helpful when it turns out you’re using a slightly different version that the code you’re looking at (always check if the version makes sense!). But it’s usually better than reading the docs (which do rot).
Typescript is also nice in that it’s (annoyingly) opinionated. This works to your favour, as good that looks “right” is correlated with it actually being correct.