Is Programming Science, Engineering, or Art?

Programming is a new profession. As such, it is still finding its footing. The curriculum in many colleges is called Computer Science. That carries a connotation that it is a field that studies computers as if they were naturally occurring phenomena. It implies that there is a right way and a wrong way to use computers and by studying them and conducting experiments on them we can discover the right way.

The truth is, Computer Science doesn’t study computers per se. It studies how to use computers to solve problems. For the most part, it studies how to write programs that are verifiably correct and perform well, making best use of the hardware resources available to it. If anything programming is an engineering discipline, not a scientific one.

But that leaves something to be desired in terms of putting an accurate label on programming. Engineering disciplines have a body of best practices that govern the development of new projects. Programming is more of an art than an engineering discipline. The developer imagines a system that could meet the requirements of a project they’ve been assigned to write. She implements it iteratively, addressing first one, then another of the requirement that she has been given.

Getting all the pieces of a significant program to mesh together is a challenge. It takes an inquisitive mind to try various ideas until a good solution is arrived at. And a good solution is probably the best you can hope for. Excellent solutions are few and far between. They take a talented programmer, a well specified set of requirements, and a lot of hard work.

The programming profession is so new that we haven’t got a universally recognized and agreed upon collection of best practices. That is probably because the field is so wide open. With software, you can model at different levels of fidelity. A great statistician once said all models are wrong but some are useful.

Programming is all about modeling the real world to the level of detail sufficient for your purpose. Model fidelity is a difficult issue to resolve. You need high enough fidelity to allow the model to predict the behavior of the real item being modeled. You probably can’t afford to exceed that threshold by much. Often it becomes an exercise in patience while you track down the hidden assumptions and flaws in the model.

We don’t have a checklist for producing good software. But, we do have experience and a growing literature of open source programs we can skim through to glean inspiration from people that have faced the challenge and produced a solution that they decided were eloquent.

I think it’s safe to say that programming is still an art with definite mathematical and engineering leanings. We need to take inspiration from scientist colleagues and use the experimental method to help us discover what works. But we should remain cognizant that we are not studying natural phenomena, we are building a tool that is by definition flawed (a model with perfect fidelity becomes indistinguishable from the item being modeled).

Sweet dreams, don’t forget to tell the ones you love that you love them, and most important of all, be kind.