Live data from Hacker News

How I Write Code: Pen and Paper

noteflakes.com

11–20 of 110 posts

Re: How I Write Code: Pen and Paper

#11
post #9

I've never really had success doing concept work of any kind with pen and paper. Especially writing, but even diagramming. If I need to step back and work with ideas abstractly, the paper medium is still going to get in the way at least as much as the digital text does. What I really have to do is keep it all conceptual in my mind; that's the only medium that's truly unopinionated and flexible. Paper/whiteboarding is…

Can I ask if you ever had any kind of art/drawing type of classes? I very often turn to sketches as my first attempt. I will often turn to paper first. I can sketch things faster than using something like Sketch. Maybe it's because I come from a wood working background where rough/not-to-scale sketches with dimensions written in were common just to double check your cut lists. Mearsure twice, cut once.

Also, I'm old enough to not have always had electronic devices, so sketching was all we had. In college, I didn't live on campus while living with my parental units an hour away. With the limited access to the computer lab, I would hand write code on paper and then transcribe. Then, right at the end of lab time, hit print so I could continue debugging by making notes on the greenbar print outs.

Re: How I Write Code: Pen and Paper

#12
post #4
post #2

you get to the obstacles faster, which is what really takes the most thinking time to solve

I just write all the comments first, which forces me to think about the obstacles up front before any code is written.

I do this as well. I kind of take an outline approach with the comments. I find things that will need to be re-used and other types of refactoring kind of just pop out.

Re: How I Write Code: Pen and Paper

#13
I found it very helpful to review code on paper. After writing a gnarly algorithm, my favorite way to scrutinize and improve it is to print it out on paper, lie on a couch, and mark up the text with a red pen. I focus much better this way, away from an interactive computer.

Re: How I Write Code: Pen and Paper

#14
post #4
post #2

you get to the obstacles faster, which is what really takes the most thinking time to solve

I just write all the comments first, which forces me to think about the obstacles up front before any code is written.

I try to do this but then I realize I'm writing python.

Re: How I Write Code: Pen and Paper

#16
post #9

I've never really had success doing concept work of any kind with pen and paper. Especially writing, but even diagramming. If I need to step back and work with ideas abstractly, the paper medium is still going to get in the way at least as much as the digital text does. What I really have to do is keep it all conceptual in my mind; that's the only medium that's truly unopinionated and flexible. Paper/whiteboarding is…

Can I ask if you ever had any kind of art/drawing type of classes? I very often turn to sketches as my first attempt. I will often turn to paper first. I can sketch things faster than using something like Sketch. Maybe it's because I come from a wood working background where rough/not-to-scale sketches with dimensions written in were common just to double check your cut lists. Mearsure twice, cut once. Also, I'm old…

I haven't really had art classes, no

The problem I run into when I'm brainstorming or thinking about high-level architectural/modeling questions, is that if I start drawing something I get focused on how to represent my current idea and I stop actually developing the idea itself. And then if I change my mind, I have to go back and erase or strike things out instead of just redirecting my thought. Etc.

Usually if something is new for me or ill-defined, I take a walk or a shower and work through a rough idea of the big picture (usually realizing and iterating on some of the high-level problems) without any medium.

And then when I sit down to start seeing what that established will look like more tangibly, I usually go straight to the computer. Though I will say, I sometimes turn off type-checking when I'm just writing the idea out the first time. It can get really distracting when the code is going to be "broken" for the first 90% of the process. Once I've given it a look over and feel good about it, then I turn editor hints back on to nail it down and get it running.

Re: How I Write Code: Pen and Paper

#17
post #13

I found it very helpful to review code on paper. After writing a gnarly algorithm, my favorite way to scrutinize and improve it is to print it out on paper, lie on a couch, and mark up the text with a red pen. I focus much better this way, away from an interactive computer.

I did that once: had a Unicode related bug somewhere in a code that fit nicely 2 A4 pages so I printed them and debug when have lunch with a friend. I was able to think a quick solution that involved few changes, probably not what I would have been go for if using a computer. One of my most debugging experience so far. Also I fixed another bug (or more likely something not in the requirements at the time) and still use that portion of code today.

Re: How I Write Code: Pen and Paper

#19

It's something that I'm still trying to force myself to do. I do know that I'm more productive away from the computer. But it's so tempting to just tweak, compile, test, iterate... I generally use pen and paper when I'm stuck and require deeper thinking. Also, a lot of the work of a programmer consists in understanding existing code. You need the computer for that.

I have to agree with your other comment. Drawing things out on pen and paper helps me a lot as well, but it’s quite difficult to do when you need to work around existing code and keep all the classes, methods, and logic in your head, looking up things as you go.
Post reply on HN