Showing posts from 2015

Of traffic, teams and companies

Swami Gulagulaananda said: " The grand unification theory is nought but analogies connecting seemingly unrelated things " When you drive through Bangalore traffic, more often than not, you are not driving... You are probably waiting at traffic junctions or trying to wiggle through evanescent worm holes. The strange fact about driving is that it becomes automatic after some time - You don't even pay attention while changing gears or switching between the accelerator and the brake. And since that frees up your mind, it tends to wander into the realm of contemplation... As I watched vehicles around me, I drew some parallels that I wanted to list out in this post. 1) Among motorbikes, cars and buses, bikes are the fastest when it comes to rate of picking up speed or accelerating while buses are the slowest. However, once all vehicles start accelerating, bikes soon get left behind as cars and buses zoom past them. Companies are also of these types small caps (start-u

Knight's Tour

Swami Gulagulaananda said: " The dark knight can never be blocked... nor can the white knight " The Knight's Tour is a mathematical puzzle which I had played on a Windows Phone game called Doors. I didn't know it was called Knight's Tour till I watched this Numberphile video . I had some time to spare and wrote a simple version of it that you can test out below. The objective of the game is to make sure that every square of the board has been occupied by your knight once. Click on any valid square to make your move Programmers: Do you think you can write a program to find solutions? Knight's Tour Move the knight and cover every single square without repeating a square ♞ Restart 5x5 Board Restart 8x8 Board

Yellow Journalism

Swami Gulagulaananda said: " That moron asked me not to be judgemental about him " We love watching movies and I am sure that you have watched this scene that appears in several motion pictures; The protagonist walks into his house and is shocked to see a dead man with a knife sticking out of his stomach. He drops whatever he was holding and rushes towards the slumped body he has identified as his father, an eminent lawyer who fought injustice with a fiery passion. It is obvious to the son that his father was murdered by some land baron / politician who was rubbed the wrong way by the deceased, but he puts those thoughts aside for the moment. He has a slight glimmer of hope that his father might still be alive and worries that he is in pain. He crouches beside his father and pulls the knife out of him. At that exact same time, a police inspector and a couple of constables arrive at that scene on a supposed tip-off. " Hands up, you are under arrest " he shouts as

Playing old DOS games

Swami Gulagulaananda said: " Only 90's kids will understand this " Remember the good old days of Dangerous Dave, Doom and Commander Keen? I remember spending countless hours playing all those games - Jazz Jackrabbit, Cosmo's cosmic adventures, Hocus Pocus, Prince of Persia... the list is endless. I recently stumbled upon a great way to play those old DOS based games on your modern computer. I thought of sharing it with you guys. Install DosBox The first step is to download and install DosBox, a DOS emulator. Download DosBox Download Games The next step is to download games. There is a wonderful site that hosts all these old games. You can search and download the games of your choice from here. Download Games Make games available on DosBox After you download games, unzip the files Create a dedicated folder to put all your downloaded games. Like, C:\dos_games or ~/dos_games . Now, run DosBox. You should see the terminal. Run the command below: moun

The Kannada Hater

Swami Gulagulaananda said: " Keep an open mind about everything in life " " There are more Indians in the US than within the borders of India ", he said. " What in heaven's name do you mean? " I asked. He replied, " Yes, in other countries, there are many Indians. But within India, you have a Bihari, a Madarasi, a Tamilian, a Telgite, a Kannadiga, Hindu, Muslim etc. but no Indians " It's an old SMS forward that I paraphrased above. But a deep one nonetheless I was absent-mindedly scrolling through the infinite curated posts on my Facebook wall the other day when I stumbled upon a post. What caught my attention was the fact that my junior from college had ' liked ' it, but the photo of the guy in the post was my former colleague. What was the connection? I then paid a little more attention and noticed that it was a photo accompanied by a write-up of some sort. I clicked on it to expand the content and read something as foll

The Population Effect

Swami Gulagulaananda said : " Battles won are inconsequential when the war is lost " " Indians don't have any civic sense. Look at the way people drive! Look at all the garbage being strewn around. Tchah! That's why everyone moves to America and Europe. Things are so much cleaner there and people are so much better too. Not unlike here... " is a complaint that is often heard during moments of frustration - especially when that pesky autorickshaw driver cuts you off or comes in the wrong way in a one way road. I had often wondered if these claims are true or not. On a trip to the US, I decided to make comparisons and make some mental notes. My first stop had been the West Coast of the US - San Francisco and the Bay Area predominantly. I found that people drive in a very disciplined manner - There's lane discipline, people don't cut other people off, traffic signals are followed religiously and the distance between two vehicles is enough to fit

The Javascript Closure Problem

Swami Gulagulaananda said: " Closure is very important in broken relationships... Also in JavaScript " I was trying to write a fairly simple piece of code where I would create an array of functions in JavaScript. There was a loop and a function would be generated in each iteration such that the body of the function had a dependency on the loop counter. What happened finally was that every function in the loop was the same as the last function. I was bewildered. I understood that it was because of some reference issue but could not come up with a solution easily. Here is a simple piece of code: I was expecting a[0]() to give 0, a[1]() to give 1 and so on. But I was getting 3 each time. How do you solve this? After breaking my head for some time (despite knowing it was something to do with Closures) I posted the question on Stackoverflow. Try solving this problem by yourself before seeing the solution. Here's the solution:

Vintage Whine

Swami Gulagulaananda said: " With great ownership comes great sense of responsibility " Expectations vs Reality We like things to be perfect. We have a certain set of ideas of what perfection is. These are expectations. Then there is reality. The greater the gap between reality and expectation, the greater the disappointment. When there is disappointment, there are four things that can be done. We can sit quietly and remain disappointed.  We can try and do things to bridge the gap.  Change expectations Whine about it. Sitting quietly and remaining disappointed is not a great option. It quietly sucks out your morale and eat you away from within. There are many who do this; they end up feeling worthless. They resign to their fate. A good example of this would be women in Saudi Arabia. The society in which they live is in a certain way and they are, or feel, so powerless to change it that they have accepted their fate. Changing expectations is what Buddha suggeste

The Quota Paradox

Swami Gulagulaananda said: " Some see the glass half empty, others see the glass half full " The reservation system in India is one of the most debated topics among people. I, for one, strongly oppose caste based reservation system. To deny meritorious students of seats in good institutions (and jobs) simply because certain seats are reserved for people who belong to a particular caste is as unjust as people looking down upon a certain caste because they belong to that caste. While many of you may agree with my argument above, I would like to pose a series of situations before you and ask you for your opinions and thoughts. I read a news article that spoke about the situation of daily soap opera makers of Tamil Nadu. 50% of Tamil Nadu's serials are local shows made by people of Tamil Nadu while the remaining 50% are Hindi series that are dubbed to Tamil. A lot of Tamilians feel that this is unfair because other serial makers are unable to compete against big bud

Greenpeace, NGOs & WYSINWYG

Swami Gulagulaananda paraphrased Jacob Braude: " The duck seems calm and unruffled at the outset, but paddles like crazy under water " In the good ol' days when I was trying to learn HTML, there were a set of editors called WYSIWYG - What You See Is What You Get, where you could visually design web pages as you would write a Word document without writing a single line of code, and the final page would look as it did in the editor. However, a majority of the times, life is not WYSIWYG (pronounced wee-see-wig ). It is the opposite of that - thus WYSINWYG. Several years ago, before Facebook (and perhaps before Orkut) became a rage, I had a chance encounter with a website called Greenpeace. I was very young and I didn't know anything about them. The page I was looking at was campaigning for turtles against an industrial conglomerate. I immediately decided to join the fight - My reasoning at that time was simple: I love animals, I know turtles are getting extinct,