Posts

The Price of Achievement

"A lot of unnecessary pain in the world is caused by people running on their own racetracks, furiously trying to get ahead of one another with their heads bowed and their blinkers on. They keep running: trying to go faster, higher and stronger in the hopes of achieving that which has yet to be achieved. In that they sometimes pay a hefty fee - the price of family, of friendship, of kinship and of health. The price of pain is indeed the price of achievement and it must be paid generation after generation but the racetrack does not demand of you the price of love, for you may run on it just as well in a spirit of camaraderie, respect and fellowship. So take some time, raise your head, lift a glance, and acknowledge your fellow runners for it is they that make your race worth running." ~ Divye Kapoor

Coke Studio: Madari English Meaning and Lyrics

Image
Thanks to Sanat Rath , I had the absolute privilege of listening to this superb rendering of Madari by Vishal Dadlani and Sonu Kakkar and an absolutely stunning composition by Clinton Cerejo as part of Coke Studio. Here's the official video. The lyrics of the song are interspersed with the meanings translated to English. Credits for the superb lyrics go to Manoj Yadav. Hope you enjoy it. Make sure you watch this in HD, it's worth the extra audio quality. Song: Madari Producers: Coke Studio Singers: Vishal Dadlani and Sonu Kakkar (Intro music with chords) (Slow build up) (Sharp guitar riff) (Drums kick in...) [Vishal Dadlani sings] Madari, Madari, Madari, Madari mera tu, Main Jamura re Jamoora,  Jamura re Jamoora...  Master, master, master * you're my master I'm an obedient assistant * , an obedient assistant... Madari, Madari, Madari, Madari mera tu... Main Jamura re Jamoora,  Jamura re Jamoora re...  Master, master, m...

How do you determine if a number N is a Pentagonal Number?

Image
Just yesterday, I decided to do a couple of problems from Project Euler . I hadn't been to the site in a long long time, but I was happy that I got through Problem 19 and Problem 43 in short order, but then I've temporarily hit a wall with  Problem 44 . The problem is phrased in terms of Pentagonal numbers and while working through it, I derived an interesting result that I'd like to share with you, namely "How do you efficiently test if a number is Pentagonal?". Recall that a Pentagonal Number is a number N which is representable by a formula   where n is a Natural number. To test whether N is a Pentagonal Number, all we need to do is to solve the equation: which is a simple quadratic and check if n is a Natural Number. That's pretty easy for humans to do when N is a small quantity but programming languages aren't very good with quadratic equations, so we need to do some pre-processing of the quadratic equation for them. Simplifying the above eq...

Fixing .innerHTML for the World

I filed Bug 17176 with the W3C a few days ago (my first on the HTML spec). The gory details are at   https://www.w3.org/Bugs/Public/show_bug.cgi?id=17176 Basically, I'm arguing for a consistent cross browser string representation of the DOM structure because it addresses a current technical need as well as is a "good to have" feature. See the complete discussion there. Some of you might be interested. :)

My Blog is Too Geeky

It's a sad sad truth. I hope to change that someday. But that day doesn't seem to be coming soon enough.

The Rise of China and the Emerging Markets

Image
I'm posting a graph from Google Finance today. It graphs the relative movement of various currencies over the past few years. The graph is extremely interesting. The baseline for this graph is the USDCNY downward slope. View the other currencies against that baseline. Some interesting observations: The US Dollar has depreciated 20% against the Chinese Renminbi since late 2005. The other way to look at this statistic is that the Chinese Renminbi has appreciated 20% against the world standard currency - the dollar. That's because its exports are in much greater demand across the world and more so in America. America has a $295 billion trade deficit with China that is fueled primarily by American consumerism and its insatiable appetite for imported goods at low rates. The US Dollar has appreciated 20% against the Indian Rupee since 2005 but we all know that the dollar isn't doing too well as a currency. What then explains this increase? The answer, my friend, lies...

C++: Some Frequently Questioned Answers

Through a series of random mumblings too hard to explain here, I landed on this amazing thread on comp.lang.c++.moderated . Basically, the thread is a significant rant about why C++ is horrible and it posts a link to a site that actually rips apart the C++ FAQs. That site has taken up amazing amounts of the author's time and energy and definitely deserves a link here. My suggestion is that you take the time and go through the site here but if you just want to cut to the chase, here's a list of some articles that I went through: Defective C++ Big Picture Issues Classes and Objects Input-Output There's tons of other useful information on that site that you must experience for yourself. However, before leaving you, here's a bunch of other random stuff that I've been reading: The fully legal Programming in Scala first edition ebook The lawsuit between Oracle and Google: Can you Copyright Computer Languages? A brief history of Microsoft's dirty le...