Air Crash Investigation

During my entire schooling I grew up watching Discovery & NGC. Air Crash Investigation was one of the programmes that me & my brother used to watch & talk about the most. The gravity in the narrator’s voice, the choice of words, the characters & actors, the melancholy, the sadness, the rage, the mystery & the investigation full of technical details – it had all the required ingredients in perfect proportions to make a great to program. that such that there was a point in time, when NTSB almost became a household name at my home for sure. This is my forever WIP work, and I dedicate this post to my brother, as this reminds me of my childhood days. I’ll post the latest story on the top.

Alaska Airlines Flight 261

We were discussing current affairs & economic impact that today’s news of Capgemini/Nasscom’s prediction, TCS shares buyback & Infosys ceasefire episodes can have. Donald Trump is now officially POTUS and it’s imminent that his policies can jeopardise Indian IT sector. And, TIL that NASSCOM was indeed a lobby and not some IT company as I had previously assumed it to be.

During this discussion, we began talking about various clauses associated with Severance pay (while discussing Rajiv Bansal, Infosys CFO’s exit), suddenly the topic of ‘garden leave’ popped up which also prevents employees from sharing trade secrets. Such was a case with Punit Soni, Ex Chief Product Officer, Flipkart.

And so did another case, of the whistle blower, the employee from Alaska Airlines, who went loud & exposed the company’s nefarious maintenance practices. He wasn’t fired, but his access to office was prevented by putting him on garden leave, where he’d get the salary sans the incentives & allowances.

Aeroflot Flight 593

The most unfortunate of the stories, where challenges related to autopilot, language & demography surfaced as the major reason. One’s conscience will never allow accusing the innocent 12 year old boy Eldar, the pilot’s son, who was playing with the Air Craft’s control column unknowingly disengaged the plane’s autopilot, which did not warn or alert the pilots who were familiar with Russian versions of flights.

Überlingen mid-air collision

Perhaps because of its dramatisation, I felt it to be the second most saddening & melancholic accident, where the Air Traffic Controller crew, who was present on that fateful day, was later murdered, possibly by a victim’s family member. Such sadness.

A slow radar and over trusting human voice over computer generated voice  led to in-air head-on collision between  a Tupolev Tu-154 passenger jet from Bashkirian Airlines Flight 2937, and a DHL Cargo jet, DHL Flight 611, a Boeing 757 cargo jet, on 1 July 2002.

I remember it most for the saddening narration about the broken pearl necklace memorial built in the memory of the passengers who lost their lives that day.

American Airlines Flight 191

American Airlines Flight 191 was a regularly scheduled passenger flight operated by American Airlines from O’Hare International Airport in Chicago to Los Angeles International Airport. A McDonnell Douglas DC-10-10 used for this flight on May 25, 1979, crashed moments after takeoff from Chicago. All 258 passengers and 13 crew on board were killed, along with 2 people on the ground. It is the deadliest aviation accident to have occurred in the United States.

Engine number one, on the left wing, separated and flipped over the top of the wing. As the engine separated from the aircraft, it severed hydraulic fluid lines that locked the wing leading edge slats in place.

About three minutes into the flight, at local time 3:27 p.m. EST, the plane struck a flock of Canada geese during its initial standard instrument departure climb out from LaGuardia, just northeast of the George Washington Bridge. The bird strike caused both jet engines to quickly lose power.

As the aircraft lost altitude, the flight deck crew considered attempting to return to LaGuardia or to land at nearby Teterboro Airport, but decided that the plane could not reach either. They turned southbound and glided over the Hudson, finally ditching the airliner off midtown Manhattan near the Intrepid Sea, Air & Space Museum, about three minutes after losing power.

US Airways Flight 1549

The entire crew of Flight 1549 was awarded the Master’s Medal of the Guild of Air Pilots and Air Navigators. The award citations read, “This emergency ditching and evacuation, with the loss of no lives, is a heroic and unique aviation achievement.” National Transportation Safety Board member Kitty Higgins described the feat as “the most successful ditching in aviation history.”

This is the story behind the noteworthy movie Sully, starred by Tom Hanks & directed by Clint Eastwood.

Who is at helm in a Start up?

Few days ago the news about top level shifts, followed by some top-level exits, in ‘the’ most prominent Indian startup captured headlines when the founders were stripped off of their CXO titles and their responsibilities were reduced to mere placeholder-roles akin to rubber stamps. They were replaced by an administrator appointed by the investors.

The founders still held the majority shares, including veto shares, their respective chairs at the board of directors and the right to vote. And that made many believe that they still held power & control.

The whistle blower troll circle, often referred to as the Startup L. Jackson(s) of India had this information at least a month ahead of its announcement. They kept on hinting towards the upcoming tsunami of layoffs, cost cuts and massive reorganizations. The keenest of the observers started making speculations.

But there was certain class of objectors who chose to turn deaf to all these noises. I had a spat with one such objector over the fact “who still holds the power here“.

 

A naive animal in an animal farm believes the breeder feeds them & hence will never kill them. This happens to people too. Or should we call them sheeple?

The Ship

Consider a startup as a ship, that left the pier with a limited supply of food & water & a mini livestock aboard (no, not Noah’s arc) and has to complete a 90-days’ journey across the Atlantic (no, not Niña, Pinta nor Santa María). Midway the ship hits a rock (no, not the Titanic). The captain’s damage assessment team did a survey and kept their assessment confidential to prevent undesirable panic among the sea-men. But they did not have to ability to prevent actions by individuals onboard.

Some could sense the threat, some couldn’t, and some decided to wait while some chose to believe that the threat was nonexistent.

The Rats

When a ship is about to sink, rats jump off the deck first and per the code of conduct, the ship’s captain is always the last.

It’s not bad to follow your survival instincts. It’s not bad to be a rat or follow one. Saving one’s life should be one’s top priority. There is no reward that can compensate loss of life. Better be a rat & survive than an audacious man on deck to die later miserably.

Proactive Rats

Some rats are wiser than the others, those who read the signs early & observe the symptoms, match the patterns and take action in right time. They are the pre-crastinators.

One among many such signs, one is M&A. At 31:48, Guy explains when a VC firm acknowledges your company as a loser company (say loser A) in their portfolio, they arrange your acquisition by another loser company B in their portfolio to save face.

Procrastinating Rats

Some rats are procrastinators. They are hesitant about jumping off. This hesitation may not be inherent to them. It might just occurs to them because of the the market situations. I mean, what would they do if they left the ship & boarded another which sank immediately after their arrival?

Now, you might complain – that’s totally hypothetical, stop cooking up stories. Well, ebay was shut 2 months ago and they’re recruiting & on boarding people until a week before they pulled the shutter.

So, these hesitant rats choose to take action when the moment finally arrives. They still manage to survive the situation because they remain prepared & well equipped to handle it.

The sheep and the suicidal lemmings

So, this startup had lost its first batch of rats who ran away elsewhere to save themselves from the big tide. But now it was left with the brain-dead lemmings, and the docile & gullible lot  – the sheep.

The lemmings have no ability to think. They just follow the one before them. The possibility of their survival depends entirely on their leader.

The sheep can foresee some danger approaching them. But instead of dealing with they, they decide to bury their heads in the sand & believe that nobody’s going to hurt them.

I’ll definitely appreciate if that’s self-confidence induced audacity.

But if that’s ignorance induced ostrich syndrome, then this needs to be stopped. Choosing to remain in a constant state of denial while overlooking the facts and the phenomena is a blatant insult to one’s conscience, that their emotions overpowered their ability to reason,  that they have shut their eyes and pretending that nobody’s watching them, that they can  no longer distinguish what’s reality and what’s delusion.

The start up laid off several of its staff including their head of products in June-July citing the obvious reasons – performance. Some employees took action and fled for security.

The startup is laying off some from its leadership team.

The threat is imminent. Of course, correlation may not imply causation always. But during the moments of crisis, being a bit pessimistic can be good. Your intuitions may not be accurate enough to help you out in need.

The problem with intuition is that people only remember when their intuition was right–truth be told, their intuition was probably wrong as often as right.

Guy Kawasaki, Art of Recruitment

When the news came, it captured the attention many. Budding entrepreneurs, graduates, engineers, buyers, sellers, economists and even the consumer base in India who had developed an emotional connection with the brand – everyone was curious what was going wrong. All of a sudden, the poster boys of Indian startups became the example of the biggest losers.

But it’s even more surprising to see that there are still people who believe that the तारणहार (Taranhar) will save them from the apocalypse. Good luck to them!

Guy Kawasaki: The Top 10 Mistakes of Entrepreneurs

Long back while dreaming about creating my own startup, I was reading, watching & stuffing myself with information from all sources and I happened to come across a brilliant talk by Guy Kawasaki where he explains the top ten mistakes by entrepreneurs, and at 23:30

Many many entrepreneurs believe as long as they and their buddies own 51% of the company they are in control of the company …

… but the truth is the moment you take outside money you have lost control of the company.

It never comes down to a vote 51 to 49.

This is not the US senate.

The moment you take external investment you’ve already sold your company to the highest bidder. You no longer remain the owner, but become a salaried (or non-salaried) employee of the company who has a mandate to meet the numbers & deliver on the promises.

The rights to vote, the seats at the board, or the percentage of ownership become irrelevant.

So who is at helm?

Can’t help you if you’re still unable to decide for yourself.

 

Dataset in React

When life gives you lemons, you make lemonade. And when it doesn’t, hack your way around it. Such was the case with a piece of React code where the previous programmer passed some data-* attributes as props, then onto the JSX markup and later extract them from event.target in the event handlers (or also from the event.currentTarget or from native event). Now, React isn’t ready enough for this (as of January, 2017). The dataset property which are generally accessible via the HTMLElement.dataset property aren’t handled the DOM way.

While playing around wrappers, I had to find a workaround to pass the data-* props. I wrote a little hack to extract the data-* attributes using regex and some spread syntax to pass the dataset to both the outer wrapper, and the inner component.

Example:

render() {
  // Extract the keys present in the `props`
  // Filter the keys which have `data-` as prefix
  // and insert them into `dataset` object
  const dataset = {};
  const { state, props } = this;
  Object.keys(props).filter (value => {
    if (/data-\S+/gi.test(value)) {
       dataset[value] = props[value];
    }
  });
  return (
    <Wrapper {...dataset} onChange={this.handleChange} >
      <Component {...dataset} name="component-type-1">
      </Component>
    </Wrapper>
  )
}

The advantage – you can access the dataset in your handleChange method from the event.currentTarget and event.target. Visit this MDN link to know more about dataset.

Redux forms: Scroll to form field containing error message

  • Redux forms v6.2+ provide you with an onSubmitFail callback when a validation fails in your form.
  • Add refs to all Field elements with name
  • Note: Without refs, this will not work at all.
  • Import the following function as a utility and bind it in your constructor.
  • Whenever there is an error, this scroll the page to the 1st element in the page containing errors.

 


import ReactDOM from 'react-dom';
/**
 * Handles the errors received and determines the first element
 * containing the error as the 'key' element, so that,
 * it's positions can be determined
 * Scrolls the page that element to bring into visibility
 * And focuses on the element
 * Requires developers to use 'ref' attribute with 'name' in form fields
 * @param  {[object]} errors
 * @return {[undefined]}
 */

export function handleSubmitFail(errors) {
    if (!this.refs) {
        return;
    }
    const refsKeys = Object.keys(this.refs);
    const keys = Object.keys(errors);
    let key = null;
    let matchfound = false;

    refsKeys.filter(item => {
        if (keys.indexOf(item) > -1 && !matchfound) {
            key = item;
            matchfound = true;
            return false;
        } else { // eslint-disable-line no-else-return
            return true;
        }
    });

    this.targetNode = this.refs[key];

    if (this.targetNode) {
        const node = ReactDOM.findDOMNode(this.targetNode);
        const parentNode = ReactDOM.findDOMNode(this);
        const xy = node.getBoundingClientRect();
        this.x = xy.right + window.scrollX;
        this.y = xy.top + window.scrollY - 60;
        parentNode && parentNode.scrollTo && parentNode.scrollTo(this.x, this.y) || 
        (parentNode && parentNode.scrollTop && (parentNode.scrollTop = this.y) ) || 
        window && window.scrollTo(this.x, this.y); // eslint-disable-line no-unused-expressions
    }
}

 

When I’m on Modafinil vs when I’m not on Modafinil

When I’m on Modafinil

  • I should prepare the strategy for creating great designs
  • I should organize mood boards, and should focus on creating themes and UI kits rather than jumping into design
  • I should investigate why t-engine is faster than vanilla nginx
  • I should find out if anyone else logged into my digital ocean VPS as the root user or not
  • I must find out the optimal way to isolate webpack from node to reduce the compile time
  • I must learn Kannada
  • I’ve heard people who learnt multiple languages had greater IQ
  • P V Narasimha Rao must have been great. He sent Vajpayee as a delegate to represent India once. That’s damn awesome.
  • There should be IQ level indicator in Facebook. You should ignore (or prevented from) engaging in comment-wars with people of lower IQs. I must create a chrome plugin that determines someone’s IQ and warns.

When I’m not on Modafinil

  • I should rather be at home. I focus better at home
  • The chirpy team next to me is very noisy & seems jobless. I can’t work in an environment like this.
  • I need coffee.
  • Enough for the day. Too noisy here. I should rather go home and sleep to get rid of the noise in my head.
  • It’s Wednesday. Because the noise levels are at peak.
  • I don’t know how to file IT returns yet. How’ll I manage a family?
  • The problem with open floor office designs is – you’ve no privacy. Joel Spolsky was right. Nobody wants to work in facebook because of their acre wide open floor office.
  • I need espresso. Double black eye.
  • Why people are so optimistic about their political leader and too cynical about who question the authority in this nation?
  • I’ve no cash. How’ll I manage a family?

Make a Custom Array without distorting the Original

  function MyArray () {
    var _arr = [].slice.call(arguments, 0);
    for( var i=0; i<_arr.length; i++ ) {
      this[i] = _arr[i];
    }
    var THIS = this;
    var max = arguments.length;
    Object.defineProperty(THIS, 'length', {
      enumerable: false,
      get: function() { 
        var keys = Object.keys(this);
        for(var i=0; i< keys.length; i++) {
            keys[i] = parseInt(keys[i], 10);
            if( !isNaN (keys)[i] ){
              if (keys[i] > max) {
              max = keys[i]
            }
          }
        }

        for( var i=0; i<max; i++ ) {
          if( !this[i] ) {
            this[i] = void 0;
          }
        }
        return max;
      },
      set: function(){
        max = arguments[0];
      }
    });


    this.splice = [].splice.bind(this);
    this.push   = [].push.bind(this);
    this.add    = [].push.bind(this);
    this.splice = [].slice.bind(this);
    this.pop    = [].pop.bind(this);

    this.addAll = function() {
      var arr = arguments[0];
      for (var i=0, j = this.length; i<arr.length; i++, j++) {
        this[j] = arr[i];
      }
    };
    return this;
  };


  MyArray.prototype = new Array;
  MyArray.prototype.constructor = MyArray;



  var collection = new MyArray(1, 2, 3, 4);


  console.log(collection);
  //true
  console.log(collection instanceof Array);
  //true
  console.log(collection instanceof MyArray);
  // true

  console.log("collection", collection);
  //[1,2,3,4];
  console.log("collection.length", collection.length);
  //4

  console.log("-------------------------1");


  collection.add("hello");
  console.log("pushed hello");
  //5
  console.log("collection.length", collection.length);
  //5
  console.log("collection[4]", collection[4]);
  //"hello"
  

  console.log("-------------------------2");


  collection.push("world");
  console.log("pushed world");
  console.log("collection.length", collection.length);
  //6
  console.log("collection[5]", collection[5]);
  //world
  console.log("collection", collection);
  //world



  console.log("-------------------------3");


  collection.addAll(["java", "script"]);
  console.log("pushed [java, script]");
  console.log("collection.length", collection.length);
  //8
  console.log("collection", collection);
  //[1,2,3,4,"hello", "world", "java", "script"]


  console.log("-------------------------4");



  collection[8] = "last";
  console.log("assigned collection[8] = 'last'  ");
  //9
  console.log("collection.length", collection.length);
  //9


  console.log("-------------------------5");



  console.log("collection.pop()", collection.pop());
  //"last"
  console.log("collection.length", collection.length);
  //8
  console.log("collection", collection);
  // [1,2,3,4,"hello", "world", "java", "script"]


  console.log("-------------------------6");
  console.log("Array.prototype.addAll", Array.prototype.addAll);
  //undefined


(WIP)Articles: Colonialism and Homophobia

Terms:

POC – People of color, everybody except caucasians

LGBT in the Modern Day

Popular Articles

The Guardian – Africa: homophobia is a legacy of colonialism

  • Most Africans don’t recognize homophobia as a colonial legacy
  • Before colonialism, many traditional cultures were tolerant of different sexualities and gender relations.
  • E.g. In the Ganda or Baganda Tribe, (Uganda’s largest ethnic group) women from the royal clan are addressed with male titles and may or may not be required to perform duties expected of women.

Slate: How American Evangelicals Infected Uganda

Role of Christianity

  • Tribal Chiefs and Village Courts of law were traditionally the hallmark of conflict resolution.
  • But those were traded for a European Penal Code system post colonialism, which included the criminalization of homosexuality.
  • Sodomy laws would not have impacted African sexual politics without the influence of Christianity.
  • Christianity was used to whitewash African culture as primitive and to demonize traditional interpretations of African intimacies.
  • The bible became the credo of African morality, disordering African sexuality to missionary positions of heteronormativity (ie. the idea that heterosexuality is the only ‘natural’ sexual orientation).

Islam and Homophobia

  • Homophobia among religious extremist bodies like ISIS are attributed to their extreme religious beliefs.
  • But homoerotic themes and pederasty could be found in many poetry and other literature written by Muslims presented in positive light belonging to the medieval period (5th to the 15th century).
  • Modern Day

Modern Day Islam

  • The modern Islamic law criminalizes homosexuality but the punishment is not part of the rule book, and it is usually left to the discretion of the local authorities on Islam, unlike

Inflation in India

Tools Used: Inflation calculator by Calculator Stack, an online tool to calculate India’s inflation between the years 1971-2016 based on Consumer Price Index

Method: calculating the worth of ₹ 100 in the concerned year over time.

Inflation in last 10 years – from 2006 to 2016

Worth of ₹ 100 in 2006, is same as ₹ 214.62 in 2016

Result: ₹ 214.62
Number of Years: 10
Average Yearly Inflation Rate : 7.97 %
Culmulative rate of inflation : 114.62 %
Year Amount Inflation Rate
2006 ₹ 100.00 N.A.
2007 ₹ 105.97 5.97 %
2008 ₹ 115.43 8.93 %
2009 ₹ 130.45 13.01 %
2010 ₹ 140.27 7.53 %
2011 ₹ 153.56 9.47 %
2012 ₹ 168.53 9.75 %
2013 ₹ 185.48 10.06 %
2014 ₹ 194.25 4.73 %
2015 ₹ 204.80 5.43 %
2016 ₹ 214.62 4.79 %

Inflation in previous decade – from 1996 to 2006

Worth of ₹ 100 in 1996, is same as ₹ 171.73 in 2006

Result: ₹ 171.73
Number of Years: 10
Average Yearly Inflation Rate : 5.58 %
Culmulative rate of inflation : 71.73 %

Year Amount Inflation Rate
1996 ₹ 100.00 N.A.
1997 ₹ 106.71 6.71 %
1998 ₹ 119.08 11.59 %
1999 ₹ 124.38 4.45 %
2000 ₹ 131.10 5.40 %
2001 ₹ 137.81 5.12 %
2002 ₹ 143.11 3.85 %
2003 ₹ 148.41 3.70 %
2004 ₹ 154.06 3.81 %
2005 ₹ 161.13 4.59 %
2006 ₹ 171.73 6.58 %
Source: inflation.eu
Historic CPI inflation India (yearly basis) – full term 1959-2015

Historic inflation India (CPI) – by year

 annual inflation (dec vs. dec) inflation annual inflation (dec vs. dec) inflation
 CPI India 2015 6.32 % CPI India 2005 5.57 %
 CPI India 2014 5.86 % CPI India 2004 3.78 %
 CPI India 2013 9.13 % CPI India 2003 3.72 %
 CPI India 2012 11.17 % CPI India 2002 3.20 %
 CPI India 2011 6.49 % CPI India 2001 5.16 %
 CPI India 2010 9.47 % CPI India 2000 3.48 %
 CPI India 2009 14.97 % CPI India 1999 0.47 %
 CPI India 2008 9.70 % CPI India 1998 15.32 %
 CPI India 2007 5.51 % CPI India 1997 6.29 %
 CPI India 2006 6.53 % CPI India 1996 10.41 %

Average inflation in India (CPI) – by Year

 average inflation inflation average inflation inflation
 CPI India 2016 5.91 % CPI India 2006 5.79 %
 CPI India 2015 5.88 % CPI India 2005 4.25 %
 CPI India 2014 6.37 % CPI India 2004 3.77 %
 CPI India 2013 10.92 % CPI India 2003 3.81 %
 CPI India 2012 9.30 % CPI India 2002 4.31 %
 CPI India 2011 8.87 % CPI India 2001 3.77 %
 CPI India 2010 12.11 % CPI India 2000 4.02 %
 CPI India 2009 10.83 % CPI India 1999 4.84 %
 CPI India 2008 8.32 % CPI India 1998 13.17 %
 CPI India 2007 6.39 % CPI India 1997 7.25 %

Top GDP contributions by Sector in India

 Total GDP

Gross domestic product: 1.877 trillion USD (2013) World Bank
Population: 1.252 billion (2013) World Bank
GDP growth rate: 5.0% annual change (2013) World Bank

Related statistics

Population
1.252 billion ‎(2013)
Gross domestic product
1.877 trillion USD ‎(2013)
GDP growth rate
5.0% annual change ‎(2013)

GDP per capita elsewhere

United States of America
53,041.98 USD ‎(2013)
China
6,807.43 USD ‎(2013)
United Kingdom
41,787.47 USD ‎(2013)

Top GDP contributions by Sector in India

  • source
  • 52% : Services sector
  • 17%  : Agriculture
  • 30% : Industry
  • Service sector includes – retail, banks, hotels, real estate, education, health, social work, computer services, recreation, media, communications, electricity, gas and water supply
  • Computer software businesses in India are increasing at a rate of 35% per year
  • In India, there has been a huge growth in service sector businesses which made up 55% of India’s GDP in 2006—2007.
Sector GVA (Rupees in Crore) at current prices
2011-12 2012-13 2013-14 % share 2014-15 % share
3 Services Sector 3,976,498 4,628,810 5,376,045 51.31 6,118,738 52.97
2 Industry Sector 2,713,467 2,954,565 3,219,942 30.73 3,466,996 30.02
3.3 Financial, real estate & prof servs 1,539,575 1,807,699 2,074,623 19.80 2,372,103 20.54
2.2 Manufacturing 1,482,158 1,654,084 1,808,370 17.26 1,984,173 17.18
1 Agriculture Sector 1,505,580 1,668,676 1,881,152 17.95 1,964,506 17.01
1.1 Agriculture,forestry & fishing 1,505,580 1,668,676 1,881,152 17.95 1,964,506 17.01
3.4 Community, social & pers. Servs 1,023,803 1,160,634 1,355,362 12.94 1,541,351 13.34
3.1 Trade, repair, hotels and restaurants 882,957 1,046,241 1,257,324 12.00 1,431,836 12.40
2.4 Construction 774,093 801,884 868,808 8.29 928,418 8.04
3.2 Transport, storage, communication & services related to broadcasting 530,163 614,236 688,736 6.57 773,448 6.70
2.3 Electricity, gas, water supply & other utility services 194,403 213,826 244,220 2.33 278,593 2.41
2.1 Mining & quarrying 262,813 284,771 298,544 2.85 275,812 2.39

List of countries by GDP growth

Economy of India

The Indian economy is the fourth largest economy of the world on the basis of Purchasing Power Parity (PPP). It is one of the most attractive destinations for business and investment opportunities due to huge manpower base, diversified natural resources and strong macro-economic fundamentals.

The spice trade between India and Europe was the main catalyst for the Age of Discovery.

The statistical work of the Cambridge historian Angus Maddison has shown, India’s share of world income collapsed from 22.6% in 1700, almost equal to Europe’s share of 23.3% at that time, to as low as 3.8% in 1952.

Estimated per capita GDP of India and United Kingdom from 1700 to 1950, inflation adjusted to 1990 US$.[84] Other estimates[85] suggest a similar stagnation in India’s per capita GDP and income during the colonial era.