Sunday, January 28, 2007

Single no more

There have been a lot of changes with my life lately. The most prominent one of all is that I am single no more. I am now happily wedded to my long time love Shanthi. I stole a few minutes off my busy schedule to post this .

I am going drop off the web for a couple of weeks now. Bye Bye web. Cya later.

Thursday, January 18, 2007

6006l3 4 h4x0r

I just came across this. 1337 5p34k is a form of hacker language that was very popular on BBSes in the good old days. I did this in my college days. I was pleasantly surprised to find this page on Google. :-)

Sunday, January 14, 2007

The Observer Pattern using Ruby Meta- Voodoo

The ruby standard library already has an implementation for the observer pattern. The implementation of the pattern was not very rubyish. It seemed a direct implementation of the Java equivalent of it. Ruby is far more powerful. This is the more rubyish version of the of the code goes something like this.


require 'observerext'

class Person
include Observer #include the observer related methods
observable :name,:address # the metavoodoo to create the accessor methods and fire events
end


admin=Person.new
admin.name='vagmi'
admin.address='admin@somesite.com'

# first observer
admin.observe :name do |old,newvalue|
puts %{The administrator changed from #{old} to #{newvalue}}
end

# the second observer
admin.observe :name do |old,newvalue|
puts 'there can be multiple observers'
end

admin.name='root'
#this prints the following statements
# > The administrator has changed from vagmi to root
# > there can be multiple observers


You can find the code for observerext.rb here. What I have basically done is to extend the Module class, which defines the observable method. The observable method injects the attributes' getters and setters. The setter method notifies the observers if there are any. The Observer module does the leg work of registering and unregistering the blocks and the notifyobservers method.

Update: Forgot to credit Greg Houston for explaining some of the ruby voodoo.

Monday, January 08, 2007

Moving back to blogger

I have moved back to blogger from my previous blog on geekswithblogs.net. I know that frequently changing the URL of a blog will hurt the traffic. But I have no other choice. Geeks with blogs admin application does not support unicode content and that really sucks. Apart from that fact, I have been working on phonetic layouts for both हिन्दी and தமிழ் on Ubuntu. I have just completed them . The first version can be downloaded here.

Most people like me are living the g-life. I use almost all the services that google exposes. Search, Calendar, Blogger, CodeHosting, Adsense, Docs and Spreadsheets, Picasa web, Youtube (although not technically a google service yet) and maps to name a few. Google has long since become the synonym for the word search. It is now pioneering in the applications space. Google Apps for your domain will give products like M$ Exchange and Lotus Domino a run for their money. It makes perfect business sense for SMEs to base their groupware on Google's infrastructure than maintain their own. This is of course given that you must have the kind of bandwidth and the infrastructure to remain connected and ensure that the business is not affected. But I do not see this as a huge problem. GMail exposes your inbox via POP3 and hence it is possible to have your mails both offline and online. Google Calendar can be used to sync up appointments. What is missing from Google right now is a Wiki. That would make it a complete groupware solution. Google would probably integrate its docs and spreadsheets application when they are mature with your domain. Google is taking web to the next level. And it is way more than Web 2.0. But let us refrain from naming it Web 3.0. Just imagine if we have enough bandwidth and google lets us host our databases on its infrastructure. I am sure google would like it. :-)

We are now using the Web as its creator Tim Berners Lee envisioned it to be. A readable and a writable medium. Web is no more a place for companies to advertise their business. It is now a formidable platform on which they conduct business.

Its midnight and I am very tired. Its about time I hit the sack. Good night world.