• Week 1 as CA: Two sessions, a deal and bucketfuls of hope

    It's been ages since I put up a post so I guess it's time I come over and clear the cobwebs. It's been a pretty hectic week and a half since I got back from my CA induction training programme in Bangalore and I think I did quite a bit during the first week.

    One thing I always intended on doing as CA of my institute is to nuke everyone's misconceptions on the open source ideology and the technologies that are associated with it. Contrary to what a lot of people think, open source is not a toy which is meant only for the lifeless geeks living in their basements with their computers. I don't think an end user needs to wonder how a technology is made as long as he can use it without any worries right? When's the last time you asked yourself how your bathing soap was manufactured and what chemicals go into it's making?

    Open source has enough for everyone. If you're a developer, there's a whole lot of knowledge (which by extrapolation is source code) out their waiting to be hacked by you. If you're an end user, there's a lot of amazing software that can get your productivity up and running. Quality products and a healthy ecosystem where the developers interact more or less directly with the users is precisely what open source offers us. No middle layers, no sweet blondes from customer care centers, no nothing. People should embrace open source and experience the sheer awesomeness that comes bundled with it. And the best part of it is that it's all free! So what're you waiting for? Like Abhishek says, it's the age of participation, let's all participate!

    Said and done, the aim of my first session was to enlighten people about what the world of open source offers them and why it's just plain better than their proprietary counterparts. I'd scheduled it for the 5th of August, a Tuesday and I'd gone through the routine of booking my department's seminar hall. But as luck would have it, the intended target of my audience, which was essentially 2nd years and 1st years, had their darned library card issuing on that very date. I've always hated the institute librarian ever since the day he kicked me and my ex out of the library for having a chat in the reading section. What a turd. I thought I forgot how much I hated him until this. He never put up a notice up in our department regarding the card issuing and hence, I didn't come to know. Even the juniors themselves were informed like 5 hours before my session started. But I decided to move ahead with the plan.

    Surprisingly, I still got an attendance of around 35 students which included a fair mix of 1st, 2nd and 3rd yearites who decided NOT to get their cards issued because it's a well known fact that our library could be turned into a historical museum, considering how outdated our books are. Most third years didn't turn up because for some strange reason, they all felt they've already been enlightened. I wonder why they all still use Windows and TurboC then. Last I remember, Windows was proprietary wasn't it? Maybe it's changed. They'd know better I guess.

    But I'm proud to say that every single student who were present that day told me how they just got a whole new insight on what open source actually was! It's better to know nothing than to know half of it, I've always told myself and that was the case with them all. They all insisted I get on with teaching them about these technologies ASAP and I'm convinced that the technology itself, and the ideology will partner well in driving these guys and gals forward.

    Meanwhile, I came to know that some our students are organising a purely technical fest during the 3rd week of October, here in our institute. Before I knew it, they came running asking me to organise a programming contest. I wasn't really interested, but I saw this a golden opportunity and hence, I agreed do it for them IF and only IF they gave me at least two hours to conduct a workshop on Sun's technologies during the fest and hence, we had a deal. :)

    My next session was held on the morning of Sunday the 10th. This time, I made sure that the librarian wouldn't interfere because that wretched fortress of his, stays closed on holidays :). I'd decided to divide my session into two, first with a talk on the Sun Academic Initiative and second with an introduction to the Unix environment. Booking the seminar hall for a weekend, especially after going through the hassle of being permitted to keep the keys wasn't easy and this clearly meant that I couldn't postpone this session if something was to go wrong. And heck, all the first years decided to go home for a week long mass bunk! My rotten luck just wasn't going to have enough of me.

    The third years, yet again, decided they were good enough with Linux and whatever, so they didn't need an 'introduction' to the Unix environment. And just for the record, one of my batchies came to my room while I was typing this blog entry asking me for some help with an assignment and he then had this to say before he left, “Hey yaar, please tell me how I can learn Linux and all that. I think I need to do so badly.”

    Strange, and in spite of all the notices I'd put up and the 'word of mouth' publicity I'd given my sessions, this dude didn't turn up. Sad.

    But the best part of it was that forty second years attended my talk! There were five third years apart from this and a first year as well. At the end of my talk, I was taken aback by the enthusiasm my juniors showed. All of them wanted to get started with working on Linux and Solaris. They even asked me to conduct an install fest ASAP!

    While I showed everyone my Debian GNU/Linux for the Unix commands, I kept giving people hints of what to expect in Open Solaris. Every now and then, when I have a conversation with a junior about Linux, I tell him something like 'so and so is better in solaris' and stuff like that. Everyone was particularly amazed by pre-emptive self healing :). I intend on building up this curiosity till the end of this month and then unleashing Open Solaris on them in September itself, after I myself, am comfortable with it. :)

    The response I received from my juniors has given me a sense of hope, that one day, my institute can boast a large number of Linux and Open Solaris users and that we will have enough students in the developer communities out there. I see it as my responsibility to bring M-OSUM (MNIT Open Source User Mesh) to a height such that my successor doesn't have to do much work!

    I guess I see the light at the end of the tunnel now, hope the road ahead proves to be smooth enough.

    Cheers!

  • The longest twenty days of my life comes to an end...

    In two days from now, I'll be on a train to Jaipur after long last. While anyone else would be sad that they could spend only twenty days at home, I beg to differ. I for one, am a person who doesn't like to remain 'idle'. I was advised time and again to just sit back and relax through whatever little is left of my vacation. Time not only flies when you're having fun, it also soars when you're busy with something or the other. In all other cases, it's just as fast as a cheetah who's been run over by an 18 wheeler and then eaten up by a pack of vultures. Anyway, the point is, I've never experienced boredom of this order before. Barring a day or two, my friends were never around and neither were my cousins. My mom insisted I go visit all those old people (her uncles and aunts) who live in remote corners of the planet. But visiting old people ain't exactly my idea of a fun filled rollercoaster ride of a vacation you know? Yeah, call me a brat. See if I care...

    To add enriched nuclear fuel to the fire, I couldn't work on my laptop. Why? Because of all the things I'd forgotten to do back from college, I forgot to configure my Debian for using the dial-up connection I have at home. And since I didn't have a pen drive to transfer content between my PC and my laptop, I was pretty much stuck. And if you didn't know, trying to work/hack on Windows is as good as trying to dance without feet. When the Google Code Jam happened yesterday, I couldn't submit my code because of this. I'd successfully solved one of the problems which was enough for me to qualify but darn.

    On the bright side, I learnt python through that problem. I ain't that good a programmer and I'm still learning. As of now, I'm pretty much in love with python and this could be the one language I've been looking for since quite a while. An elegant combination of simplicity (near english like syntax) and power (very good built in datatypes and methods) is exactly what the doctor ordered in my case because I'm someone who wants to easily implement an algorithm without having to work out low level details. Haskell is the God of languages in this case which I'll come to shortly. And yes, I'm a lazy sloth.

    During these three weeks, I tried my hand out in a lot of other things as well such as Perl, linux socket programming, linux driver coding, trivial kernel hacking and lastly, Haskell. Haskell is one thing that's impressed me a lot. Thanks Vivi for introducing me to it. Haskell is a purely functional programming language. To learn Haskell, you basically have to unlearn whatever programming you already know, and then learn it again from scratch. But learning Haskell makes you re-think and improve your programming methodology it seems. I didn't read too much on it because I couldn't download the Hugs compiler till I get back to college. No point learning if you can't try out code yourself, is there? Some ten/nine pointers I know would disagree :D . Anyways, Haskell works at a very high level compared to languages like C. Hence, you can do a quicksort in just one line! Yes, one line and thats it. Brilliant eh? Here's how it looks like...

    qsort [] = []

    qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++ qsort (filter (>= x) xs)

    The first line means, "qsort on an empty list returns an empty list". The second line is read as follows, "qsort is a function operated on a list where the first element is x and the rest is tagged xs, such that the element x lies between two elements such that the ones on the right are greater than or equal to it and the ones on the left are less than or equal to it". ++ is the concatenation symbol. And yes, Haskell thrives on recursions.

    I can't wait to get back to college and get into the hustle and bustle of life all over again. I'm also looking forward to attending the induction training programme for the Sun Campus Ambassadors in Bangalore between the 27th and 29th of this month. My CA work officially starts from the 1st of August. Anyways, I've laid down a set of goals for myself for the coming semester which according to Suvha, might lead to me ending up in an asylum. Maybe, I am overloading myself again. Maybe I'm not. Whatever the case, I guess I'm all for it now. I think I'm rejuvenated and wiser (laugh you morons...laugh) after a couple of lessons life thought me in the past few months. Let's see how things change now...

    Cheers!

  • Home at last...

    After two months of self inflicted torture at Jaipur, I've finally made it home, at last! On the 23rd of last month, I was informed that I'd been selected as the Sun Ambassador to my institute. Awesome! I'd almost forgot what joy felt like until then. As Sun Ambassador, I get trained in a multitude of Sun Microsystem's technologies such as Open Solaris, Java, Netbeans, Sun Studio and a lot more. My job is to conduct tech demos and events in my campus to promote all these technologies among both students and faculty alike. The coolest part is, I even get to code on specific projects of their's and hence get to contribute to open source. And as if that's not enough, I even get paid to do this! What more could I ask for? Four days later I was on a train home. For the first time in two years, I was super excited about going home because I'd really worn myself out throughout my fourth semester and on top of that, I stayed back at Jaipur so that I could continue my work with the institute network. I also thought I'd complete my RHCE examination training from Linux World for which I'd got a 100% scholarship for; although it (sadly) turned out to be a complete waste of my time (since I don't intend on spending 12k to get a certification). Two hours of classes everyday for which the very young and inexperienced teacher of ours teaches only for an hour. He keeps getting things wrong and the sad part is, his working knowledge of Linux is confined ONLY to Red Hat. He hasn't experienced the sheer awesomeness of distros like Debian or Gentoo. Plus, his knowledge was restricted only to whatever he'd learnt after attending a couple of similiar courses. And, he has no developing experience. In my honest opinion, Linux and everything else related to computers, is best learnt alone. But anyways, my decision to stay back this summer has been one of the most rewarding decisions I've ever made in my life. I came to know about the Sun Campus Ambassador post being open and my working knowledge on networking and system administration improved by a factor ten :) . I also worked on firewalls, name servers, proxy servers, SMS alerting systems, VPN and high availability clusters, all of which contributed to a steep learning curve. Apart from the one week of nonsensical politics we had in college during Gaur sir's absence, I'd say these two months have been the most productive months for me so far. Anyways, I hadn't actually reached wonder land yet as I'd just embarked on a two day journey which, as I was to realise soon enough, was without any doubt the closest thing to getting a nine inch nail hammered into your skull. And why was that? Anyone who knows me well enough would guess one out of these three things: brats, brats and brats. You guessed right? Awesome!

    Yes, my coupe had a family with a very little 5-6 month old brat and his big sister who had to be the brattiest fucking brat ever (not to mention the fact that the neighbouring coupes had a brat each). The stupid piece of filth could not sit still for no less than 2 seconds. And if you think i'm exaggerating, kindly ask her parents who told me that she couldnt sit still at all. tiI can understand that the little brat couldn't do much but cry, because that's the only thing little brats can do (right?), but that darn swine of a sister of his kept crying for attention while her unfortunate parents tried to attend to the routine diaper changes and what not. I'm sure they must have sinned like crazy to get a kid like that. Her folks tried 'asking' her to keep quiet, but in vain. If I were the parent, I wouldn't resort to words to get the job done. I'd be quick to toss her out of the train, preferrably off a bridge so that the chances of survival are grim and that there is no possibility of some unfortunate passerby having to find her and take her in. For most of the trip, I confined myself to my upper berth and thought of ways to get rid of the brat. I even thought of ways to get rid of the little brat just in case. You can be sure that he'll grow up to be just like his sister. I'd share those thoughts with you but it might end up being too graphic and is hence not appropriate for any age group at all. Luckily, there was a Malayali guy and his mom on their way to Calicut on the side berths. The guy's name was Nikhil and he'd just complete his twelth grade from KV Pattom and hence, I could open up a conversation with him. We talked about how crazy our batches at school were, about the people in Jaipur and a lot of other things. The blasted brats and their incompetent parents (after long last) got down at Madgaon the next evening. The train was running pretty late (five and a half hours to be precise) owing to an engine failure which happened close to an hour after it left Chiplun. I finally reached Shoranur junction at 7:00 AM on Sunday morning. After a wreched two hour long ride by bus, I finally reached home! Mom, Priyamma and Ammamma gave me a warm welcome with nice, long, crisp dosas and stew for breakfast. I mowed down six dosas.

    Dial-up blows by the way. For signing into blogger and putting up this post, it took me no less than forty minutes.

    Although it feels great to be visiting relatives and friends (after a long time!) I kind of wish I was back at college. Guess I got used to the hectic lifestyle I'd led back there. Hope my mom doesn't see this or I might get bludgeoned with a rolling pin or something. Cheers!

  • You know someone wants a favour from you when...

    Ever felt odd when that person who's always ignored you comes up to you and becomes nice all of a sudden? When that person who's always in the 'I'm busy' mode when you're online suddenly opens a chat conversation and says “Hi! How are you today?”. Well, chances are, Mr/Mrs X wants a favour from you. In this post, I'll give you a little tutorial on how to tell if someone wants something from you. Once you're through with this, you'll be unmasking those hypocritic maggots in no time! I shall move on to a little categorisation based on how cunning the maggot under consideration is. So with no further ado...

    NOTE: I don't know what you call such a person, so I guess I'll continue referring to them as maggots throughout this tutorial. No offence to the real maggots which are just nice little crawly creatures who want to make the world a better place.

    Level 1 maggot: Loser class

    Skill level: poor
    Cunningness: poor
    Brains: N/A
    Sinister rating: 1/10
    Signs: You've never had a conversation with him in your entire life, nor will you for many more lives to come, but this person actually walks into your room, sits on your bed and acts as if he's very interested in whatever you're doing. When asked, “Hey, what brings you here?”, he's dumb enough to answer, “Nothing, just dropped by to say hi, we are friends and all aren't we?”. Note, he said friends. Wrong answer. The verdict: maggot!
    Comments: The one finger salute works well. Try it out.

    Level 2 maggot: Grunt class

    Skill level: less than average
    Cunningness: less than average
    Brains: Rumours are they do have some, but I still go for N/A
    Sinister rating: 3/10

    Signs: You're sitting in the mess, cursing your rotten luck to be served cattle feed, when the suspected maggot comes running and sits right next to you. You observe he's already had his meal. You also remember you've just given a kick ass presentation that morning. He puts his arm around you like you grew up together only to say, “Hey man! How're you doing? How's your life going?” Note that both the questions are related to you. This is a sure give away. This person has nothing to do with you at all and you're not related. Chances are, he's going to ask you to help him out with his project but he's going to play around for a while before asking you for certain, just to make you feel comfortable.

    Comments: Shove your plate up his throat. And then proceed with the one finger salute.

    Level 3 maggot: Striker class

    Skill level: above average
    Cunningness: above average
    Brains: A teeny weeny bit. Or maybe not.
    Sinister rating: 6/10

    Signs: You know there are a lot of people in your friends list who don't give a beep about you and vice versa? That's the kind of people that we're talking about here. Now you're working away in the server room trying to figure out a solution to a problem that has long been elusive. Then, the maggot opens up a chat conversation saying, “hi”. You also note that he's got the 'I'm busy/Don't disturb/away/I'm dead' status message up. The conversation proceeds as follows:

    Maggot: hi
    You: hi there! ssup?

    ...10 seconds later...

    Maggot: how are you?

    ... Notice the delay...

    You: uh...i'm ok. Wat abt you?

    Maggot: i'm fine.

    ... It's time to slip up you evil scum...

    Maggot: wat are you workin on in the server room again?

    ... Gotcha!...

    This is where they all go wrong. The two of you might have been in the same class for maybe two years and it's been a whole two semesters probably since you've been working in the server room and he knows it and you know that he knows it. BUT, he comes out of the blue and decides to ask you what you've been doing all along? It's strange. It's not like he woke up one fine morning and while having coffee, realisation struck, he went OMGWTF and he figured out he didn't know what you've been doing in the server room all along. I'm sorry. What he really wants to do, is to get a conversation going so he can ask you a little while later to check his grades or something of that sort. Dork.

    Comments: Tell him he flunked in all his subjects and that he's got a sem back. It works great!

    Level 4 maggot: Elite class

    Skill level: High
    Cunningness: High
    Brains: Lots of it. Lots and lots of it. Or then again, I'm just kidding.
    Sinister rating: 10/10

    Signs: These guys are the mommy's and daddy's of all the above mentioned maggots. They're the pros. If this whole thing was Warcraft, they would be some boss like Nerzhul, the Lich King. They're pretty good at getting what they want from you. They'll plan way in advance as to get what they want from you and how they're going to go about to get it from you. Even people who rule as much as myself are prone to these things. They're a menace and we should all unite to send them to oblivion. Yet again, I'll take the example of a chat conversation but in this case, the hunter won't make it that obvious until at least half an hour.

    Elite maggot: Heya... long time! Have you forgotten me kya?
    You: oh hi. yeah right. long time!
    Elite maggot: So what have you been doing?
    You: oh nothing...just working away...
    Elite maggot: i c. when're you going home?

    ...blah blah blah...

    ...blah blah blah...

    ...blah blah blah...

    20-30 minutes later, the maggot is out of things to talk about...

    Elite maggot: temme...howz ur (continued below)

    Remember, all this person wants from you is the favour and he/she doesn't give a shit about you or your life, let alone your...

    (continued from above) ....girlfriend? ;)


    It's a 99% complete give away and this is a sign for you to become cautious. Put up your guard and be on the defense. Or better, do what I do...

    You: hey...the connection seems to have some probs here. I might get disconnected any sec...

    Elite maggot: wait... can you do me a favour?


    And it's at exactly that instant that you turn invisible to the maggot. You have to time this right ok? It's all about practice. But do keep in mind that this depends heavily on the IM client you're using. For example, in Gtalk, it takes a while for the other person to get the message that you're offline. So it's all about preventing the maggot from knowing that you're sure there's that question coming to you.

    Comments: Once you turn invisible, either block that person or ignore him/her for at least a century and a half.


    So there you go folks. Hope this helps. And don't forget, squish 'em maggots! And an advice to anyone who wants a favour from me; JUST ASK!
  • Setting up MRTG for BSNL, Jaipur.

    I finally took my network monitoring work up a level when Gaur sir asked me to go over to the BSNL head office and set up a MRTG server for the NIB (National Internet Backbone). What an opportunity! MRTG is Tobi Oetiker's (the man behind RRD Tools and Smokeping) multi router traffic grapher which is basically a tool to tell how much bandwidth your routers are using. This seems crucial for an ISP like BSNL who keep getting calls from their customers who b**** about not getting enough bandwidth. And it's really important that they have such a set up since all broadband connections to the state of Rajasthan originate from the Jaipur node where I was asked to work. I'd decided to deploy my ever favourite linux distro, Debian Etch on their server so that apt-get would make quick work out of the task at hand. Here's the roadmap I'd laid down for myself for the job:


    1. Install a base Debian Etch-4.0.r1 with a netinstall with a fairly large and separate /var partition since all the .png files generated by MRTG are dumped into /var.

    2. Since security is an important issue at such a level, a dist-upgrade is necessary which is meant to patch the OpenSSL security flaw that was found in Debian a couple of weeks back.

    3. Use apt-get install apache2 to set up a webserver and configure it as needed.

    4. Use apt-get install mrtg snmpd to set up MRTG and SNMP and the required dependencies.

    5. Setup .htaccess for MRTG so that only privileged users can view the graphs.

    6. Estimated time: 1.5 hours at the max.


    Since I was told not to go alone, I took Yash along with me. We reached the BSNL head office at around 10:45 in the morning and after a scouring the whole office complex for around half an hour, we finally met Mr S.C Gupta, the head of the NIB (National Internet Backbone) in Jaipur. He guided us to his office and then led us into their server room which housed some seriously wicked routers and a couple of not-so-wicked servers. Quite expected actually. He showed us the server we were supposed to work on. I don't even think it was a server class machine. He'd already tried to follow the instruction manual that each head office had been sent so as to (or hoping so as to) set up MRTG on their own, and had installed Red Hat 7.1 (LOL) in it by himself as per the manual. At first, I exclaimed “Are these guys kidding me?”. But as the reader of this story will soon find out, the joke was on me. :(


    I proceeded to tell Mr S.C Gupta how much Debian rules and how it's the ultimate combination of security and stability and is pretty much the best choice for running servers. He was kind of pleased with our idea and told him that the machine was all ours and we're free to do whatever it takes to get the job done. Roger that! So we proceeded to do the necessary pings to see if the server was connected to the internet and then noted down the IP address, netmask, the default gateway and the routes. Then we booted our Debian net install disc and went on with the usual procedure, did the partitioning, set up the time zones blah blah blah and set up a static IP configuration. We kidded about how this is going to be piece of cake but I guess we had spoken a moment too soon because the installer complained that it couldn't connect to ftp.iitm.ac.in to fetch packages. WTF? This was definitely a bad omen. I wondered if we'd set the network interface up correctly and we had. But it just refused to recognize the mirror. So we decided to fetch the packages ourselves after we properly configured the card once the installation of the base system was over. As soon as that was done, we realized we simply could NOT ping any host outside the LAN (after having a hell lot of problems being identified within the LAN itself, we couldn't ping our machine from other machines). What followed was a lot of trips to Mr Gupta's computer and back to see if he's given us the right details about the network which was followed by an exchange of calls between us and Gaur sir who suggested that IP forwarding wasn't enabled. It seemed kind of odd since I ran the netmon machines from this very installation disc. Then I tried it with my own Debian installed laptop but in vain. I just could not see any host outside the LAN. After a lot of attempts and reinstalls, we decided enough was enough and moved on to install Red Hat 7.1 itself :(. Yuck. I was kind of embarrassed actually. After all the hype I created around Debian. Sad.


    What was supposed to be just a matter of two commands in Debian was indeed a herculean task in Red Hat. We had to fetch each of MRTG's dependencies from the net, compile and install them from source, not to mention having to manually include and link the necessary files and libraries in each case. After using links, the text based web browser we all know and love, we were able to find out the latest and available versions for zlib, gd and libpng and we successfully installed them from source inspite of having to do a lot of including and linking. Then when it was time to install MRTG, the connection of ours went down and we got awesome transfer rates of around 0-30 bytes per second. Since I hadn't brought another set of clothes, a sleeping bag and a shaving kit for myself, I decided to ssh into our college network, download it from my netmon server and scp it over to the BSNL machine and it worked like a charm. After the MRTG package was ready, it's configuration files made, the HTML template created and the MRTG binary scheduled to run every five minutes using crontab, we decided to test it. And it seemed the rotten luck which had been following us all day wasn't going to make itself scarce any time soon. We couldn't open the apache test page from Mr Gupta's browser. We ran a lot of checks on our httpd.conf and everything seemed normal. The permissions were perfect and the ownership required etc were all fine. We even tried setting up a virtual host for the job but even that was in vain. Finally, the idea dawned upon me that the firewall we'd set during installation time was set to block all incoming connections to the machine. After permitting www (http) requests to the machine and adding the prescribed set of ipchains rules, the server was good to go! We moved on to set up the finishing touches to the machine, making sure things worked even after a reboot. We then set up .htaccess and added a line to the html file saying that the maintainer was Mr S.C Gupta. Job's done!


    Estimated time: 1.5 hours max.

    Actual time taken: 6.5 hours flat!


    All in all, an interesting experience, having had to work in a real live environment. After the ordeal, we realised we were pretty hungry because we were NOT given a single bite at the office. I went on to mow down 6 or 7 rotis (I lost count actually).


    Cheers!