Monday, August 31, 2009

Some Crazy Code Not out there, but here within

You won't believe this, but it's true.
I heard from somebody (won't mention his name), that somebody who is a follower on this blog (won't mention the name either) has been busy writing some piece of code, what I consider to be a a great work of code-art. The word is - this dude has written a crawler! You know that thingy don't you guys? That thing that goes around computer networks, crawling on every network computer and gathering information on that computer.

The unnamed source also disclosed that this fellow now has a database with over 9000 records of information on a certain country in a certain continent, all gathered with the 'crawler'.

What I want to know, is what language that crawler was written in? I presuppose it's written in JAVA or Python. And then I want to know the algorithm(s) behind this. That fellow is a genius if you ask me.

It appears after all, that while we were sleeping some great mind has been writing some excellent piece of code.

Or is it this fellow only? What is everybody else working on?

What crazy price of code have you written lately? I read on TKMUNZWA's blog sometime ago about how he wrote some crazy shell script on linux that monitors whether or not a headless computer is connected to the internet 24/7,. I wish to quote it here (the assumption is, if it's on a public blog, i won't be sued for plagiarism). He did it in 2 scripts. The first one below is called checkinternet.sh and the second one is called soundalarm.sh For more information visit http://munzwa.tk/blog/

#!/bin/sh
if eval "ping -c 1 google.com";then
# echo "connected to internet"
killall soundalarm.sh
else
# echo "not connected to internet"
/var/local/soundalarm


#!/bin/sh
while [ 1 ]
do
for F in 1000 1500 2000 2500 3000
do
beep -f $F -l $(($F/50))
done
#sleep 1
done


Some crazy yet very useful piece of code don't you think?

Anyways, before I name the culprit behind the 'crawler' I am giving you a chance to come forward and tell us all about this 'crawler'. Perhaps we might be inspired to come up with crazy code too.

Long live Code, and long live JAVA.