Monthly Archive for January, 2009

A Feel Of Things To Be

Things have returned back to normalcy at IIT Kharagpur. This report is with regard to one Mr. Anuvrat Singh, who is a final year student of the Department of Computer Science and Engineering.

A young boy, happy with his placement at Fair Isaac, Bangalore had been behaving oddly these past few days. Sources close to him tell us that since the start of the spring semester, this being his final one, Anuvrat had been attending all the classes. This was an unexpected change in a guy who never attached much significance in being present during the lecture hours. He had this weird theory of – Why attend classes if you don’t listen to the professor anyway. Time would be better spent sleeping then and later on doing something constructive. And he stuck to this absurd notion of his for seven semesters.

However, what changed his mind at the beginnnig of the semester continues to be a mystry. He won’t talk about it. When confronted, he simply tries to change the topic. His wing mates and friends were highly concerned for his well being and health. They were troubled by the possibility of attending classes having an adverse affect on the young boy’s health. To get him to bunk classes, they suggested he watch movies along with them late night, go for a walk at 2 am, and what not. But it was all in vain. Classes, apparently, had become his priority for the semester

His friends had given up as a lost cause. And then it happened ! This morning he had a double lecture at 0730 hrs – Foundations of Cryptology. Anuvrat woke up at 0725 and the very thought of a double lecture, that too of Cryptology, scared him. For the first time this semester he was afraid to go to the class. And then he did what he does best – pretend as if he doesn’t have a class at all. Yep, he woke up, got fresh, had breakfast and watched Two And A Half Men for the next four hours. This was the first class he skipped (not missed, but bunked) this semester.

And if the rumours are to be believed, he is leaving Kharagpur to visit his parents in Hyderabad tomorrow. It is a 2 weeks planned trip – away from classes, projects and any work. And he feels quite good about it. Things certainly are starting to look well for this lad once again. He was seen enthusiastically involved in a conversation to plan a trip to the Sundarbans in the second week of February with his wingmates.

Get lost, Ha ! Now its me, Anuvrat. Look, whatever the reporter has written is crap. I wasn’t demented to attend the classes everyday. It was all part of a plan. A plan that has already been put into action. The classes were to give me an advantage in attendance, so that I can now skip many more classes without being worried about  a drop in the percentage of attendance. Thats all from me. I am a bit busy right now – lots of trips to plan. See ya :)

Popularity: 1% [?]

Perhaps Perhaps Perhaps

The theme song of the UK series Coupling is enchanting. The serial was great as well. One of my favorites. Definitely watch it if you haven’t done so already – and remember the UK version. The US version doesn’t even merit a mention. Included below is a teaser of the song. I would suggest the version of the song Perhaps, Perhaps, Perhaps by Mari Wilson.

Popularity: 1% [?]

Win 7 Beta :)

Windows

Windows

Its hard to resist myself trying out the latest software’s available. And when it comes to windows, it becomes almost irresistible. But the last experience with Vista had taught me to be extra careful when trying out the newer editions of Microsoft’s operating systems. It was an experience I would very much like to forget.

As a result, I had decided not to jump into the fray and try out the Win 7. Everyday I would read about it in blogs, and yet I confined myself to Win XP. But the threshold of my patience was tipped over when my brother asked me if I have installed the new OS or not.

I have to try it – I decided and immediately got myself a key from the windows downloader. The downloading took some time, and then I was on to installing the new OS.

I chose to have dual boot option, so that I am not at loss if Win 7 proves out to be disappointing. I mounted the image file using daemon tools and started the installation. After choosing Custom Installation mode, selecting the drive in which to install the new OS, the familiar Vista installation screen flashed. Files were copied, extracted, the system restarted, did some more installation stuff, another restart and I was finally ready for the new desktop.

The very first impression is that you have Vista back ! The look and feel is exactly as it is of Vista. The same Aero effects, same Start Menu and even the control panel. Apparently this version has better security, and has a nagging habit of asking for permissions for even more simpler operations.

At the moment my experience with Win 7 is quite limited. I still have to explore a lot of features, do a lot of stress testing and all. I hope to be able to write a more complete post in a few days, specially about how Win 7 is different from Vista (though they look just the same).

But just to point out the one most obvious and interesting feature – Win 7 requires lesser hardware standards than Vista, it for instance can work with 512 Mb RAM, with 1 Gb being Recommended (it was 1 Gb and 2 Gb respectively for Vista). Win 7 scores first ! :)

I really hope this version turns out to be good, I don’t want to revert back to the boring look of XP after the experience of Aero. I might otherwise as well shift permanently to Ubuntu + Compiz.

Reblog this post [with Zemanta]

Popularity: 1% [?]

Angel of the Morning

There’ll be no strings to bind your hands
Not if my love can’t bind your heart
And there’s no need to take a stand
For it was I who chose to start
I see no need to take me home
I’m old enough to face the dawn

Just call me angel of the morning, angel
Just touch my cheek before you leave me, baby
Just call me angel of the morning, angel
Then slowly turn away from me

Love It !!

Popularity: 1% [?]

php – Sessions

After a long long time I was back to coding in php. And by long time, I mean atleast 24 months ! Believe me, it wasn’t easy. More so because of the higher standard I have set for myself. My code this time shall be much neater and easier to read than it ever was.

The past four years of my life has been spent coding. And when you code so long, you modify your habits to get tuned to the proper way of coding. As it is said, a person spends more time reading a code than writing it. So this time I am taking special care of writing simpler and smaller functions so as to make the code more readable. Also, since I have been reading a lot of OOP these days, I am intent on providing an abstraction layer for the user, so that at the top most level coding should appear like writing a few english sentences rather than some cryptic mysqli_select_db things.

This is the first time I am trying to code in php following the OOP structure. Also, though this might seem strange, it is the first time I am using session variables in my design! Below is a trivia I had not known earlier, and spent 2 hours trying to understand what was wrong in my seemingly proper and correct code.

A session created with session_start will only be available to pages within the directory tree of the page that first created it.

i.e. If the page that first creates the session is /dir1/dir2/index.php and the user then goes to any page above dir2 (e.g. /dir1/index.php), session_start will create a new session rather than use the existing one.

Also I found the following class to be useful.

< ?php
class Session {
public static function Init() {
self::Commence();
}

public static function Set($fld, $val) {
self::Commence();
$_SESSION[$fld] = $val;
}

public static function un_set($fld) {
self::Commence();
unset($_SESSION[$fld]);
}

public static function Destroy() {
self::Commence();
unset($_SESSION);
session_destroy();
}

public static function Get($fld) {
self::Commence();
return $_SESSION[$fld];
}

public static function is_set($fld) {
self::Commence();
return isset($_SESSION[$fld]);
}

private function Commence() {
if(!isset($_SESSION['ready'])) {
session_start();
$_SESSION['ready'] = TRUE;
}
}
}
?>
Reblog this post [with Zemanta]

Popularity: 4% [?]

php5 OOP – Function Overloading

PHP

PHP

Starting php4, object oriented concepts have been made available to the programmer. Though not well developed, they paved the way for a more complete implementation of the OOP basics in the php5 version. However, one thing that remains lacking is the ability ot overload the functions.

Overloading of functions is quite an useful feature. In the simplest form, it gives you the freedom to declare a class with more than one constructors.

Not to get disheartened though, we have a simple enough way to work around this short coming. In php, when a call is made to a function that does not exist, then the control searches for the __call() function. We make use of this to carve out the over loading feature that we need.

Below, I am writing the code for a Register class which has two variables – name and pass. The constructor is being overloaded here.

class Register {
private $name;
private $pass;

public function Register() {
$num = func_num_args();
$args = func_get_args();

$funcName = 'Register'.$num;
$this->__call($funcName, $args);
}

private function Register0() {
$this->name = '';
$this->pass = '';
}

private function Register2($name, $pass) {
$this->name = $name;
$this->pass = $pass;
}

public function __call($funcName, $args) {
$this->call_user_func_array(array($this, $funcName), $args);
}

public function setName($name) {
$this->name = $name;
}

public function setPass($pass) {
$this->pass = $pass;
}
} // Register

// regA is using the Register2() constructor
$regA = new Register('Anu', '@#$#@$@$');

// regB is using the Register0() contructor
// and subsequently setting the values of name, pass
$regB = new Register();
$regB->setName('Anu');
$regB->setPass('@#$#@$@$');
Reblog this post [with Zemanta]

Popularity: 4% [?]

Who Are We ?

Disclaimer: I cannot believe I am writing this down. I have always maintained a neutral stance on this issue, but I think its time to finally accept that Dad and Baba were always right.

Today I was going through the conversations of my friends on one of the so called social – networking sites. Ploughing through the unlimited smileys and a few words that I did not understand (though I was supposed to), I could not fail to notice how much our english has changed in these few years.

We have, in a matter of speaking,  adopted the western style of writing – their slang and all their jargons. Accepted, a lot of it is because we are influenced by the west and strive to be as successful, but it does not mean we have to ape them.The usage of da, gotta, dood, … makes my head spin. I wonder where the world is headed to. We now believe in aerobics and gym, while people in the west have started doing yoga.

No, I am not professing any culture. I believe in none. I am an Indian, but do not call myself a hindu. Its like what Baba said, we are the pagans. We can have our own culture, our own beliefs and our own system, based completely on our own twisted sense of logic. But the important point is that we need to have a unique quality, a selling point which makes us the person that we truly are. Its this quality that we have lost and become a part of the faceless herds.

Almost all my friends are unique in their own special way. It is this quality of theirs that makes them my friend (I do not get along very well with everyone). A person who has no self respect and nothing new in himself, can never be my friend. Above all, a sycophant – never never never – they are the kind of people I hate, loathe, disrespect with all my sincerity.

Its true that change is a way of life, but change for the sake of change must be discouraged. Afterall, what does the western culture have to offer us that we do not already have. Once again, Dad you were right and I wrong, we are much happier as it is. The strong notion of family clearly lacks in the foreign culture. I do not say this as a small boy sitting in my room with no exposure to the outer world. No, I have been to Switzerland. I have stayed there for almost three months. It pained me to see the old people shunned to the outer regions of the city, living a lone worthless life while their kids earned money (in the same city I might add).

On a completely unrelated note, I would like to add that after spending three months in a foreign country, I realised that India is a much better place to live and grow old. There is more to life than just money.

Popularity: 1% [?]

F60 Unveiled

Ferrari
Image via Wikipedia

Yay, finally the time has arrived when the teams present their new challengers. Ferrari is the first one to roll out its F60 for the 2009-2010 season, which it did at its Maranello base on Monday.

The car looked quite odd though. The new regulations require a longer front wing and a short high rear one. Also the car had slick tyres on it. The KERS system has also been installed on the car, though Ferrari is yet to take a decision if it wants to use the KERS or not.

Generally Ferrari names its car after the season in which they will be used. The previous one for instance was called the F2008. This one though has been christened F60 to commemorate the milestone of Ferrari being the only team to have participated in all the 60 Formula One Championships.

Massa was pretty excited about the new car while Raikonnen was once again eager to get onto the race track to wrestle back the championship from Hamilton. With lots of rule changes this season, not to forget the re-introduction of the slick tyres, the choice of adjusting the front wing twice per lap so as to gain extra performance while overtaking, and the newly introduced KERS it should be a great season to watch.

Reblog this post [with Zemanta]

Popularity: 1% [?]

A New Home

To my already mentioned lists of websites (Never The One), I have added a new one. Yes ! I have once again moved my website to a new address.

The last time, I was using the services of Hyperwebenable to host my blog. The only restrictions I had with them was that url could not contain my name, that ads would be displayed on each page and that the site had to generate a certain minimum hits per month. I liked none.

This time around I have settled for a different solution. I have registered a domain with co.cc for free. Since all my ID’s are singh.anuvrat, I decided to have this one as the same. Hence the address singhanuvrat.co.cc.

But they provide you only the domain name. I still had the job of finding a host. Luckily, I found a free host at 07x.net. I have a disk space of 1500 mb, and a monthly bandwidth of 51200 mb. This is more than enough for me. Moreover, if I feel that these restrictions are hampering me, I can very easily move to another host without having to change my domain name. This means that I can continue using singhanuvrat.co.cc for as long as I want to, while changing the host as and when required.

I would however like to purchase my own .com domain sometime in near future, subject to condition that I take up blogging as a serious activity.

Popularity: 2% [?]

I Hate Feeling So Helpless

Why ? Why ? Sab kuch isi saal kyun hona tha … I hate being a final year student this year, now that the  market scenario is so grim.

Had it been a normal year, abhi tak sabki job lag gayi hoti thi and we would be having lots of fun. I had been dreaming about this one carefree semester, jab hum apne aane waale salon ke sapne dekhte, maze karte and live a bindaas life jo seniors ki hoti thi. We would go out almost every other day knowing that we are the studs who cracked the best jobs in India,  and that in four months we shall be earning lot more than a normal erson would do as a fresher. Studying at an IIT and watching all the seniors land up with high paying jobs gives you the illusion that all is well and that a few years down the line you could have an extravagent life style.

Alas ! Things went all wrong for us this year. The markets crashed in August and everything became chaotic. Companies like Google, ITC, P&G cancelled their campus recruitment. If that was not all, the first day top companies drastically reduced their intake. Last year Microsoft had recruited 6 from IIT Kgp, and this year only 3. McKinsey, Morgan Stanley, Yahoo and a few more selected just single students. Just one from an IIT ! Amazon went without any ! The indications were clear – it was going to be tough landing up a job this time.

Luckily, I got selected at Fair Isaac. I had even better luck of being offered a profile I very much wanted – the RnD position. It allows you to do something innovative and try something new – to think out of the box. Others have not been so lucky. And this is what worsens the situation.

The dilemma is how to present yourself among your friends. You cannot be all happy and bragging about your job. You cannot throw parties and celebrate the occasion. Heck, its my first job and I haven’t yet given a treat to my closest friends at kharagpur – my wingmates, the people I really care about.

Today the CAT results were declared. One of them got a call from all the IIM’s and three others got none. Worse, ek ka percentile 99.32 hai, and yet no call, while people with lesser percentiles have got calls from 2 to 3 IIMs. I hate this disparity. I just want to get out of here, to let the things cool down a bit.

I think, I want my life fast forwarded three years into the future when things will have become better. It pains to know that you cannot help your friends, not always. There are a few battles that you have to fight alone, a few demons that only you alone must get rid of. I hate feeling so helpless. I wish there was something I could do to make things better.

Popularity: 1% [?]