Art and Science and of course AI

Comments 0

Share to social media

There is a classic argument that goes like this, “is programming art or a science?” In its purest form, science would tend to try to get one perfect answer for every question it is asked. The goal is to find the definitive answer to a question. The process is rigorous, with hypotheses, tests on those hypotheses, and then maybe an answer based on empirical evidence. Sometimes the answer is non-specific, and the answers change over time as more is learned, but in the best cases, there are no “feelings” involved in the process.

On the other hand, art is based on far more subjective criteria, where not only can there be more than one answer that is correct, sometimes there is practically an infinite set of answers to a question like “what is the best style of music.” I asked AI this question and it gave the answer you can imagine: “There’s no one-size-fits-all answer to that question”. I will admit the use of a contraction and one-size-fits-all in the reply threw me a bit, but for sake of argument, let’s agree that art is in the eye of the beholder, Beethoven, Beatles, or Barney the Dinosaur, and other musicians whose name don’t start with B, are all art to someone…for some reason.

And how does this pertain to AI?

I won’t try to say exactly my opinion, but I am leading somewhere

What really muddies the water is that there is a bit of art to science, and quite a bit of science to art. In science, there is an art to choosing a hypothesis. But once chosen, it is essential to let the evidence do the rest of the work. For art, there is application of science to putting colors together to make people feel, to take a great picture, and whatever the formula is, it is why so many people cry during Pixar movies.

So, there is no doubt that the argument about whether programming is art or science has continued for a very long time. On the one hand, It is much like science because we always have a hypothesis that we need to prove. That code we wrote should match the requirements of the customer, not only in terms of functionality, but also in terms of performance. We test the hypothesis that it does, though rarely with the rigor users would like, even if it were possible (imagine trying to test every single response a simple program that calculates the sum of two integers for example. Say you limit that to non-negative 32-bit integers. There are approx. 2 billion such integers , so you would need to verify 2 billion times 2 billion responses, just for sum.

We also want to think of it as art. But is it? Isn’t there always a “best” way to do something? Is there any subjectivity about it? Even creating a user interface, while there is some artistic leeway, there are a lot of rules, as Benedict Ampea-Badu chronicled in a series last year.

Some things, like algorithms may even feel like art. One of my first “this is beautiful programming” moments was when first I learned about the quick sort algorithm. The first sort algorithm you probably learned was the bubble sort. The bubble sort algorithm is easy, it works, and you can easily remember it 20 some years after you first used it. If you have ever sorted something by hand, you probably even used a version of it. Horribly inefficient compared to other methods, but simple. But the quick sort or merge sort algorithms, when you first see and grok what they do, it is like seeing a work of art.

If I have just made you want to look at sorting algorithms, I won’t be hurt if you leave and go read this article on builtin.com).

What got me started thinking about this stuff?

Of course I can’t solve this dilemma, and I bet you didn’t think I could. What started this was me thinking about AI. If programming is purely a science, AI should soon enough be able to conquer it right? We feed it requirements; it spits out the one true answer. And the only thing we would need to do is provide working requirements. And just change the requirements when the users’ needs change, right?

But if it is art, could it take the requirements and implement making choices on its own?

Really though, could this happen where it becomes extremely useful, almost scarily so? I don’t completely know, but I think it definitely would be an interesting direction for programming. It would be the next natural step in declarative languages, I think. You describe the output you want and it gives it to you. But instead of one statement at a time, you give AI a virtual pile of documents that define the many requirements of a system and let it spit out the entire system.

I wonder how soon?

I have no idea, and as a user and programmer, I don’t really think it will happen anytime soon. But it is the next logical step from answering questions about restaurants, travel plans, organizing people’s lists. As I type this, I am a bit fearful if AI actually becomes intelligent… because it is going to be mondo bored with the trivial jobs we want to use if for.

Of course, I become less fearful when I ask it to draw a simple picture using a prompt like “draw a picture that says ‘Databases are Awesome’ in a field of flowers” since it rarely even gets the wording and spelling right:

A collage of images of flowers and butterflies

Description automatically generated

And the one with the spelling right has terrible use of colors!

Article tags

Load comments

About the author

Louis Davidson

Simple Talk Editor

See Profile

Louis is the editor of this Simple-Talk website. Prior to that, has was a corporate database developer and data architect for a non-profit organization for 25 years! Louis has been a Microsoft MVP since 2004, and is the author of a series of SQL Server Database Design books, most recently Pro SQL Server Relational Database Design and Implementation.