Comparing Writing to Programming

I was thinking about what to write about this week when it occurred to me to compare writing to programming. There are a number of similarities and differences between them both superficial and fundamental. I will discuss both.

At the most obvious level, both writing and programming involve placing symbols (letters, numbers, punctuation, etc.), either on paper or typing them into a computer. Sometimes you may spend some amount of time planning before you begin but often you just start, knowing that you are going to have to come back later and refine the product.

They both involve placing those symbols within a structure, either words, sentences, and paragraphs for example in the case of writing, or expressions, blocks, functions, and data structures in the case of programming.

Both writing and programming are done for an audience. Writing is done predominantly for human readers, in particular those that are self selected by their expectations of the content of the work. Programming is done predominantly for future programmers to understand how the compiled program works and, equally import, for a computer to translate into a program that can be executed to render some sort of useful computation. The reason that I say programming is predominantly for programmers is that if it were for a machine you might as well enter the primitive machine instructions by hand. Note that one of the programmers that you are writing for is your future self, long after you have forgotten the details of the program that you yourself wrote.

Another similarity between programming and writing is that they both are best done when the writer or programmer is in a state of flow. Flow is a concept that was written about by Mihaly Csikszentmihalyi. It is a state of mind where people are so involved in what they are doing that nothing else seems to matter. For the writer, the words seem to flow onto the page effortlessly. For the programmer, the code appears on the page as if it was already there, waiting to be discovered.

I have experienced this state of flow both while writing and programming. It is one of the most satisfying experiences I’ve ever had. It is the reason that I continue to write and program. But it is not always easy to attain. Csikszentmihalyi has studied the state for years and gives advice on how to attain it in his books but it is sometimes elusive.

The product of writing and programming are somewhat different. A program is a utilitarian artifact, a tool useful to accomplish some task that would be difficult or even impossible without it. At the same time, it is an expression of the programmer’s understanding of the process that comprises the program. When it is well constructed it has an aesthetic appeal that goes beyond it’s function.

A piece of prose has a similar aesthetic but it may lack the utilitarian aspect that one finds associated with a program. That is not to say that some prose is not useful, just that it is not necessary to be useful to be successful as prose.

I have made a lot of generalizations here. I must note that not all successful programs or pieces of prose fall strictly into the categories that I have described here. For instance, many programs are written strictly for their function without consideration of the aesthetic aspect they might embody. This is the nature of the economic pressures of commercial programming. It is often the case that attention to the aesthetic aspects of programming yields a product that works better, is easier to maintain, and consequently enjoys a longer span of usefulness.

Similarly, not all pieces of prose are expected to be aesthetic masterpieces. The instruction manual of a kitchen appliance is not expected to be read for its artistic merit. It is expected to be understandable and organized in a fashion that renders it easy to find the information that one is seeking. For that matter, not all fictional writing need rank high in the aesthetic ranks to be entertaining and worthwhile to read.

I will assert that learning to seek that flow state when writing or programming can result in a better product when you are finished. It will also result in a much enhanced creative experience while your are producing it.

Which brings me to this final point. It is important to chose what you do with your life carefully. Time is the one thing that you have an unknown but limited supply of. It is important to do everything possible to make what you do both enjoyable and useful.

Be safe, wash your hands often, stay home if you can and wear a mask if you must go out, and maintain social distance when possible.


I’ve followed the career of Paul Graham for a large part of my career. He was a Lisp hacker from MIT that started a company that had a web site that would allow you to create your own custom web site strictly by filling out forms on the web. You didn’t need to learn HTML or CSS. You just had to pick options off of lists and fill in boxes with the text you wanted to display as your content.

Paul eventually sold the company to Yahoo! and started an angel investment company called Y Combinator. His idea of an angel investment company was somewhat unique. They held events that they called Demo Days where potential startup founders would pitch their ideas to Paul and his partners. They would pick the best of the lot and then put them through a sort of startup boot camp where they would attempt to teach them things that would help them succeed with their new company.

The interesting thing was, most of the Y Combinator graduates went on to run successful startup companies. One of the insights that Paul brought to the table was that you shouldn’t select startups based solely on their ideas. Rather, you should select them based on their founders. He observed that good founders would eventually stumble across some product or another that would succeed whereas founders that only had a good idea were out of luck when that one idea fizzled out as it so often does.

The reason I know so much about what Paul Graham observed about picking winning startups is because I read his essays. After becoming a very successful serial startup founder, he discovered that he liked writing essays. He published a book of his essays, Hackers and Painters: Big Ideas from the Computer Age. But even after that, he continued to write and post essays on his website.

His essays are all very well written, very well reasoned, and highly polished. He spends days, sometimes weeks, writing them and tweaking them until they feel right to him. He contends that the difference between essayists and journalists is primarily that journalists work under a deadline.

I find myself attempting to write essays under a self imposed deadline. Maybe they would be better if I put off posting them until they just felt write. Perhaps I should get people to review them and comment on them before I post them. But somehow, that’s not how this site works.

I will continue to write my posts off the cuff, posting them after a light proofreading. That is the style of this blog. Maybe I will write essays Paul’s way sometime in the future. I doubt it. If I don’t set deadlines for myself, I never get anything done. If that makes me a journalist instead of an essayist, I’ll take that.

Take care of yourself and your loved ones. Wash your hands, wear a mask, and maintain social distance.

My Obsession

I remember when I first discovered computers. It was exciting to learn how such simple circuits could do such complicated things. I wanted to learn everything I could about them. More importantly, I wanted to own one so that I could experiment with it and learn all the ins and outs of how it worked.

The problem was, I was young and didn’t have much spare income. Computers, it seemed to me, were always priced just slightly beyond my means. At first, the inexpensive computers that were selling for $100 – $250 were tantalizingly close to being affordable. But soon, bigger and better computers came on the market and they started out in the $500 range. For a while there it seemed like the capabilities of personal computers grew exponentially but their entry level price stayed at a fixed price of about $2000.

So, instead of buying a computer, I joined the Army to learn about computers and how to fix them. I told the recruiter that I was interested in enlisting for the computer job that had the longest school. I correctly assumed that they wouldn’t want to spend any more time than absolutely necessary on training so the longer the school, the more it would cover.

Consequently, I learned everything that there was to know about how computers were built, programmed, and troubleshot. I learned how the hardware worked and how to fix it when it didn’t work. I learned how to write programs and debug them when they didn’t work. And most important of all, I got to work with computers every day.

You have to understand that this was before computers were everywhere. Phones were wired to a particular place and had little or no digital components. TVs were big analog radios that used a tube for a display component. Cars didn’t have computers in them. In short, if you wanted to work with computers, you either had to go to college to learn to program business applications on mainframes or find some cutting edge device, like a missile, that used a computer to control the launch circuitry.

I enjoyed my time in the Army, at least the part of it that had to do with computers. I can’t say I enjoyed the marching, and the physical training, and all of the combat related stuff. But I was willing to put up with it to get to work with computers.

When I got out of the Army, the Personal Computer revolution was in full swing. I found a job right off the bat and all my study and experience paid off. I was so well trained that one of the first jobs that I applied for had me interview both as a technician and a programmer. I later learned that the software manager had called the hardware manager to ask if he was going to hire me. If he wasn’t the software manager was going to make me an offer.

I eventually got my own computer. In fact, I have seldom had fewer than two or three computers. Right now, in this room, I have four computers, a Storage Area Network that has a small linux computer for a controller, my iPhone, an iPad, my work PC, not to mention a workbench full of computers that aren’t even powered on right now.

Throughout my career as a computer scientist one thing has remained constant. I am constantly learning more about computers. I am obsessed by them. I want to learn about advances in hardware and software. I am always looking for new computer languages to learn. It has kept me relevant far longer than most of my contemporaries who have long since taken positions in management.

I’m happy to have remained a programmer. I balk at the title Software Engineer. We don’t know enough about building robust computer systems yet for their to be a clear computer engineering discipline. There are some early attempts to codify the profession but a good programmer is still more of an artist than an engineer.

Be safe, wear a mask when you go out, wash your hands frequently, and take care of yourself and each other.

A Short Return to Pandemic Posting

I made a commitment to myself in December to write a blog post every week of 2020. I’m a little late sometimes but I’ve managed to keep that commitment so far. When the pandemic hit, I posted a number of pieces about the quarantine and the fear and grief that it engendered. And then, I decided to try to move on and post more upbeat topics.

Here it is, the first week in July, the second half of the year. If we had behaved like responsible adults, the pandemic would have been under control by now. But instead, encouraged by our irresponsible leaders, too many people have gotten out without observing the simple precautions of keeping their distance and wearing a face covering. The result being, predictably, that the virus has taken another turn toward exponential growth.

At this point, I find that the only thing I can do is to stay home as much as possible (bi-weekly trips through the pharmacy drive through are my main outings), maintain social distance and wear a mask when I do go out, and wash my hands frequently.

Oh, and there’s one more thing I can do. I can encourage people to exercise their right to vote. Apply for an absentee ballot if you can, vote in person if you must, but make your voice heard. Let your elected leaders know how you feel about the way they handled this situation. Your vote is the only way some of them will pay any attention to you.

Next week, I’ll try to get back to the upbeat, move on with my life kind of post. That is unless the aliens invade or fire rains from the sky or who knows what unexpected crisis rears it’s ugly head.

Take care of yourself and those you love. There’s no replacing you or them.