Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Like the title says, do you ever write code with pen and paper? If so, why? Do those who don't do if have anything to gain by doing so more often?

share|improve this question
The best reason for using pen and paper to help thinking is that there are no hyperlinks :) –  Benjol Oct 27 '10 at 9:37
I once had to write a program in an exam; COBOL too. It was a nightmare! –  TeaDrinkingGeek Feb 21 '11 at 16:57

15 Answers 15

up vote 25 down vote accepted

Yes, I do it quite often and I think it's really good. I don't write code, merely pseudo-code when I figuring out algorithms for different problems. The biggest benefit is that you can draw figures and arrows together with the pseudo-code which is very helpful. I definitely recommend it.

share|improve this answer
+1 for pseudo-code. It's so damn hard to write e.g. C# code without an IDE, you can't believe it until you tried. :( –  ShdNx Sep 27 '10 at 21:06
Love my whiteboard for drawing figures. +1 –  Chris Sep 27 '10 at 22:08
Jonas's answer and Chris's comment made me want a whiteboard. Or a blackboard (I love chalk). –  gablin Sep 28 '10 at 6:07
Every stationery place I go, they have an assortment of gigantic corkboards, but only stupid mini calendar whiteboards, or whiteboard/corkboard combos (I have a combo right now). I can't find a suitable whiteboard anywhere. Oh, and +1 for figures and arrows. –  Carson Myers Sep 28 '10 at 19:56
With this answer, I think we can agree that the pen is indeed mightier than the... compiler. So get that whiteboard, people! –  gablin Sep 29 '10 at 18:10

No, but maybe we should. 25 years of programming have taken away my ability to write anything readable by hand.

share|improve this answer
Haha! Yeah, a lot of people I know can't write better than a 4-year-old. –  gablin Sep 29 '10 at 11:16

I do but mostly pseudo-code or simple diagrams.

It comes from growing up with an engineer for a father. His first admonition when I had a issue solving a problem was "draw a picture". Thus, anytime I'm having difficulty wrapping my head around code I do just that.

I probably do it most when reverse engineering someone else's code than when writing my own, though.

share|improve this answer
+1 for draw a picture. Best advice I ever got from one of my CS profs years ago. –  Byron Whitlock Sep 27 '10 at 22:17
My sister isn't even in a technical field (high ed management) still swears by it in solving her problems or explaining to her staff. The recent success of "Back of the Napkin" is probably related. –  HerbN Sep 28 '10 at 3:04

I never write actual code on paper. Pseudo-code or diagrams, yes. Little notes about things I need for the next stage of coding, yes. Code, no.

If I write code out with a pen, I just have to retype it later. It's easier to type it into the machine in the first place.

share|improve this answer

I did a lot in the past.

Actually My first steps was on paper. I practiced programming before I have access to a computer. I worked as a office boy and I always took a notepad (paper of course) and a pen to code while I was waiting at long lines on banks. When I bought my first computer (Sinclair Z80) I had lots of bugs to type. You read right, lots of bugs, not lots of code. Lesson: code write to a young guy without experience, on a paper standing on a bank line just produces bug :-)

Today I planned overall things on paper but never code on it.

share|improve this answer

I often write psuedo-code with pen and paper to hash out ideas and flow. And since I write a lot in Python, it winds up being very close to what I write in the editor.

There's something about a pencil/pen in hand that switches me into creative mode and requires less attention than typing. I also like the way paper gives me the option to diagram and write notes that I can go back to later when I'm writing up the documentation.

share|improve this answer
Same here, especially during school, when I have free time. +1 for the Python code being very close to what is written in the editor, I have had the same experience. –  Pip Apr 15 '14 at 23:46

Diagrams and such, especially in meetings.

The actual coding process, though - at least the way I do it - doesn't lend itself to pen and paper. In much the same way that word processors promote rapid revision and more "sculpting" of documents than pen and paper or an old typewriter, interacting with the PC and the compiler real-time promotes constant innovation and inspiration, and lets your subconscious get in touch with the task at hand.

Honestly, I couldn't write down a list of instructions for how I go about my job, but it seems to work pretty well.

share|improve this answer


Like others, I'll diagram stuff out and draw butchered UML (because actually drawing compliant UML would take forever) but never code.

I can type pseudocode faster than I can hand-write anything.

share|improve this answer

I started using pen and paper before I go to coding stage since college. And I usually do it when I want to organize my thoughts.

When the code is short, I write it first on paper before typing it. Otherwise, I write pseudo-code or draw diagrams and flowcharts.

share|improve this answer

There are 2 occasions when I'll write code on paper, both involve having a sudden inspiration about a problem I've been working on.

1) I'm stuck in a long meeting without a laptop and I think of a solution. I'll write the code in my notebook.

2) I can't fall asleep because I've got a problem stuck in my head. If I have an 'a-ha' moment, I'll jot it down, instead of booting up the laptop to code it.

share|improve this answer

I tend to draw out UML diagrams on paper first before designing a system. Having to interact with a keyboard or mouse in my UML modeling program hinders my ability to get the design out, so a pen and paper feels more natural.

In terms of code, I don't tend to write algorithms or snippets by hand. I tend to leave a "Sandbox" program open, and do test development there.

share|improve this answer

As I mentioned in this post, sometimes when working at home I will go into the next room and lie down to think about a problem I'm stuck on. Ironically I've found that as soon as I get back up I start to lose the details of whatever solution I've come up with, so I've used pen and paper to capture my thoughts. It's also more useful because I tend to draw diagrams at the same time.

share|improve this answer

yes ... i did that in college for the algorithm analysis class ... nowadays it's more flow charts than actual pseudo code ...

share|improve this answer

I used to a lot of this back in the days when each student had limited access to the computers.

I recently did a fair amount of this again to prepare for interviews when I was asked to do a lot of whiteboard coding.

share|improve this answer
I remember programming in high school with punch cards. rabbit.eng.miami.edu/info/card.html You would turn in your stack of punch cards, then a week or so later would get the results of the computer run. If you didn't think about your program ahead of time you were screwed. As a side note, you would also write in pencil the card order in the top of the card. Nothing like dropping the deck of cards and forgetting to number them first. –  Bill Feb 21 '11 at 15:50

Wrote half a chess program with pencil and paper at the poolside in a resort hotel once, but that was long ago (when laptops weighed in at 20+ kilos and had no batteries).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.