06 August 2011

About Hats

Watch this video about a company that makes hats. The same management attitude is required for software companies. I believe my late friend RR practised this.

17 July 2011

Coding Productivity

Some days back Ramy sent me  this link. A some what in-extenso quote from the article:

“… To the contrary, they fully understand that few things are more foolish, dangerous and pathologically counterproductive than superficial productivity measures. Great coders don't just write great code, they grasp the essence of problems in ways that makes their code architectures clean, accessible and maintainable. The code not only works, other coders — perhaps less talented — can safely and creatively build on it, with it and for it.
Their code costs less to support and evolve even as it invites and facilitates new value creation. Only the technically naive and economically inept see code as a software deliverable that programmers should produce on time, on budget and on spec. People who really know what they're doing appreciate the lifecycle and ecosystem economics of their efforts."
Note: The emphasis in the above is mine.

 I believe that that was at the core of our development process at acmet's Tools BU.

An earlier post on  measuring software productivity is relevant to the subject.

Japanese Industrial Culture & Software

A decade ago Mr. Yuasa, a customer of acmet's, asked me, 'How is it that India is so good at software". My short answer to him was, "Because we are not good at anything else!" My reply was not entirely in jest.

This was my thesis, progressively strengthened over the years:
1. The large semiconductor companies that we dealt with did not value software tools (acmet developed and maintained compilers for them).
2. They made their money selling processors. Tools and their maintenance they gave away free to support sales. It was a pure cost that, if not made zero, had to be minimized. (In a way that helped us, as otherwise they would never have outsourced tool development.)
3. The top decision makers had made their careers and reputations developing, manufacturing and selling chips - drams, processors, ... The semiconductor companies had software talent but I doubt if they really had the respect of top-management.
4. Unlike what some of my colleagues believed, Japanese software talent was strong. Evidence of that was their dominance in games and in robotics.

The Jul 16th - 22nd 2011 issue of The Economist has an article titled, "Samurai go soft", with the subtitle, "Japan's preference for hardware over software is fading". Here are some quotes:
"A samurai would never write software!" barked a senior executive at one of Japan's biggest electronics firms, ....
 .. by bundling programs with machines, they taught customers that software was of little value.
 The article mentions that, among others, "Hitachi and Toshiba are hunting for software firms". I wish this had happened earlier - or acmet were still around.

In 2008, I remember, a large Japanese conglomerate was interested in investing in acmet. But then the financial melt-down happened. The rest, as they say, is history :-(

05 June 2011

Source Code Comments

Some weeks ago my son who works for one of the iconic software companies rang up and asked, "What is the definition of Standard Deviation?"

I was rather taken aback. He has a good degree in Mathematics and his college days are not all that long ago - at least compared to mine. So was it a trick question? Since at the moment I was having lunch, I used that as an excuse to get back later with the answer.

When I did get back with the definition (without having had to google it :-), I got the full story.

He was going through some code where the comments described  a wrong computation for Standard Deviation. Yet, given the halo around the people who generated the code he doubted his own understanding. As it turned out the code was correct. The comments were wrong.

Imagine if a maintainer decided to change the code in accordance with the comment.

Here are the mistakes made by the author of the comments:

Describe the WHAT. In this case it is sufficient to say, "The following computes the Standard deviation of ....". If required a reference to a standard text or a Wikipedia link can be provided.
Describe the WHY? What use is going to be made of the Standard Deviation? Why is it required to be computed?

The HOW should be in the form of an algorithm. Again, in many cases the algorithm would be available in standard texts, or in Wikipedia; provide a link.

And use Intentional Naming. Use StdDev, or Sigma; not S.

16 May 2011

Code Reviews

Seth Godin has a recent post which I think is applicable to software artifacts.

Code and documentation will be required to be understood by developers long after the original authors have gone. It is important that reviewers "share their confusions" rather than "improving" the code.

14 April 2011

Are Business Models, Values Not Tested?

In a post made some months back, Seth Godin talks of the culture of testing at Netflix. According to Seth, Netflix tests everything, except for three things: their business model, their culture, and the change in business model by switching from postal delivery to online delivery. According to Seth these could not be tested.

Is it really true that these cannot be tested?

It is true that these cannot be tested like DVD cases. (Netflix tested 200 of those before deciding on the design.) Yes, they cannot be tested in-house, on a test-bench. But they are tested - and have to be tested - in the market place. Values too are a result of testing in the market place of life.  And like all testing these too involve time and costs.

All start-ups are based on memes that the founders bring with them. Values are memes. Business models too are memes. Memes like genes, are subject to Darwinian testing.

Netflix's early story gives an idea of the memes that led to the initial business model.

It is, I think, safe to assume that Netflix's values are largely based on what the founders had experienced, and seen, and absorbed, at other companies. These were the result of "testing" in their earlier work life. It is also safe to assume that these values are put to the test every day at Netflix. If the values are practiced they are reinforced, otherwise they mutate, or die.

10 April 2011

The Facebook Effect: Some Lessons for Startups

Note: The page numbers mentioned below are for the Virgin Books edition available here in India.

Innovation
Facebook was certainly not the first social networking site. There was (and still is) Orkut. There was Friendster. There was (and still is) MySpace. It definitely was not technology.

I believe the key component of the innovation was to spot a social need of students at Harvard. A need that was not addressed by other social sites. The other components of the innovation were:
  • Identity had to be true. You had to be who you said you were. This was validated by the college email-id.
  • It had nothing to do with meeting people. You online network was the same as your off-line network.

Open Source
Development could be done from a college dorm because open source platforms were used. The major cost was the cost of servers. I suspect Facebook continues to use open source platforms. No point building revenues for Oracle and Microsoft:-) Microsoft did at one time offer to buy Facebook. If that would have happened, I suppose they would have switched to Windows Server.

Lesson: FOSS provides a good platform for entrepreneurs. But be aware, that, "... while the software might have been free, it was not simple to operate." (pg38). Software wallahs wanting to use FOSS must be ready to invest time, or have already invested time, in learning the internals of the tools. It is an investment worth making.
 
Vision & Values
At one stage someone proposed to introduce an additional mouse click so that an additional ad could be shown. This was not acceptable to Zuckerberg as he was "fanatically devoted to making his service easy to use".  Throughout the book there are numerous such examples. Though advertisers provide revenue, it is the users and their links that are the real assets of Facebook.

Lesson: Revenue, like costs, are constraints, they should not be the objective function.

Sustainable Growth
Pg 57-58:
"Every time the database was upgraded or the server array reconfigured, Zuckerberg tried to do it in a way that could accommodate ten times more users than TheFacebook had at that moment."

And again:
"So if the systems were acting up, capacity was at the max,or they couldn't yet afford new servers, they'd simply wait before launching at the next school. This was a rare asset at an underfinanced Web start-up. It allowed TheFacebook to grow methodically ..."

Lesson: Uncontrolled growth is a cancer. It can kill. Never let growth destroy the quality of the customer experience.

Growing after Assuring Demand
Pg 140: "By keeping the gates closed and only opening at schools once there was proven demand, Zuckerberg and Moskovitz, the expansion guru, ensured that when TheFacebook did open, usage would explode."

Lesson: Test your hypotheses about the market. 

Not Cool
Being cool can get early adopters. But for Crossing the Chasm, and then to get Inside the Tornado, and then to become a platform, you need to be perceived differently, and do things differently. And all along you need to consistently evolve your vision. The book is a study in how Zuckerberg did it.


Work Place Silence
Pg 49: "When they sat at their laptops .... it was eerily quiet. That is because when they did talk to one another, they did over instant messaging, even when they were sitting next to one another." (emphasis is mine)

Again:
Pg 137: "One employee a few years older who sat about six feet from Zuckerberg in those days received an IM from the boss. "Hey," it read. It was the first time he had gotten such a message. So, seeking to be convivial, this guy stood up from his chair, turned to Zuckerberg, and said out loud in a friendly voice "Hey!" Zuckerberg continued staring blankly at his screen."

Comment: The workplace atmosphere should be that of a good college library. Not that of a canteen. This is more so for start-ups as they should not be spending money on private offices.

And Finally
Learn how to leverage social media for marketing your offering.

31 March 2011

Quality Control and Quality Assuarance

India Software Brief group on LinkedIn has a post on protection from bad software. The actions to be taken by an outsourcer (the one getting the software developed) are all necessary acceptance checks. The problem is what happens when the acceptance checks fail? Sure, reject the product but what happens to rolling out the services that depend on getting this software?

Acceptance checks can provide assurance that bad software does not get accepted. It does not provide assurance that good software will be delivered.

Far better to check the outsoursee's processes and be assured that the final acceptance checks will not turn up serious deficiencies or defects. An incremental model of development, with actual functioning code delivered would give a better estimate of the progress. This, of course, requires that the outsourcer put resources to test each increment and give feedback.

A while back I posted my views about QA and QC. The outsourcer must verify the QA processes and, by providing feedback on each increment, become part of QC. I suspect the root cause of all outsourcing horror stories lie in not doing this.

Cyber Weapons against Embedded Systems

Watch this video on Stuxnet.

I suppose the answer, for systems that can justify the additional cost, is not to use standard off-the-shelf hardware. The people who built stuxnet knew the details of the Seimens SCADA systems that run the centrifuges. They would also know the details of the centrifuges. Iran, like Pakistan, does not have the capability to build centrifuges. (India's nuclear programme, I think, does not require centrifuges.)

Not using standard hardware and firmware means building them in the country. Good news for Indian engineers.

Safety is one dimension of embedded software quality. Safety includes security against malicious attacks. Watch this webinar on security in eHealth.

25 March 2011

A Better Way of Putting it

A few days ago I posted on Optimization: Objectives and Constraints. Today I read Seth's post. He puts it much better.

Are there Bugs in our Society?

Breaking India is a book by Rajiv Malhotra. The book also has a discussion group breakingindia@yahoogroups.com. I am member of the group and it is quite surprising to note the paranoia that some of us have.

It is the author's thesis that "India's integrity is being undermined by three global networks". The one that the book deals with is "Dravidian and Dalit identity separatism being fostered by the West in the name of human rights". (The other two, with which the book does not deal, are Islamic radicalism linked with Pakistan, and  Maoists and Marxist radicals backed by China.)

The Dalit and Dravidian situation are two fault lines of our society. It is a creation of our society. It is a defect in our society. It was created by us. It was not caused by some bug that came from outside. As with software, we must acknowledge that the defect is our creation; not the result of maliciousness of outsiders (or the stupidity of users).

What is Redaction?

I was browsing through Michael Barr's post about the unintended acceleration problem in Toyota cars. He uses the term redaction/redacted at a number of places. It is a word that I had never come across. He explains the term in the second paragraph of his post but since I wanted to get to the details of likely defects in Toyota's software, I missed it. A Google look up led me to believe it meant a frame or a side-bar that one commonly finds in article and books. (Incidentally Hindu's series on WikiLeaks concerning India also mentions redaction by the Indian Embassy of the Indian Ambassador's statement.)

I downloaded Appendix A  to NASA's  report from NHTSA's site. When first I saw the document on the screen I thought there was some problem with my internet connection. It took me a couple of seconds to realize that those black boxes were redaction - plain and simple censoring. To me that appears very suspicious.

I have browsed through the post mentioned above and the subsequent post. Both posts deserve study. I strongly urge all those concerned with quality of large embedded software to study the posts.

15 March 2011

acmet's Tools BU Should Have Hired Parsis

I am currently reading historian Ramachandra Guha's book, "A Corner Of A Foreign Field". As its subtitle says it is the Indian history of a British Sport. I am no fan of Mr. Guha, but I was asked by my brother not to pre-judge and read the book. I am currently progressing at a couple of pages a day. Not because of Mr. Guha's writing, which is excellent, nor the content, which he presents very well, but because I continue to be pre-occupied with caring for my mother, working out, exploring avenues for remunerative work, and drinking beer. 

The book is a social history of cricket. Guha writes in the preface, "The making of modern India is its theme, with cricket serving merely as a vehicle, as my chief source of illustrative example". Though I have read just 56 pages, I recommend this book very highly.

Coming back to the subject of this post. People who have worked with me know the importance that I attached to a written record - Records of Discussion, Minutes of Meetings, Code reviews comments recorded by email, ... Now I know why it was so hard.

Guha says, " ... we, as a people, have a criminal indifference to the written record" (pg 46). He goes on to say, "Among the things borrowed by the Parsis from the British was a regard for facts". He mentions one Mr. Framji Patel who wrote a book that talked only of Parsi cricket and not Hindu cricket. The reason that the Mr Patel gave was that he would be "poaching on the preserves of my friend Mr. Telang, who, like a Rishi, has long contemplated writing a history of Hindu cricket".

Mr Guha's tongue-in-cheek comment: "This was a mistake, for Telang's book never appeared. Like a Rishi, the Hindu sportsman would operate only in the oral tradition".

The Tools BU had a lot of wannabe Rishis (some were even named Rishi:-).

14 March 2011

Optimization: Objectives & Constraints

Optimization is maximizing a desired objective function subject to given constraint relations.

Hospitals have to make profit, otherwise they cannot grow, or buy new machines, or get better qualified (meaning more expensive) doctors. They must provide the best medical care and treat patients in a manner that does not offend the patient's dignity. Given that a hospital has positioned itself for a certain type of customer, in its day-to-day operation its charges are no longer a variable.

So what should be the objective function and what the constraint? Should it maximize profit under the constraint that patient care and handling does not fall below some minimum threshold? Or should it maximize the patient experience under the constraint of some minimum profit?

What of software companies? Should you maximize thruput (executable lines of code, function points) per person and minimize Quality (documentation, reviews, unit tests, ...) subject to the constraint that acceptance checks are passed? Or should you maximize Quality subject to the constraint of minimum thruput acceptable by the customer?

(True story: We once undertook work that the customer wanted done in 7 months. We said, we would deliver but without testing. The customer said that was okay as long as it was top quality. The project proceeded. After 7 months till about another 18 months all lived through interesting times.)

What we choose as objective and what we set as threshold for the constraints depends on how we see ourselves. It is what we are - and are not. It is about our values.

One objective is not intrinsically superior to another. What is important, however, is that objectives, and constraint limits, must be consistent through out the organization. That is what forms the culture of the organization.

28 February 2011

Business & the Principles of War

The British armed forces (and thus the Indian armed forces) have 10 Principles of War. I learned it by the acronym COSSAC FAME. These are equally applicable to business strategy & tactics.
  1. Concentration. Determine the chinks in the competitions offerings, needs that are not being addressed, segments that are not being served, ... Then concentrate on exploiting these weaknesses
  2. Offensive Action. Be proactive. Do not wait for the customer to walk in the door. Go out and find her. Do not wait for the competition to obsolete your product. Obsolete it yourself. Actively seek innovation. Follow the golden rule, "Do onto others as they would do onto you; only do it first." When on the defensive, counter-attack to slow down the competition.
  3. Security. Temper offensive action with measures to safeguard against exposing your own vulnerability.
  4. Surprise. Innovate. Then execute with speed. Slow execution will alert the competition.
  5. Administration. Meeting regulatory & legal requirements. Managing cash flows. Safe and hygienic working conditions ... Things that will not give you a competitive edge but must be done if you are to stay in the game. What Dealing with Darwin: How Great Companies Innovate at Every Phase of Their Evolution calls context
  6. Co-operation. Between different function heads. They should not be working at cross purposes, or playing political games.
  7. Flexibility. No plan survives contact with the enemy as expounded by von Moltke. Gen Eisenhower said, "Plans are worthless. Planning is essential." The actual scenario will not be quite the same as the one planned for. Business environments change, assumption turn out to be not quite true. If business plans are inflexible they will break.
  8. Aim, Selection & Maintenance. There is a hierarchy of aims. At the very top is the Mission of the Business. This must be selected with due thought and then zealously maintained.
  9. Morale. It is adversity that tests morale. What builds morale is not food courts, or week-end beer bashes, or company parties. Management must be frank and truthful on all company matters, must share the pain, must train people for tasks they are to handle and not set them up for failure. The CEO must take the lead. It calls for relentless and truthful communication through word and deed, and celebration of even small, individual, or team wins. Morale indicates the quality of leadership.
  10. Economy of Effort. Get the maximum bang-for-buck. Be frugal - but effective.

27 February 2011

Entrepreneurial Traits and Cricketers: Aggression

Aggression must be backed up by muscle (capability). Bluster, or posturing, will land you in trouble (read that as "You will get slapped by Bhajji and end up weeping on national TV":-)

In my experience of delivering software, an aggressive attitude in committing to customer demands, that does not take into consideration actual capability, will result in poor quality of deliverables, missed schedules, an unsustainable work process (heroics cannot be performed on a 24 x 7 basis)  and finally angry customers. I would much rather under-promise and over-deliver and have a sustainable process.

Having said that, sometimes heroics are called for. The operative word there is sometimes never 24 x 7. Stretch is fine, but beware of stretching beyond the elastic limit.

Set Big Hairy Audacious Goals (BHAGs) but read this before doing so.

Set a target "to put a man on the moon by the end of the decade" but only if you have already build successful ICBMs.

This is the final post on "Entrepreneurial Traits and Cricketers"

26 February 2011

Entrepreneurial Traits and Cricketers: Focus

One of the traits mentioned in the first post in these series was focus.

Problem with focus is it can get too narrow. That leads to tunnel vision. Or it can be too broad to the extent that everything is in focus - something like a wide angle lens

Let me give an analogy. Search and Track are two operating modes of radar systems mounted on modern fighter aircraft. The radar is capable of switching between both modes at a high frequency. Given the rate at which the scenario changes the effect is of simultaneous search and track. For tracking a target, preparatory to firing its weapons, the weapons system uses a narrow focused beam. For being aware of other aircraft in its vicinity - friendly or hostile - it uses the search mode which is much broader, far less focused, beam.

An entrepreneur needs both a narrow tracking beam to lock on and track her target and a broad scanning beam to tell her of likely threats, and collateral opportunities.

How broad is broad? How narrow is narrow? Depends on the market dynamics. That's what makes entrepreneurship fun!

Entrepreneurial Traits and Cricketers: Fear is Good

In my ealier post ,  I said that fearlessness is one of the traits that Dr Nandini mentions in her article in the "Entrepreneur".

I believe it is the ability to overcome one's fears, to not let fear cloud one's thinking, and not the absence of fear, that is important. And that requires training. And faith in one's capabilities developed through training.

Fearlessness is doing a trapeze act, without having trained for it.

As Andy Grove's book title says, "Only The Paranoid Survive". But it is paranoia that is under control, as he explains in the preface.

You need fear, "kyunki", as the ad for a soft drink has it, "Dar ke agey jeet hai" - because success lies on the other side of fear.

22 February 2011

Entrepreneurial Traits and Cricketers

Last week, on a flight to Delhi, I was reading the February issue of the Entrepreneur. The lady in the aisle seat enquired if I was an entrepreneur and we got talking. She mentioned that she writes a regular feature in the magazine. The issue that I was reading had an article by her on entrepreneurial traits and styles of some Indian cricketers. The lady is Ms Nandini Vaidyanathan.

I have thought about her article for the past few days.

The article lists 11 traits:
  1. Focus - Gambhir, 
  2. Fearless - Sehwag, 
  3. Reliable - Dravid, 
  4. Outside the box (Nandini calls it "Do the impossible") - Laxman, 
  5. Genius - Tendulkar, 
  6. Leadership - Ganguly, 
  7. Street fighter (Nandini calls it scrappy) - Dhoni, 
  8. Identity - Irfan Pathan as an example of losing one's identity, 
  9. Resilience - Kumble, 
  10. Adaptability - Harbhajan, and finally 
  11. Aggression - Sreesanth.
 Cricketers at this level have been playing the game since they were kids. They have had time to experiment with styles. They have varied their heroes. They have learned whether they were speedsters, or leg spinners, or off spinners, openers or middle order, close in fielders or outfielders. In short they have had a long time to discover their identity. They have had time to discover if they should pursue cricket, or become an engineer, or in some cases both. Except, of course, a prodigy like Sachin. Prodigies do not require time to discover themselves.

Entrepreneurs, largely, start much later in life. By that time their traits have been set. What is worse is that most entertain wrong notions of their traits. To discover their identity they need to go and play "gully cricket". But then scoring "ducks", or getting hit for "sixes" in "gully cricket" is very bruising for the self-image - also the pocket. A mentor, someone like Ms Nandini, can be of great help.

In subsequent posts I will write about some of the traits.

The Ministry of External Affairs (MEA) Needs to ask 5 Why

Our Foreign Minister, SM Krishna, commenced his address to the UN Security Council by reading out the address of the Portuguese Minister, translated copies of which would have been distributed in advance to all delegates attending the meeting. The Deccan Herald in Bangalore carries opinions about the faux pax. I hope the MEA does not adopt a similar attitude. People will wonder if our Nuclear Button is clearly marked. Won't do to have it confused with the button on some minister's office coffee machine :-)

The MEA needs to do 5-Why analysis. Here is what it might look like

1. Why did the Minister read out the wrong speech?
  1. His own speech could not be distinguished from other documents in front of him.
2. Why could they not be distinguished?
  1. Because his speech too was printed on the same stationery and the same printer as all other speeches and documents.
3. Why could the document not be printed on the Government of India stationery and put in a separate folder marked prominently as, "Address by the Foreign Minister of India, Shri SM Krishna, to the UNSC, on
"?
  1. No sanction for special stationery.
  2. Funds for getting special folders exhausted.
4. Why could funds, or sanction not be obtained?
  1. Because the Indian Mission at the UN is not the CWG Organizing Committee.
5. Bingo! That's the solution: Make Suresh Kalmadi the head of the Indian Delegation at the UN.


Explanation of hiatus from Blogging
For those who were wondering what happened, since early January, I was attending to my mother, in Bangalore. She is much better now. Hopefully I should be back in Noida in a couple of weeks with more time on my hands. The couple of weeks that I spent in hospital, attending to my mother, gave me lots of time to reflect and read - I had no access to my laptop. I will blog about some of that.

01 January 2011

Will Social Networking Tools Help?

The December, 2010, issue of Entrepreneur has Vivek Paul on the cover. The cover story talks of Kinetic Glue the venture that he has started.

The features of the products, I think, will definitely add to productivity - provided if it is used. The armed forces have a saying, "A machine is only as good as the man behind the machine". It is this man (and increasingly woman)-behind-the-machine - their training, motivation, ethos, value - that determine effictiveness.

So too with any tool. It needs people with the appropriate culture. A collaboration tool can only help if there is a culture of collaboration. Tools cannot break down silos. If the correct culture is built and nurtured, and contrary behavior robustly discouraged, will silos break down.

Lacking a culture that discourages silos, the tools will be ineffective. Result: The tool will get a back name.

Before selling the tool should not Kinetic Glue conduct an analysis of the culture and advise the company about changing the culture? I think so. I doubt if Kinetic Glue, or Vivek Paul, think so :-(

If the correct culture is not in place should Kinetic Glue sell them their tool? They should not. I am sure Kinetic Glue will sell it.

It comes down to defining who is your prospective customer; and who is not - segmentation.

To all readers of this blog:
A High Quality, Low Defect, Sustainable work year;
May you spot and quickly fix Broken Windows; 
May you spot and chase away all Wolves-in-Sheep clothing;
Happy New Year!

"War" Stories

Some great lessons over at LinkeIn's Real-Time Embedded Engineering. Must read for all embedded engineers.