all code posts | subscribe via rss

I am for Ruby on Rails

Yes that phrase “Ruby on Rails” has been sounding in my ears for a long time, probably ever since it came into existence. It did not matter much really. It was yet another programming language, framework, whatever - so who cares. There are lots of things like that, the world has more than enough MVC frameworks than it ever needed. Not much of a big deal in such a big world. But once I saw this very graphic attack on Java, I knew that I had to give it a try.

class Package < ActiveRecord::Base
has_many :customers
validates_uniqueness_of :name

I am telling you. In the past 14 years I have tried 13 programming languages, 3 development platforms, done garbage programming, web programming, win32 applications, hardware interfacing and even industrial robots, yes. But I am telling you, nothing, and nothing even comes close to doing its thing as Ruby on Rails does.

Recently we saw some pointers about these web frameworks - why does one need something so strong and powerful for tiny projects? The answer is simple. It is the same answer you will give me when I ask you why you do not write you web applications in C++ or Assembly. Ruby on Rails fast forwards your typical web development cycle (say PHP) by a how much? Maybe 5 times or say 10 times? If you do not believe me, just try - and rediscover web development.

4 8 15 16 23 42

What could these numbers mean anyway? Haven’t spent any time on it myself, but many people seem to be going nuts over this mysterious website, What it says is :

4 8 15 16 23 42
The secret shall be revealed.

What the heck? This could just be some wise guy’s idea of having a good time. Or something genuine like the Google job advertisement which became very popular last year - a math puzzle written on a highway billboard.

Greetings to Visitors from

Greetings to visitors from and (looks like a Spanish version ripoff of Over 200 downloads from in a single day. Not bad. My thanks to Dwergs (owner of for discovering the MSN sniffer post and putting it up on!

Perl MSN Sniffer

Given below is my version of the popular Msndump program. The program published on SecuriTeam is about 150 lines long and supports reading data from a pcap capture file. I was able to reduce it down to about 35 lines without the file reading functions, instead this version just captures live traffic and displays it all on the screen. Use this to capture raw MSN Messenger traffic on your routers. You can also develop your own MSN Messenger spy software using this piece of code; you may copy,modify and redistribute as you wish. This program uses the Net::Pcap and NetPacket modules, and is rather simple to read.

For those of you coming from and MSNLocos please note that this script is not the original one I wrote that got published on those websites. There were some changes to the MSN protocol in version 7 and I have decided to leave the message parsing and the regular expressions programming upto you. Most of the visitors are simply looking for a capture script, or just a basic idea on how to listen on MSN conversations using Perl. This is what you are looking for.

#!/usr/bin/perl -w
use strict;
use Net::Pcap;
use NetPacket::Ethernet qw (:strip);
use NetPacket::IP qw (:strip);
use NetPacket::TCP;
my %ports;
my $interface = "eth0";
my $pcapfilter = "tcp and port 1863";
my $packet = &capturePacket;
Net::Pcap::loop($packet, -1, &parsePacket, 0);
sub capturePacket {
my ($error, $filter);
my $capture = Net::Pcap::open_live($interface, 4096, 1, 0, \$error);
if (!($capture)) {
die "Error on $interface:\n $error";
else {
print "Capture started on $interface\n";
Net::Pcap::compile($capture, \$filter, $pcapfilter, 1, 0);
Net::Pcap::setfilter($capture, $filter);
return $capture;
sub parsePacket {
my ($address, $header, $packet) = @_;
my $ipdata = NetPacket::IP->decode(eth_strip($packet));
my $content = NetPacket::TCP->decode($ipdata->{data});
print $content->{data};

OOP is not for Dinosaurs

If you are a big fan of OOP, you might feel uncomfortable reading this story. If you follow OOP, take a moment and ask yourself if your code is infact object oriented, and nothing but object oriented. According to the article, OOP just adds layers to your code and thats it. This is with reference to small programs ofcourse. Again, how many of you are in a big collaborative software project? Or any other project in which code reuse and pluggable modules are the main focus? This is how the author tries to capture you. The author himself has written more than 32 computer books since 1982. Yes, he was doing code when I learned how to walk.The author may be a little behind in comprehending what OOP is not for - people like himself. Just because it is there, it does not mean that its supposed to be used by everyone for every imaginable purpose. He also thinks that object oriented programming is used for hiding code from one another, and that code reuse can be done by copying and pasting instead of creating objects. I think the article is just hillarious, and so is the author’s website dedicated to debunking objected oriented programming.