Korva
Tech

Great Programs Start as Broken Drafts

The college method was to plan the whole program on paper, but real work looks more like a painter's sketch.

AI image
paulgraham.com · Hackers and Painters

Paul Graham, a programmer, was taught in college to plan a complete program on paper and check it was correct before touching a computer.

He couldn't work that way. At his computer, he tended to just "spew out code that was hopelessly broken," and then "gradually beat it into shape." Debugging was supposed to be a last pass for typos. In his experience, the fixing was the work itself. He compares his embarrassment to feeling bad as a child for holding his pencil the wrong way.

Then he considered painters and architects, and realized he had been sketching all along. Writers and painters and architects figure out what they are making as they make it, and programmers should too. In his words: "It should be a pencil, not a pen."

For Graham, a language is for thinking up programs, not for writing down ones already thought out.

Static typing assumes a program is planned up front. It is a checker that tests what kind of data each part of a program will handle before the program runs. Sketching clashes with that demand.

For someone working by trial and revision, that early check gets in the way of sketching.

Graham wants tools that let programmers "scribble and smudge and smear." A compiler is the tool that checks code before it runs, and he does not want that checker to block ideas while they are still taking shape.

Questions people ask

What does static typing mean?

It means the programming language checks what kind of data each part of the program will handle, like numbers or text, before the program runs. Fans say it catches errors early. Critics say it gets in the way when you are still figuring out what you want to build.

Do painters really work by sketching and fixing?

Yes. Many painters start with rough studies in charcoal, oil, or pencil to work out composition and light. X-rays of old paintings often show moved arms, shifted faces, and painted-over sections, proof that the finished image emerged through revision.

Is writing perfect code first ever a good idea?

It can help for very small programs or for safety-critical systems, like flight controls, where mistakes are costly and requirements are fixed. Even there, most teams now build in drafts, test, and revise, because needs and errors only become clear once something runs.