paint-brush
Understanding Basic Programming Concepts: Objects & Processesby@erlenddahlen
1,450 reads
1,450 reads

Understanding Basic Programming Concepts: Objects & Processes

by Erlend DahlenOctober 16th, 2019
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Two ways to structure a program are ‘Objects invoking behaviour’ and ‘Processes sharing information’ The degree of self-governing is not binary, but balances in between. Environments seemingly structured in one way contain far greater nuance. Some environments are structured deliberately, while others are naturally emerging. By analyzing how agents interact with each other and rating the interactions from IB to SI, it is possible to map both the implied and perceived power hierarchies in real life.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Understanding Basic Programming Concepts: Objects & Processes
Erlend Dahlen HackerNoon profile picture

Through my studies I get exposed to a lot of programming. This is useful to solve technical problems, but I also like to think how the concepts can be applied to different domains and everyday life.

Programs consist of various parts. For the program to work these parts need to be structured, communicate and interact with each other.

Two ways to structure a program are “Objects invoking behaviour” and “Processes sharing information”.

The structure in the first approach is based on objects consisting of data and functions.

Depicted is an apple and its structure as an object. It contains data about the colour and functions to get or set the colour. In a program there exists many different objects that interact with each other.

Another object can get the colour of the apple using the function

getColour()
. Using the functions, one object can invoke behaviour in another object.

In the second approach, however, the processes only share share information.

Two processes are illustrated, the car and the stopping light. Each process uses information it receives to decide what to do. In this example the stopping light shares information that the light is red, and the car has to decide if it should stop or not.

In contrast to the first approach, the stopping light cannot make the car stop by directly invoking behaviour.

The structure of the program defines the parts and how they interact. In the approaches discussed the degree of self-governing are at polar opposites, from objects behaving based on external invocations to processes making informed decisions.

In real life the degree of self-governing is not binary, but balances in between. This balance can be thought of as a scale with a gradual shift from strong expectations to light influence

Completely to the left we find a parent making a child clean their room. Moving to the right there is someone trying to get their friend to join training.

Further along we find a discussion about dinner. And all the way to the right is someone telling a fact.

Before we delve into the applications on the personal level, it is useful to move the scope and inspect environments. Some environments require specific functionality and are therefore deliberately structured a certain way.

The military operates in stressed and time-critical situations and to excel the interactions among the soldiers are IB-based. On the other side of the spectrum, the purpose of discussion forums is to better understand chosen topics. To ensure that the discussion encompasses maximal information the interactions need to be SI-based.

When examining interactions at a high level it is easy to cluster them together and label them as the same approach. However, inspecting specific interactions and understanding the internal processes can yield completely different answers.

This difference can be illustrated with a military squad consisting of a sergeant and some soldiers. In one scenario the sergeant commands “shoot at the van“. Contrast this with another scenario where the sergeant informs “there might be a soldier aiming at you in the van“.

In both scenarios the soldiers end up shooting at the van, but the internal processes differ. Environments seemingly structured in one way, nevertheless contain far greater nuance.

Some environments are structured deliberately, while others are naturally emerging. If we attribute IB with a desire for control and SI with a desire for openness, the scale can be applied to detect and understand power dynamics.

By analyzing how agents interact with each other and rating the interactions from IB to SI, it is possible to map both the implied and perceived power hierarchies.

The scale is useful to understand environments and emerging power dynamics, but it also spurs reflection on the personal level.

“Do all non-SI interactions imply that the sender thinks he understands the world better than the receiver? And, can such an implication ever be justified?“

Interacting with some degree of IB means exerting influence of what the other person should do.

But how can one person better understand what another person should do than the person itself?

The second person, just like the first, has their own complex and vivid understanding of the world making them the best to decide what they should do.

Previously I have fluctuated, unaware, between the two end points when interacting with others. Now I consciously try to interact with as much SI as possible.