Some thoughts on software development

For whom to write software :

– Users : Please think of the fellow human who’ll be using the software. Let’s make his life better.

– Fellow developers: Compliers can parse the worse of our code but software is written in a certain way for the fellow developers – someone showing us our code after 5 years shouldn’t cause us embarrassment. Or let’s try to minimize it .

– Company : Someone is paying you to write this , to solve a certain problem. Think of them as well – how can you add more value. Many a times, it can be different than just writing code – a suggestion about what’s possible.

Things to consider in mind:

– Don’t cause  bugs.

– Think of the larger architecture. Try to understand how various things interact with each other. I have found it to be key in problem solving – having a higher level complete picture makes us focus on areas where handshaking happens or corner cases arise where most of the difficult issues arise.


Anti fragile software

Software especially critical software ( as used in integration layer ) can benefit from Taleb’s triad of fragility, robustness and anti-fragility.

In short:

Fragile : If a thing loses from randomness e.g. a glass falling on the floor and breaking down.

Robust: If it works normally . Most things do when no stressor is applied.

Anti-fragile: It gains from stressors. e.g. Human body when we exercise.

Software: Taleb didn’t touch software but given how important it is becoming in today’s world – some degree of redundancy will help to cater for situations when things go wrong. For example, if you just have a middleware bus and it goes down – what happens next ?

Netflix uses this concept literally – it has a chaos monkey. According to them – “We have found that the best defence against major unexpected failures is to fail often. By frequently causing failures, we force our services to be built in a way that is more resilient.”

In college, I had class on TMR ( Tripular Modular Redundancy ) .  TMR is a fault-tolerant form of N-modular redundancy, in which three systems perform a process and that result is processed by a majority-voting system to produce a single output. If any one of the three systems fails, the other two systems can correct and mask the fault.

In TMR, three identical logic circuits (logic gates) are used to compute the same set of specified Boolean function. If there are no circuit failures, the outputs of the three circuits are identical. But due to circuit failures, the outputs of the three circuits may be different. A majority gate is used to decide which of the circuits’ outputs is the correct output. The majority gate output is 1 if two or more of the inputs of the majority gate are 1; output is 0 if two or more of the majority gate’s inputs are 0. The majority gate is a simple AND–OR circuit: if the inputs to the majority gate are denoted by x, y and z, then the output of the majority gate is:

 xy \lor yz \lor xz

How it is relevant to modern software development ? Software is becoming more pervasive and complicated with time. We can learn from nature how it has created redundancies – the system may not be the most efficient at a given point of time – there is redundancy.However, over time it is definitely more stable.