The Essence of Programming (2021)

One thing I've noticed a lot when a programmer struggles with a problem, especially a novice one, is that they get stuck worrying about the "best way" to implement the solution rather than actually understanding the problem he has. I believe a lot of this is because we don't understand the essence of what programming is all about.

Essentially ordered aspects

In one of my previous articles, I stated that "programming is a tool to solve the problems you encounter in the field of computing". The basis of all programming is about using and building tools with computers. My sincere belief is that studying the tool concept itself and its essentially ordered aspects will help usage properly structure our thinking about how we build tools in general.

The fundamental aspects of a tool are:

Its goal, Function, Use, And Implementation/Form.

Each next aspect/step is a completion of the previous one, at which step can be skipped.

Objective

A tool, by its very nature, is a means to an end. A good tool is one that fulfills its purpose well, the reason for which it was created. We use and build tools for goals, there is a why behind the tool.

The function of a tool are the tasks that a particular tool is assigned to perform. Using an example, the function of the hammer can be described in that it was used to drive nails, but in general it strikes other lesser tools (a nail being another type of tool ). The specific function of the tool is determined by the specific problem.

Note: To clarify the difference, purpose is the why behind the tool and function is the what behind the tool.

Use

A tool is used in a particular way by the user. The use is the performance of its function. Most hammers will have a place for the user to hold, their handle, and a part they can use to hit objects, their head/face. The use of a tool is limited by the function of that tool.

Implementation/Form

Finally, how this tool should be implemented is restricted and dictated by how the tool is supposed to be used. If all the previous aspects have been met, then the implementation is mostly straightforward (especially in programming). A hammer used for masonry can be implemented with a wooden handle and a smooth steel flat head.

Note: Aesthetics fall into this category of implementation or form. Implementation and appearance can be separated, but in practice this is rarely the case. How someone implements a tool is part of the aesthetic of that specific tool. Aesthetics is usually something that has evolved and been discovered by tradition and not by pure reason.

The novice trap

For most people reading this article, most of these will seem quite obvious, but they may not have seen it in this specific joint. So why am I talking about it? Because forgetting (or not knowing) this structure of the reality of what you actually do is the trap that many novices, and even veterans, fall into when programming. Getting caught up in the best way to implement a program, or any problem for that matter, distracts the programmer from the problem.

For the vast majority of problems, especially problems encountered by novices, if you understand the purpose, function, and use of the tool you are creating, its implementation will be "trivial" in the meaning that the previous aspects restrict how you approach the problem.

Education

When teaching novices, I have found that there are usually two different types of people (sometimes embodied by the same person):

Novices who are worried about the best way to implement their programs, but don't really understand what the goal of the program they are trying to do Novices who understand the purpose, function, and usage of their program, but don't know enough about the tools to implement things

Interestingly, the former is much more common than the latter.

In the latter case, these people are natural problem solvers and only need to be taught the explicit thinking that goes on and the tools they need to produce their program, e.g. algorithms and data structures. In this case, practice is necessary to perfect the skills of the novice.

In the first case, it doesn't matter if all the tools can be taught if the individual doesn't understand...

One thing I've noticed a lot when a programmer struggles with a problem, especially a novice one, is that they get stuck worrying about the "best way" to implement the solution rather than actually understanding the problem he has. I believe a lot of this is because we don't understand the essence of what programming is all about.

Essentially ordered aspects

In one of my previous articles, I stated that "programming is a tool to solve the problems you encounter in the field of computing". The basis of all programming is about using and building tools with computers. My sincere belief is that studying the tool concept itself and its essentially ordered aspects will help usage properly structure our thinking about how we build tools in general.

The fundamental aspects of a tool are:

Its goal, Function, Use, And Implementation/Form.

Each next aspect/step is a completion of the previous one, at which step can be skipped.

Objective

A tool, by its very nature, is a means to an end. A good tool is one that fulfills its purpose well, the reason for which it was created. We use and build tools for goals, there is a why behind the tool.

The function of a tool are the tasks that a particular tool is assigned to perform. Using an example, the function of the hammer can be described in that it was used to drive nails, but in general it strikes other lesser tools (a nail being another type of tool ). The specific function of the tool is determined by the specific problem.

Note: To clarify the difference, purpose is the why behind the tool and function is the what behind the tool.

Use

A tool is used in a particular way by the user. The use is the performance of its function. Most hammers will have a place for the user to hold, their handle, and a part they can use to hit objects, their head/face. The use of a tool is limited by the function of that tool.

Implementation/Form

Finally, how this tool should be implemented is restricted and dictated by how the tool is supposed to be used. If all the previous aspects have been met, then the implementation is mostly straightforward (especially in programming). A hammer used for masonry can be implemented with a wooden handle and a smooth steel flat head.

Note: Aesthetics fall into this category of implementation or form. Implementation and appearance can be separated, but in practice this is rarely the case. How someone implements a tool is part of the aesthetic of that specific tool. Aesthetics is usually something that has evolved and been discovered by tradition and not by pure reason.

The novice trap

For most people reading this article, most of these will seem quite obvious, but they may not have seen it in this specific joint. So why am I talking about it? Because forgetting (or not knowing) this structure of the reality of what you actually do is the trap that many novices, and even veterans, fall into when programming. Getting caught up in the best way to implement a program, or any problem for that matter, distracts the programmer from the problem.

For the vast majority of problems, especially problems encountered by novices, if you understand the purpose, function, and use of the tool you are creating, its implementation will be "trivial" in the meaning that the previous aspects restrict how you approach the problem.

Education

When teaching novices, I have found that there are usually two different types of people (sometimes embodied by the same person):

Novices who are worried about the best way to implement their programs, but don't really understand what the goal of the program they are trying to do Novices who understand the purpose, function, and usage of their program, but don't know enough about the tools to implement things

Interestingly, the former is much more common than the latter.

In the latter case, these people are natural problem solvers and only need to be taught the explicit thinking that goes on and the tools they need to produce their program, e.g. algorithms and data structures. In this case, practice is necessary to perfect the skills of the novice.

In the first case, it doesn't matter if all the tools can be taught if the individual doesn't understand...

What's Your Reaction?

like

dislike

love

funny

angry

sad

wow