Bill Gates : The Tony Stark Of Our Era

This post is completely my own formulation and the thoughts here are completely my own. They have in no way been influenced by the company I work for, media propaganda, or any other means of influence. This post is based on my personal observations and opinions.

The world won’t care about your self-esteem. The world will
expect you to accomplish something BEFORE you feel good about
yourself. – Bill Gates

Recently, Elon Musk announced his plans for the Hyperloop and that was when the world went gaga! This effect was particularly felt by me on Quora, however, since the question “Who is Elon Musk?” became more popular than a viral meme. One interesting answer was the comparison of Mr. Musk to famed fictional inventor, Tony Stark, who we all better know as Iron Man. But after reading some articles on Hacker News and Reddit, it has become very apparent to me who the real Tony Stark of this world is.

It would be very hard to find a person who does not know who Bill Gates is. For everyone educated, we know him as one of the richest men in the world. For everyone working in a well-paying job, we know him as the founder of the company that has in some way or the other created our job. For the uneducated and the poor, we know him as someone who spends his days and nights fighting to save people from hunger, disease and illiteracy. This article in the Wall Street Journal was what changed my perception permanently. Most of us know about the profound effects The Bill and Melinda Gates Foundation has had in Africa in fighting Malaria. But I never realized, even after living in India for the last 22 years, that this man made as much headway in the fight against Polio as anybody in my country. Here is an American businessman, with so much money that he could burn it to keep his house warm, trying to save people in a foreign country for no direct profit other than the humanitarian rewards. And he is mobilizing my compatriots to do it in the best way possible.

This was after a year filled with Mr. Gates pushing the envelope further. His condemnation of pseudo-altruistic actions by his peers (read about it here), his devotion to seeing children educated the right way, especially with computer literacy (see the wonderful video here) and his promotion of innovation via his company (ImagineCup, BizSpark, Microsoft Research, the list goes on), are all testimony to his efforts. Individually, they don’t seem like much. Taken together, you get a much more vivid picture.

Ask yourself once, who is Tony Stark? Genius, Billionaire, Playboy, Philanthropist seems to be the popular answer owing to the success of The Avengers. Tony Stark is a superhero who spent his life using his genius and resources to save mankind from the trouble that befell it. While we don’t have to worry about alien races invading us, there are much more concerning and realistic problems in this world that need our immediate attention. This TED talk provides more insight. And right now, it seems that only Mr. Gates is taking the necessary action with his genius and resources. All this, while his peers go on about fancy gadgets that will change the world, but not help a single child dying of starvation. He is being the Philanthropist.

So while Mr. Musk (and a dozen others) gladly rejoices in his magnificent achievements, which I agree are absolutely stunning, calling him our era’s Tony Stark felt plain wrong to me. No matter the amount of hate Microsoft has generated for itself from various communities, this is about more than a single company. This is about global-scale problems which we as engineers are obligated to tackle. Problems that are more meaningful and have an impact. One engineer is tackling them, and I hope to follow in his footsteps. This is why, for his heroic efforts and contributions to the world, Mr. Bill Gates is the true Tony Stark of my era.

Truly an inspiration.

Advertisements

ICPC, Christmas And A Lot Of Fun

Well, December was wickedly insane, that is certifiably true now. Lots of work, lots of fun, another trip to South India and meeting up with old friends – it couldn’t have gotten any better. And the best part is, it ironically began with a very frustrating  and disappointing end to a semester. 😀

As mentioned, my end semester examinations graced the beginning of December 2012 (the so-called last month, courtesy the Mayans) and while they went well, certain events I would not like to mention really frustrated me and got me into a semi-depression state. Boy, was I glad when I was in the train back home. That was when things really started picking up. The first week involved mainly two things: Feasting on Mom’s cooking and getting the arrangements done for ICPC-Asia Amritapuri 2012.

While the first task was easy (eating really does help during depression), the second was insane, with me having to co-ordinate with my other two teammates in Surat, that too after we were informed of our selection just a week prior. While one had his brother’s wedding as an obligation, the other simply could not come and dropped out at the last moment. Thankfully, after a few hours of pings, I managed to find another teammate ready to undergo the arduous 30+ hour journey. With a lot of help from family, we managed to mail in the Demand Draft and book the tickets to Coimbatore, planning it such that my teammate could attend his brother’s wedding.

So it was on a great Monday morning, that we set out for what was my 2nd South India trip in 6 months. The train journey was interesting to say the least. I managed to find out that IIT Bombay students are as desperate for placements as people from my college and made friends with this energetic nine-year-old named Jayant. Jayant helped me enjoy 12 out of the 30 hours in the train and at the end of my journey actually wanted my autograph. 😛  I was humbled to say the least. We landed in Coimbatore on Tuesday evening and were immediately escorted to Amrita University’s Coimbatore campus where we were provided rooms and dinner. After dinner, we met up with others from our college and spent a good chunk of the night partying it out.

We all were pretty clear that none of us were in any shape to mount a serious challenge in the ICPC as each of us had been busy, myself with PG applications and research, so we decided to make use of the opportunity to enjoy ourselves thoroughly. It started with some late night Gangnam Style (and we even recorded a hilarious video) and pulling each other’s legs. The next day, after the drudgery of the opening ceremony and registration, along with the practice round, we spent the afternoon playing cards. After snacks in the evening, we met up with some Sophomores from our college and included them into our band of Merry Men. We went as a group for the special banquet dinner in honor of the participants and quite literally ate out of one plate. All the while, we discussed everything from college to love-lives to department trips, constantly cracking each other up. The sophomores really had a gala time then. The fun continued in our rooms later with more rounds of card games to some light music in the background. Man, it was awesome!

The contest was a bag of bad luck, in essence, for us. Well, we still haven’t found the error in one of our codes even though we threw a hundred different test cases at it, so I just won’t talk about the contest. We did manage an All India Rank of 64, not bad considering our abysmal preparation. Finally, the contest ended, and we had to leave so Jay could attend his brother’s wedding. We caught the late night train and I reached home at 6:30 am two days later, with my previous night’s sleep completely ruined. I whiled the day away in that sleep deprived state.

Come Sunday. Old school pals planned a meetup and we went to the most amazing pizza joint where we ate like there was no tomorrow (funny, considering it was the 23rd of December) and still had to only pay a bill of Rs. 130/person. Epic, I tell you. We were meeting after almost a year and it was amazing seeing all those old, familiar faces. Even better was 4 days later, when all us interns in Microsoft, who were based in Mumbai, met up at TGI Friday’s. Seeing those guys, with whom I had such a great time in the summer, really brought back lots of memories. Of course, we did create new ones, taking pics and tagging our intern friends in other cities to make them feel jealous. We reminisced about our brilliant summer, sharing previously unrevealed stories and reminding each other of everyone’s eccentricities.

In the middle, I celebrated Christmas with my family. We attended Midnight Mass as we always do and really thanked the Lord for his blessings upon us. Hopefully, you had a Merry Christmas as well. 😀 The icing on the figurative Christmas cake was the roast chicken special that my mother managed to bag. Surely enough, there were only bones once we were done going through it. A similar scene was for New Year’s with Dad and I doing all the preparation for a family evening on the 31st. I got a Cranberry flavored Breezer and set up Mutt, what more did I want?

In terms of work and computers, I managed to complete one of my Machine Learning projects while in the train back and also worked on some other things in the meanwhile, such as configuring PintOS, generating and publishing my own public-private cryptographic key pair, and setting up Mutt on my machine to allow me to forevermore communicate securely with my family friends. These are the main reasons I have put this post here and not on my other blog.

Concluding, what was supposed to be the last month of mankind, turned out to be a pretty good one (barring unrelated and unfortunate incidents in Newtown and New Delhi). College has officially resumed and I am back to the daily grind, but it is comforting to know that not only were we 3 the only teams who truly enjoyed the ICPC, but I caught up with family and friends and managed to make the most of my vacations, just like in the summer.

Eviva!

Difference in WCF Services

Whoa! Back from an amazing internship at Microsoft Corporation where I was given some truly great work. I had to build an Operations Tool for something called an ESB and I was supposed to use Silverlight with Windows Communication Foundation (WCF).

Now, the main issue I faced when developing in Silverlight was that I had a multitude of options when it came to choosing a WCF Service Library and the appropriate settings. Here is a list:

  1. WCF Service
  2. WCF Data Service
  3. WCF RIA Service
  4. AJAX-enabled WCF Service
  5. Silverlight-enabled WCF Service

Now this gets very confusing for someone new to .NET and Silverlight (which was me 3 months ago). But with a little exploration and search, you can easily find out the difference in all the options.

There are basically 2 types of WCF Services in actuality. However there are 5 variations present which leads to most of the confusion.

The two basic types of WCF Services are:

  1. SOAP Services – Here, there is a service metadata file that helps the client generate proxy classes and the messages being transferred are generally SOAP messages with Binary encoding an option via the NetTcpBinding binding.
  2. REST Services – This service allows for a greater variety of message formats, from binary and XML to JSON, since it uses the HTTP protocol. The drawback is that there is no standard and both the client and server have to agree on the data format. However this type of service is more lightweight.

I hope this makes it very clear. And now onto the 5 variations:

  1. Core SOAP services: Simply used to build a standard SOAP service.
  2. Core REST services: Used to build a standard REST service.
  3. Data services: This is just a variation of the REST service, where the data being transferred uses a common format (OData), and thus clients know how to consume a new data service even if there’s no document. No arbitary data is allowed and only AtomPub (XML) and JSON is supported.
  4. RIA services: With RIA services, you can create one service and define multiple endpoints. So you can have both SOAP and Data Services in one package through different endpoints for your application to access.
  5. Workflow services: A variation of SOAP service. It allows you to expose a workflow(a series of executions based on operation of the application. For more info, see Windows Workflow Foundation on MSDN) instead of code as a SOAP service.

Finally, AJAX/Silverlight – enabled WCF Services are simply templates that allow for easier creation and programming of WCF Services for Silverlight and AJAX applications, owing to their lack of compatibility with a some libraries. Thus, be sure to use these if you have a AJAX/Silverlight application, irrespective of what others say!

As I am sure you now understand, WCF Services are quite simple in their hierarchy and nomenclature. If you have solid fundamentals of Computer Networks and Internet Technology, all the above terms should feel like everyday words. Also, the power that WCF grants you for your application, not only to retrieve data and information, but to enforce good design in your application really makes it worth your while to check out this great technology from Microsoft and create something really useful and meaningful.

Eviva!

Probabilistic Analysis of Algorithms

Probability Theory has always been one area of study that has made more than its fair share of students cringe. However, its importance in the field of Computer Science, especially Algorithm Design and Artificial Intelligence cannot be emphasized enough.

Here’s a question I recently encountered as part of my selection process as an Intern for Microsoft: Consider Randomized QuickSort for a set of ‘n’ numbers. What is the probability that we always get the worst-case scenario for this algorithm?

Now you may want to try this on your own first as it is deceptively simple.

Here’s the solution: By the analysis and design of QuickSort, we get the worst-case scenario when we select either the least or greatest element in the array of n numbers, as the pivot. Thus the probability for n numbers is 2/n. Now we take the remaining n-1 numbers (Divide and Conquer) and similarly the worst-case is obtained when we select the first or last element. Thus the new probability is 2/(n-1). This continues on until we have just 2 elements left, which then gives the probability of 2/2.

Here’s the smart part: When we analyze Randomized QuickSort, we notice that the selection of the pivot in the recurrence is independent of the pivot selection in the outer equation. Thus, since the probabilities are independent, we can multiply all our earlier probabilities to give us [ 2/n * 2/(n-1) * 2/(n-2) *…* 2/2 ] = [ 2^(n-1)/n! ] (The n-1 as we have n-1 2s in the numerator) .

And thus we have the answer!! Pretty simple, huh? All we needed to know was what is the worst-case criteria for QuickSort and that pivot selection is independent of the pivot selection in the recurrence.

Similarly, probability theory plays a big part in Bayes Networks, which are essentially Probability Distributions in a graph, which is a core topic in AI. Knowing about total probability, Joint Probability and Bayes Rule really helps in the inference of Bayes Nets. Combine that with Variable Independence, Explaining Away Effect and Enumeration and you’ve got yourself a Smart System.

Just because all this seems simple, doesn’t necessarily mean Probability theory is simple. It does tend to get a tad bit confusing at times, but with ample practice, one should find himself/herself being able to predict the future!

Eviva!