Is programming an art?

Source: Internet
Author: User
Tags define abstract

Is programming an art? Released on: 2006-10-23 | updated on: 2006-10-23

Stanley B. Lippman

People who only use software often do not realize how difficult it is to write software. Oh, the design part and the initial development part are interesting. The most difficult part is to make it run correctly (and run fast enough ). For programmers, this is like a delicious double-layer milk chocolate coffee cheesecake at the beginning of a meal, but it is like spinach cream sauce at the end.

It is said that programming is still an art, not a science or engineering discipline, because we cannot break it down into multiple steps and then perform it mechanically. Once we succeed in this area, a new possibility will emerge to some extent: programming with a people-oriented design language (podl, programming is used to prove the correctness of the program and to analyze and support semantic queries. However, at that time, programming is still an art, that is, it contains so many traditional wisdom.

However, like many traditional wisdom, this analogy cannot be further elaborated. In fact, programming (I have been working on this line for more than 20 years) is not like art at all-at least not like writing novels (I have been working on this line for more than 20 years. Let me use two clips (one program clip and one prose clip) to illustrate my point of view.

The first segment is part of a lexical analysis program used to analyze visual c ++ 7.1. The snippet is as follows:

If (index> = tokenid: lastkeyword ()){
String token = tokenstring (INDEX );
If (isdigit (token [0]) | (token [0] = '-')){
# Ifdef tell_me
Display ("!! Tokenset: tokenidentify :",
"Text number:", token );
# Endif
Return tokenid: tk_literal;
}
}

The second clip starts with a story I wrote about 27 years ago. At that time, I lived in Tucson, Arizona, and was engaged in Prose Teaching and creation:

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 clips have been carefully designed-that is to say, I spent a lot of time designing the architecture of the entire job in advance, and these fragments reflect my design efforts. This program has a performance defect-I retrieve string entries in the associated string table by value rather than by pointer. If you put the code into production, it is obvious that you need to revise it. This is not related to correctness, but to performance. For small source code programs, the speed difference cannot be measured, so I chose a simpler but slower object syntax, because I do not like the pointer operation mark of C/C ++.

Although my prose did not attract millions of readers, those who did read it appreciated its clever way of weaving emotions under a strict symbolic framework. Those who do not appreciate the Prose Tradition think that it is meaningless. The purpose of art is to reflect the authenticity of personal feelings and personal private life in public events based on specific plasticity media (words in prose. Of course, it is not as inherent as a program.

I like the process of program design, and I like to figure out how different parts of the program interact with each other. I like to define abstract or abstract families. I think of it as my own character. In addition, I like to compile interfaces because they are what my characters do with each other. This is actually the way I write a program.

I don't like writing expressions and statements. I hope we can have a signed programming language so that I can better use it to think and remember it in my mind. Frankly speaking, I cannot keep the arithmetic expressions and parentheses nested clearly. Although I can remember eight separate text parts for comparison and ECHO, I don't know what the meaning of the program outside of the class I designed and its interfaces is.

In what the Dormouse Said, a PC industry event by John Markoff, he claims that the goal of initially homesick to enable everyone to control computers has been achieved. But he is wrong. This goal is only half achieved. If a person does not program himself, how can he say that the person already has all the power of a computer? We haven't realized their dream yet, because we haven't figured out how to turn programming into an art so that everyone can share it. Before we can achieve this goal, programming still does not fall into the subject or art field. Currently, programming is just a new kind of "Alchemy ". No one can really understand it, and no one can turn the norms into real money.

Stanley B. LippmanSince 1984, C ++ has been developed in Bell Labs with the inventor Bjarne stroustrup. Later, Stan worked in image animation at Disney and DreamWorks, and served as the software technical director of Fantasia 2000 (fantasy 2000. Since then, he has served as an Honorary Advisor to JPL and a designer in Microsoft's Visual C ++ team.

This article is from the October 2006 issue of msdn magazine.

Go to the original English page

2006 Microsoft Corporation is copyrighted. All rights reserved. Usage rules.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.