←back to thread

628 points kiyanwang | 2 comments | | HN request time: 0s | 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. perrygeo ◴[] No.43633123[source]
Agreed. Make a guess, then verify that guess with running code, repeat.

I'm surprised this is controversial; engineering ostensibly follows the scientific method. Without forming hypotheses and testing them, there is no scientific method. Unless we want to nitpick the difference between guessing and hypothesizing, making guesses is a critical part of programming.

I always come back to Peter Naur’s essay "Programming as Theory Building". It's 40 years old now but still nails the essence of programming. The value produced by programming is a shared working theory of the system, not the source code itself. I can't see how you would develop a sufficient theory without first forming hypotheses.

replies(1): >>43636508 #
2. d0mine ◴[] No.43636508[source]
Formulating your assumptions before you run code and check saves you from rationalizing after the fact whatever behavior you happen to observe. Invalid predictions help improve understanding, learn.