

Ask HN: What do you think while developing? - gonification

I recently perused an article on HN stating many programmers don&#x27;t think. I found this intriguing and began to ask around. From the small sample, it appears true in some regard. There are many related concepts such as flow and familiarity in the vein of muscle memory.  I&#x27;m interested in feedback and discussion.<p>Do you think when you program&#x2F;code&#x2F;design? Please elaborate.<p>Do you maintain a dialogue in your head? or perhaps you are coding while pondering the far reaching ramifications of what you&#x27;re currently typing?<p>Try it and see. Is not thinking a good state? is thinking about something else more beneficial? is deliberate, mindful programming better for you? Perhaps one method contributes more cognitive dissonance, leading to burnout easier?
======
DigitalSea
Weirdly enough, I have never stopped to think about what I think when I am
coding. I actually am not thinking of anything, at least not subconsciously
anyway. I find I talk to myself out loud quite frequently, more in the form of
questions and expressions, "Why are you not working?", "Line 38, line 38",
"Hmm interesting" and "WTF?"

When I am not coding, I like to play guitar. I find the two are quite similar
in that I don't think about what strings I want to play or think about the
chords, it just happens thanks to my muscle memory. I actually don't think at
all when I play guitar and the times I am aware of this fact, it actually
throws me off and messes up my playing when I attempt to think. This is how I
code, I don't think about what I am going to write, I just know like it is
embedded in my muscle memory.

~~~
gonification
From what I've run across, your experience seems quite common. It also seems
common that people don't consider what they think while programming.

Do you think that deliberate thought would interfere with coding similar to
the guitar?

------
informatimago
Obviously, the problem is in the definition of "to think".

Some people think that to think, is to have some internal word-based
discourse.

And indeed, when you are learning, eg. mathematics, you are transmitted a
formal discourse system, such as two plus two equal four, eight plus five
equal three carry one, plus some rules such as: add digits and carries from
the right, to the left.

But notice already the limits of this system: even when you're a young adder,
you won't keep telling you the rules: "add digits and carries form the right
to the left", or current adding column is the second from the right, let's
move to the next column on the left.": you JUST DO IT.

Ie. once you've learned the rule, you apply it without thinking. (I mean,
without this kind of verbal discourse). Once you've learned the tabular data,
you also use it without needing to recite it verbally.

This is the same when you learn music, cooking, bicycling, or anything. At
first, you have some verbal description of what you should do, step by step,
and you may "think" about it to interpret the "program". But if you really
learn it, your brain will "compile" this verbal program into your
subconscious.

And this is why it is important for children to learn mathematics reasoning
and programming, not because they'll become mathematicians or programmers, but
because they'll learn reasoning processes that their brains will compile and
that they may forget the sources (the verbal lessions given to them). But
their brains will have been hard wired with those compiled logical reasoning
programs that will make them and the world better.

Oh, and yes, when you know programming, your verbal centers are free, so you
may use them for other things, such as temporary storage "line 38, line 38"
:-)

This is also a reason why I'm not sure vocal interfaces could be made quite
usable for programming (or for mathematics, or polytonal music, or for sports
(try to tell a robot how to move each of its muscles to jump over a bar)).

------
LarryMade2
Usually I'm asking myself questions (what do I need here? Do I need to add
something else if X happens?), and putting together a solution to a puzzle -
this is stuff I've already mostly worked out, mainly just replaying my
thoughts.

Also I think of what will the computer do with what I'm coding, how things
will calculate, or how the user will see it or respond, part of it is on the
fly debugging, part optimization, often during this, I also think of
additional code for optimization elsewhere, fixes or new features.

One thing I know is when I'm in the zone my human interaction skills goes
down, not much for platitudes or chit chat, unless it's about the stuff I'm
working on.

------
josephhardin
Usually my thought process goes something like: "Hmm, that's weird, why
doesn't this work"

"Oh..duh"

"...okay nope that wasn't it. "

...googling

"Ahh that should fix it"

"F!&*"

"Oh, duh that was simple. That should fix this part and then I should get this
to output the right....hmm, that's weird"

------
anon3_
I actually wrote my thoughts in a diary (edited a bit)

Everything I do has a purpose. Often when I'm programming, I'm consolidating
effort...

I don't build shortcuts. I'm not programming to survive. I'm programming
foundation to build on top of. The potential is limitless.

I'm building so other people can use, so I document the hell out of it.

I'm building so other poeple can use, so I follow the patterns of the best
applications out there.

I'm building so other people can use it to function and save huge amounts of
time - get done lots of stuff to great effect, very simply. To remove
duplication from their lives.

DRY > Duplication. Macro > Repetition. Abstraction, Idiomatic > DSL /
solipsism. Pragmatism and Wisdom.

Write code to be simple. Write it to function.

Utility. Build to the stars.

This _me, who I am, my being_ is truth, ignore the liars. Just build.

