London’s 7D

In classes 11 and 12 i had to travel every day from Jayanagar to indiranagar to get to school. There was a direct bus that took me from just behind my house to Just behind my school. This was 7D. But despite my mother’s insistence that I take that, I seldom did. For it took such a circuitous route that it would take ages.

I’m sure that someone has done a survey of bangalores most convoluted bus routes, and if so, 7D would fall close to the top there (the only bus that I imagine could beat 7D is 201).

So rather than take 7D I’d take one of the many buses bound to Shivajinagar and get off at Richmond circle, from where I’d get 138 to take me right behind school (or the double decker 131 to take me 10 mins walk away in the other direction). The changeover at Richmond circle was rather simple (no walking involved) and this process would help me save at least 15 minutes each way every day.

Now I’ve figured that the London Underground has its own 7D, except for the fact that the route is not circuitous – it’s simply slow. I live in Ealing and my office is near Victoria so the most direct way for me to travel is to take the district line. It takes 35 minutes and runs once every 10 minutes (the line splits in two places to frequency to Ealing is low).

On most days I don’t travel directly from home to work since I drop Berry to her Nursery on the way. So taking the district line straight from Home to work is never an option.

Yesterday I was ill and so my wife took Berry to her Nursery. So I travelled directly to work. And for the first time ever since I joined this office I took the district line on the way to Office.

I reached Ealing broadway at 8:02 and Just about caught the 8:03 train. The train rolled into Victoria at 8:40 and I was in Office at 8:45.

Today once again I was traveling directly from home to work, and reached Ealing broadway station a few seconds later than yesterday, just missing the train I’d caught yesterday. I had the option to wait 10 minutes for the next district line train or using what seemed like a convoluted route. I chose the latter.

I took a great western railway train to Paddington, where I walked for about 5-7 minutes to the bakerloo line and got it. I got off the bakerloo five stops later at oxford circus where I changed to the Victoria line, and got off two stops later at Victoria. The time was 8:35!

In other words I’d left later than I had yesterday, changed trains twice (one involving a long walk) and still reached five minutes earlier. And all the time traveling in trains far less crowded than an early morning district line train headed to the city!

I hereby christen the district line as London’s 7D. Except that the route isn’t anywhere circuitous!

JEE coaching and high school learning

One reason I’m not as good at machine learning as I can possibly be is because I suck at linear algebra. I totally completely suck at it. Seven years of usage of R has meant that at least I no longer get spooked out by the very sight of vectors or matrices, and I understand the concept of matrix multiplication (an operator rotating a vector), but I just don’t get linear algebra.

For example, when I see terms such as “singular value decomposition” I almost faint. Multiple repeated attempts at learning the concept have utterly failed. Don’t even get me started on the more complicated stuff – and machine learning is full of them.

My inability to understand linear algebra runs deep, and it’s mainly due to a complete inability to imagine vectors and matrices and matrix operations. As far back as I remember, I have hated matrices and have tried to run away from it.

For a long time, I had placed the blame for this on IIT Madras, whose mathematics department in its infinite wisdom had decided to get its brilliant Graph Theory expert to teach us matrices. Thinking back, though, I remember going in to MA102 (Vectors, Matrices and Differential Equations) already spooked. The rot had set in even earlier – in school.

The problem with class 11 in my school (a fairly high-profile school which was full of studmax characters) was that most people harboured ambitions of going to IIT, and had consequently enrolled themselves in formal coaching “factories”. As a result, these worthies always came to maths, physics and chemistry classes “ahead” of people like me who didn’t go for such classes (I’d decided to chill for a year after a rather hectic class 10 when I’d been under immense pressure to get my school a “centum”).

Because a large majority of the class already knew what was to be taught, teachers had an incentive to slack. Also the fact that most students were studmax had meant that people preferred to mug on their own rather than display their ignorance in class. And so jai happened.

I remember the class when vectors and matrices were introduced (it was in class 11). While I don’t remember too many details, I do remember that a vocal majority already knew about “dot product” and “cross product”. It was similar a few days later when the vocal majority knew matrix multiplication.

And so these concepts were glossed over, and lacking a grounding in fundamentals, I somehow never “got” the concept.

In my year (2000), CBSE decided to change format for its maths examination – everyone had to attempt “Part A” (worth 70 marks) and then had a choice between “Part B” (vectors, matrices, etc.) and “Part C” (introductory statistics). Most science students were expected to opt for Part B (Part C had been introduced for the benefit of commerce students studying maths since they had little to gain from reading about vectors). For me and one other guy from my class, though, it was a rather obvious choice to do Part C.

I remember the invigilator (who was from another school) being positively surprised during my board exam when I mentioned that I was going to attempt Part C instead of Part B. He muttered something to the extent of “isn’t that for commerce students?” but to his credit permitted us to do the paper in whatever way we wanted (I fail to remember why I had to mention to him I was doing Part C – maybe I needed log tables to do that).

Seventeen odd years down the line, I continue to suck at linear algebra and be stud at statistics. And it is all down to the way the two subjects were introduced to me in school (JEE statistics wasn’t up to the same standard as Part C so the school teachers did a great job of teaching that).

Pudina family

Sometimes they say that opposites attract.

But more practically, I think it’s impossible to louvvu someone unless you have lots of similar interests, and that also means lots of similar ambitions. And in that sense my wife and I have shared quite a few ambitions.

First we wanted to become celebrity bloggers. Then (ok the order gets messed up here) there was the MBA. And before all this there is Ganeshana Maduve (which we re-watched perhaps for the 50th time this weekend).

And adding to all this, there’s the desire to write in newspapers. I remember that over a decade ago I wanted to regularly write in newspapers, and about “policy issues”. I didn’t follow up on that ambition, of course, but through lots of twists and turns and happy coincidences meant that I started writing for Mint in 2013, and some of the stuff I’ve written there are about “policy issues”.

And the wife has had similar ambitions as well, though her methods have been vastly different, and much more focussed. She’s always wanted to write a column on relationships. Rather, she first wanted to be a relationship blogger, and then a relationship columnist, and she’s gone about the process with single-minded ambition.

So, first there was the MarriageBrokerAuntie blog (now hosted here). Then it turned into a Facebook page. It even led to a business that she ran during her maternity and post-childbirth periods (imagine running a business while nursing a tiny baby). And now she’s in the papers. Yay!

It so happens that it’s the same paper that I write for. And it also happens that the edition of the paper where it was published (Mint on Sunday) also happened to carry an excerpt from my book two-three weeks back. And that also happened to be about relationships.

So a long long time ago, a couple of days after we’d first met, she had written about “Arranged Louvvu“. I don’t think it’s a coincidence that the first piece she’s written for Mint is about “Love, and other arrangements“.  It’s about dating apps, and how what they lead to is not “real love” and it’s no different from “other arrangements”. That people think arranged marriage is uncool, but dating apps lead to basically arranged relationships. And so on.

Read the whole thing, it’s damn well written. Oh, and it features 1-6-1 calls, Panchatantra and George Akerlof’s “market for lemons”, among other stud fundaes.

Now the only thing left is for Berry to start writing for Mint. They don’t have a children’s issue (where they feature drawings, poems, etc. written by kids) so I guess she’ll have to wait a while. But I’m damn hopeful!

In any case, for now massive pride is happening on account of the wife!

Poor food

Until about 1970, when the so-called Green Revolution happened, India as a country collectively didn’t have enough food (remember PL-480 and “ship to mouth existence”?). Until liberalisation in the 1990s, even people who could possibly afford it couldn’t get the food they wanted (remember lining up at ration shops?).

In other words, Indians (as a country – there are still lots of people who don’t get to decide on what to eat since they’re way too poor) have had a proper choice in terms of what to eat for just about one generation now. More than half the Indians who are currently alive spent at least some part of their lives at a time when it just wasn’t possible at all to eat what one wanted.

What this implies is that what we consider to be “traditional food” is largely “poor food” – we and our ancestors ate that not because it was what was the most nutritious, but because that is what was available, and what we could afford.

And so you have most of our traditional food being extremely heavy in carbs and light on almost everything else. I have friends who comment that most Indian vegetarian food hardly has vegetables – consider the sambar, for instance, which just has a few pieces of vegetables floating around. It is a correct comment, but that is because most of what we know as traditional Indian food evolved through times of shortages and poverty.

There are times when I attempt to give people nutrition advice, and while people listen to me politely, they end up saying something to the effect that if they start eating “traditional food”, all will be fine with their health again.

We’ve evolved to fundamentally trust the familiar, and distrust the new. And so it is with our food choices. Without really understanding why we and our ancestors ate the food that we ate, we consider “traditional food” to be good.

Now that I can afford it, I try to make sure I have balanced meals, and a lot of “traditional indian foods” that I grew up eating hardly get consumed in my house now. Consider the uppit – which is mostly carbs (semolina) with a small handful of vegetables and some fats thrown in – incredibly unbalanced stuff. Or beaten rice (avlakki/poha) – which is so light that you start feeling hungry within a couple of hours of eating. And so on – once you start looking at at the nutritional value of what you are eating, you will find yourself thoroughly dissatisfied with a lot of “traditional stuff”.

So my advice to you is this – if you can afford it, give what you are eating a thought, and make sure you get the right kind of nutrition without giving too much concern to your “priors”. And if you’re on a tight budget, optimise that to make sure it goes as far as possible in providing you a balanced diet.

On cultural appropriation

Over the last few months, I’ve come across this concept of “cultural appropriation” several times. I don’t claim to get it completely, but I think I understand it enough to comment about it.

Going by Wikipedia, cultural appropriation

is the adoption or use of the elements of one culture by members of another culture. Cultural appropriation, often framed as cultural misappropriation, is sometimes portrayed as harmful and is claimed to be a violation of the collective intellectual property rights of the originating culture

The list of celebrities who’ve been accused of cultural appropriation runs way too long to list here, but it’s basically a popular topic of outrage among the modern left, commonly described by their detractors as “social justice warriors” (SJW).

In any case, my attention to the topic was drawn by a recent essay on the topic by philosopher Kenan Malik. In “In defence of cultural appropriation“, first published in the New York Times, Malik writes:

But who does the policing? Every society has its gatekeepers, whose role is to protect certain institutions, maintain the privileges of particular groups and cordon off some beliefs from challenge. Such gatekeepers protect not the marginalized but the powerful. Racism itself is a form of gatekeeping, a means of denying racialized groups equal rights, access and opportunities.

In minority communities, the gatekeepers are usually self-appointed guardians whose power rests on their ability to define what is acceptable and what is beyond the bounds. They appropriate for themselves the authority to license certain forms of cultural engagement, and in doing so, entrench their power.

In fact, reading the rather long essay, it was hard for me to disagree with him. In fact, it started to make me wonder why cultural appropriation is a matter of debate at all – controversial enough that at least three editors who defended it have lost their jobs (per Malik). In fact, Malik himself was victim of significant online abuse and trolling following his article.

So thinking about this topic during a work break the other day, I found compelling evidence about why the concept is bullshit – basically, it’s one-sided.

The whole concept of “cultural appropriation” hinges on there being a “superior community” and a “marginalised community”, with members of the former not allowed to adopt practices of the latter. This is a one-way street – if you turn the argument around and say that a person from a traditionally “marginalised community” should not adopt cultural practices of a “superior community”, you’re essentially being racist or casteist or whatever.

Consider this, for example – “Dalits should not recite the Vedas because by doing so, they are appropriating the culture of caste Hindus“.  It is unlikely that any self-respecting SJW would condone this statement. But turn the communities around, and the outrage on cultural appropriation become legit!

This makes the entire concept problematic, since it rests on a prior of certain communities being “marginalised”. In other words, it rests on a prior of a partial ordering of “communities”, with some considered more advanced than the other. Take away any such ordering or hierarchy, and the concept of cultural appropriation falls flat.

To me, the outrage about cultural appropriation smacks of a sort of “white man’s burden” among SJWs in an attempt to seemingly protect seemingly marginalised communities. All this achieves, as Kenan Malik mentions in his essay, is to empower the self-appointed leaders of these marginalised communities.

Maths, machine learning, brute force and elegance

Back when I was at the International Maths Olympiad Training Camp in Mumbai in 1999, the biggest insult one could hurl at a peer was to describe the latter’s solution to a problem as being a “brute force solution”. Brute force solutions, which were often ungainly, laboured and unintuitive were supposed to be the last resort, to be used only if one were thoroughly unable to implement an “elegant solution” to the problem.

Mathematicians love and value elegance. While they might be comfortable with esoteric formulae and the Greek alphabet, they are always on the lookout for solutions that are, at least to the trained eye, intuitive to perceive and understand. Among other things, it is the belief that it is much easier to get an intuitive understanding for an elegant solution.

When all the parts of the solution seem to fit so well into each other, with no loose ends, it is far easier to accept the solution as being correct (even if you don’t understand it fully). Brute force solutions, on the other hand, inevitably leave loose ends and appreciating them can be a fairly massive task, even to trained mathematicians.

In the conventional view, though, non-mathematicians don’t have much fondness for elegance. A solution is a solution, and a problem solved is a problem solved.

With the coming of big data and increased computational power, however, the tables are getting turned. In this case, the more mathematical people, who are more likely to appreciate “machine learning” algorithms recommend “leaving it to the system” – to unleash the brute force of computational power at the problem so that the “best model” can be found, and later implemented.

And in this case, it is the “half-blood mathematicians” like me, who are aware of complex algorithms but are unsure of letting the system take over stuff end-to-end, who bat for elegance – to look at data, massage it, analyse it and then find that one simple method or transformation that can throw immense light on the problem, effectively solving it!

The world moves in strange ways.

Schoolkid fights, blockchain and smart contracts

So I’ve been trying to understand the whole blockchain thing better, since people nowadays seem to be wanting to use it for all kinds of contracts (even the investment bankers are taking interest, which suggests there’s some potential out there 😛 ).

One of the things I’ve been doing is to read this book (PDF) on Blockchain by Arvind Narayanan and co at Princeton. It’s an easy to read, yet comprehensive, take on bitcoin and cryptocurrency technologies, the maths behind it and so on.

And as I’ve been reading it, I’ve been developing my own oversimplified model of what blockchain and smart contracts are, and this is my take at explaining it.

Imagine that Alice and Bob are two schoolkids and they’ve entered into a contract which states that if Alice manages to climb a particular tree, Bob will give her a bar of chocolate. Alice duly climbs the tree and claims the chocolate, at which point Bob flatly denies that she climbed it and refuses to give her the chocolate. What is Alice to do?

In the conventional “contract world”, all that Alice can do is to take the contract that she and Bob had signed (assume they had formalised it) and take it to a court of law (a schoolteacher, perhaps, in this case), which will do its best possible in order to determine whether she actually climbed the tree, and then deliver the judgment.

As you may imagine, in the normal schoolkid world, going to a teacher for adjudicating on whether someone climbed a tree (most likely an “illegal” activity by school rules) is not the greatest way to resolve the fight. Instead, either Alice and Bob will try to resolve it by themselves, or call upon their classmates to do the same. This is where the blockchain comes in.

Simply put, in terms of the blockchain “register”, as long as more than half of Alice and Bob’s classmates agree that she climbed the tree, she is considered to have climbed the tree, and Bob will be liable to give her chocolate. In other words, the central “trusted third party” gets replaced by a decentralised crowd of third parties where the majority decision is taken to be the “truth”.

Smart contracts take this one step further. Bob will give the bar of chocolates to the collective trust of his classmates (the adjudicators). And if a majority of them agree that Alice did climb the tree, the chocolate will be automatically given to her. If not, it will come back to Bob. What blockchain technologies allow for is to write code in a clever manner so that this can get executed automatically.

This might be a gross oversimplification, but this is exactly how the blockchain works. Each transaction is considered “valid” and put into the blockchain if a majority of nodes agrees it’s valid. And in order to ensure that this voting doesn’t get rigged, the nodes (or judges) need to perform a difficult computational puzzle in order to be able to vote – this imposes an artificial cost of voting which makes sure that it’s not possible to rig the polls unless you can take over more than half the nodes – and in a global blockchain where you have a really large number of nodes, this is not feasible.

So when you see that someone is building a blockchain based solution for this or that, you might wonder whether it actually makes sense. All you need to do is to come back to this schoolkid problem – for the kind of dispute that is likely to arise from this problem, would the parties prefer to go to a mutually trusted third party, or leave it to the larger peer group to adjudicate? Using the blockchain is a solution if and only if the latter case is true.