jueves, 24 de julio de 2008

Programming is writing and its corollaries.

After so much pondering about the best possible ways to make software development more like engineering, Rosenberg finally realizes something important: programming, after all, is a lot like writing.
People write programs. That statement is worth pausing over. People write programs. Despite the field's infatuation with metaphors like architecture and bridge-building and its dabbling in alternative models from biology or physics, the act of programming today remains an act of writing -of typing character after character, word after word, line after line. Tools that let programmers create software by manipulating icons and graphic shapes on screen have a long and sometimes successful story (for a time in the 1990s, one such tool, Visual Basic, won phenomenal popularity). But these have generally served as layers of shortcuts sitting on top of the same old text-based code, and sooner or later, to fix any really hard problems, the programmer would end up elbow-deep in that code anyway.

(Rosenberg: pp. 298-299)

Why else would style become such a contentious issue among programmers? He's absolutely right. Programming is like writing, in spite of all the efforts to make it a "scientific" discipline, something reliable, akin to building a bridge. Companies have created lots of IDEs, tools that make it easier for programmers to carry on with their activities, to drag and drop. At the end of the day, the programmer is no more than a coder, that adjective that so many would-be engineers find derisive. But it's a reality, the programmer has to write the lines of code, one by one. He may be able to rely on other programmers' work, include libraries, use modules... but whatever he does, he still has to actually write the lines of code. That's precisely why quite a few programmers still prefer to use good old Emacs,vi or some other simple text editor. This wouldn't be possible if the act of programming were something very distinct from writing lines of code. It should be patently obvious. The tools currently available may help in this writing activity, just the same way the computer —and the typewriter prior to that— helped the writer of a novel, but the core of the activity remains the same: writing line after line.

Now, said all that, assumed that the core of programming is actually writing, we can also reach other conclusions. For instance, there are always different writing styles. Some of them may be considered better than others, more efficient than others, even more aesthetically pleasant than others. In other words, programming can be considered, to some extent, an art or, at the very least, a craft. To some people, this may be a mind-boggling conclusion, but I think it's clearly derived from everything we have seen before.

No hay comentarios: