Course registration by a ‘robot’ :)

Everyone knows, course registration is the suckiest part of the semester. Apart from the fucked up ISAS portal, its because of the following steps that each one of us needs to perform -

1) Fill up the form in a damn hurry.
2) Check if all the courses are entered properly.
3) Click the ‘Update’ button.
4) Hope that you are in.

Now, step 2 is a very big problem. If you do it, you are late, and if you don’t, you may be dead before you know it. So, I decided to let my computer take control of step 1. Hence, started searching if there is anything that can automatically type letters, and found a Java class called ‘Robot’. Without wasting any time, wrote a simple program that can fill my form just as I would possibly have done. Here it goes, entering my courses…

—Start Program—


import java.awt.Robot;

class CourseRegistration {

    private static Robot robot;

    public static void Type(int key) {

        robot.keyPress(key);
        robot.keyRelease(key);
    }

    public static void FillForm(){

        int i;
        // Select the first field by pressing a 'TAB'
        Type(9);
        // Register for Major Project II by pressing 'M' 3 times
        for (i=0;i<3;i++) Type('M');
        // Select the next field by pressing 'TAB' 3 times
        for (i=0;i<3;i++) Type(9);
        // Register for Project (4 C 7th sem) by Pressing 'P' 18 times
        for (i=0;i<18;i++)Type('P');
        // Select the next field by pressing 'TAB' 3 times
        for (i=0;i<3;i++) Type(9);
        // Register for Linear Programming by pressing 'L' 5 times
        for (i=0;i<5;i++) Type('L');
        // Select the next field by pressing 'TAB' 3 times
        for (i=0;i<3;i++) Type(9);
        // Register for English Literature by pressing 'E' 8 times
        for (i=0;i<8;i++) Type('E');
        // Finally, just to be safe, press a 'TAB'
        Type(9);
        // Done!
    }

    public static void main(String[] args) {

        try {
            Thread.sleep(1000);
            robot = new Robot();
            FillForm();
        } catch (Exception e) {
        }
    }
}

—End Program—

Steps (although quite obvious) one need to follow after making suitable changes are -
1) Open the special registration page.
2) Make the fields ‘—None—’ and set the mark above the actual form.
3) Compile the program.
4) Run it and alt-tab the special registration page within 1 sec.
5) Update and be happy.

PS0) May be some of us already knew about it. Anyways its interesting.
PS1) Found “Motto : ?” written on our colleges’ wiki page. No offence but that seems true.
PS2) Happy next sem to all of you. :)

samwise

Surf’s Up

“You know, kid, never give up. Find a way, ’cause that’s what winners do”. OMG! When did I last heard anything like this in an animated feature. I don’t think I ever did. This is the 2007 Academy Award nominated “Surf’s Up” from Sony Pictures Animation and believe me this one is surely two thumbs up. The film is a mockumentary on the life of a rockhopper penguin Cody Maverick. Its striking, dazzling, hilarious, backed up by its amazing soundtrack with songs like “Drive” by Incubus, “Holiday” and “Welcome to Paradise” by Green Day featuring in the film. I think many of us won’t see it just because its not a Disney or a Pixar flick, but its so much better than its biggest rival Pixar’s 2007 Academy Award winner “Ratatouille”. Some pics btw …

Surf’s Up Poster

Chicken Joe, full of luck, out of brains

PS time…
0:- Song of the day – Love Hurts by Incubus
1:- My latest wallpaper

Drew Barrymore

Aw man, I’m in love with her.

samwise

“Desperate Roses”

I always wanted to do this. Write a poem, though a short one, may not be as good as I thought it should have been. I suppose, each one of us would have felt this atleast one time in his/her life. This is one of those moments when you are feeling so lost, and you are not sure what the things around mean. So, here it goes…

Desperate Roses

Soaring like a ship
Sinking like a kite
Intelligent like a mule
Dumb like a scientist
I’m not in my best of the pose
Am as desperate as a rose

I can feel the moment
I can feel it within
But I can’t feel myself
My feet are still
Am I wrong, am I right
I don’t know, I can’t decide

But I know, I’m very strong
My heart says I am
To overcome this moment
I’ll come out with a plan
Then this world will see something
Unexpected as I am

That’s it. I’m not sure why I chose the words “desperate as a rose”, may be cause a rose so desperately wants to reach its fate, the hands of a simple, beautiful girl.

PS0 : I am desperate to go home, someone’s waiting with a surprise.
PS1 : How the hell in the world I got an ‘A’ in OT ?
PS2 : Life is getting more and more hectic here.

samwise

God Damn, Damn Small Linux aka DSL

This is my first post, and I am not gonna talk funny here…..or am I!

That was a sunday night, project was finally over ( wish Jawahar has the same thoughts), with just some documentation remaining. Bored with enough of orkutting and movie watching ( just finished watching Shawshank Redemption for the fourth time ), I just glanced at my desktop to find something interesting, and see what did I find….QEMU Manager. Lets use it again…..oh yes the first time I used it for Ubuntu 7.04 and that went so slow and heavy that the terminal used to open like the curtains drop after finishing of an act in a theater. Fed Up. After all that’s quite a full fleshed, heavy linux (Ubuntu RoX).

Now, what should I do wid QEMU. That’s pinching in my eyes. Lets try something terribly small. Damn Small Linux. Many ya geeks out there would definitely have heard about that damn thing. That’s a business card size bootable Live CD desktop derivative of Knoppix. I downloaded the 49.5 MB DSL3.4.4 ISO (that’s strangely and terribly small for an OS, wonder what will it have for the users!). I can’t wait, lets try.

Loaded the ISO in a virtual drive….

Configured and started QEMU….

And vrooooom….within 15-20 sec it took me to its DSL world. A pleasant looking desktop loaded wid neither a menu button nor even a taskbar, but wid some applications hanging out here and there on the window ( Fluxbox window manager, as they call it ). They say, install “icewm” if you wanna get a taskbar and a menu…I say, why do you always have to follow the traditional way. Here are some DSL screenshots…

Desktop More Applications Applications Running

Upper right corner of the desktop shows some system parameters. When I ran a firefox, xzgv( Image Viewer ), Beaver
( editor ), Siag (spreadsheet) and xmms, it showed…

Processes : 35

CPU usage : 2% ( may be that’s why P.K.Reddy was always worried about CPU sitting idle )

Ram : 40.8 MB ( and what did I gave…512 MB )

In the lower right corner is an applet for mixer settings and drive mounting. And of course concentrated in the upper left corner are icons for useful applications. This damn thing can even boot from a USB drive. The most hilarious part was its ability to boot on a system without a hard drive. It uses ramdisk as its installation area. All the useful applications are just a right mouse click away. There is a postscript viewer, a Sqlite Book, options of configuring ssh, ftp, nfs servers and many more. DSL panel concentrates most of the system configurations and management options in a single spot.

BizCard moreapps.jpg Simple

The night passed swiftly. As morning approached, I turned off my virtual machine….and slept. And if you are still wondering why didn’t I install it on my system…….RECONSIDER!

samwise