Thursday, February 14, 2013

Software Analysis

Software Analysis is the art of gaining knowledge of an object, in terms of itself, as well as in terms of how it interacts with other objects in the world and the world at large. We must view these interactions in the infinite contexts that these interactions take place, as well as through all possible life cycles of its product-world interactions. Keep in mind that an object will behave differently in different settings. It will also behave differently when interacting with different types of objects. Then there is the history of the object to take into consideration.

Needless to say, complete knowledge is not just difficult but theoretically impossible. The reason is because of unspoken assumptions and hidden variables. Given this, the best thing we can do is start with the intended functionality of an object and work from there.

Functional Analysis - Intended use

The intended use is the official use of the product. It is absolutely essential that the product work correctly for the proper use of the product. Before any testing can begin, you need to know the intended use of the product or service, who the end-users are, and in what context people will use it.
Let’s use a pencil as an example:

Function

The intended use of a pencil is to write.

Context

We normally use pencils to write on paper. Should we expect the pencil to behave the same for all types of paper? The answer is, No. The pencil will behave differently on different surfaces.
 
What sort of surfaces is possible for writing? We have the standard notebook, wax paper, cardboard, sand paper, wallpaper, the hard cover of a textbook, etc. The more types of paper surfaces we can think of, the better our testing can be.

However, paper is only one category of surface on which people write. To think of other surfaces, we need to think of who will use pencils in their daily lives.

Users

Secretaries, construction workers, astronauts, and deep-sea divers are a few people who would use pencils. We have already explored the surfaces on which a secretary might write. They include notebooks, books, envelopes, loose paper, and self-sticking notes.
 
Construction workers write on wood, particleboards, and fabricated surfaces. They do this in order to mark where to cut and drill.

Deep-sea divers write under water. A deep-sea diver needs a waterproof surface on which to write. To best serve the diver’s needs, we need to design not just a pencil but surface on which to write on, since they both work in concert. The same reasoning applies to astronauts. We normally don’t think of standard paper and pencil as being a single design unit, but that’s because we are so used to it.

Astronauts need to write in space. Astronauts have unique requirements. They wear bulky gloves. This means that the pencil needs to be equally bulky. They are in the vacuum of space. This places unique requirements on pencils and writing surfaces. Then there is the issue of no gravity and wild swings in temperature.

Construction

The construction of an object has a profound effect on its function. It affects performance, security and maintainability, to name a few things.
 
Pencils are usually made of graphite, but other materials are used. For instance, colored pencils in an arts store are made of a waxy substance. This, together with a pencil’s hardness determines how well a particular type of pencil will behave when writing on a specific surface. (The artist is a user we didn’t think of before.)

In terms of hardness, the most common writing pencil is #2HB. This is popular for writing tests, because automated test scanners see them best.

Life Cycle (Use Cases)

Many companies try to steal the best people from other companies. In my opinion, this is a lose-lose situation.
 
What is a pencil’s life cycle?

The pencil is manufactured, used and then disposed of.

A pencil gets used, gets worn down and gets sharpened for further use. Is the pencil easy to sharpen or does the tip break easily? Does the pencil hold a sharp point or does it need to be sharpened often?
Then there is the issue of erasing pencil marks. This is where we test pencils and erasers on different surfaces. On some surfaces, pencil marks cannot be erased. Is that important?

There are many uses for pencils other than writing, but those are beyond the scope of this type of testing. If a customer finds a use for a pencil that doesn’t involve writing, then that’s free functionality. The manufacturer could optimize the pencil for this use if there is marketing incentive.

Safety-Security-Sustainability

Let’s look again at the pencil’s life cycle.
The pencil is manufactured:
We need to look at the manufacturing process. This includes how the materials were obtained, assembled and shipped to the end user. This is becoming important from an environmental and sustainability point of view. Also, the safety of workers is paramount.
The pencil is used:
Is it safe to be used by children and adults? People chew on pencils. Is the pencil covered with lead-based paint? Are the shavings dangerous? Does the shaving require special disposal? The graphite tip sometimes breaks off. Will that cause problems if swallowed?
The pencil is discarded:
Does the manufacturing process take recycling into consideration?

Summery

  1. Function - What are the intended functions of the object?
  2. User - Who are the intended users?
  3. Context - What are the contexts in which each user will use it?
  4. Life Cycle - What is the product life cycle?
  5. Safety, Security, Sustainability – Helping the world become a better place.

Functional Analysis - Unintended use

For various reasons people will use items in unintended ways. Sometimes the user wants to innovate. Other times the user misunderstands the correct function of the item and so uses the product in an inappropriate way. Often the user just makes a mistake. Ideally, the product should handle these scenarios in a safe manner.
 
There is a saying: “Fool-proof implies a finite number of fools”. From a cost point of view, it’s not possible to protect all fools. It’s not even to possible to predict how a fool will behave because even they don’t know. The only thing we can do is use the past as a guide to logically analyze the situation.

Functional Analysis - Malicious use

When it comes to physical objects, it’s difficult to prevent people from using items in a destructive manner. No one can prevent a person from stabbing someone with a pencil. There’s nothing a manufacturer can do to prevent this scenario, other than placing a warning label.
 
However, there are many things we can do to keep people and the world safe.

(This is an excerpt from a book I'm writing on Software development.)

No comments:

Post a Comment