Friday, July 29, 2005

... and somebody had time for this.....

All my earlier posts are quite big.. I want to keep this small:
Obviously you would have come across a lot of useless things on the net... but today I fell upon two of these things in a row.


don't look at them unless you are hopelessly jobless ;-)

Tuesday, July 26, 2005


Till now, I have mostly blogged about technical stuff. Today my mind is occupied with a lot of other things. This is the background:

From the last one year I was working on a large project and somewhat hidden from most of the nitty-gritties of an organization outside the problems of actual delivery of software. From the last one month, since I rolled out of that project, I am opening my eyes to some of these things. I have a few observations to make: This is probably true for any consulting firm.

  • The delivery phase is actually just one part of a very large process.
  • There is a lot of effort by a lot of people that goes in before an assignment actually comes through to the delivery stage.

I was hearing one of our senior executives talk about these matters (and a lot more things). Everything was so tangled up. Each and every decision which tries to untangle some of these things, brings with it a few more knots as well. As a whole, it is a chaotic environment. If you consider all the multitudes of things that humans are trying to do in this existence, I don't see any sort of order in this at all. It feels as though people are trying to make sense out of nonsense.

This fact leads to a more general question. Why are human beings in general creating and getting involved in all these complicated situations? What is driving humans to create problems for themselves and solve them and get stuck in this never ending chain?

Money - This is probably the answer for a vast majority but we see that beyond a certain level, it hardly matters. People sometimes take risks and are ready to lose money for something else.

Ego - This is probably one factor which overtakes money. People can go to any extent to maintain their self image. Probably this is also one of the factors driving the free software movement. But I feel this is again not the end. There is something else.

Something Else - I dont know what to call it. It involves the high level of passion exhibited by humans in whatever they are interested in. It is the infinite amount of creativity hiding inside every human, manifesting at various degrees. The push to do something new and special overflows from everyone given the conducive environment. When that push bursts out from within, neither money nor ego nor anything else can even come near it, let alone constrain it.

So, my conclusion is that we humans do what we are doing because we just can't help it. The knowledge/creativity/energy inside is trying to breakfree from all the limitations around. It is just the degree of manifestation that causes the differences between man and man.

Saturday, July 23, 2005

Communication with E.Ts - Yahoo!

This is my first experiment with ruby. Don't be too shocked! - the title is misleading. ok.. let me explain.

I was trying out the interfacing of ruby with other languages like C/C++, Java etc and wanted an example. So, I downloaded the C API (libyahoo2) for yahoo messenger with the idea of writing a wrapper for it in ruby. But I somehow couldn't get it working even after trying for almost a week after which I was too frustrated and gave up that idea. In the process, I looked at the C source code and ...hey! I said. Why not...? yes! you guessed it right! It looked as though I could write it in ruby itself from scratch!

I started off soon. Now, Yahoo has its own packet strcture to manage communication between its client and server. Or, can you say its own Domain specific language in a very crude sense? whatever. I tried to build that packet structure but with no success. The yahoo server doesn't respond at all if the packet is not proper i.e. it doesn't say that I am wrong. This situation looked as though I was trying to communicate with an extra-terrestrial entity in its own language!
It was indeed a very tricky situation.
  • You don't have tests to tell you what to expect out of your code.
  • You don't know how near you are or how far you are to the solution until you actually get the right solution.
But finally! after doing a little bit of trial and error and wishful thinking and all that, it actually talked to me! It started sending me the buddy lists, cookies and lots of things.

After that it was all normal. I generalised the packet generation and cleaned up my code. Right now I just have made of it a sort of API which can be used to write any sort of client. I have written a small CLI client with just the basic functionality of logging in and sending/receiving messages and typing notifications. Now I am thinking of writing a web-based client using ruby on rails and AJAX.

This was quite a useful experiment for me. It made me comfortable with ruby. I learnt a lot about how yahoo messenger works and in general how such asynchronous messaging works. I also recollected socket programming and multi-threaded programming and reading C code ;-).

Saturday, July 09, 2005

Stony Spells

"Take a true object-oriented language, such as Smalltalk. Drop the unfamiliar syntax and move to more conventional, file-based source code. Now add in a good measure of the flexibility and convenience of languages such as Python and Perl. You end up with Ruby. "

Don't look at my previous post and say that I am very fickle minded and keep changing languages. After all, programming languages are just ways to direct processes in a computer. As I am writing this, I am reminded of this definition from the SICP book:

"Computational processes are abstract beings that inhabit computers. As they evolve, processes manipulate other abstract things called data. The evolution of a rocess is directed by a pattern of rules called a program. People create programs to direct processes. In effect, we conjure the spirits of the computer with our spells."

The bottomline is that, I am trying to learn a new kind of spell - a spell of a precious stone.
I am just curious, people are praising ruby so much. Will try it out.
But it looks like, lisp has taken a very high place in my list of languages. By the way, I have some near-successful experiments in lisp. Will post them when they mature. Learning Ruby might actually help me go closer to lisp.
For the time-being, Ruby, here I come.