
The Lost Art of Typing Shit by Hand - 3stripe
https://daveceddia.com/the-lost-art-of-typing-shit-by-hand/
======
camtarn
Even if you're not literally typing things by hand, having an attitude of "I
won't use this code until I understand what each keyword is actually doing" is
very useful. As the article says - learn what each word in "public static void
main( String[] args )" actually means.

This is the primary reason why old-style Visual Studio Windows programming
really freaked me out: you start with a massive template, full of complex-
looking code, and you're expected to just ignore it and write your own code in
the little marked-out areas. I really like the new approach in C# using
partial classes: all you have in your source file is your own code, and it's
really easy to see how that maps to the UI that you're building. The rest is
under the surface and can be treated as library code.

~~~
hardwaresofton
Someone close to me has been learning to program (self-taught), and this is
what I've tried to impress the most, the path to being an intermediate level
programmer definitely cuts right through understanding as much as is
reasonable about the effects the text you type have.

I think it's also hard for this advice to help certain beginners if they don't
know where to stop when they start going for knowledge about what's
happening... It's so easy to start looking up keywords and all of a sudden end
up being bombarded with terms you understand even less.

~~~
ordu
If they don't know where to stop, then how they can learn where to stop? The
only way, I think, is making errors. It's nothing bad in taking a glimpse of
something too difficult to understand. Even failed attempts to understand
something too difficult is not bad. The only risk is the loss of motivation
because of failure.

~~~
hardwaresofton
So generally I would say that they learn where to stop (or never see the
depths of the endless pit that is knowledge in the first place) with the help
of a good teacher or textbook.

A textbook that tells you just what you need to know, and just enough of
what's happening under the covers to let you think you understand, and
solidify what you're learning

------
inputcoffee
Right now, somewhere on the web, someone is writing a blog post about how we
should not type things out by hand, why it is a waste of time, how the nature
of programming is changing, how the calculator meant that we no longer had to
do long division and other contrary points.

~~~
err4nt
Wouldn't that person just use a markov chain to generate the article instead
of wasting their time writing every point out by hand ;)

~~~
inputcoffee
That person might be using the markov chain to go to market fish that answer
this question now for all you people out there who know.

------
bdcravens
"How To Start Typing in a World With Ctrl-C"

Been a few years since a Windows machine was my daily driver, so I thought,
"What does breaking command execution have to do with anything?"

~~~
klodolph
Ctrl-C is how you exit insert mode when you're typing something in, obviously.
:-)

------
_virtu
I'm a big fan of typing new code. My most recent example was while learning
Webpack. You could pick from oodles of pre-existing configuration, but it's
meaningless if you just copy and paste it in to your editor.

I normally type something out and then if I can't come up with a moderately
reasonable assumption about what it does, then I'll pull up the docs and read
about it.

~~~
clifanatic
I find that typing things out by hand organizes my brain to focusing on one
thing at a time. If I read over a code snippet, I tend to sort of gloss over
it; typing it out slows down the thought process a bit so that I can focus on
some of the nuance.

~~~
username3
Watching presenters type code has the same effect.

------
johnmaguire2013
When I was 10, I literally taught myself to program by typing out open source
projects by hand, looking up the functions I didn't understand as I went.

I truly believe this is one of the best ways to learn.

------
bbctol
I don't remember which one, but one of the plethora of "teach yourself to
code!" guides floating around the web has all of their code snippets as
images, so every time you used one of their example programs, you had to type
it in by hand. It was horribly annoying (so I stopped,) but it was a
deliberate choice to try and force understanding.

~~~
dceddia
Yeah that seems to go a little too far. There are valid reasons for wanting to
copy-paste code, even if it should be typed out most of the time.

------
losteverything
Before keyboards everyone taking CPS at my university (1978) were taught to
write out code in yellow lined paper.

We handed in our code to the (female) adjunct for review. Run time was
expensive. Then we made our deck of run cards.

I used this "write it out by hand first " method during my entire tech career.

For me, writing it out was a really good way to learn (next to actually
teaching others)

------
paulmd
Up next week: "The Lost Art Of Rote Memorization".

You see, when I was studying for an amateur radio license, I had a
realization. Memorizing page after page of meaningless numbers and acronyms
could actually instill a sense of curiousity about what those numbers and
acronyms meant. What is a sideband and why does it single? Who is a Hertz? Why
would I want to limit third-order distortion to below 0.1% of the principal
frequency? You see, nobody had ever told me that it might be good to be
curious about the thing I'm doing!

Sorry, this is meaningless drivel. Yes, you should know what the keywords do
in a function declaration, but once you are aware of what 'static' means then
typing it yet one more time does not help you whatsoever in the least. Yes,
you should know know what various delimeters do in your language, but if
you're not sure just go look it up, it doesn't make sense to fight it.

The reality is that there are all kinds of things that are best left in
reference material. I have the Regular Expression Cheatsheet pinned right next
to my desk; I could easily write a regex without it but by having a reference
right there I conserve that mental bandwidth for tasks that matter. Pop quiz:
which is the code for a word character, \w or \W? Is that something you want
to be thinking about while you're also trying to juggle business logic for
three other classes?

The same thing applies to all kinds of other things. We have documentation for
a reason, memorizing the order of function arguments for a function I only use
once a year is a waste of brain space. Some functions have all kinds of quirky
behavior that you really need to double-check unless you use it daily - for
example, anything in the C stdlib. It's not worth introducing bugs for the
sake of avoiding using your IDE.

It's true that for skilled programmers, most of what we do is thinking about
how to solve the problem rather than mechanically typing it in. _But that 's
no reason to make the act of typing it in needlessly difficult_. Programmers
have been using intelligent assist systems for as long as we have had
interactive computer systems, dating right back to vi/emacs macros.

These are a good thing: after I've encapsulated fields in getters/setters for
my first five classes, the next thousand that I'm going to do over the course
of the year buy me nothing, and I might as well let my IDE handle the
mechanical act of declaring ten pairs of getters/setters for yet another
class.

~~~
dceddia
Perhaps I should've been clearer in the article, but it's aimed at people
_learning_ to program. Absolutely, as a professional, use the tools available
to be as efficient as possible. But as a newcomer, relying on tools (and
copying jQuery snippets from StackOverflow) too early slows down the learning.

~~~
paulmd
If you don't know what "static" means then sure, that's a good thing to learn
because it's an important concept to understand how the code will behave. But
a lot of programming stuff is either syntax or just convention/The Way It's
Done.

Why is it static void main(argc, argv) in Java? Well, that's the way C did it.
Why did C give main() function arguments, as opposed to (say) environment
variables? Well, that's just the way it's done. Why is return 0 success and
other values fail? Convention. Why are curly braces used to delimit code and
parentheses used to delimit arguments? Because the spec authors said so.

Basically, I think most of what constitutes programming can be done without
ever typing a line of code. It's the process of decomposing a large task into
small, simple ones, in a way that can be processed efficiently. The rest is
just notation.

Pedagogy is absolutely fine, but at the same time we all stand on the
shoulders of giants. Nobody is writing their own TCP/IP stack, we all rely on
"copied and pasted" code (encapsulated in a library) so that we can focus on
business logic. Obviously if you don't know what you're doing you can easily
cause a mess, but the physical act of typing is probably the least important
part of programming. Conceptual understanding is what matters, and the random
syntax and half dozen keyword modifiers you will learn by typing are not going
to push you very far in conceptual understanding.

------
ChuckMcM
I understand the controversy, In my experience, both statements; 'typing it
does nothing' and 'typing it is everything' are accurate. Just for different
people.

In a similar way, some people don't see music until they play it, some see it
before it is played. I really don't know what it is that creates the
difference.

For me, doing the typing (or writing in my notebook) really connects the
knowledge somewhere in my head that is harder to erase/lose than just reading
or seeing it. I discovered in college that I could look at a homework problem
and solve it but later in an exam couldn't bring back all the finer points of
solving it, _unless I had actually written down my solution._ Very strange but
a good thing to know about oneself.

------
Houshalter
This reminds me that I once made a stupid game where you type code scraped
from random github repos. The goal is to predict the next character that will
appear. The premise being that typing real code, and consciously trying to
predict what will come next, forces you to quickly learn the syntax and style
of a new programming language.

[http://houshalter.github.io/perplex/perplex.html](http://houshalter.github.io/perplex/perplex.html)

~~~
fapjacks
Wow that is a very clever idea! It seems like though that I would get green
letters even though I had never made a guess. For example punctuation, e.g.
newlines and whitespace and dots, would be green instead of red, even though
I'd not typed any character at all. Awesome idea nonetheless!

~~~
Houshalter
Oh yes, that was a feature I added. If you don't make a guess, it
automatically guesses the most likely next character. You can see in the table
to the left what it's predictions are. Which is just the letters most likely
to appear after the last letter seen.

~~~
fapjacks
Oh, okay, that makes sense, then. So it's almost like I've got a computer
partner that's also "learning" the syntax with me? That's actually _really_
clever, because it helps me by demonstrating correct characters that I
wouldn't have otherwise guessed. Very cool!

~~~
Houshalter
It was originally intended just to be a few hints to make it a bit easier. But
I thought it made sense, that if you don't make any guess at all, it might as
well guess the most likely character for you, and give you a few free points.

------
bluenose69
This makes a lot of sense. I don't think cut/paste makes anything stick in the
head (no pun on "paste"). Maybe this is how my old-fart mind works (I go back
to the punched-card days) but I've found that my millennial students also
learn more by typing. It's a bit like studying ... using a highlighter can be
better than just reading, but to really grasp difficult material, it's
important to write things down in your own words/equations.

~~~
AstralStorm
It engages additional modes of learning: language based and kinesthetic. Plus
it extends understanding.

------
rumcajz
I am programming for 30+ years and I am still doing this. As mentioned in the
article it's a good way to memorize stuff, but it also acts as a checklist: As
I re-type each line I make sure I understand what exactly it is doing and
whether that's what I want it to do. It's a good way to reduce bug count IMO.

------
ggambetta
I sort of agree with this. I got my start typing listings from Microhobby[1]
into a ZX Spectrum... I was around 5, so I guess a big chunk of my early
learning was by osmosis!

[1] [http://www.microhobby.org/](http://www.microhobby.org/)

------
cableshaft
If he ever worked with a convoluted business and data layer with about seven
layers of boilerplate code that needs to be written every time a new feature
is added, I doubt he'd still be singing the tune that everything must be
typed. Because typing all that is a chore, not a benefit.

But that being said, when learning something new I do tend to type it out
myself to help reinforce things. Same reason I handwrote my notes in college.

But I'm not going to type everything all the time. I'll get carpal tunnel, and
it'd take me a lot longer to get tasks done.

~~~
skywhopper
I think the suggestion to retype was specifically about learning things and
not about boilerplate you already understand or don't need to.

~~~
Jtsummers
At the same time, why do we tolerate excessive boilerplate in our systems?
Particularly in areas where it offers no measurable improvement in the output,
and probably a reduction in quality due to the increased opportunity for
error.

------
3stripe
The Lost Art of Writing by Hand is a thing too. A sad one at that.

------
bschwindHN
I went through the Rust Mio guide this way, it really helped! Along with
learning it better by typing it out, you can compile your code after each line
and get better insight into why the code was written the way it was.

[https://github.com/carllerche/mio/blob/getting-
started/doc/g...](https://github.com/carllerche/mio/blob/getting-
started/doc/getting-started.md)

------
fapjacks
Maybe I'm weird, but I still type things out even when I'm copying them from
another place. Except, for example, string values or something in
configuration data. But if it's just some code I'm learning, I type it all up.
I mean, you're trying to learn it, right?

------
Grue3
Also, handwrite your lecture/conference talk notes. Writing by hand is even
better for understanding than typing by hand.

------
clifanatic
Wow, I thought I was the only one who still did this.

------
mi100hael
> badassity

The word is most definitely "badassery"

~~~
dceddia
Pretty sure you're right, but I like "badassity", it's got a nice ring to it.
Plus MMM [0] agrees.

[0] [http://www.mrmoneymustache.com/](http://www.mrmoneymustache.com/)

------
frozenport
How long would it take to type out the CSS from your favorite Bootstrap
tutorial :-)

------
coreyp_1
Not interested in the vulgarity of the title.

