Writing Programs Is Writing

Writing programs is a special kind of writing in general. Other kinds of writing include writing fiction, poetry, nonfiction, songs, plays, and the like. Programs can direct the operation of a machine, sort of like a screenplay controls the flow of a movie (computers are like "traffic-cop" movie directors); other kinds of writing can only persuade a person's brain to operate a certain way. Programs have to be unambiguous and syntactically perfect; other kinds of writing are more forgiving -- most of the time.

Sometimes I wish there were no such thing as binary code, and that programs were written and sold in source form in the same way magazine articles, short stories, nonfiction books, and novels are sold: by being offered to publishers. Human readability would be as important as machine parsability. Code would be copyrighted, but never patented. All of it would be documented; that would be half the point.

Compare LiterateProgramming -- same principle.

Writing has the same FourProcessesOfConsciousness as programming:

-- EdwardKiser


If required to give a yes or no answer to the question "is writing programs writing" I would have to say yes. If able to give a fuzzy answer, I would say writing programs has a membership of around .1 to writing. In other words, it is a little like, but is really not much like writing a novel, play, poem, etc. If coding was really like writing literature, there would be a lot more people who do both, and a lot fewer people who can do one well but are terrible at another.


One significant difference between writing for humans (prose, poetry, etc.) and writing for computers (software) is that when you write for humans, you have to know when to stop editing. Much has been written about how over-polishing prose can sap it of its vitality and spontaneity, so part of the skill of writing is knowing when to stop and to simply release the piece into the world. The article/poem/novel is most likely not perfect, but any further mucking about could seriously damage the spirit of what made your subject seem so pertinent when you started it. So release it into the world, accept its imperfect state, and get on with your life.

A-ha! -- some of you might say at this point -- this maps perfectly to the OpenSource dictum of ReleaseEarlyReleaseOften?, does it not? Well, not really. Consider your embarrassingly shoddy (but admittedly preliminary) version of FooBar 0.1 -- if it's full of bugs and logical gaps, you can possibly fix them in version 0.2. But if you release a poorly crafted novel one year and it is panned by the critics, you do not get another chance at that novel. Nobody ever gets to rewrite a novel and release it, saying "That first release was just a beta."

Bugs can be corrected; bad writing can only be ignored, and hopefully one day, forgotten.

Not quite true - many short stories have been re-written as novels (usually to their detriment). Ditto Evil Dead and Evil Dead 2 movies -- But those short stories are still judged on their own merits, as separate works. (The first two Evil Dead movies are a rare anomaly.) Consider the case of movie adaptations. As a fan (and occasional critic) I find it most useful to consider a movie adaptation of a favorite novel, comic book, etc., to be separate from the original work. That way, my enjoyment of, say, AlanMoore's FromHell doesn't have to be hindered by the impending release of a shoddy movie adaptation. Other fans are different; they prefer to follow the ideas, characters, concepts, from work to work, regardless of medium, author, or iteration. I suspect that in part this difference comes down to ModernismVsPostmodernism?.


Some writers plot a lot, and when they write the draft, their minds have already preceded them. These kinds of writers map to programmers who think that (only) DesignIsCreative and that CodingIsJustDataEntry.

Some writers plot hardly at all, and when they write the draft, that is when their real ingenuity comes into play. (I, who belong to the first group, think they are really backtracking into design more than they think they are, almost running it as a co-routine.) These kinds of writers map to programmers who think CodingIsCreative.

Both styles have their strengths and weaknesses. People in each camp sure do love making fun of the people in the other camp, in writing and programming both. I used to do that; now I make fun of those who make fun.

-- EdwardKiser


The above one-to-one mapping of programming activities to your putative "processes of consciousness" looks a bit like a ShoeHorn to me; in fact I suspect that these "four processes" are themselves a ShoeHorn. Why should we reasonably expect to see programming - a very specialized type of linguistic activity - map to the broadest overall categories of mental activity ?

Keep in mind that there seems to be a school of thought that consciousness doesn't even "exist" - or at least deserve to be named as an identifiable process or quality. (See WhyIamNotConscious.)

The four processes of consciousness are not categories but components. If consciousness has these four components, then every kind of consciousness should have them, too, including the application of consciousness to programming or writing.

My business card says that I am a "Software Author". I don't think that people really get it though: it doesn't tell them how important I am (or am not) which seems to be what they want to know. It describes what I do and what is important about it though. -- PhilGoodwin


You don't just write programs, you compose them, which means that you are continuouly intending results and at the same time discovering them. Learning to program a computer improved my prose organization skills immensely. I attribute that to the "all or nothing" feedback from compiler and runtime. But composing for people is as much about transitions as it is about organization, so the programming lessons for general writing are limited.

In a strange sense, writing for computers is the realm for the AnonymousCoward, because even though the computer can reject with force, it never hurts as much as people rejection. Are all computer programmers just writers hiding in the technical closet?

-- WaldenMathews

Are all computer programmers just writers hiding in the technical closet? I think all computer programmers want to be creative and to be recognized for that. But not all programmers want to be "writers", meaning creators of natural-language prose that is intended to impart information to other human beings. Those that do hang out in newsgroups and wikis, and write magazine articles and books. I am one of those people who enjoys writing, and I don't understand why so many people don't, but I think wannabee writers are pretty rare. --KrisJohnson


Computer programs are a human-to-human communication in which the author describes a precise solution to a particular problem. The prose is simplified in a manner that our dumb-but-learning computers can understand. As computers get brighter, I expect programming to approach pure human language. Still, the intent behind software is to address a problem, while the intent behind art, including prose, is to impart a change in mental state upon the reader. As such, I doubt we'll see much overlap between the two, even after computers are smart enough to compile English. (That's not to say I haven't been moved by the elegance of some code, just that it is a small subset of code that is both functional and moving).

-- GregoryBloom

See also ProgrammingIsLife, TheElementsOfStyle


CategoryLiterateProgramming


EditText of this page (last edited September 3, 2010) or FindPage with title or text search