Even Stensberg

Thoughts of mine

Reasoning Computer Science with other genres

Computer Science is so vast, yet limited. We’ve discovered so much, but how far away are we from other disciplines? Not far. By looking at biology, chemistry, math (of course) and languages, we can abstract more or less anything into these concepts and interchange these topics with one and another.

An ecosystem
An ecosystem

In Biology, we use ecosystems to denote a set of animals that live together and the use of animal resources to construct a cycle of life and death. Birds eat fish and fish eat alges. Alges consume oxygen and sunlight. How can we relate this to Computer Science? It is no hard task. If we think of the ecosystem of the whole machinery of programming, with CPU’s, ALU’s and registers. We can then relate fish as instruction code, and birds as programming langugages. If we can make up large programs based on how we fly, we can learn to fly by really well. We can travel large distances, meaning we can construct a lot of programming langugages.

Programming languages are the best way to reason about the computer, because we tell how the computer should behave, rather than how it should behave in detail. A fish and a bird are the same, namely animals. Animals behave similar. If we can write machine code, we can write a programming language. Assembly and JavaScript could generate the same code, but a fish use less time to fetch food than a bird that need to evaluate everything in its eyesight first.

Programming languages and machine code tells how code is structured, and how it should be exceuted, just as animals. Let’s go in depth of a use case of how we can relate.

Everytime a human needs to move, it sends signals to it’s brain. Similarly, everytime we need to retrieve something from a server, we send a SYN/ACK in a TCP protocol. The SYN in this example, is the brainwave requesting access to the hand, and the ACK is the movement of the hand. How can we use this? Imagine you need to construct a data structure. We can say that we are reading a book. Ironically the first pages is a dictionary of how the book is constructed. For this exercise, let’s make a double Linked List. First, the book is connected by pages and the book as a whole.

[| <- previous - data- -> next] - [ previous page <- page -> next page]

Doubly Linked List
Doubly Linked List

The previous page is the Linked Lists’ previous pointer, the next is the next page and the page itself is the data the node holds. Easy, right?

So far, we’ve considered ecosystems to be dependent on each other, but they are also encapsulated. One could say that a tree and water are dependent on each other, but the tree is also dependent on itself. It needs pollen to flourish, and it needs to be located with safe ground to become a healthy tree. We are encapsulating data in the tree. The leaves we are getting, are not only the information the tree holds, but also a reference to the tree, meaning it’s inheriting the DNA of the tree. Trees also have this kind of inherance on a higher level, meaning classes of trees is a set of trees that act on behalf of each other. Trees communicate with each other. They tell whenever a danger is nearby, and they can behave as a flock, disrupting air.

If I can say so myself, this is pretty cool!

But what happens if we need to make our mind palace relate to another field or all fields? Let me tell you a story. When we want to trasfer data in Computer Science, we tell chunks of data to send their information to a destination. Namely, a buffer. In Chemistry or Biology, a buffer will restrict its PH value to another solution relative to its substance.

When we want to transfer information in the brain, we use neurons, or even blood. Blood transfers data too, food! Food is essential for us to function, we carry medicine and vitamins in the blood.

bird eating plastic
bird eating plastic

In the ecosystem, we can relate to a buffer as the ecosystem parts transfering toxic substances to its lower chain in the energy pyramid. A bird can transfer its digested plastic, to a fish, and we will fish that, and then we will consume that plastic. All the way, a buffer made that possible, us!

We use all our vocabulary to denote Computer Science expressions, and perhaps my favorite one, is debugging. Whenever it is a bug in our code, we need to debug it. Same goes for humans, whenever we need to figure out what is wrong with us, we go see a doctor. The doctor is the programmer, and the bug is us. We search for answers, then we apply those answers to a solution or a fix. These fixes often needs to be maintained, just as you need yearly checkups at a dentist, you need to check your program every now and then. The only difference, is the time span.

To conclude this, you clearly can draw parallel lines between Software Engineering and other genres. From Medicine to Biology, we can construct the same meaning to different problem sets.

⬅️ Go back