Hooke’s Curve, hooking up and dressing sense

So Priyanka and I were talking about a mutual acquaintance, and the odds of her (the acquaintance) being in a relationship, or trying to get into one. I offered “evidence” that this acquaintance (who I meet much more often than Priyanka does) has been dressing progressively better over the last year, and from that evidence, it’s likely that she’s getting into a relationship.

“It can be the other way, too”, Priyanka countered. “Haven’t you seen countless examples of people who have started dressing really badly once they’re in a relationship?”. Given that I had several data points in this direction, too, there was no way I could refute it. Yet, I continued to argue that given what I know of this acquaintance, it’s more likely that she’s still getting into a relationship now.

“I can explain this using Hooke’s Law”, said Priyanka. Robert Hooke, as you know was a polymath British scientist of the seventeenth century. He has made seminal contributions to various branches of science, though to the best of my knowledge he didn’t say anything on relationships (he was himself a lifelong bachelor). In Neal Stephenson’s The Baroque Cycle, for example, Hooke conducts a kidney stone removal operation on one of the protagonists, and given the range of his expertise, that’s not too far-fetched.

“So do you mean Hooke’s Law as in stress is proportional to strain?”, I asked. Priyanka asked if I remembered the Hooke’s Curve. I said I didn’t. “What happens when you keep increasing stress?”, she asked. “Strain grows proportional until it snaps”, I said. “And how does the curve go then”, she asked. I made a royal mess of drawing this curve (didn’t help that in my mind I had plotted stress on X-axis and strain on Y, while the convention is the other way round).

After making a few snide remarks about my IIT-JEE performance, Priyanka asked me to look up the curve and proceeded to explain how the Hooke’s curve (produced here) explains relationships and dressing sense.

“As you get into a relationship, you want to impress the counterparty, and so you start dressing better”, she went on. “These two feed on each other and grow together, until the point when you start getting comfortable in the relationship. Once that happens, the need to impress the other person decreases, and you start wearing more comfortable, and less fashionable, clothes. And then you find your new equilibrium.

“Different people find their equilibria at different points, but for most it’s close to their peak. Some people, though, regress all the way to where they started.

“So yes, when people are getting into a relationship they start dressing better, but you need to watch out for when their dressing sense starts regressing. That’s the point when you know they’ve hooked up”, she said.

By this point in time I was asking to touch her feet (which was not possible since she’s currently at the other end of the world). Connecting two absolutely unrelated concepts – Hooke’s Law and hooking up, and building a theory on that. This was further (strong) confirmation that I’d married right!

Watching the Clasico in a bar

No, this post doesn’t have to do with the current El Clasico between Real Madrid and FC Barcelona. When I’d watched the previous Clasico on March 22nd I’d formed a blog post in my head but I never got down to writing it (combination of travel and NED and enjoying my holiday) so I thought this is a good time to put it down.

On that occasion I was in Barcelona and briefly toyed with the idea of going to watch the game at the Camp Nou. That idea was quickly shelved given that tickets were going for about €500 each. Then there was hope that the game would be telecast on local TV (like the Barcelona-Ajax game I had watched at the Camp Nou was), but that wasn’t to be. The only option was to watch it at a pub.

While there were several bouts of NED due to which I had decided I won’t see that game, when Maxime, my wife’s flatmate, went out, I couldn’t help but join him. The first task was to find a suitable pub, especially given that it was a Sunday.

There is an interesting hierarchy of local businesses in Barcelona. Most Spanish-run supermarkets, for example, are closed on that day, though the Pakistani-run places (which are interestingly plentiful in the city) are open 24×7. A large number of Spanish-run bars are closed on Sundays, too, while the Chinese bars (again plentiful) are open all day.

Given that it was the Clasico and it was not broadcast on terrestrial television, there was no surprise that bars were full. Seating-only bars were thus out of question. And some of the standing-allowed places were choc-a-bloc. Finally it was this Chinese bar near the Entença station that Maxime and I went to.

The place was full, like most other bars in Barcelona that night, but there was some standing room with a view of one of the televisions. A sign at the entrance greeted us saying that each person was expected to order at least one beer for €2 (normal price for a beer in such a bar is €1,80). Estrella thus Dammed, it was time for the game.

I don’t remember much of that game, but the atmosphere in the bar was far from the kind I’d seen elsewhere. The crowd was partisan, of course, with anyone who wanted to support Real Madrid doing so silently (remember that this is a politically charged fixture, especially given renewed calls for Catalan secession). Loud cheers accompanied the Barcelona goals. The Madrid goal was met with silence, as you might expect (and people stepping out for a smoke). People stepping in and out created another problem – it was a rather cold spring evening, and every time the door opened it let in rather cold wind and disturbed the thermal balance of the bar!

There were a couple of other noteworthy sidelines on the evening. The first was how hard the bar staff worked. Expecting it to be a big night, they had pressed in extra staff, with possibly the entire family of the people who ran the bar involved. Children who looked as young as ten or twelve hurriedly ferried dishes from the kitchen to the tables (there were a few tables, which I’m assuming were pre-booked). Service was overall top notch, with our €2 beers arriving within two minutes despite the massive crowd at the bar. Considering that some bars were shut (given it was a Sunday), it was incredible how hard this one worked to make most of a good Barcelona night.

 

And then there were these guys at the slot machines. Like most other cheap bars in Europe, this one too had a couple of slot machines and they were all occupied, by people who couldn’t care less about what was going on around them, and whose only worry in life was to bet against the house. It could have been yet another night at the bar for them, except that the beer cost them twenty cents extra.

PS: I got distracted by the Manchester City – Liverpool game and hence took much longer to finish this post. I started writing it as soon as El Clasico started.

Mythology, writing and evolution: Exodus edition

I watched half of Exodus: Gods and Kings last night (I’d DVRd it a few days back seeing it’s by Ridley Scott). The movie started alright, and the story was well told. Of Moses’s fight with Rameses, of Moses being found out, of his exile and struggle and love story and finding god on a mountain. All very nice and well within the realms of good mythology.

And then Moses decides to hear god’s word and goes to Memphis to free his fellow Hebrews. There’s a conspiracy hatched. Sabotage begins. Standard guerrilla stuff that slaves ought to do to revolt against their masters. Up to that point in time I’d classified Exodus as a good movie.

And then things started getting bad. God told Moses that the latter wasn’t “doing enough” and god would do things his way. And so the Nile got polluted. Plants died. Animals died. Insects attacked. Birds attacked (like in that Hitchcock movie).  What had been shaping up to be a good slave-revolt story suddenly went awry. The entire movie could be described by this one scene in Indiana Jones and Raiders of the Lost Ark:

When you see the guy twirling the sword, you set yourself up for a good fight. And then Indiana just pulls out a gun and shoots him! As a subplot in that movie, it was rather funny. But if the entire plot of a movie centres around one such incident (god sending the plague to Egypt, in this case), it’s hard to continue watching.

Checking out the movie on IMDB, I realised that it has a pretty low rating and didn’t recover its investment. While this is surprising given the reputation of Scott, and how the first part of the movie is set up and made, looking at the overall plot it isn’t that surprising. The problem with the movie is that it builds on an inherently weak plot, so the failure is not unexpected.

It did not help that I was reading mythology, or a realistic mythological interpretation, earlier in the day – the English translation of SL Bhyrappa’s Parva. In that, Bhyrappa has taken an already complex epic, and added his own degrees of complexity to it by seeking to remove all divinity and humanise the characters. Each major character has a long monologue (I’m about a third into the book), which explores deep philosophical matters such as “what is Dharma”, etc.

While moving directly from humanised philosophical myth to unabashedly religious story might have prevented me from appreciating the latter, it still doesn’t absolve the rather simplistic nature of the latter myth. I admit I’m generalising based on one data point, not having read any Christian myth, but from this one data point, it seems Christian myth seems rather weak compared to Hindu or Greek or Roman myth.

My explanation for this is that unlike other myths, Christian myth didn’t have enough time to evolve before it was written down. While the oral tradition meant that much valuable human memory was wasted in mugging up stories and songs, and that transmission was never exact, it also meant that there was room for the stories to evolve. Having been transmitted through oral tradition for several centuries, Hindu, Greek and Roman stories were able to evolve and become stronger. Ultimately when they got written down, it was in much evolved “best of” form. In fact, some of these myths got written down in multiple forms which allowed them to evolve even after writing came by.

While writing saves human memory space and prevents distortions, it leaves no room for variations or improvisation. Since there is now an “original book”, and such books are determined to be “words of God”, there is no room for improvisation or reinterpretation. So we are left with the same simplistic story that we started of with. I hope this explains why Exodus, despite a stud director, is a weak movie.

Why restaurant food delivery is more sustainable than grocery delivery

I’ve ranted a fair bit about both grocery and restaurant delivery on this blog. I’ve criticised the former on grounds that it incurs both inventory and retail transportation costs, and the latter because availability of inventory information is a challenge.

In terms of performance, grocery delivery companies seem to be doing just fine while the restaurant delivery business is getting decimated. Delyver was acquired by BigBasket (a grocery delivery company). JustEat.in was eaten by Foodpanda. Foodpanda, as this Mint story shows, is in deep trouble. TinyOwl had to shut some offices leading to scary scenes. Swiggy is in a way last man standing.

Yet, from a fundamentals perspective, I’m more bullish on the restaurant delivery business than the grocery delivery business, and that has to do with cost structure.

There are two fundamental constraints that drive restaurant capacity – the capacity of the kitchen and the capacity of the seating space. The amount of sales a restaurant can do is the lower of these two capacities. If kitchen capacity is the constraints, there is not much the restaurant can do, apart from perhaps expanding the kitchen or getting rid of some seating space. If seating capacity is the constraint, however, there is easy recourse – delivery.

By delivering food to a customer’s location, the restaurant is swapping cost of providing real estate for the customer to consume the food to the cost of delivery. Apart from the high cost of real estate, seating capacity also results in massive overheads for restaurants, in terms of furniture maintenance, wait staff, cleaning, reservations, etc. Cutting seating space (or even eliminating it altogether, like in places like Veena Stores) can thus save significant overheads for the restaurant.

Thus, a restaurant whose seating capacity determines its overall capacity (and hence sales) will not mind offering a discount on takeaways and deliveries – such sales only affect the company kitchen capacity (currently not a constraint) resulting in lower costs compared to in-house sales. Some of these savings in costs can be used for delivery, while still possibly offering the customer a discount. And restaurant delivery companies such as Swiggy can be used by restaurants to avoid fixed costs on delivery.

Grocery retailers again have a similar pair of constraints – inventory capacity of their shops and counter/checkout capacity for serving customers. If the checkout capacity exceeds inventory capacity, there is not much the shop can do. If the inventory capacity exceeds checkout capacity, attempts should be made to sell without involving the checkout counter.

The problem with services such as Grofers or PepperTap, however, is that their “executives” who pick up the order from the stores need to go through the same checkout process as “normal” customers. In other words, in the current process, the capacity of the retailer is not getting enhanced by means of offering third-party delivery. In other words, there is no direct cost saving for the retailer that can be used to cover for delivery costs. Grocery retail being a lower margin business than restaurants doesn’t help.

One way to get around this is by processing delivery orders in lean times when checkout counters are free, but that prevents “on demand” delivery. Another way is for tighter integration between grocer and shipper (which sidesteps use of scarce checkout counters), but that leads to limited partnerships and shrinks the market.

 

It is interesting that the restaurant delivery market is imploding before the grocery delivery one. Based on economic logic, it should be the other way round!

Centralised and decentralised parties

In the spirit of the just-concluded Assembly Elections in Bihar, here is my attempt at political theorising, which Nitin Pai classifies as “political gossip”.

During the ten years of UPA rule at the Union government, the opposition BJP lacked a strong centre. The central leadership was bereft of ideas following defeat in the 2004 General Elections, and this was badly shown up in the 2009 General Elections when the BJP put in an even worse performance.

All was not lost, however. The lack of strong political leadership at the centre had meant that BJP units in different states managed to thrive. Narendra Modi became Chief Minister of Gujarat in 2002 (albeit following a directive by the BJP central leadership), and won three consecutive elections there. His track record as Gujarat CM was pivotal to him getting elected as Prime Minister in 2014.

Around the same time, Shivraj Singh Chouhan emerged as a strong leader in Madhya Pradesh, and Vasundhara Raje, who had once before been chief minister in Rajasthan, came back with renewed strength. Manohar Parrikar was a strong Chief Minister in Goa. The period also saw the BJP forming its first state government in South India under BS Yeddyurappa.

This state-level buildup of strength was key in driving the BJP (and Modi, who had managed to appoint himself leader) to success in the 2014 parliamentary elections. Modi brought on his trusted aide from Gujarat Amit Shah as the president of the party.

While the objective of capturing the Union Government had been met, this created a new problem for the party – it had a strong centre once again. And the strong centre has meant that regional leaders now have less chances to thrive. After Modi and Parrikar moved to the Union government, relative lightweights have been installed as chief ministers of Gujarat and Goa, respectively.

Chouhan and Raje have been implicated in scandals (related to the Vyapam recruitment and Lalit Modi, respectively). Yeddyurappa has been kicked upstairs as National Vice President of the party. Elections are being fought in the name of Modi and Shah rather than projecting a strong state leader. No chief ministerial candidate was projected in the recent Bihar poll debacle. The Haryana chief minister was a nobody when he was installed. Lightweight Kiran Bedi was projected in the Delhi polls, which ended in a massacre for the party.

 

In other words, ever since Modi and Shah came to power a year ago, the  BJP has been showing promise towards becoming a “high command driven” party, like the Congress before it. The Congress, which has looked rather clueless since the last days of its 2nd UPA government, should serve as a good example to the BJP in terms of what might happen to an over-centralised party.

The BJP has its own template on how strong state level leadership can lead to success, yet it looks like it’s in danger of discarding its own successful formula and following the Congress path to failure.

The Chamrajpet model of leadership

When you are doing a group assignment (assuming you’re in college) and you get assigned your share of the work, the assumption is that the allocation of work across team members has been fair. Good group leaders try to ensure this, and also to split work according to the relative interests and strengths of different team members.

Except that there are times when team members get the sneaking suspicion that the group leader is pulling a fast one on them, by following the “Chamrajpet model” of leadership. To understand what the Chamrajpet model is, watch this video, from the beginning of the Kannada movie Gowri Ganesha (the video below has the full movie. Watch it if you can. It’s fantastic).

For those who couldn’t understand, Lambodar (played by Anant Nag) needs to get to Chamrajpet but doesn’t have the money. He befriends two guys (who also want to get to Chamrajpet) and convinces them to share an auto rickshaw with him. He convinces each of them that the “other” guy is his (Lambodar’s) friend, and that they should split the fare equally. This way, he collects the full fare (and a bit more ) from them put together.

It is a fairly common occurrence in group assignments for one of your teammates to tell you “you do part 1. This guy and I will do part 2”. There are times when this is a fair allocation (when part 2 requires twice the effort as part 1). If the teammate is a Lambodar, however, he might have pulled a similar allocation with the third teammate (telling him “you do part 1. I’ll do part 1 with this guy”).

In a way, these are the perks that sometimes come with leadership.

The only way you can deal with it is to follow the advice at the end of the movie – “Beware of Lambodars”.

Blockchain and real estate

Based on the title of this blog post, you might assume this might be about Honduras, where there is a proposal to use the blockchain to store land records. The problem with Honduras is that there is no “trusted third party” – nobody even trusts the government, for example, so the best way to store land records is in a decentralised hard to tamper manner.

Over the last few days I’ve been reading up a bit on blockchain and bitcoin and how it works and so on. I haven’t yet got to the math – that it is described as “proof of work” irritates me no end (given that work should be evaluated on output rather than input).

So I see that what makes blockchain secure (apart from the miners having to agree on every transaction, and securing bunches of transactions using cryptographic hashes) is that every block contains within itself a hash of the previous blocks. In other words, the entire sequence of transactions is maintained.

The way “normal currency” (like cash) works is that only possession matters, not history. So the fact that there is a hundred rupee note in my pocket means that I can spend that money, and nobody has a track of how that hundred rupee note reached my pocket. This makes the system insecure since if a pickpocket picks this note, there is no proof (apart from possibly catching him in the act red-handed) that he picked it from my pocket.

With bitcoin, on the other hand, there is a record of how each bit of currency (no pun intended) ended up where it ended up. So even if someone were to magically “steal” my bitcoin, the historical records show that this legitimately belongs to me, and that makes it secure.

This reminds me of the paperwork involved when we bought our apartment in Bangalore last year. Normally you would imagine that a certificate indicating that the title currently rests with the current owner is enough to conduct a real estate transaction. but lawyers and bankers here are not satisfied with that.

The paperwork for the apartment I bought went back sixty odd years, when the land on which the building was built was first “allotted” by the City Improvement Trust Board. If I have to sell this apartment on, along with the certificate that I own this apartment I’ll have to furnish copies of this entire history going 60-70 years back. And the way property deals are done here, I don’t expect the system to change.

So this is what makes real estate such a prime candidate for using blockchain. Not only is a third party (such as the government department that stores land records) not trusted, it is a standard practice to include the entire history of every land or property going back several years. A sale transfers ownership, but in terms of paperwork, a layer gets added, not replaced.

This shows why real estate is such a prime candidate for moving to blockchain for storing transactions. It is ironical that a small and crime-ridden country such as Honduras is showing the way on this. It is time for countries like India to consider similar uses. But first, we will need to digitise existing records and make sure there is exactly one owner for each piece of property, and blockchain can’t help us with that challenge!

To app or not to app

The difference between using an app and a website is in terms of the costs. The app reduces the per-transaction cost, thanks to customisations and additional user information it possesses. There is a fixed cost in using the app, though, in terms of time, memory and bandwidth incurred in installing it, and user data that the app collects.

The costs of using an app versus using a website, as a function of the number of transactions, is illustrated in the figure here (this is simplified but not far from the truth):

app webThis is the graph you need to keep in mind when you are trying to take your product app-only or web-only. Labels from the graph have been removed on purpose.

For low levels of usage, there is no point in installing an app (unless the reduction in marginal cost is dramatic), for the fixed cost is not going to justify the benefit that the app offers. When the usage is high, it makes sense for the user to install the app, since the fixed cost will amortise over the larger number of transactions.

When a service goes app-only (as is the fashion in India nowadays), it loses the long tail of low volume users who see no value in incurring the fixed cost of keeping the app. On the other hand, a web-only service is likely to lose power users since they have to incur the higher marginal cost each time.

So if you are starting a new service and are wondering whether to launch the service on app first or web first, think of the frequency with which your customers will be using the service, and the incremental value you can add if they use the app (be realistic about these estimates). If it is either a high-frequency service (like email or news, for example) or a service where the value added through the app is massive (like Uber, which can read the user’s location), you better lead with an app.

On the other hand, if the service is low-frequency and the quality of experience in app and web need not be dramatically different, it makes sense to lead with the web offering and add an app later only to hold on to your power users.

From this perspective, I’m not convinced of the logic of Indian companies such as Flipkart and Myntra (which are shopping sites, which most users don’t use that often) to go app only. India being a ‘mobile-first’ nation is at best an excuse.

Postscript

The above graph also explains why businesses offer attractive incentives to customers to install the app – to mitigate the high fixed cost of installation. The problem is that the fixed cost is borne not just during installation but also over time (app occupying phone space, snooping on you and sending you notifications), so smart users take advantage of these incentives and uninstall the apps after immediate use.

 

 

Quantifying life

During a casual conversation on Monday, the wife remarked that given my interests and my profession (where I mostly try to derive insights from data), she was really surprised that I had never tried using data to optimise my own life.

This is a problem I’ve had in the past – I can look at clients’ data and advise them on how exactly to build their business, but I’m thoroughly incapable of doing similar analysis of my own business. I berate people for not using data and relying too much on “gut”, but “gut” is what I use for most of my own life decisions.

With this contradiction in mind, it made sense for me to start quantifying my life. Except that I didn’t know where to start. The first thing you think of when you want to do something new is to buy new gadgets for it, and I quickly asked the wife to pick up a Fitbit for me on her way back from the US next month. She would have none of it – I should use the tools that I have, she said.

I’ve tried logging stuff and writing diaries in the past but it’s mostly been tedious business (unless I’ve had to write my diary free form, which I’ve quite liked). A couple of days is all that most logs have lasted before I’ve lost interest. I hate making checklists (looking at them psyches me out), I maintain my calendar in my head (thus wasting precious memory space) and had nightmares writing notes in school.

A couple of times when I’ve visited dieticians or running coaches I’ve been asked to make a log of what I’ve been eating, and I’ve never been able to do it for more than one meal – there is too much ambiguity in the data (a “cup of dal” can mean several things) to be entered which makes the data entry process tedious.

This time, however, I’m quite bullish about maintaining the log that the wife has created for me. Helpfully, it’s on Google Docs, so I can access it on the move. More importantly, she has structured the sheet in a way that there is no fatigue in entry. The number of columns is more than what I would have liked, but having used it for two days so far, I don’t see why I should be tired of this.

The key is the simplicity of questions, and amount of effort required to fill them in. Most questions are straightforward (“what time did you wake up?” “what time did you have breakfast” etc.) and have deterministic answers. There are subjective questions (“quality of pre-lunch work”) but the wife has designed them such that I only need to enter a rating (she had put in a 3-point Likert scale which I changed to a 5-point Likert scale since I found the latter more useful here).

There are no essays. No comments. Very little ambiguity on how I should fill. And minimal judgment required.

I might be jumping to conclusions already (it’s been but two days since I started filling), but the design of this questionnaire holds important lessons in how to design a survey or questionnaire in order to get credible.
1. Keep things simple
2. Reduce subjectivity as much as possible
3. Don’t tax the filler’s mind too much. The less the mental effort required the better.
4. Account for NED. Don’t make the questionnaire too long else it causes fatigue. My instructions to the wife was that the questionnaire should be small enough to fit in my browser window (when viewed on computer). This would have limited the questions to 11 but she’s put 14, which is still not too bad.

The current plan is to collect data over the next 45 days after which we will analyse it. I may or may not share the results of the analysis here. But I’ll surely recommend my wife’s skills in designing questionnaires! Maybe she should take a hint from this in terms of her post-MBA career.

Ladder Theory and Local Optima

According to the Ladder Theory, women have two “ladders”. One is the “good ladder” where they rank and place men they want to fuck. The rest of the men get placed on the “friends ladder”. Men on the other hand have only one ladder (though I beg to disagree).

The question is what your strategy should be if you end up on top of the “wrong” (friends) ladder. On the one hand, you get your “dove“‘s attention and mostly get treated well there. On the other hand, that’s not where you intended to end up.

Far too many people at the top of the friends ladder remain there because they are not bold enough to take a leap. They think it is possible to remain there (so that they “preserve the friendship”) and at the same time make their way into the dove’s good ladder.

Aside 1: The reason they want to hold on to their friendship (though that’s not the reason they got close to the dove) can be explained by “loss aversion” – having got the friendship, they are loathe to let go of it. This leads them to pursuing a risk-free strategy, which is unlikely to give them a big upside.

Aside 2: A popular heuristic in artificial intelligence is Hill Climbing , in which you constantly take the path of maximum gradient. It can occasionally take you to the global maximum, but more often than not leaves you at a “local maximum”. Improvements on hill climbing (such as Simulated Annealing) all involve occasionally taking a step down in search of higher optimum.

Behavioural economics and computer science aside, the best way to analyse the situation when you’re on top of the friends ladder is using finance. Financial theory tells you that it is impossible to get a large risk-free upside (for if you could, enough people would buy that security that the upside won’t be significant any more).

People on top of the friends ladder who want to preserve their friendships while “going for it” are delusional – they want the risk-free returns of the friendship at the same time as the possibility of the grand upside of getting to the right ladder. They should understand that such trades are impossible.

They should also understand that they might be putting too high a price on the friendship thanks to “loss aversion”, and that the only way to escape the current “local optimum” is by risking a downward move. They should remember that the reason they got close to their dove was NOT that they end up on the friends ladder, and should make the leap (stretching the metaphor). They might end up between two stools (or ladders in this case), but that might be a risk well worth taking!

PS: this post is not a result of my efforts alone. My Wife, who is a Marriage Broker Auntie, contributed more than her share of fundaes to this, but since she’s too lazy to write, I’m doing the honours.