DEV Community

Andreas Jakof
Andreas Jakof

Posted on


What is programming?

What is programming?

This is a question I am asking my self from time to time. Usually followed by...

What skills make a good programmer?

I am doing this for a while now, and so far I came up with some answers for myself, which I would like to share and discuss with you.

1. Algorithmic thinking "...the rest is just syntax"

Programming is not just knowing a programming language. To me, a big part of it is algorithmic thinking. The rest is just syntax, which might differ from language to language, but has at least similar results in the end.

I often use an analogy of talking to a person, that knows only it's own language and no other. A person, who will follow any and all of your instructions true to the word, but does neither deviate nor has any own initiative. Which means, that you have to be concise and complete.

I mean: You have to solve every bit of the problem (at least in theory) and then tell the computer how you would do it in a way, that enables it to solve the problem using only your description.

2. Breaking big problems into smaller ones

Algorithmic thinking is all good, but what if the problem too complex to be solved straight on? You have to be able, to break a big/complex problem into smaller pieces.

Let's take a closer look at the often used example of spreading butter on a slice of bread. You could solve the problem as one... but that would limit re-useablity and you would be stuck with always the same ingredients: always toast, always butter. Also it is kind of a repetitive task, moving the knife back and forth.

But what if, you could identify different sub-problems?

  1. Preparing the bread
  2. Opening the butter cup
  3. Spreading "something spreadable" on "something" using a "spreader"
    • moving the spreader with slight pressure (from left to right)
    • moving the spreader with slight pressure (from right to left)

The whole task now consists of three smaller tasks, which are also a bit more abstract, but can be used again, if something similar comes up.

3. Solving smaller problems, solves the big one

If you have created manageable problems to solve, it time to do so. I think, the most important task here is to create the algorithm, that solves the problem at hand. And finding a balance between glueing it to that one case and having too much abstraction and complexity.

I think, that as a rule of thumb: If you can think of another use case right off your head, there is a good chance you might use it in the future. If you have to think about it, just leave it be for the time or YAGNI will bite you. You can always come back later and make it more versatile, if you need it.

In the butter spreading example this would be, to make the spreading independent of the flow direction, so one only has to write it once and then just call it with different directions: right-to-left and left-to-right. On thinking about it, there might be more parameters, like the pressure for different kinds of "spreadings": Peanut butter will take more pressure than jelly for example.
But that could be added, when it is time.

I guess the three traits above are the basis, for what is programming. Depending on the execution of these, you can determine the craftsman skills of a programmer.

4. Art vs Craftsmanship

But I think that programming is not only craftsmanship, where you use the tools you have but also art, where you create, think out of the box and come up with new and unique solutions.

5. Experience and Curiosity

With time, you get to know your tools better and better.
You learn the shortcuts of your IDE, the functions a framework provides, but you also learn the limitations of the framework. So you are no longer trying to solve it in dead ends, but you chose another road from the start. You learn, how to combine different tools and/or frameworks.
But experience also leads to the danger of only using the paved roads. Doing the safe thing. So even with experience, I think an open mind and curiosity are two main factors, that make a good programmer.

6. Willingness to learn and allowing for failure

There are times, when you have to deliver. Times, when there is a deadline and every one is counting on you to be ready, when you have to. These are the times, when you choose the safe road.

And then there are times, when you have time to play around with ideas, to invent and to learn. I think, it is an essential trait of a good programmer, to use those times and learn. But as with every unknown, this has the potential to failure, so a good programmer allows for failure and takes them into account. And a good programmer also learns from those failures, and if it is just, how not to approach a specific problem in the future...

As a synopsis: I think programming is not the writing of code in a programming language, but the breaking down of complex problems into manageable portions, solving them and putting them together in away, to solve the bigger issue.
Also I think a good programmer uses his/her experience and creativity to solve unique problems and is always trying to learn something new, allowing for failure but learning from it.

Oldest comments (0)

Take Your Github Repository To The Next Level

Take Your Github Repository To The Next Level 🚀️: A step-by-step guide on creating the perfect Github repository.