Printer Friendly Version      Send     
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
Learn how you can peer-enable business applications by allowing them to share state in a serverless peer network.

By Kevin Hoffman (July 2008)
Animating with Silverlight is easier than you think. Here we create a 3D app that folds a polyhedron using XAML, C#, and by emulating the DirectX math libraries.

By Declan Brennan (April 2008)
Howard Dierking talks to the inventor of C++, Bjarne Stroustrup, about language zealots, the evolution of programming, and what’s in the future of programming.

By Howard Dierking (April 2008)
The goal of the ADO.NET Data Services Framework is to create a simple REST-based framework for exposing and consuming data-centric services easily.

By Elisa Flasko and Mike Flasko (August 2008)
More ...
Read the Blog
Many people using SharePoint technologies don't realize that there is auditing support built directly into the Windows SharePoint Services (WSS) 3.0 platform. In the September 2008 issue of MSDN Magazine, Ted Pattison walks you through a ...
Read more!
The September 2008 issue of MSDN Magazine is now available online. Here's what's in the issue: Hierarchy ID: Model ...
Read more!
Silverlight 2 features a rich and robust control model that is the basis for the controls included in the platform and for third-party control packages. You can also use this control model to build controls of your own. In the August 2008 issue of MSDN Magazine, Jeff Prosise describes how to ...
Read more!
In the August 2008 issue of MSDN Magazine, Matt Milner covers several topics regarding development with Windows Workflow Foundation, some that are intended to address specific reader questions, such as how to safely share a persistence database ...
Read more!
LINQ is a powerful tool enabling quick filtering data based on a standard query language. It can tear through a structured set of data using a simple and straightforward syntax. In the August 2008 issue of MSDN Magazine, Jared Parsons demonstrates a ...
Read more!
One of the very cool features of Silverlight that hasn't gotten the attention it deserves is the InkPresenter control, which enables Internet users to draw directly onto Silverlight applications from their browser. In the August 2008 issue of MSDN Magazine, Julia Lerman builds ...
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.

© 2008 Microsoft Corporation and CMP Media, LLC. All rights reserved; reproduction in part or in whole without permission is prohibited.
Page view tracker