What is (wrong with) software
Tags: oop, solid, beginners, design
Published: 2020-10-08 23:03:38

Software is eating the world. Those of us who work, live and love software do not usually stop by to think about its meaning. 

*This is the first of a series of articles where we will try to address current software design problems in a minimalist way.*

In university and industry we are taught the following definition about
software:

> Software is a set of instructions that with certain input data generates output data.

If we look at *Wikipedia*, we will understand that this is precisely the
definition of [computer program](https://en.wikipedia.org/wiki/Computer_program):

> A **computer program** is a collection of [instructions](https://en.wikipedia.org/wiki/Instruction_set) that can be [executed](https://en.wikipedia.org/wiki/Execution_(computing)) by a [computer](https://en.wikipedia.org/wiki/Computer) to perform a specific task.

Many decades ago we understood that software is much more than a program
and we still don’t have good definitions of what software really is.

Again, according to [Wikipedia](https://en.wikipedia.org/wiki/Software):

> **Computer software**, or simply **software**, is a collection of [data](https://en.wikipedia.org/wiki/Data_(computing)) or [computer](https://en.wikipedia.org/wiki/Computer) instructions that tell the computer how to work. This is in contrast to [physical hardware](https://en.wikipedia.org/wiki/Computer_hardware), from which the system is built and actually performs the work.

In other words, the definition is by the complement (everything that is not hardware) or by physical omission (everything that cannot be kicked
and can only be cursed).

These definitions take us away from the only purpose we have whenever we build software that is:

> Mimic something that happens in a possible reality.

When we do this, we are forgetting about the origins of modern programming languages ​​like [Simula](https://en.wikipedia.org/wiki/Simula). (the first
object-oriented programming language and the first to include classification). In that language, it was clear from the name that the
goal of software construction was precisely to **build a simulator.**

This is the case of most of the computer software applications today.

Therefore and returning to the origins we can define the software as the construction of a:

> **(M)odel: (A)bstract (P)artial and (P)rogrammable (E)xplaining (R)eality.**

## Why is it a (M)odel? 

The model is the outcome of observing a certain aspect of reality under a certain lens and a particular perspective with a certain paradigm.

It is not the truth revealed.

It is the best possible conception at a certain moment with the present knowledge. Since [Plato](https://www.tutorhunt.com/resource/10969/)’s
time, human beings have tried to build good models of reality.

![Plato](https://dev-to-uploads.s3.amazonaws.com/i/7hv6kiza8x516t2gjhjg.jpg)

Photo by [Max LaRochelle](https://unsplash.com/@maxlarochelle) on [Unsplash](https://unsplash.com/s/photos/cavern)

## Why is it a (A)bstract?

We can only understand it and observe it with instruments like a black box based on its behavior before our stimuli. Like Schrödinger’s
[cat](https://en.wikipedia.org/wiki/Schr%C3%B6dinger%27s_cat), we cannot know what state it is in without disturbing it with our measuring
instruments.
The use case technique is an excellent tool to describe a model in a declarative way.

If you are not a declarative programmer, you might [lose your job](https://chatbotslife.com/most-programmers-are-losing-our-jobs-very-soon-77adf846beb1) very soon.

## Why is it (P)rogrammable? 

It has to run in some type of **simulator** that reproduces the desired conditions. It can be a [Turing model](https://en.wikipedia.org/wiki/Turing_machine) (current commercial computers), a quantum computer or any type of simulator that can keep up
with model evolution

## Why is it (P)artial?

Like any scientific model, we will make a partial cut of the reality that interests us for the problem we are modeling, taking certain
simplifications on aspects that do not interest us in order to isolate the problem.

![Map](https://dev-to-uploads.s3.amazonaws.com/i/uiv7ucimphbcwdk3bdr5.png)

A 1: 1 scale map of the earth would not make sense.

## Why is it (E)xplanatory?

The model must be declarative enough to let us observe its evolution, allowing us to reason and predict behaviors in the reality we are modeling.

## Why is it about (R)eality? 

Because it has to reproduce conditions that occur in an observable environment.

The ultimate goal is to forecast the real world, like any simulation.

* * * * *

Once the software is defined, we can begin to infer good modeling and
design practices that we will publish and add to this article.

## Starting Point 

From the axiomatic definition presented in this article, we will derive **principles**, **heuristics** and **rules** to build excellent software
models.

{% link https://dev.to/mcsee/the-one-and-only-software-design-principle-3086 %}


* * * * *

Part of the objective of this series of articles is to raise debate and discussion spaces on the problem of software design.

We look forward to the comments and suggestions on this article.

This article is published at the same time in Spanish [here](https://medium.com/@mcsee/qu%C3%A9-es-el-software-3620067590f4?sk=9534660033af9d20ed3e261c9f616949).