How a watch works ; Mechanical movement
Programming is so weird. You write thousands of characters and they all have to be just so or your program won't work. For instance, I ran into a problem that I could not solve, so I excerpted the offending section and posted it on the Go Language Help Forum:
I thought I had a simple expression in an if statement:if c2c >= (r2 + r2) {
but I couldn't make it work until I replaced (r1 + r2) with a single variable.
https://play.golang.org/p/juhYJaoq5p6Am I missing something?
There are some errors that the compiler will catch, like if you misspell a variable name. For instance, if I had typed 'r3' instead of 'r2', the compiler would have complained, but only if I had not created variable r3. And in some cases you can transpose expressions, or lines of code and even whole sections, and the program will run just fine. I liken it to virtual watch making. The only parts that matter are the working bits, and those have to be absolutely right.
Quora has a good post about this.
Update April 2018 replaced missing video with something similar.
No comments:
Post a Comment