Sunday, January 20, 2013

TTT Curve - Economic Growth - and the Source Code [Cont]

In my previous post we skimmed through T-T-T curve especially for people who don't have relevant background.



source: http://www.materialsengineer.com/E-Steel%20Properties%20Overview.htm

Now, let's talk about its connection with the Economy and yes - the Source Code.



Year 1991 is marked as turning point in India's economic history, when the (the then) finance minister Dr. Manmohan Singh made many reforms, which created many opportunities. Thereafter India enjoyed a massive economic growth especially during the period of year 2004 to 2008. India's GDP (Gross Domestic Product) since 1991 has always stayed impressive, when developed countries had been stagnant.  However HDI (Human Development Index) of India has continuously regressed. I used to question myself "Is too much of economic growth good or bad?" I believe in Laffer Curve, which gave me the same answer that I derived the other way.

When economy grows, it changes many things. You have new factories producing products that people will consume. The same factories create jobs for people who in turn by these products. People as they create wealth, buy houses and new cars. They migrate to cities. City cannot accommodate such a large rise in population, so we build multi-story towers which again gives business to construction companies which generates more money & employment. People go to shopping malls, multiplex theatres & restaurants to spend the money and so on... A goody goody picture painted by Capitalism.

But the picture is definitely no that rosy. All the things above have created severe Environmental Debt. I completely agree that growth has to occur. There is no progress without economic growth. However, when growth happens, the system has to change its Internal Structure. Widening the roads & increasing allowable height of the buildings does not solve the problem, rather it complicates the problems or creates ones. The city needs to be re-built with new design, infrastructure, schools, gardens, hospitals and so on - towards its new needs. But that has not happened. Capitalism has always painted the illusion that system takes care of itself. The strong force within individuals to make more money & resources actually helps the whole society to improve. To some extend its true - but only to some extend.

What makes difference here is the sheer Rate of Change. Look at TTT curve - there is something called as Critical Rate of Change. Very high rate of change (e.g. rapid economic growth) is required to achieve higher GDP, but it also creates a lot of internal stresses & distortion. Some times we cannot control rate of change - we are mercy to it. But we can certainly control "structure of the economy" (i.e. grain structure) and "Government Policies" (i.e. alloying elements) that will shift the TTT curve to right side of x-axis.

What happened to India during the period of year 2004-2008, has happened to my beloved city of Pune where I live. Historically this city has been hub for numerous  research & educational institutes like "National Institute of Virology", "India Meteorological Department", "Bhandarkar Institute for Oriental Research" and so on. However growth of city in last decade has been based only on Consumption, rather than Creation. We didn't add any more premier institutes, what we added was only things like shopping malls & restaurants.


The same thing has happened to many software companies. I know a few software companies which were small in size, but were serving a very niche market. They had great people working in a very open & professional environment nourishing high value system. Needless to mention they were making good money & wee also contributing to society. Working with those few companies was considered as a symbol of pride. During year 2004-2008, the market environment grew very rapidly. Investors & stock market pressurized companies to show every quarter to supersede market expectations. Supply of people was short. To make the billing happen & tick the business, company started recruiting in tons of people without really checking do they really fit into company's values & culture. Recruitment heads of these companies were given the "Headcount Targets"! This encouraged mediocracy & companies lost their reputation. They are somehow sustaining the growth, but they lost their much preserved organization culture. It is the sheer rate of change without proper grain structure & without alloying elements that killed those companies.

Same thing happened to the source code. It was eighties, when Fred Brooks wrote the famous & beautiful book called "The Mythical Man-Month". But it seems we are still are doing the opposite. Expected turn-around time for projects to deliver has shrunk tremendously. To achieve that, managers put lot of developers & testers on the project without smooth ramp-up. There are frequent governance reviews, so frequent  -that team members spend more time preparing for reviews than actually writing code or testing it. Projects get delayed & management once again puts more people in a hope to bring it on track. Quality of code degrades rapidly & the project never gets over.

Expected turn-around time is going to shrink further. We are going to get developers & testers who may not have required competencies. In fact gap in competencies is going to be very high.  And we may not afford to be very choosy in choosing the people, as pressure from investors & stock market will be tremendous to short QoQ results. This is fact of life, which we have accept. When economy grows fast companies are always short in supply of skilled people. We are not talking about niche companies here, but general market here - especially in context of common Indian Software Companies.

Question is; can we still make investors happy without sacrificing internal quality of code & without diluting organization structure? We need to think differently. Effect of grain size & proper alloying elements help a lot. In terms of code, fine grain structure (i.e. highly cohesive, loosely coupled software components written with Single Responsibility Principle) is able to withstand high rate of churn. The best Alloying Element is "Testability and Tests". It is often difficult for companies who recruit in masses, to teach new-comers about writing good code, software design, Design Principles, Design Patterns , Programming Paradigms, usability & rapidly changing technologies & so on - in short span of time. But is we teach people, work with them & show them how to write a testable code, many other things fall in place automatically. Testability is the way to scale. Its the best alloying element.

I learnt the magic of testability when I visited  GTAC-2010 ("Google Test Automation Conference") a couple of years back. The talk by Russ & Tracy "Flexible Design, Testable Design, You don't have to choose" really provoked me a lot. I went back to my environment. I applied to multiple code bases with projects from different challenges, its amazing to see how simple it is! It really works!

No comments:

Post a Comment