Is programming art or science?

Is programming art or science?

How do we define programming? Some people adhere to the engineering definition of programming. They talk about building stuff, they call themselves engineers or architects.

There are others who focus more on the part of programming that resembles fine art. They talk about elegance, solutions that “feel natural.” There is also a subtle difference in the vocabulary they use. They don’t say “building things,” they talk about “making.”

Art or science?

So what is programming? Art or science? Maybe we picked the wrong metaphor. Maybe we should not call software engineering. What if programming is like cooking?

For sure, there is art in cooking. There is an enormous difference in results achieved by a skilled cook and a novice, even if they follow the same instructions and use the same ingredients. Not only is it essential to follow the recipe, but also it is crucial to pay attention to the visual part of the outcome.

Both results can achieve the simple goal: feeding a person, but we have way more expectations when we talk about food and cooking. In programming, we often want to produce code that not only does everything it should do, but also code that looks good and can be shown to other programmers.

There is science in cooking. For sure, you can blindly follow instructions and cook an egg for 7 minutes. You can also dig into the chemistry behind cooking an egg and understand why you should do it and how the cooking time affects the result.

When I cook an egg, the process is straightforward. An egg = 7 minutes. In the end, I get what I wanted, a cooked egg. I know that you can cook it for 5 or 10 minutes and get a different result. That is all I know about cooking eggs.

You don’t need to understand that to make breakfast. Yet, there are people out there who know that cooked egg is not just one or three outcomes, but a whole spectrum. They can make precisely what they want.

The same situation happens in software engineering. For example, you can know the basic algorithms, data structures, the most popular framework, and libraries. That is enough to build software. If you learn more, you can not only develop software but use the most appropriate tool and get precisely the result you want.

Do you want to show your product/service to 25000 data science enthusiasts every month? I am looking for companies which would like to become a partner of this blog.

Are you interested? Is your employer interested? Here are the details of the offer.

Craft

There is the third part. The part that is not quite an art, not quite science. The process and discipline.

We call it software craftsmanship. In the kitchen, it is called hygiene.

When we eat out, we hope that the cooks keep their workplace clean. We don’t think about it, but we assume that the ingredients are correctly stored, and raw meat is not prepared in the same place where they make a salad. We even have institutions that make sure the rules are followed and who punish abusers.

Sometimes we say that the craftsmanship is not essential. Well, it is not required in the kitchen either. Often you can ignore those rules, and nothing happens. Sure, you can be lucky. How many times have you eaten something and were… unlucky? The same happens in software.

Kitchen?

So is programming an art, science or engineering? It is all of that at the same time, just like your culinary skills.

Even the entry barrier is similar to cooking. You can cook for yourself, your family and friends without any formal education or training. You don’t need it even if you want to open your own restaurant and prepare food for other people.

Let’s cook something.


Remember to share on social media!
If you like this text, please share it on Facebook/Twitter/LinkedIn/Reddit or other social media.

If you watch programming live streams, check out my YouTube channel.
You can also follow me on Twitter: @mikulskibartosz

If you want to hire me, send me a message on LinkedIn or Twitter.


If this article was helpful, consider donating to WWF or any other charity of your choice.
Bartosz Mikulski
Bartosz Mikulski * data scientist / software engineer * conference speaker * organizer of School of A.I. meetups in Poznań * co-founder of Software Craftsmanship Poznan & Poznan Scala User Group