Category: Amusing Tech News


Web has become almost ubiquitous with our daily chores.  Take for example – When we sit before our PC/Laptop, how many of us start typing the letters “F” “A” “C” and choose “facebook.com” from the drop down and then wonder why we chose it? Such is the impact of the Web on our routine activities. Research says Internet has changed the way we remember facts. Rather than remembering the birthdate of our best friends, we just rely on Gmail reminders. Don’t we?

The amount of information generated in the World Wide Web each day is unimaginably high. What could be done in 60 seconds? Sounds trivial? Well, let me allow the picture to speak for itself.

The Web in 60 seconds

This mammoth network of networks wasn’t built in a day. The web has seen a phenomenal growth since its inception.

Web 1.0 – The Read web. People could just read the contents articulated by others. One-way communication.

Web 2.0 – The Read, Write Web. People could comment on what others said. Thus started the era of blogging. Two-way communication.

Web 3.0 – The Read, Write, Execute Web. People share their ideas. And the system processes and understands the information it has obtained from various authors and suggests the contents which a particular person would be interested in. That’s why he call it the Semantic Web. Suggestion Engines, Mashups, Micro-blogging etc. make the Web much more interactive.

Now we are experiencing the indocile rise of HTML5, which, I feel, is a paradigm shift in Web technologies. With a clever use of HTML5, JavaScript and CSS almost anything and everything could be emulated on the Web. And the OS makers are also ceaselessly working to avoid being an #epicfail. Say, with Windows 8, all the applications (called tailored apps) are supposed to run on HTML5, bringing in in a radically new concept for an operating system. And we are expecting a ChromeOS which could sound the death-knell to all the Native Apps and introduce the concept of “Browser is the OS”.

The Internet we are witnessing now is something larger than life. Something we are depending on so heavily that one day we might even forget our own names and check our Google+ profiles to get them.

The future of Internet, I believe, would be to make an unified ecosystem wherein it would be possible to get the same amount of data storage and processing power from any kind of device connected to the internet. 

Below is a wonderful infographic on how far the Internet has catapulted from humble beginnings to colossal heights.

Extent of "Internetization" : Courtesy - Cisco

Though am not a full-time coding geek, I never miss an opportunity to appreciate good algorihms and snippets. Saying that, now this post is about an invention of a sorting algorithm on 20th January, 2011 by someone “Anonymous” in the 4Chan Family. If you do not know about the 4Chan website, atleast you must know about the Operation Payback which they launched in 2010. I became a fan to 4Chan after that incident. Now here lets discuss a sorting algorithm from 4Chan which intrigued me. Its called the SleepSort. I know it sounds funny, but believe me you’re gonna feel great once you understand it. Here is the code..

#!/bin/bash
function f() {
sleep "$1"
echo "$1"
}
while [ -n "$1" ]
do
f "$1" &
shift
done
wait

filename : sort.bash
usage : bash sort.bash 5 2 8 1

The code is amazingly simple, but the algorithm is the interesting part.
while loop : The loop executes until there is a value for the “$1” expression, which actually denotes the command-line argument. So as long as there is a command-line argument value, the function “f” is called by f "$1" &. Because of the presence of “&”, the command is executed as a background process without disturbing the control flow in the current execution, and thus the next line shift is executed immediately. This line shifts the the focus on to the next command-line argument, and therefore now the value of “$1” is the next value in the argument list. This loop is repeated until all the command-line arguments are exhausted. After the loop is done with, there is a separate background process executing the function “f” corresponding to each command-line argument.
function f() : This function makes the process to sleep for “$1” number of seconds and then prints the value of “$1” in the terminal by the echo command. We know that all the background processes we created have a value from the argument-list. Thus lower the value of the argument, earlier is its value displayed on the screen. Like 1 is displayed after 1 second, and 3 is displayed after 3 seconds. Thus the numbers are printed in ascending order.
Though there is a major drawback that higher argument values lead to increased delay in getting the result, still the algorithm amused me.
Happy Hacking 🙂