←back to thread

628 points kiyanwang | 9 comments | | HN request time: 1.024s | source | bottom
1. dilawar ◴[] No.43630314[source]
> "Don’t go to Stack Overflow, don’t ask the LLM, don’t guess, just go straight to the source. Oftentimes, it’s surprisingly accessible and well-written."

It's a bit like math books. I dreaded reading formal math during my engineering -- always read accessible text. Got a little better in my master's and could read demse chapters which got to the point quickly. At least now I can appreciate why people write terse references, even Tutte books.

Some references are a pleasure to use. For rust crates, I always go to docs.rs and search there. It's just fantastic. i can search for a function that returns a particular type or accept a particular type etc. hoogle from Haskell was lovely too when I took a functional programming course in college. Cpp reference is also pretty good -- thanks for adding examples.

Today I was reading boto3 python library docs, and I immediately missed docs.rs!

replies(8): >>43630559 #>>43630585 #>>43630805 #>>43631296 #>>43631397 #>>43632993 #>>43638165 #>>43638790 #
2. Zambyte ◴[] No.43630559[source]
I haven't used Haskell in years, but I still find myself wishing for Hoogle no matter the tool I'm using. Being able to just go "I know I want a value of type X, what functions return type X?" is so useful. I think Scala may be the only other language I have used whose docs let you search by type signature like that.

I have been playing around with Zig a lot lately, and their doc system is quite nice too. I particularly like how they will embed the source of how what you are looking at is implemented, and often an example of how it is expected to be used. Being able to see the language in action all over the docs has helped with making it super easy to pick up. Being able to search based on type signature a la Hoogle would really be killer though.

3. nickjj ◴[] No.43630585[source]
I think this also ties into using tools that help faciliate this workflow.

Being able to jump to a definition of library code lets you really quickly move from your code to some function you're trying to figure out. With code editor support this is a seamless experience that can happen without a real context switch.

Without this, you might leave your code editor, Google for the project it's related to, find it on GitHub, open up the "dev" version of GitHub (hitting . when logged in on a repo's home page) so you can explore the project, then do a project search for that function and wade through a bunch of results until you find it.

That or find the code locally where your package manager might have saved it but if your app is in Docker that could be a problem because it might not be volume mounted so you won't be able to explore it from the comfort of your local code editor.

4. WillAdams ◴[] No.43630805[source]
Powerful argument for Literate Programming:

http://literateprogramming.com/

The two best programmers I worked with had well-thumbed copies of Knuth's TAoCP....

5. ClikeX ◴[] No.43631296[source]
> Oftentimes, it’s surprisingly accessible and well-written

I'm happy this person works with quality software. I haven't been always been as lucky.

6. palmotea ◴[] No.43631397[source]
>> "Don’t go to Stack Overflow, don’t ask the LLM, don’t guess, just go straight to the source. Oftentimes, it’s surprisingly accessible and well-written."

> It's a bit like math books. I dreaded reading formal math during my engineering -- always read accessible text. Got a little better in my master's and could read demse chapters which got to the point quickly. At least now I can appreciate why people write terse references, even Tutte books.

I don't think that's what he means by the advice. I think it's more about systematic knowledge vs. fragmented knowledge. Someone who "learns" through an LLM or Stack Overflow is not going to have the overall knowledge of the tool to be able to reason what's available, so will tend to use it in very stereotyped ways and do things in harder ways because they don't know what's possible. You can still get that systematic knowledge through an accessible text.

7. postalrat ◴[] No.43632993[source]
It can be a bit hard to go to the source when you don't know the name of your problem.
8. weakfish ◴[] No.43638165[source]
God, the boto3 python docs are _insanity_. The lack of type hints, having a single method for getting a client that could be for 100 different services…

For the uninitiated, boto3 is the official AWS python library. To get a client for, say, S3, you do `boto3.client(‘s3’)` - instead of the sane thing, like, you know, `boto3.s3.S3Client()`

9. jilles ◴[] No.43638790[source]
Most projects should follow diataxis and we’d be in a lot less pain