InterviewBit

A few months ago I got addicted to InterviewBit.

InterviewBit is a website that helps candidates prepare for technical interviews at software engineering firms. It does this by providing test programming questions, which are then automatically graded online. It’s not alone; other websites like CareerCupLeetCode, and GeeksForGeeks provide a similar functionality.

I had heard of InterviewBit when someone in my quora feed gave it a glowing recommendation. On a whim, I registered for (free) access, and started browsing around. I had expected to spend a few minutes at the most.

The site itself is organized into two sections, a section with puzzles and a section with programming questions.

I started with the puzzles. Now, puzzles are like a box of chocolates: if you eat (solve) one, you want another. If you throw away one (cannot solve), you want to redeem yourself by going to the next. Either way the box (section) is finished in no time.

Once the puzzles were dealt with, I turned my attention to the programming questions. I thought I’ll solve a couple, and that would be it.

What kept me going was the gamification of the the platform. When you click on a question to solve, a timer starts, and your score depends not only on the correctness and efficiency of the solution, but also on how quickly you code up a working implementation. And you get a global rank based on your total score.

The desire to increase your rank keeps you hooked. You solve a problem, your rank increases, and you want to solve another one..Lather, rinse, repeat!

How did I perform? The first week got me in the top 10000, within a month I was in the top 1000, and 2 months got me in the top 200. It became increasingly difficult after that. At this point, my score was 40000+ points, and considering that each question was for 200-300 points, I must have solved more than 150 questions.

In the process, I had also managed to brush up on computing techniques like Dynamic Programming and Greedy Algorithms.

Overall, quite satisfactory!

I do wish though that I had ended in the top 100.

Maybe,  I’ll Be Back!

 

Work ? = Fun

A former colleague recently started his postdoc in computer vision/robotics at the GRASP lab at the University of Pennsylvania.

On his google+ feed, he put a picture of students competing in a “robo-hockey” tournament. One comment good-humoredly asked, “Are they working? Or just playing?”

The comment was of course written in jest. We all know that we are most productive when the work is both enjoyable and challenging. But, it got me thinking. Can mundane day-to-day grind be made fun?

I think it can be. Not always, not easily, but definitely sometimes.

The first example that comes to my mind is when I was a graduate student, majoring in Aerospace Engineering. I was part of a research group developing software to aid the design of fuel nozzles and injectors. The software predicted the fuel spray characteristics for a given nozzle geometry, and the conclusions had to be experimentally verified.

A fellow student and I were tasked with conducting the verification experiments. Each nozzle configuration had to be painstakingly assembled, mounted on a rig, tested by sending a blast of water (in lieu of jet fuel!), and the resulting spray had to be  recorded for later analysis. There were many different combinations to test, and the process was slow and tedious.

Out of boredom, my friend decided to record how long it took us to do each experiment. This simple act inadvertently changed the dynamics of the whole project. As we tried to improve on each run of the experiment, the process had turned into a game, and our boredom melted away.

Another example is from a few years later. I was working as an algorithmic trader, and I had written software to process market data from  a derivatives exchange. Our server was hosted by our broker in a new rack that they had  co-located with the exchange.

The problem was: I was not receiving any data. I was confident that the problem lay with the broker’s setup. Our server was the first in the new rack, and it made sense to me that they must have  configured some switch or router incorrectly. Similarly, the  broker’s engineer (let’s call him AK) was confident that the problem lay with my software.

Situations like these lead to a dead-lock. Each side waits for the other to fix their stuff, and progress is delayed. I didn’t like the delay; I wanted to trade, and I couldn’t till this was resolved. What to do? I was so confident in my own analysis, that I decided to bet a bottle of Champagne on it.  AK accepted the bet.

I lost the bet! But, it was the best 50 dollars I could have spent. The bet changed everything. It created incredible energy, enthusiasm and momentum. AK procured a spare server from somewhere, loaded it with third party software, drove over immediately to the data center around 40 miles away, set it up identically as our’s and powered it on. Lo-and -behold: data started flowing to his server.

Once I knew the problem  was with our setup, it didn’t take too long to isolate and debug it. While I would have preferred to win the bet, I was happy never-the-less.

Gamification works!

Time Horizon

Sometimes when I meet people at parties or other social occasions, they ask  me “What I do”? I always struggle for a response. I usually start by saying I am a programmer. Some people leave it at that. But some people are more curious and want to know the details. After some hemming-and-hawing on my part they get the idea that I do something related to the stock market. And then they ask me for Investing advice. That’s when I begin to grumble.

The reason is simple. I have no Investing expertise whatsoever.  At least the kind of expertise that can be useful to a retail investor. And it’s difficult to explain that. After all, I *have* been trading stocks for a living!

So, why don’t I have expertise in Investing after all these years? The reason is something pesky called the “Time Horizon”.

Time Horizon is just the period over which you expect your strategy to work out. For high frequency traders like me, it’s something measured in seconds, minutes or (rarely) hours.. but definitely not days. On the other hand, long term investors like Warren Buffett look far out in the future, with time horizon measured in years or even decades. Finally, Analysts predict (if you can call it that) company performance over the next quarter.

Now, you cannot.. absolutely cannot.. mix expertise in one time horizon with another.  If Warren Buffett were to try his hand at high frequency (and I don’t mean by hiring someone else), he would lose.

Time Horizon affects everything.. It  influences how you think, what skill-set is important, the data you look at, the data you *don’t* look at, the tools/technology/infrastructure that you use, how you manage your orders.. everything. You cannot mix-and-match.

I believe that consistent performance is possible only at the two extremes… at the low end (aka high frequency) or at the high end (aka Warren Buffett style). Interestingly, most analysts, hedge funds, and other market participants concentrate on the middle end. The result usually is terrible.

I became consciously aware of the importance of Time Horizon only accidentally. Several years ago, I used to work for a very successful high frequency group. A former colleague of mine was interviewing for  a new hedge fund that Andrew Lo had started, and I was one of the references. After a short discussion about the candidate, Andrew seemed curious to know about our strategies. His first question “What is your time horizon”?

Uber rides

I have used Uber twice so far. Both times, I was dropping my car off to the dealer, and needed a ride back.

I wanted to see how  Uber and Lyft worked. Unfortunately, Lyft doesn’t seem to have much of  a presence where I live (a small town called Greenwich around 35 miles from  New York city). So I could only test Uber.

The technology itself is very nicely done. You order using an app on the smartphone, and soon your ride shows up.. all very nice, easy and convenient.

And in both cases, I enjoyed my ride far far more than any taxi ride. Why? Not because of the technology (though it was cool), and certainly not because of the cars itself (though they were also both nice and relatively new).

No, what made the rides interesting were the drivers. I learned something from both of them.

The first one told me that he had been using Uber for around a year. He liked it. I asked him about Lyft, but he didn’t care much for it. I asked him why? He said Uber keeps him busy enough, so why bother? I queried him about  how easy it is to find passengers. He said he had figured out my town, and knew exactly where to be at what time of the day. Except the holidays! No, he didn’t like the holidays. Everyone seemed to be taking off, and no one wanted his services.

I asked him about Uber. Did he like being part of the service? By and large he did. He had minor quibbles about the 20 percent fee. He said “A little too much for doing nothing!”. But overall he seemed happy.

The second driver was an Immigrant from Peru. He asked me where I was from. I told him I am originally from India. He liked Indian food.  He told me that his daughter had lots of Indian friends. And Asian. And African. And from all over the world.  And she was now working in San Francisco for a startup  company doing innovative work in the education space.

It was clear that he was mighty proud of his daughter. She was a gifted student, and through  hard work and determination, had graduated from a top school in Chicago before moving to San Francisco. I exited the car with a nice feeling. It’s always good to see hard work pay off.

So, does this mean that rides in Uber are always going to be fun? Clearly not! But  I am human and first impressions matter.

I am optimistic of the service.

First Job

“You seem like a happy person”.

I was interviewing with the Program Trading group of a Investment Bank in San Francisco. This was in 1998, and the person interviewing me was the Head of the desk. Let’s call him M.

M Is now at a very high position in another Investment Bank. His rise has been spectacular, and he is generally acknowledged as a born leader. In another post, I may expand about this and my experience with leadership skill in general.

An Investment Bank generally has a few ranks. At the bottom is the Associate, and at the top is the Managing Director (MD). I was interviewing for an Associate Position. And M was the MD.

From M’s point, the only thing that mattered at my level was whether I was a pleasant enough fellow. In hindsight this makes complete sense. I wasn’t going to make any difference to the revenue or “pnl” as it is known on Wall-Street. But he would have to see my face everyday in the morning..and that too early in the morning.  San Francisco is 3 hrs behind New York, so we all had to be at our desk by 5:00 am. Imagine coming early in the morning and seeing a sad face. That spoils the whole mood!

M also cared a lot about how you dressed. Thankfully on that day I was dressed in my best Interviewing attire. So everything was good. Later, my poor dressing sense would cause him mild annoyance, but by that time I had developed a good rapport with everyone, so he overlooked it.

Now don’t get the impression that Wall Street is completely shallow. In many ways it’s a total meritocracy. As long as you are bringing in the moolah, and you are compliant with the laws and regulations, nobody cares much about anything else.. Talent and hard work are respected, and over time you tend to do well.

But first you need to get in.

Looking back I was very lucky. Because of the strong demand for a job on Wall Street, it is very difficult to break in unless you have a degree from a top school. It also helps (for some jobs) to have a Ph.D.  I just had M.S from the University of Cincinnati. For sure, I had received a first rate education, but my degree just didn’t have the cachet of a MIT or Stanford or Harvard.

My undergraduate degree though was from the Indian Institute of Technology Bombay (IITB). And in some circles, it carries the same weight as MIT. The person doing the initial phone screen (let’s call him S) knew about IITB. He probably also had had a good day in the market that day. Whatever the reason  may be, he decided to give me a chance, and called me.

He started by asking me about the Monty Hall Problem. Now I had heard about the problem before, and I told him the solution quickly. I also told him that I had known the answer before. He liked my honesty and asked me another puzzle. I don’t recall solving that one completely, but he was happy enough with my attempts that he passed me on to another phone interview by his colleague Y.

Now Y had previously been a faculty member in Computer Science at Yale. His specialty was Programming Languages. He asked me to compare the Programming Languages that I had used. My only experience was with Fortran and C++, and Fortran always seemed to me to be easier to use for the kind of numerical simulations I did. He listened to me, and then asked me what I thought of Lisp. I had heard of Lisp, but I thought it was something used by Artificial Intelligence Community a long time ago, and had since been abandoned. Y corrected me. He explained to me that Lisp was a functional language, that functional languages had lots of useful constructs. He spoke about lambda calculus, and first-class functions, and closures. But wasn’t Lisp slow? I asked. No he said. With recent compiler advances you can get performance close to mainstream languages. He told me about tail call optimization, and other developments. It was heady stuff, with most stuff going way above my head. But I was excited.

Now one cool thing about excitement is that it’s contagious. Y was happy with my excitement. They decided to fly me to San Francisco for a in-person interview.

My first interview was with M. He didn’t ask me many questions. He knew I knew nothing. So what’s the point? On the other hand I had lots of questions for him. I asked him how he manages. How he interacts with his team? What does he  think about the industry? What ambitions he had for the group? M loved to talk, and by god he was good at it. He was energized, and he could sell. He sold me a vision of this small group in San Francisco creating such value for clients that very soon we would be the only game in town. I was literally dancing at this point.. I wanted this job so bad, I would have signed for free.

In all the years since then, I have never met anyone who could sell better than M. Maybe Steve Jobs could, but just maybe.

M decided that I was a “happy” person. I had passed the filter.

The next interview was with Y again. I had already built a rapport with Y on the phone. So the interview was more relaxed. He looked at my resume, and asked me some questions about some numerical simulation I had done. It was about some flow over an airfoil, and I  had broken the problem into smaller parts in a certain way. It always seemed to work in my tests, but he asked me whether I could prove that the split would always work. I couldn’t of course, but I asked him about his thoughts. He said he was not sure but a certain approach may be promising. And in a few steps he managed to give a nice Inductive proof about why the split would work. I was thrilled. What a group!

The next interview was with J. J was a Quant and a genuinely nice guy. He asked me what an eigenvalue was. I  had taken the normal sequence of Linear Algebra courses, and knew the answer. He then asked me about generalized eigenvectors. I had no idea, but J laughed and said he had forgotten too. It was all nice and pleasant.

There were a few more interviews with the Technology and the Back office teams. But nobody gave me a hard time.

Finally, I met with S again. If hired, I was going to report to S and but work mostly  with Y. He told me he would call me within a week with their decision.

I got the call the next day. I was in.