Saturday, May 21, 2005

To Smoke or to Smoke

Nah, I am not missing a "not" in the title of the post. This post is about the two huge ideas that went from smoke to smoke. Here's what happened:

After quite a bit of ramblin' over the topic for THE project that we are supposed to do at the end of under-graduate degree, we finally had come at a fork in the road.

The "we" was made of THE TWO guys of IT department in my college plus me. Sure, you can easily run a word-count on the words I spoke at college and still not hit anything more than a few thousands, but it seems whatever little I said have given me some recognition. The other two were vociferous when it comes to voicing anything. Sriram krishnan and Balak are the two best brains that you can have around if you are planning a brainstorming session. I was definetely out-of-league here. I take in things bite-by-bite and come up with something...in the end.

Me and balak were fascinated by p2p and network related research stuff, while the microsoft employee sriram wanted to do something that will give "instant-gratification" to the masses. My suggession was that we do something with BitTorrent to alleviate ordinary web servers' bandwidth problems. (Yeah, I like BT). Initially, my focus was on eliminating slashdot effects. Then I wanted a one-code-to-solve'em-all thing. I had planned to write a replacement web server and a replacement webclient (actually, a browser) which would incorporate all of BitTorrent goodness in it.
Then when I actually sat and talked about it, sriram wasn't exactly sure people would like to change their web servers "just because a bunch of undergrads told'em so". So we sat down and refined the idea and pointed it at a slightly different but more appropriate angle. Since not a lot of them do podcasting and videocasting, we may as well provide a distribution media for them. But for a more short-term focus, we chose text blogs. Thus was born "Smoke". Read all about it in sriram's blog posts here.

(There's a running gag that if balak or I were asked "Why name it Smoke?", that we would reply with a "Ask sriram's GF" ;) )

Sriram was more into employing intelligent search engines, retro-fitted with intuitive visualizations and putting that behind a MS-legacy-usablity-for-the-masses UI. But now he wanted to build a machine. A machine so powerful that...ok, it's a virtual machine :)

I was not in favour of doing a virtual machine. Partly because I wasn't sure I could crank out something as big as a virtual machine, and mainly because I wanted a p2p project in my resume. But later, I accepted to be a builder of the virtual machine, partly because I knew sriram had no problems with doing a p2p thing so I shouldn't have one working on a VM, and mainly because neither me or balak was able to come up with a project worthy p2p idea.
One interesting idea I came up with involved "TorrC"s, or TorrentContainers which are just Torrent files containing hash of torrent files. Basically, my idea was to give the main tracker server the abilty to make a tracker out of the peers, dynamically and transparently. I hoped that this would halt the tracker server shutdowns for some time and give the BT sites more robustness and more bandwidth. I didn't really go into the details as this seemed too small a project and was dropped. Recently, I found that the BTHub project (@isohunt.com) is a similar, but more centralized, implementation.

So, thus began the construction of this awesome machine. And it was thus named ....(wait for it).....Smoke! It even has a proper little home at sourceforge.net. Sriram follows the building of the SmokeVM at his end in parts: Here's First, second, third and fourth parts (for now).

Since sriram was the authority on programming languages, virtual machines and stuff like that, we let him split the workload amongst us. Sriram enlisted more help from the outside. Aarthy and kaushik were invited to join the coding work force. Before long, each one of us were assigned our task. Sriram would muscle with the main smokevm engine, while balak and I would produce a python-to-smoke compiler, kaushik would produce the parser that reads-in the smoke code file and Aarthy would script out a Lisp-to-smoke compiler.

Not before a month passed, schedules changed followed by our plans. So, in the end, we wound up having to dump the Lisp compiler and post-poning a few of the ambitious goals for the college project deadline. I wound up coding the Python compiler, while balak wrote the project documentation (for the college version of the code). Though we got it all planned and stuff a full three months early, the entire code and documentation that was submited to the college was done in less than three weeks.

The entire project was filled with a lot of everything. I was helpless as I listened to a LOT of geek noise between the head-geeks (sriram and kaushik) both in chat conferences and in the smokevm mailing-list. I had fun coding something and sending it over to sriram for checking it with the VM, who would check it out immediately and reply. We were initiated to the world of cvs through this project. I had my own moments when I n00b'ily created a few modules on the cvs tree and sriram had to "patiently" delete those. I had great fun constantly updating my compiler code once I finally got the hang of the cvs thingy. I experienced responsiblity when I started creating Change logs for all my coding updates. We all had our own goof-ups in the project and I believe that we learnt a great deal from this.

I remember being baffled at the very thought of coding a compiler for a language that I hardly knew existed (python). But after I wound up learning that language, I was happy to write the compiler in Python itself. In retrospect, it only seems perfect to write it in python because it has excellent library support to examine it's own bytecode output. I had promised a be-all-end-all python disassembly guide after I am done with the python compiler and it will be posted.

Throughout the project, sriram was kind enough to ask me to have fun doing this python stuff. I really was having a good time.



PS:
There was another project we were considering at that time but it never had a definite goal to it. It was for the Microsoft Student Project program 2005. It was basically a contest where you can register your final year project with microsoft and compete among other students from other colleges for the best project. The winner also gets a chance to enter the Imagine cup 2005.
We had a [Search engine + Blog + p2p = Cool!] theory that we wanted to make a project out of. Since I got to register the project, I whipped out the name DEBIAN, a retronym for Distributed Enhanced Blog Itemiser And Navigator. A cool insult to microsoft if the project was awarded the best. I had to endure quite a few words from sriram before he tried to forget what name I gave the project (being a pro-MS guy that he is).

Tuesday, May 10, 2005

Drink your own spiddle!

It's always annoying when someone drinks water off of a glass(or silver) tumbler and not drink the entire contents. I always find this puddle of spit ridden water at the bottom of the glasses kinda disgusting and always(mostly/sometimes) get rid of that water and then rinse it before drinking off that glass.

It's been quite a while I've been doing this but today it suddenly it hit me that there was no actual word for this kinda water. So why not make my own. So here's my word for it: SPIDDLE.

How spiddle? Spittle + puddle = SPIDDLE !

All hail Spiddle (the word, that is).

Now, no more have you to be baffled when you are trying to refer to this obnoxious pool of stagnation at the bottom of the glass! Just say, "Drink your own spiddle!"

PS: Google says that Spiddle the name of some irish town. Who cares? Let them change their town name if they feel embarrased.

Sunday, May 08, 2005

"Be 100% sure"

Those were the words that would stare at me whenever I come out of the bath room after a ponderous bath. The words were part of a dettol liquid soap bottle, left unused for ....quite some time. So on my birthday, which keeps getting more uneventful every year that it surprises me, I finally took the dettol liquid soap...thingy (hereafter called "squeezy") to my room and "studied" a bit closely. (much to the anxiety of my mother).

After a few months of modelling petty things like chairs, champagne glass, tables and the irks, I found a technique that could help me model most of the non-baffling objects into 3D studio max. The step I folllow in modelling an object is pretty simple and straight-forward: Look at the objet and try to visualize it in terms of primitive shapes and geometry, then try to figure out how to place those primitives in the software. I don't know how long this method will stay good, but it has, so far.

Back to the squeezy. Designing the squeezy was the most fun thing I had done in quite some time. It had quite some radical new challenges than the chairs and tables: It had curves all over its body. I tried a total of 5 to 6 different approaches to model the sqeezy and all of them turned ..er..ugly, at best. Finally, after some sleep, I got the shape I wanted.
One of the reasons I didn't start modeling humans was 'cause of the curves (no double meanings here). The next challenge was the squeezy's nozzle. It was all curves. Again, when i was sufferring from unsuccessfulness, some sleep cured me. (But I really am not satisfied with the current nozzle).

The next fun part was desiging the label that's stuck on the front side. I never thought I would ever do "real" texturing this early into my designing hobby, but there I was firing up ol'photoshop cs and painting the logo. *sniff*I am so proud*sniff*. After working with an excellent context-sensitive and "sense ful" application like 3ds max, Adobe photoshop felt clumsy like hell. Found my way through it in an hour. (actually, I was searching for the custom shapes button :( ) Struggled with gradients, got fed-up with layers, wrestled with transparency and finally split my head trying to texture-map the squeezy in 3d studio max.

After that, my favourite renderer, Mental Ray started acting up. It would just crash just before rendering the scene. I tried changing the environment map, materials and render settings but to no avail. Since I was reluctant to go with the default scanline renderer, I downloaded some famous renderers like brazil and vray, albeit as trials. Both had a LOT more controls than the default scanline. Brazil(rio, the free version)would only output in 512x384 mode and vray was SLOW. So I went with default scanline renderer. After a lot of burnt-out images, I finally found the lighting that produced the least artifacts and settled with it.

Here are the final renders of squeezy: