While I agree with the general idea of having a primary goal to solve the problem and coding is…
Pratik Chaudhary

Wow. Awesome, thoughtful and thought-provoking response.

Code as an abstraction

I found this part especially intriguing:

… the reason we are in a more technologically advanced world than we were before is not just because people only used numbers, maths, equations and science as just mediums to solve problems but they became obsessed with finding out to what extent they can push their limits.

Fields like Mathematics progress by abstracting away the problem they are modeling/trying to solve and just working on that abstract domain. And in turn, they can solve even harder problems i.e they become more powerful. All that by not focusing on the problem but the “tool”.

From A short introduction to Mathematics:

A graph is a very flexible model with many uses.
However, when one studies graphs, there is no need to bear these
uses in mind: it does not matter whether the points represent
regions, lectures, or something quite different again. A graph
theorist can leave behind the real world entirely and enter the realm
of pure abstraction.

So, yes, this is a very good point. Some approaches to coding could follow a similar mindset. By focusing on the code i.e treating it as a first-class citizen, we can solve the problems indirectly.

It can still be argued that the goal here is to enable us to solve other problems. But I agree that one can dive into the beauty of a field without thinking about the problems being solved (if any).

Which brings us to the next point:

The hobby code

Here too, the discussion moves beyond code and programming. For a Musician, is Music the goal? For an artist, is the piece of art the goal? (For a footballer is the goal the goal? :D)

I think generally self-expression, creation, or even simple enjoyment is the goal. The paint on the brush, the musical notes are just the mediums.

In a similar vein, most hobby code have goals beyond code: learning, teaching, building things, or simply indulging in the act of coding.

I mean, if it’s “throw-away” code, then the code probably wasn’t the goal. And if it’s not i.e you are committed to maintaining it or at least deploying it once, then it probably solves some problem.

Professional Code

Most of the authors of the articles I referred to were probably looking through a “professional” mindset i.e when you’re coding beyond hobby projects.

I was also influenced by that context in which code is surely not the goal 
because code by itself doesn’t create value.

Summing up

You make a valid point. A competitive programmer may have a goal of winning competitions or solving problems but they may (and rightly so) lose themselves in the process itself. I mean, it does sound absurd to say “For a chess player, chess is not the goal”. They live and breathe chess!

We live and breathe code! It is beautiful. And sometimes, just focusing on the code is valid and enough.

Still, as I see it, there are two extremes that are both perilous:

  • As you point out, those who neglect code as third class citizens and only look at what their underlying goal is. The focus is squarely on the goal.
  • Those who become so engrossed in code that they forget what the goal is. The focus is squarely on the code.

And well, we are simply more prone to becoming members of the latter group.

Show your support

Clapping shows how much you appreciated Bijay Gurung’s story.