The Importance of Discipline

I’ve never been a fan of discipline. I think it is a major constraint and hinders creativity, and puts too many walls within which you need to live your life. Despite constant exhortations by my father, I never wanted to join the army. Hell, I tried my best (successfully) in order to even avoid NCC when I was at IIT. I pride myself on being some sort of a free spirit who isn’t held back by any arbitrary rules that I create for myself to live my life by.

A really nice article that I read today, however, makes me think twice about this stand. So this article is about “decision fatigue” and is not very dissimilar to what I’d read a long time back (again in the NYT) about the Law of Conservation of Willpower. So this article talks about how every time you need to make a decision it consumes some part of your mental energy. Irrespective of the size of the decision that is to be made, there is some willpower that is lost, and that causes you to be suboptimal in your decision making as the day progresses.

The article really struck a chord with me, and I realize I’m also heavily prone to decision fatigue. Sometimes the smallest decisions take away so much energy from me that I simply put NED. And yeah, on a related note, I’ve got the wife upset innumerable times solely because of my indecisiveness, a part of which can be attributed to decision fatigue. I even remember not going to a wedding reception some three years back because I couldn’t decide which shirt to wear! And no, I’m not making this up.

So on that note, here’s where I think discipline has a part to play in life. By putting certain constraints on your life, you are reducing the number of decisions that you have to make. And that implies your willpower and mental energy will be reserved for those things where it’s really important that you decide carefully. By making a schedule for yourself, you are outsourcing to you-the-planner all the trivial decisions of your life. Yes, you might feel constrained at times. But it saves you so much energy by way of saving you from several trivial decisions.

Of course, feeling constrained can also affect your mental energy in a negative way, and prevent you from giving your best. Nevertheless, this decision fatigue thingy implies that discipline may not be all that bad. Or maybe I need to think about it some more.

Coding

Back when I was in school (11th/12th) I think I was an awesome coder. I think I was especially good at what they called as “logic coding”, i.e. coming up with algos. I used to experiment quite a bit (as much was possible with TurboC) and had a lot of fun too. I remember doing graphics in TurboC, making a “pong” game, brick breaker, and a lot of other cool stuff. For our 12th standard project, Hareesh and I built this totally awesome cricket scoring program, which we unfortunately didn’t take forward (and went to college instead).

It was my love for coding that meant I fought with my parents (who wanted me to study Electrical) and decided to study Computer Science at IIT Madras. And then I lost it. Somewhere along the way. I didn’t enjoy coding any more. Soon, I began to hate coding. I would love coding when I would write the odd program in “pure” C, or when I would participate in contests such as BITWise. But I’d completely lost it.

So over the last six to seven years (after I graduated from IIT) there have been occasions when I have thought I’ve regained my coding mojo, only to lose it again very soon. I’m still very proud of that Excel+VBA model that I had written in the very first week of my third job. But a couple of months later, I was hating coding again. And so it was while debugging a complicated piece of code at work this morning that I realize why I have this love-hate relationship with coding.

It’s simple – basically I hate coding for others. I hate writing code that others will read or use. I don’t mind writing code that others would use as a black box, of course. But I think writing code that others will read or use puts too many constraints on the way you code. My instinct is always to stop doing something when I’m personally satisfied with it, and with code it seems like I’m satisfied sooner than others would be satisfied with my code.

At a fundamental level, I like coding and I think I’m pretty good at it, so it isn’t something I want to give up. But then the formal processes and endless testing involved with writing code for others really kills joy (as does GUI, and Java). Code saves a lot of time, and helps “studdize” what might be otherwise fighter work, so I like doing it.

In an ideal world, I would be writing code that I would alone be using, AND profiting from it (I never intend to sell code; I intend to sell the results of the said code, however; that would mean no one else would read/use my code per se, so I can write it the way I want). Hopefully I’ll get there, sometime.

Simplicity and improvisation

While writing my previous post on the film game, I was thinking about simplicity and improvisation. About how if you seek to improvise, in order to improvise well, you would rather choose a simple base. Like how the simplicity of film aata allows you to improvise so much and create so much fun. I was thinking about this in several contexts.

This concept first entered my mind back in class 11, when a mridangist classmate told me that for all music competitions, he would choose to play the aadi taaLa. His funda was that the simple and intuitive 8-beat cycle in this taaLa let his mind free of conforming to the base and allowed him to use all his energy in improvisation.

Thinking about it, though I have little domain knowledge, I would consider it very unlikely that a Carnatic performer would choose a vakra raaga for the “main piece” of a concert. The main piece requires one to do extensive alaap and then taaLa and requires a lot of improvisation and creative thinking on the part of the performer. Now, a vakra raaga (one where there are strict rules governing the order to notes) would impose a lot of constraints on the performer and he would be spending a large part of his energy just keeping track of the raaga and making sure he isn’t straying from the strict scales.

Starting from a simple easy base allows you to do that much more. It gives you that many more degrees of freedom to experiment, that many more directions to take your product in. If you build a sundae with vanilla ice cream, you can do pretty much what you want with it. However, if you use butterscotch, you will need to make sure that every additive blends in well with the butterscotch flavour, thus constraining your choices.

When the base for your innovation is itself fairly complicated, it leaves you with little room to manouever, and I’m afraid this is what occasionally happens when you are into research. You specialize so much and start working on such a narrow field that you will be forced to build upon already existing work in the field, which is already at a high level of sophistication. This leaves you with little choice in terms of further work, and you end up publishing “delta papers”.

Similarly in the management context, if you start off by using something complicated as your “base framework”, there aren’t too many things you can put on top of it, and that constrains the possibilities. There is even the chance that you might miss out on the most optimal solution to the problem because your base framework didn’t allow you to pursue that direction.

It is all good to borrow. It is all good to not reinvent the wheel. It is all good to stand on the shoulders of giants. However, make sure you pick your bases carefully, and not start on complicated ground. You will produce your best work when you give yourself the maximum choice.

Shoe Shopping

Ok this is a typical management guru/corporate whore kind of post.

*******************

Last weekend I needed to buy a new pair of shoes. My last pair of black formal shoes had broken a couple of days earlier and I urgently needed a new pair if I were to wear something decent to office on Monday. It was late on Saturday night when I went shoe shopping.

So I walk into this store in Jayanagar and ask one of the sales reps there for a pair of black formal shoes. He asks me my size and immediately runs inside to fetch a pair. While I’m trying out that pair, he runs in and fetches two more. He makes me walk wearing a different shoe on each foot. He brings shoes of all kinds, of varying prices, of varying sizes, of different styles. Before I know it, there are a dozen pairs in front of me, and I’m having a hard time deciding which to pick.

The choice left me utterly confused and I walked out without buying anything. It was impossible for my head to come up with a tractable algorithm to decide which of those shoes to buy. I continued on my walk, stopping only when I reached another shoe shop, with the same name and half a kilometre away.

The salesman here seemed more experienced. Before he went in, he asked me a few questions about what i wanted. He asked about my willingness to pay, colour preferences, style preferences, and even asked me to point out the shoe on display which looked closest to my last pair. He made me take off my floaters and studies carefully the shape of my foot. Even after he goes in, he pops out a couple of times asking me more questions. And finally emerges with one pair.

That pair fit wonderfully! It seemed to satisfy all the constraints that I’d mentioned, and was extremely reasonably priced. And I didn’t need to think twice before buying it.

This is what good marketing is all about. It is about understanding the customer’s needs properly before trying to sell him something. To understand what he wants and give him just that rather than simply flooding him with choices which will only end up confusing him. Giving him more choices makes him do more work than he wants to, and he will simply escape.

If you are in a sales/marketing role in your company, you would do well to spend that extra hour in trying to exactly understand what your customer wants, rather than simply trying to feed him your packaged solutions. I’m sure the extra effort will be more than worth it.

*************************

People, I need honest feedback about how I sound when i try to write like a management guru. Hope I’ m global enough!

Head, heart, phallus and arranged louvvu

In response to my arranged scissors series, my stalker has started her own thing called the “karabath series“. In the first (and so far, only) post in that series, she talks about this concept that she describes as “arranged louvvu”. It is a bit convoluted but the essence is that in “arranged louvvu” you don’t blindly get into it. Instead, you put on a rational approach to decide if the counterparty is best for you and if the cost of giving  up on all the other women in the world is covered by the joy this woman brings you, and then make sure that the counterparty satisfies all CMP constraints and only then, in a phased manner, do you fall in louvvu with the person.

It is a nice concept but unfortunately I think the way the stalker has explained it is extremely convoluted, and I think using the head-heart-phallus framework (Kunal Sawardekar, you can abuse me for this also) I can explain this a lot better. So basically the idea is that the phallus is the quickest to react, followed by the head and the heart takes the longest to react.

The way most louvvu happens, the way they show it in the movies is that phallus reacts first (it’s a purely biological reaction, so it’s quick and trustworthy). And then, quickly enough, the heart gets involved. And the thing with heart involvement is tthat it is an extremely illiquid investment – it is really tough to liquidate the “heart investment” without booking significant losses. And since the heart entered the scene before the head also gave its verdict, when the head finally comes into the picture, it finds the whole thing irrational, and thus it goes “love is blind”.

The typical arranged scissors process, however, doesn’t leave you with enough time for the heart to enter the process. And since relatives can’t help you with the phallus process (and since that’s anyway instantaneous) it’s the head that gets involved. It’s the head, the rational head that takes all the decisions there. The heart enters only later, in most cases after marriage.

So the funda is that the stalker is confusing “head involvement” for “arranged process”. What she calls as “arranged louvvu” is a case where one holds back the heart (yeah, it takes effort to do that after phallus has said yes) in order to allow for the head to take a rational decision, and then go ahead with “heart investment” only after head has said yes. This way, the head always has buy-in on any relationship that the heart has gotten into, so irrationality gets minimized to a large extent. And some of the problems of “pure louvvu” are hedged off.

Yeah, it takes effort. It takes effort to hold back the heart once the phallus has given go-ahead. But getting the right amount of head involved at the right time helps in preventing much disaster. It’s the logical way to go about things. “Arranged louvvu” is only a fancy name people give it. And now I don’t really know if the head-heart-phallus framework has made it any easier for you to understand this.

Arranged Scissors 13 – Pruning

Q: How do you carve an elephant?
A: Take a large stone and remove from it all that doesn’t look like an elephant

– Ancient Indian proverb, as told to us by Prof C Pandu Rangan during the Design of Algorithms course

As I had explained in a post a long time ago, this whole business of louvvu and marriage and all such follows a “Monte Carlo approach“. When you ask yourself the question “Do I want a long-term gene-propagating relationship with her?” , the answer is one of “No” or “Maybe”. Irrespective of how decisive you are, or how perceptive you are, it is impossible for you to answer that question with a “Yes” with 100% confidence.

Now, in Computer Science, the way this is tackled is by running the algorithm a large number of times. If you run the algo several times, and the answer is “Maybe” in each iteration, then you can put an upper bound on the probability that the answer is “No”. And with high confidence (though not 100%) you can say “Probably yes”. This is reflected in louvvu also – you meet several times, implicitly evaluate each other on several counts, and keep asking yourselves this question. And when both of you have asked yourselves this question enough times, and both have gotten consistent maybes, you go ahead and marry (of course, there is the measurement aspect also that is involved).

Now, the deal with the arranged marriage market is that you aren’t allowed to have too many meetings. In fact, in the traditional model, the “darshan” lasts only for some 10-15 mins. In extreme cases it’s just a photo but let’s leave that out of the analysis. In modern times, people have been pushing to get more time, and to get more opportunities to run iterations of the algo. Even then, the number of iterations you are allowed is bounded, which puts an upper bound on the confidence with which you can say yes, and also gives fewer opportunity for “noes”.

Management is about finding a creative solution to a system of contradictory constraints
– Prof Ramnath Narayanswamy, IIMB

So one way to deal with this situation I’ve described is by what can be approximately called “pruning”. In each meeting, you will need to maximize the opportunity of detecting a “no”. Suppose that in a normal “louvvu date”, the probability of a “no” is 50% (random number pulled out of thin air). What you will need to do in order to maximize information out of an “arranged date” (yes, that concept exists now) is to raise this probability of a “no” to a higher number, say 60% (again pulled out of thing air).

If you can design your interaction so as to increase the probability of detecting a no, then you will be able to extract more information out of a limited number of meetings. When the a priori rejection rate per date is 50%, you will need at least 5 meetings with consistent “maybes” in order to say “yes” with a confidence of over 50% (I’m too lazy to explain the math here), and this is assuming that the information you gather in one particular iteration is independent of all information gathered in previous iterations.

(In fact, considering that the amount of incremental information gathered in each subsequent iteration is a decreasing function, the actual number of meetings required is much more)

Now, if you raise the a priori probability of rejection in one particular iteration to 60%, then you will need only 4 independent iterations in order to say “yes” with a confidence of over 95% (and this again is by assuming independence).

Ignore all the numbers I’ve put, none of them make sense. I’ve only given them to illustrate my point. The basic idea is that in an “arranged date”, you will need to design the interaction in order to “prune” as much as possible in one particular iteration. Yes, this same thing can be argued for normal louvvu also, but there I suppose the pleasure in the process compensates for larger number of iterations, and there is no external party putting constraints.

Traffic signal policy

Is it fair on the part of the city government to direct people’s choices of routes by imposing a suboptimal timing plan on a traffic signal? Or is the government supposed to respond to demand and design the signals looking at the traffic in various directions? Which is supposed to lead which? Which is the hen and which is the egg?

Yesterday I passsed the airport road – victoria road T-junction on the way to office and noticed that the average perceived waiting time on the Victoria road side was significantly higher compared to that of the two branches of the Airport Road meeting there, which was clearly inefficient. Though it is very likely that it has come about because of a generally poor design of the signal, it could also be by design – because the government wants to disincentivize people from using that route.

Given that we are not yet at the libertarian ideal of  “private roads for everyone”, in most municipal regions, the government has the responsibility to build and maintain roads. And given constraints such as the Braess’s Paradox, occasionally it might actually make sense for the government to occasionally direct traffic, rather than leaving it for a free-for-all. I suppose efforts such as converting roads into one-ways are in the same direction.

So given that the government has the monopoly to “give” roads, does it have the right to “take” away roads? If it does, it means that it is effectively trying to control how and where people move. Isn’t that against stuff like freedom of movement? It’s kinda scary.

But if the government doens’t have the right to “take away” roads, what happens to stuff like one way roads, etc.? After all, when you make a road one way, you are imposing a higher cost on certain people (who are willing to brave the heavier traffic in order to move in the “opposite” direction so that the total cost to society at large goes down. Sinilarly, when you put a road divider, you cut off access to certain intersections which would have been very convenient for some people in the larger interest.

So does an elegant solution exist to this problem, assuming that we cannot put tolls on all roads? In principle, putting tolls on roads is fair because we are already taking toll from motorists in non-monetary ways – such as by not maintaining the road, or by subjecting them to too many intersections, or by allowing so many vehicles on the road that reduces the speed of the road. Given all these costs that are imposed on motorists, monetizing them is not tough in principle.

However, politically it is a huge issue and is unlikely to happen for several years to come. In this context, does there exist an elegant solution to traffic management and regulations, that can compensate for inconvenience caused to people in the name of interest of the society-at-large?