Click to Rate and Give Feedback
Articles by this Author
This month begins the design of the actual mouse class for EEK!

By Stanley B. Lippman (December 2007)
This column crafts an XML document to hold the mouse environment simulation data and shows how to incorporate an XML file into the program using a DataSet.

By Stanley B. Lippman (October 2007)
Stanley B. Lippman explores the use of C++/CLI as a pure Microsoft .NET Framework-compliant language.

By Stanley B. Lippman (August 2007)
Stanley Lippman begins a look at using C++/CLI as a purely .NET-compliant language.

By Stanley B. Lippman (June 2007)
This month Stanley Lippman begins translating the Text Query Language Query class hierarchy from C++ to the .NET Common Type System.

By Stanley B. Lippman (February 2007)
Stanley Lippman moves Text Query Language to the Microsoft .NET Framework using the C++/CLI language extensions in Visual C++ 2005.

By Stanley B. Lippman (December 2006)
This month Stanley Lippman introduces the support for regular expressions in the .NET Framework.

By Stanley B. Lippman (November 2006)
Last time Stan Lippman did not consider the visibility of types and nondeterministic finalization in writing his TQL wrapper code. This month he rewrites the code.

By Stanley B. Lippman (August 2006)
More ...
Popular Articles
Performance problems can creep into your Web app as it scales up, and when they do, you need to find the causes and the best strategies to address them.

By Richard Campbell and Kent Alstad (April 2008)
In this article we introduce you to BizTalk Services, new technology that offers the Enterprise Service Bus features of BizTalk Server as a hosted service.

By Jon Flanders and Aaron Skonnard (June 2008)
Systems that handle failure without losing data are elusive. Learn how to achieve systems that are both scalable and robust.

By Udi Dahan (July 2008)
Joel Pobar presents an introduction to how compilers work and how you can write your own compiler to target the .NET Framework.

By Joel Pobar (February 2008)
More ...
Read the Blog
SQL Server Data Services (SSDS) is a robust, scale-free data service that internally uses proven SQL Server technology and exposes its functionality over industry standard Web service interfaces. In the July 2008 issue of MSDN Magazine, David Robinson introduces ...
Read more!
Windows Presentation Foundation (WPF) offers excellent support for managing the display and editing of complex data. In the December 2007 edition of MSDN Magazine, John Papa did a great job of explaining essential WPF data binding concepts. ...
Read more!
The most fundamental form of Web testing is HTTP request/response testing. This involves programmatically sending an HTTP request to the Web application, fetching the HTTP response, and examining the response for an expected value. In the May 2008 issue of MSDN Magazine, Read more!
In the November issue of MSDN Magazine, Jeffrey Richter demonstrates some recent additions to the C# programming language that make working with the APM significantly easier. In the June ...
Read more!
The July 2008 issue of MSDN Magazine is now available online. Here's what's in the issue: Data Services: Develop ...
Read more!
The June 2008 issue features the first installment of a new MSDN Magazine column on software design fundamentals. We’ll discuss design patterns and principles in a manner that isn't bound to a specific tool or lifecycle methodology. In this issue, Jeremy Miller starts the Patterns in Practice column ...
Read more!
More ...
{ End Bracket }
Is Programming an Art?
Stanley B. Lippman


People who are only users of software frequently fail to appreciate just how very hard it is to write. Oh, the design and initial development are the fun parts. The difficult part is getting it to run correctly (and fast enough). It’s as if for a programmer, a meal begins with a scrumptious double fudge mocha cheesecake and ends with creamed spinach.
The reason we say programming remains an art, not a science or an engineering discipline, is because we haven’t as yet been able to break it down into component steps and mechanize it. Once we succeed in that, a new scale of possibility emerges: programs to write programs from people-oriented design languages (PODL), programs to prove program correctness, and to analyze and support semantic query. Until then, however, programming remains an art, or so conventional wisdom has it.
But as with much conventional wisdom, this analogy does not hold up to closer inspection. Crafting a program (and I’ve done this for over 20 years) is, in fact, nothing at all like art—at least not the art of writing fiction (and I’ve done that for over 20 years as well). Let me illustrate my point with these two fragments of program and prose.
This first piece is part of a lexical analyzer for parsing Visual C++® 7.1. It looks like this:
if ( index >= TokenID::lastKeyword() ) {
    string token = tokenString( index );
    if (( isdigit( token[ 0 ] )) || ( token[0] == ‘-’ )) {
#ifdef TELL_ME
        display( "!! TokenSet::tokenIdentify: ", 
                     "a literal digit: ", token );
#endif
        return TokenID::TK_Literal;
    }
}
This second piece is the opening of a story I wrote some 27 years ago while living in Tucson, Arizona, teaching and writing prose:
We were her pride of 10, Miss Steward named us: the Prodigal, Phoenix,
Benjamin, and perspicacious, pacific Suzanne. Hush, child. Benjamin, be 
still, Miss Steward commanded him gently. People are never just.
Both pieces were extensively designed—that is, I spent a great deal of up-front time designing the architecture of the overall work, and the fragments reflect that design effort. The program has one performance flaw—I retrieve the string entry in the associated string table by value rather than pointer. If the code were to be moved to production, it would require an obvious revision. It has nothing to do with correctness but simply with performance. For a small source code program, the difference in speed is not measurable, and so I chose the cleaner but slower object syntax since I dislike the C/C++ pointer manipulation tokens.
While my prose has not attracted millions of readers, those who do read prose appreciate the craft with its emotional weave under a rigorous symbolic framework. Those who do not appreciate the prose tradition find it mystifying because there is nothing functional about it. The purpose of art is to project feelings and the reality of a subjective private life in the midst of public events into a particular plastic medium—words, in the case of prose. Of course, there is no value in that, not like the value intrinsic to a program.
I like the design process of a program and working out how the different parts of it interact. I like defining abstractions or families of abstractions. I consider them my cast of characters. And I like doing interfaces, because those are the things my characters do to one another. And that’s really how I write programs.
I don’t like writing expressions and statements. I wish we had a symbolic programming language I could think in better and keep in my head. I can’t, frankly, keep arithmetic expressions and parenthetical nestings clear. While I can keep eight separate sections of text in my mind and contrast and echo them, I can’t make sense of a program beyond the classes I design and their interfaces.
In John Markoff’s excellent history of the PC industry, What the Dormouse Said, he states that the goal of the initial visionaries—to put a computer at the disposal of every person—has been realized. But he’s wrong. It has only been half realized. What good is all that computer power for a person, if that person can’t themselves program it? We haven’t realized their dream yet because we haven’t yet figured out how to make programming an art so that everyone can share in it. Until we do that, programming remains neither a discipline of science nor a domain of art. For now, programming is little more than a new-fangled alchemy. Nobody really understands it and nobody as yet has turned a specification into real gold.

Stanley B. Lippman began working on C++ with its inventor, Bjarne Stroustrup, in 1984 at Bell Laboratories. Later, Stan worked in feature animation both at Disney and DreamWorks and served as a Software Technical Director on Fantasia 2000. He has since served as Distinguished Consultant with JPL, and an Architect with the Visual C++ team at Microsoft.

Page view tracker