←back to thread

628 points kiyanwang | 1 comments | | HN request time: 0.898s | source
Show context
gwbas1c ◴[] No.43631365[source]
> Read the Reference

> Don’t Guess

I find that, when working with a new "thing," I often like to guess for about an hour or so before I really do a deep dive into the reference. Or, I'll read a stackoverflow answer or two, play around with it, and then go to reference.

Why?

Often there's a lot of context in the reference that only makes sense once I've had some hands-on time with whatever the reference is describing.

This is especially the case when learning a new language or API: I'll go through a tutorial / quickstart; "guess" at making a change; and then go back and read the reference with a better understanding of the context.

BTW: This is why I like languages and IDEs that support things like intellisense. It's great to be able to see little bits of documentation show up in my IDE to help me in my "guess" stage of learning.

replies(11): >>43631414 #>>43631448 #>>43631816 #>>43633123 #>>43633315 #>>43633373 #>>43634655 #>>43636297 #>>43636782 #>>43637333 #>>43638699 #
1. alphazard ◴[] No.43636782[source]
I think people are going to interpret "Don't Guess" in a way that is totally impractical and not what the best programmers do.

You should have a strong sense of the model that a tool or library presents to you as the consumer. And you should use that model to "guess" about the behavior of the tool. You should choose tools that are coherent, so that your guesses are more accurate than not, and avoid using libraries/tools with many special cases that make it hard to "guess" what they do.

The best programmers do not double check the docs or implementation for every function that they call. They are good at writing tests that check lots of their assumptions at once, and they are good at choosing tools that let them guess reliably, and avoiding tools that cause them to guess incorrectly.

Leverage in programming comes from the things you don't have to understand and the code you don't have to read in order to accomplish a goal.