Take Risks

Most of the time, life does not talk to you. It just sort of pushes you around. Each push is life saying, `Wake up. There’s something I want you to learn.’

If you’re the kind of person who has no guts, you just give up every time life pushes you. If you’re that kind of person, you’ll live all your life playing it safe, doing the right things, saving yourself for some event that never happens. Then, you die a boring old man. You’ll have lots of friends who really like you because you were such a nice hard-working guy. You spent a life playing it safe, doing the right things. But the truth is, you let life push you into submission. Deep down you were terrified of taking risks.

You really wanted to win, but the fear of losing was greater than the excitement of winning. Deep inside, you and only you will know you didn’t go for it. You chose to play it safe.

 -from the book “Rich Dad Poor Dad”

The epic transition

Blogging after a very very long time. And the reason is what this blog post is going to be about. My life has been going through a complicated phase, its the phase I have decided to call ‘The Epic Transition’. Transition, because you enter into the real world, become an independent with added responsibilities and no more you are a college-going student with a free soul. And its Epic, because it turns out to be the hardest phase of your life. Something which you can bear at most once and which will change so much in you that you’ll forget who you were before, and looking back would laugh upon the things you used to say once with certainty. You’ll realize that the things you thought to be right then were so wrong, and the promises you made to yourself were so impossible to achieve. You’ll come out of the dream world and step into the real world. Its like how Neo was rescued from the Matrix in the 1st part of the Matrix series. And just like in the movie, although it was the hardest part, painstakingly difficult to endure, but it was also necessary and it turns out the sooner you go through it, the better it is. It marks the end of your life as you used to see it, and compels you to create a new path for yourself. But as always, “the hardest part of ending is starting on again” – an except from the lyrics of one of my favorite Linkin Park song “Waiting for the End”.

The thing is, suddenly, everything that used to be so important to you would become meaningless. You’ll no longer enjoy watching movies alone, you’ll get bored with hanging out in malls and eating at dominos, activities which used to be fun would become so boring. I can’t say for sure if everyone goes through this with the same intensity, it could be even worse. Because for heaven’s sake, I still have my passion towards computers and like writing code. Others, they even lose their passion and that marks the biggest failure of their lives.

I’m not complaining. I think this is a chapter of life which had to open one day. It teaches you the things which no one ever told you before. It makes you do things which you didn’t had the guts to do before. But its like another big bang in your life, a new creation and a new beginning but what you make out of it and how it ends up is not totally in your control. At this point of your life, you’ll realize that situations have more control over you than you yourself do. You’ll be fighting them most of the time. Life becomes a struggle even though for others it would appear you are living a happy life. But you would know that the real Life has just began.

Welcome to the real world, Neo.

Now there’s only one way to survive – adapt yourself to the new rules, the games and the scenarios. The laws of nature have changed. The truth has become false and all old promises are broken. Its time to be practical and rational and do things the right way without being in the dream world. Its nasty, bad, unfair and greatly disappointing at times, but in the end if you survive, it will have it perks. That seems like a fair assumption, doesn’t it?

Note to myself – “Remember your goal. Do not stray away or procrastinate. Do not give up.”

Blogging resumes. Everything would be back to normal, but I’ve changed and my posts would reflect the same. Lets play this game, the practical way.

svnlogger v0.1

This one is for the Unix freaks (that includes me !).  Remember the textual “ChangeLog” files we used to see in a lot of open source softwares ? It used to have the list of changes made to the software along with revisions number, contributor’s name and timestamp. I always liked the format of a particular kind of ChangeLog which showed all the details in a compact manner without losing any, helps me keep track of ‘What’s new!’ in my next version of the software. Anyways, so how do I make it ? For those of you who have been thinking that they’re hand-written, you’re so wrong ! After all, how can you expect an open source freak to do something ‘manually’ when he can easily automate any task in his computer using cool scripts ?? Anyways, usually they have some kind of Version Tracking System like CVS, SVN or GIT. I happen to use SVN most of the time, actually always, and since I needed to maintain a ChangeLog as well, I found there was a nice command called “svn log” which would generate a textual log of all the commits along with all the information I needed to see. Well, everything was there, but not in a way I wanted it to be. ‘svn log’ is good enough for ‘grep’ but not so good in terms of direct readability. So I wrote this small shell script that is basically a wrapper around the svn log but it uses AWK to reformat the data in a way I like it !

Copy paste the code below into a file called ‘svnlogger.sh’ and then execute it like

> sh svnlogger.sh <path-to-svn-repo> <path-to-changelog>

Continue reading

Perfect configuration for Conky

Okay, this one’s about some eye candy. One thing I regretted while parting my ways with Ubuntu was the good looking themes and applets it had. But no more, as they say, ‘thou shall seek, thou shall find’ and I’ve found whatever I needed in Arch Linux. After configuring everything, from kernel modules to gnome, I finally came to peace with the last missing piece in my puzzle – the Conky system monitor. Configuring it to suit the looks of my desktop was a hell of a task but I finally succeeded thanks to numerous tutorials on the internet and needless to say, google. For starters, Conky is just a system monitor that can be configured to monitor everything from your CPU’s temperature to internet speed to processes and hard disk space. You can even configure it to monitor your email or some RSS feeds you like. And the best part, is the looks, okay, take a look :

Continue reading

Upgrading to PHP 5.3 in Ubuntu

I’ve been using PHP 5.2 for a long time now. I’m not so apt towards change but PHP 5.3 has some cool features which I needed very much for my projects. So yesterday I decided to do that conversion. The process was not at all so simple and it took lots of googling and searching the forums, especially for removing the post-installation bugs. Finally, at Dec 27 12:45 AM I achieved 100% transformation to PHP 5.3. As my usual habit, I like documenting the stuff I do, so here it goes.

First thing before starting the process is to make sure that none of my existing projects would break. Because as the developers have said, PHP 5.3 is a major release with lots of changes. Many new features were added while many were removed or deprecated. And to avoid getting unnecessary warnings or notices, it was better to recheck my codes for compatibility with PHP 5.3. The PHP developers have written a good page in the PHP Manual which tells in detail about the things to take care of when migrating to 5.3 from 5.2. You can check it here : http://php.net/manual/en/migration53.php

So don’t forget to go through that page once, at the least the section which tells about the “removed and deprecated” features in PHP 5.3 and use the alternatives as suggested. Now you’re ready to upgrade. BUT, before that, you’ve to know that any software you use like phpMyAdmin or ldapPhpAdmin which uses PHP might broke. Well, you cannot do anything about it but you’ll have to reinstall them. Anyways, moving ahead, take a backup copy of your php.ini configuration file. You may need it for reconfiguring your PHP 5.3. If you’re using Apache 2, it can be found in /etc/php5/apache2/php.ini

Now, just run the following commands one by one,

Continue reading

D. E. Shaw placement experience

Hello there, just 4 months ago I got a job in D.E. Shaw through campus placements in my college NIT Trichy. To help my juniors and students from other colleges as well,  I finally decided to write about my overall experience with the recruitment process of D. E. Shaw. But before that, lets tell you in brief about the company.

D. E. Shaw is an investment banking company which basically deals with investing other people’s money into right places to make more money out of it. It invests in a lot of places like share market, start ups, capital of other companies, so called “hedge fund”, etc. So in short, its a money-making machine. David E. Shaw worked at Morgan Stanley before leaving that job and founding the world’s biggest hedge fund company with total assets estimated at $30 Billion, almost same as Morgan Stanley now. Anyways, that’s enough history for you to know.

D. E. Shaw is basically a New York based company but has its offices all over the world, including Hyderabad, Mumbai and Gurgaon in India, but if you’re being recruited from India for a software job, you are most likely to get placed in Hyderabad. They’re known for their tough recruitment process and high pay all over the world. Though almost all of their work is related to finance and market, they’re doing a lot in Computer Science research also. Amazon founder Jeff Bezos was a D. E. Shaw employee before he left and founded Amazon.com. In India, the D. E. Shaw’s main office is in Hyderabad and its fully related to Software Development and hence called “D. E. Shaw India Software Limited” (DESIS).

Now I will not bore you much and start with the process.

Continue reading

PHP Optimizations

PHP is my favourite web development language.(Not anymore, its Python now). Nevertheless, here are a few tips I follow to make PHP work faster :

  • When you’re creating PHP files, you’ll start with <?php tags as usual, but DON’T end the file with ?> tags if its not your main index.php file. Its optional and ignoring it is not just safe but recommended. So always leave the <?php tags unclosed in files which you are going to include in your main file. Do close it properly in your main index.php file though.
  • Don’t use functions in FOR loop condition if the function returns the same result always e.g.
for($i=0; $i&lt;length(arr); $i++)

IS VERY VERY SLOW than

for($i=0, $N=length($arr); $i&lt;$N; $i++)

That’s because since the condition is checked on every iteration. The function is called again and again to check the lenght of the same array every time. Instead since you know the array length is the same, why not save it in $N so that it won’t have to calculate it again and again. Though if your array $arr may change in length, you can use that. Continue reading

World’s biggest conspiracy ! (Part 1)

Recently I read an editorial titled “Uncle Sam’s Scam”. It refreshed the memories of a Zeitgeist movie I saw long ago. It was about how the United States has tricked the world to satisfy its avarice and accumulated so much wealth that not even in the next 50 years can any country dream of. Ironically, many of us are not even aware of the scandal going around us. When our police are busy capturing thieves who stole a few lakhs from the banks, the people who stole Trillions of Dollars are sitting in the White House ( or in the Treasury next to it )! The reason US is also the most technologically advanced nation also lies in this very fact because it’s obvious that money attracts talent and talent leads to innovation. Here’s a brief description of the truth (as I see it) :

Let us start with the World Bank’s list of Top 10 countries by its GDP ( Gross Domestic Product : its the combined sum of all the goods and services produced within the borders of the country. Basically, it is a measure of the economy of a country ) :

(Note : The GDP specified is in Million $ )

1 United States 14,204,322
Euro symbol.svg Eurozone 13,565,479[3]
2 Japan 4,909,272
3 People’s Republic of China 4,326,187[2]
4 Germany 3,652,824
5 France 2,853,062[4]
6 United Kingdom 2,645,593
7 Italy 2,293,008
8 Brazil 1,612,539
9 Russia 1,607,816
10 Spain 1,604,174

It is clearly evident that US figures in the TOP of the list with 14 Trillion $ economy.  The closest is Eurozone or the “European Union”, which is actually a union of many European counties, so it cannot be considered as a “one entity” and has been excluded from the rankings. So, effectively, Japan is the 2nd country in the list with close to 5 Trillion $ economy. The difference, is 9 Trillion $.

About 200 years ago, India or rather the Indian-subcontinent had the largest economy in the World. Now it ranks 12th. So what did the US do to come to the Top of the list ? Looking into the annals of the period of its independence, we see its conditions were similar to what other countries suffered during independence. Nor there is any clarity in the argument that they’ve had adequate time to develop and grow given that they got independence in the 18th century, because that would contradict the fact that United Kingdom was never even captured for a millennium and around half of the world (including both India and US ) were under the U.K. territory at not-so-long-ago point in the history. So then what is the arcane recipe to affluence they’ve got ? The answer is, an amalgam of Debt as Money and the “Globalized” Dollar.

Continue reading