Creating a Software Narrative

February 23, 2014 at 5:26 pm Leave a comment

Undated and unlocated picture of American British-

So why a narrative?

Our lives are a narrative. They have a beginning, a middle and an end. As T. S. Eliot states: “In my beginning is my end.”

It is this narrative which is the dominant strain of our lives, and it is this narrative, which although at times diverted, defines who we are. Our narrative is defined by what we choose, and what we reject. Our choices present a narrative and this narrative, or composition of choices, defines the line from our beginning to our end.

So how can we use a narrative to define our software?

Think of software as a narrative which describes a story. The story is the path from the beginning of the code to its end.

In the beginning, we name the piece of software. The name may be as simple as GetTime(). This defined the purpose. It defines the goal. At the end of the code, we would reasonably expect to have the time at hand. We would certainly not expect to have our bank account balance.

The code also states what the user must provide. For a method, these is usually the arguments or parameters.

The concept of encapsulation in software means that the software has a guarantee of what it will deliver and delivers that. It does not specify how it will deliver it, but it also should not do anything that is not expected. These unwanted liberties are referred to in software as side effect.

Although, not a part of the contract, the code should be single purposed. If we ask for the time, we would not expect it to reset the clock. To reset the clock, one would expect to find a method called SetTime( newTime ).

We could have a method called GetAndResetTime( newTime ), but that really is mixed purpose. There is no logical relation between getting the time and resetting the clock.

So, our software should remain true to the narrative. Like a paragraph, it commences with a topic sentence, in our case, a name. This tells us what to expect to happen. There is a middle. The purpose of the middle is to satisfy the purpose as stated in its name. It should not do anything which does not relate to that goal. Then there must be an end, which satisfies the contract.

What we call the beginning is often the end
And to make an end is to make a beginning.
The end is where we start from. And every phrase
And sentence that is right (where every word is at home,
Taking its place to support the others,
The word neither diffident nor ostentatious,
An easy commerce of the old and the new,
The common word exact without vulgarity,
The formal word precise but not pedantic,
The complete consort dancing together)
Every phrase and every sentence is an end and a beginning,
Every poem an epitaph.

T. S. Eliot: The Four Quartets.



Entry filed under: Uncategorized. Tags: , , , .

One Size Does Not Fit All Making A Start

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed

The Creative Site Administrator

Creative Time Management.

February 2014
« Jun   Mar »

%d bloggers like this: