Latest Entries »

Its been almost a couple of weeks since I bought my Samsung Galaxy S2 and am completely in love with it. I believe that the current trend among the youngsters is like – Gadget companies are like religions. You follow one and keep your mouth shut about other companies. In that sense, I worship the Android OS ( with a true spirit of an open-source enthusiast ) Its been just a few days since I started using it and now my routine work has become much comfortable.

As they say “Character maketh a man”, I would say “Apps maketh a platform”. Even the phenomenal growth of Facebook could be attributed to the bountiful of apps that came flooding in every day. Now talking about apps, I started downloading numerous apps through Android market and it was during this time that I downloaded these two apps which have changed the way I use mobile phones.

<JustSaying> I know am late in this review. These two apps are already topping the charts in the market. But still I thought I could share my viewpoint on them  🙂  </JustSaying>

1. DropBox : Dropbox is a free service that allows you to have all your photos, music, docs, and apparently every thing on your PC or mobile on to the cloud and make it accessible to all your devices wherever you are. Once you download (http://www.dropbox.com/) and install this app on to your phone and PC, you are not going to search for your pen drives anymore. After the installation, a folder named “Dropbox” is created on your system. In my system, the folder looks like this :

The Dropbox folder

The Photos folder in my Dropbox

Note : The tick mark indicates that the folder is completely synced with your Dropbox cloud storage.

And  this is the Dropbox folder on any Android phone :

Dropbox on Android

2. Evernote : If you are one of those persons who finds it insanely laborious to keep your notes synchronized among your phone, Windows and Linux desktops, you are not alone. Maybe you “were” not alone. Because I found this solution to be really good. This app named Evernote, is once again, like storing your notes in the cloud and accessing it from anywhere. Be it on your Windows desktop, Ubuntu Workspace or Android phone. You can make clippings of your webpage or even store a snapshot/pic as a note and sync it with your evernote account. Moreover, editing and syncing text is done so quickly that you don’t even realize that its connected to the web.

This is how Evernote looks on Android phone :

Evernote Screenshots - courtesy : TechCrunch

Evernote is not available for Ubuntu currently. So I use an open-source alternative called “NeverNote” (hilariously named) which could be downloaded at http://nevernote.sourceforge.net/. It offers almost the same functionalities as the original Evernote app.

Of course there are a lot of alternatives available to these two apps. But, according to me, these two are the best among them.

Good use of technology can save a lot of time, in terms of hours or even days. Lets celebrate technology!! Cheers 🙂

Note: This post was published in 2011 and the solution may not work anymore. And please note that we are improving only the DNS resolution part of the web page fetching process. This will not have any impact on your download speeds.

Nowadays I find interest in solving the real-life problems which people face everyday through technology (However trivial it may look, its gonna help someone 🙂 )

Are you one of those thousands of people who are not satisfied by the browsing speed they get with Tata Photon+ connection? Well here is the simplest tweak you could make and increase the browsing speed by a maximum of 300% and AM NOT JOKING!

If you are a geek, am sure you’d have figured it out already. But if you are a non-technically inclined person, this post is for you. The sloth-like speed of Tata Photon+ connection is due to the default DNS servers. So the tweak is setting your DNS to 8.8.4.4 and the alternate DNS to 8.8.8.8. These are Google’s Public DNS server addresses.

In Windows : 

This is for Windows 7. I believe everyone is current enough to have it on your PC 😛

Open Control Panel –> Network and Internet –> Network and Sharing Center –> Change Adapter Settings

Right Click on your Tata Photon+ Connection –> Properties

Move to Networking Tab

Double Click Internet Protocol Version 4

In the second fieldset, change to “Use the Following DNS server addresses”.

Preferred DNS server  : 8.8.4.4 and Alternate DNS server : 8.8.8.8

Click OK and Reconnect.

In Ubuntu : 

Click the Network Connections icon on the right hand side tray of Ubuntu Desktop.

Choose “Edit connections”

Change to “Mobile Broadband” –> Choose the Tata Photon+ Connection and click “Edit”

Then it might ask for your password. Enter it.

Change the Method to “Automatic (PPP) addresses only”

Set DNS servers to 8.8.4.4, 8.8.8.8

Click Save and Reconnect.

Note :  If you don’t find any improvement after the change, then may be Google Public DNS is not the one for you. It works best if you are in Chennai. Now, the thing is that Tata Photon’s default DNS servers are not that fast. So we need a better alternative. You can find them by using Namebench software.

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 🙂

“A woman has a close male friend. This means that he is probably interested in her, which is why he hangs around so much. She sees him strictly as a friend. This always starts out with, you’re a great guy, but I don’t like you in that way. This is roughly the equivalent for the guy of going to a job interview and the company saying, You have a great resume, you have all the qualifications we are looking for, but we’re not going to hire you. We will, however, use your resume as the basis for comparison for all other applicants. But, we’re going to hire somebody who is far less qualified and is probably an alcoholic. And if he doesn’t work out, we’ll hire somebody else, but still not you. In fact, we will never hire you. But we will call you from time to time to complain about the person that we hired. “

— Urban Dictionary

Urban Dictionary is one of the most interesting sites which almost every teen on web is currently aware of – due to the definitions for words which hitherto none ever dared to define!! 😀

I got the above definition while I was browsing randomly and thought it was worth a share.. Happy Reading 🙂

My college, SSN College of Engineering provides “24×7” Wifi Connectivity. Ya thats true. But only “19×7” Internet Connectivity, since Internet connectivity is barred from 12 am to 5 am everyday. So I bought a Tata Photon+ Data Card with the Unlimited plan for Postpaid. It was of great help to me. In addition to the real “24×7” Internet access, it allowed me to access some useful websites like youtube, github, etc which are actually inaccessible through my college proxy. Moreover, I cannot access Android Market, TweetDeck or any other web application (save for the browser) in my Android phone through my college’s proxy. Now I had to find a way to get this Tata Photon+ Connection, which works on my laptop, on my Samsung Galaxy S2. So I had to share it wirelessly through my laptop’s Wifi Card, making it work like an access point. The procedure is damn simple.. Yet I made this post so mercilessly elaborate that you could rarely be misled by the procedure. So here we go –

WIRED CONNECTION -> SHARE THROUGH WIRELESS NETWORK :

Note : By wired connection I mean any connection you get through your physical ports, like Ethernet Cable, Mobile Broadband etc.

Step 1 : Get Connected to the Internet.

Check Internet connection

Step 2 : Switch on your Wifi Card. (So that you can see available wireless networks, if present)

Step 3 : Open Network Connections – First click the Network Connections icon on the top pane of Ubuntu desktop –> Click “Edit connections”. You must be facing a screen like this now.

Network Connections

Step 4 : Create Adhoc Network – Change to Wireless Tab –> Click Add –> Enter the details for the new connection.

Enter Adhoc network details

Step 5 : Change to IP4 Settings –> Set Method to “Shared to Other computers”.

Change Method to "Shared to Other Computers"

Step 6 : Connect to the newly created adhoc network – By clicking Network Connections icon –> Choose “Connect to Hidden Wireless Network” –> Choose the appropriate connection and connect.

Connect to the newly created adhoc network - naren-adhoc

Now all the surrounding systems will be able to access the adhoc network you created. By connecting to this now anyone can access the Internet, which was initially accessible only on your system.

Thus we have made our own laptop into an access point. Cheers! 🙂

Now to the funny part of the experiment – Though this was quite helpful, it did not solve the original problem. Ya, I couldn’t connect to this network using my Android phone (Gingerbread OS). 😀 The reason is that, Android Phones cannot detect Adhoc networks with their Stock ROMs. We need to root the phone and change the wap-supplicant file to enable that feature. More on that in another blog post.

WIRELESS CONNECTION -> SHARE THROUGH ETHERNET CABLE :

This is exactly the same as the previous one. The only change is that instead of changing the IP4 Settings in the Adhoc wireless network we created, do the same to the ethernet connection. Thats it. We are done.

Happily Everafter 🙂

Today I had my first experience of a phone interview, and it was from the NGO named Teach For India (TFI) . To describe TFI in a few words,

Teach For India is a nationwide movement that aims to bridge the educational gap in India by placing outstanding college graduates and young professionals in low-income schools to teach full-time for 2 years. - TFI

Inclined to social service and already being a part of Bhumi Foundation, I wanted to see how TFI, one of the biggest social service foundations, work to enhance education in India. So I applied for the Campus Ambassador post for the year 2011-12 less than a week back and today they called me at 12.30 noon for the interview. The lady with the sweet voice introduced herself and asked if I was ready for the interview. This happened when I was waiting for food in a hotel wearing a hunger-stricken face. But I was OK with it and the interview began. Though I was overwhelmingly excited on my first phone interview, I tried to maintain a grim and complacent voice replying her every statement with a perfectly professional toned “Mm hmm” “Ya, of course” “That’s awesome” almost like an adjectived and adverbed version of Dhanush’s GD in Yaaradi Nee Mohini. Then she asked a few of the cliched questions in the history of interviews like “Say about yourself”. I managed to answer that as short as possible. Unfortunately, she was expecting a more verbose edition of the same reply and waited for me to continue #awkwardsituation. Being an Engineering student, it was easy for me to bloat the answer with some cleverly articulated anectodes (from my own life, honestly) and went on for an alarming 15 minute reply for the same question. She was like “Wow!!”. And I was like “Nalla vela”.

Then came the tricky part – Role playing. I have to don the role of a Campus Ambassador and she is a fourth year college student. I have to persuade her to join TFI. Pretty interesting stuff.. I started with “Hey wassup?” and she replied with a tedious answer bringing the words “GRE” (to which am pointlessly allergic), “Placements”, “Exams every week” and she characterized herself as a typucal busy, geeky girl in final year. Without an explicit hint, she made the point clear that she is a stubborn, studious girl who is more focussed on her own life than on others’. That was pure talent. Maybe her 2 years experience in recruitment helped her with that. Btw I somehow managed to persuade her into TFI. Next, was another Role Playing wherein am the Campus Ambassador and she is the Placement Officer. This was tougher than the previous since she spoke flawlessly on the difficulties in becoming a fellow of TFI. I was left completely breathless. After a 10 second break, I started a counter reply, where I enlisted the advantages of becoming a TFI fellow after college and how companies respect the position of “Fellowship in TFI”.  Once again I succeeded in persuading her. And she remarked that the interview was “very well done”. But I am quite dubious about the result.

Moreover I myself am in a dilemma whether to pursue it or not. I do want to help the society. But is it the right time to dive headlong into it, is the question. Because we know “With great power, comes great responsibility”. In case, if I get to become the campus ambassador, I must dedicate the time the post of ‘Campus Ambassador of TFI’ deserves. Will I be able to do that? With this question haunting my mind, and letting Time to decide the solution, I end this post.

🙂

You know which organisation makes the most sightly products in the world? I hear “Apple”. Well I don’t regret it. But for me, it is the nature. Sometimes we keep searching tirelessly for the best of things, and finally come to know that it has always been there with us for long. One such phenomenon is nature. Since my childhood, the stunning beauty of the various weather phenomena has never ceased to amuse me. Its just fabulous. I used to read a lot about the science behind natural wonders. Be it the lightning, the rainbow or whatever. And among them, lightning, by far, is the most spectacular phenomenon I have ever seen. And the science behind it is much more amazing.

In this post, I have chosen a specific question “What causes the thunder? Is it the clouds or the lightning itself?”. The question hit my head so hard, that I sprang out of bed and started reading about it. The source of thunder has been a subject of speculation and scientific enquiry for centuries. Briefly, my answer would be – The source of thunder is clouds if you are a 6th grade and lightning if you are a 12th grade. Baffled? But, this is how I was taught in my school.  My primary school teacher said thunder is heard because the clouds “dash” against each other. How on hell could accumulated forms of water vapour literally DASH. But, with a bit of retrospection, it was the first ever speculation made on this subject by Aristotle in the third century BC. So here goes the real scientific reason of 21st century.

Lightning - An incredible concept

Lightning, one of the celestial forms of electric discharge, has a diameter of one to two inches. 90% of this electric discharge is released in the form of heat, which immediately dissipates into the atmosphere (Out of the remaining, 1% is dissipated in the form of sound, and the rest in the form of light). This heats the air surrounding it to about 70,000°C which is about three times the temperature of sun’s core. Now, we all know that “Air expands on heating”.  This violent increase in the pressure and the temperature causes the surrounding air to expand in a blistering pace. And now on to the next fact “Hot air rises up” – This superheated air causes a shock wave that extends radially outward for a diameter of almost 30 feet and it spontaneously races upward at a rate faster than the speed of sound (A sonic boom – we could call it). While this is in progress, as and when the lightning from the clouds connects to the ground, a second stroke of lightning will be shot back from the ground to the clouds tracing the very same channel as the first strike. This is why we could see the lightning “withdrawing” from the ground. When lightning vanishes into the clouds, the superheated air, is rapidly cooled due to the surrounding air, thus rocketing the pressure to 100 times the atmospheric pressure. This haphazard expansion and contraction causes the column to vibrate like a tubular drum head and produces a tremendous crack. As the vibrations get dampened out, it generates a low rumbling which we call thunder.

Now about the propagation of thunder, most of the lightning streaks are close to vertical since electricity follows the shortest route. Thus the shockwaves from the ground reach our ear first, followed by the shockwaves from higher altitudes (simple high school trigonometry). But when the lighting bolt forks out into innumerable branches, the intensity of the electric discharge is reduced considerably when it reaches the ground and thus the thunder’s sound pattern changes.

Finally, let me wrap things up with awe-inspiring pictures of certain special forms of  lightning. Like the stargazers, I would call myself a lightning-gazer. Talking about lightning, I thought the post would be complete, if I had discussed the science behind the creation of lightning too. To have the post brief, am saving it for the next post on “Fascination Physics”. Now its time for some eye-candy..

The Return stroke of a Cloud-to-Ground Lightning

 

Cloud-to-Cloud Lightning - reminds me of Vampire movies

 

Thunderstorm accompanied by Cyclone

 

The Ball Formation of Lightning

 

And finally…

The Diwali Special

In terms of technology and computers, I have currently decided to blog on NS2, Android and Python. I will bring in other interesting languages like LISP, Haskell, Perl later on.

Technology is fun. Though I don’t have any great desire to become a techno-geek or something,  I do read a lot on Tech stuffs. And am mad about computers and gadgets. i know am not alone. Because they really have profound impact on our lives. Don’t they?

Choice of Computer Science : It all commenced when I was doing my 12 std in High School. I was asked to make a choice of a lifetime among three streams – Computer Science, Biology and Business. After hearing all the opinions from mom, dad, anna, anni, chithappa, chithi, thatha, paati and so on (:P) I decided to settle with Mechanical Engineering in PSG. But there was one particular thing which was continually haranguing my mind. “What is it that I never get bored with?” –> “Hacking into Computers” replied my conscience, everytime. Then after a deep study into the roots of Computer Science, I fell in love with it. I wanted to learn more and more about it. And thus am into CS. So, what made effected that sudden change of mind?

I ascribe that part to the history of Computers. I thank the forefathers of computer science who have provided such a brilliant platform for the current generation of young entrepreneurs to work on. Anyone who could clearly visualize the power latent within computers and the platform available for students would easily go for computers and technology.

Take for instance, the concept of languages. We interact with the humans with languages like English, Hindi, Tamil etc. These are nothing but a product of recursive abstraction of languages, the phenomenal process which started with the introduction of Hieroglyphics in Egypt. With each level of abstraction, the depth of each word increased. And finally we ended up with beautiful languages that are in use today. Such is the evolution of computer languages. We started instructing the computers using  machine code with mere 0s and 1s. We started abstracting it to Assembly language, BASIC, procedural languages like C, Functional Languages like LISP, Object Oriented languages like Python and Java and it continues to evolve. If you ask me, this will evolve until the computers are able to perceive instructions fed in human languages like English!! Imagine instructing your computer to pXe boot to Ubuntu just by a verbal command in English. Thats going to be legendary..

And moreover computer languages too follow a grammar, similar to the grammar rules we have in our human languages. Thus programming languages are very closely related to human dialects. This closeness to reality impressed me. I swore that I would learn all these technologies and make a better platform when I pass the baton to the next generation. because thats is how civilizations occur. Thats how the world has developed over the years. That leads to ultimate glory of mankind.

And this is what made me a technophile 🙂

This post was inspired by the document “How to become a Hacker” by Eric Steven Raymond.

The term “Hacker”, automatically brings an image of a nerd using complex tools to break into the US Department of Defence. I blame the media for that. Those kind of fellows are called “Crackers”. Then how else do you describe a “Hacker”?

Well, a hacker is anyone who finds himself, as a part of the shared culture of expert programmers and networking wizards, whose origin dates back to the first time-sharing mini computers and the earliest ARPAnet experiments. So where were these “Hackers” then.

  • Hackers built the Internet.
  • Hackers made the Unix Operating System.
  • Hackers run Usenet.
  • Hackers make the World Wide Web work.

If you are part of this culture and if you have contributed to it, then YOU are a HACKER. If not, here is the next section for you..

HOW TO BECOME A HACKER :

There are just four steps to be followed before you join the elite league of Hackers who revolutionize the Digital world from time to time.

Step 1 : Learn how to program : This is obviously the fundamental hacking skill. If you are already well versed with a wide array of programming languages, consider yourself well ahead of others. Else, it is recommended that you start with Python. It is easy to learn, well documented and much productive than its other counterparts like C,Java,etc.

Step 2 : Get one of the open-source OS : Am damn sure you must own a PC. The very first quality of a hacker is to use open source Unix. This gives you a chance to know the internals of an OS. To hack internet, you must know the OS of the internet i.e. Unix. First have a dual-boot of Windows+Linux for a few days. One fine day you’l understand proprietary OS’es are for kids.

Step 3 : Learn to use the WWW and write HTML : The Web is everything. So learning how the WWW works is mandatory to become a hacker. Here, learning doesn’t mean just knowing how to drive a browser. You should know to write HTML (or better XHTML). It is good to have a webpage with considerable content in it and keep updating yourself to the latest technologies.

Step 4 : Learn functional English : I know it sounds funny. But it is of primary importance. You must be able to communicate your idea however complex it might be. If Linus Torvalds did not posses the diction he actually possessed, undoubtedly Linux wouldn’t have grown up to such an extent now. So work on your English.

Thats it. And once you’ve become part of the “Hacker” family, start writing open-source software. Help and debug open-source software. Publish useful information. Help keep the whole infrastructure working. Continue serving the hacker culture itself.

Thus Hacking is not a profession, its a way of living.

For those who are unaware of NS2, NS2 is a event-driven network simulation software, used to study network models and simulate network scenarios. Installation of NS2 in Ubuntu seems like a tough job for many. If not, atleast for me, it was a herculean task because of lesser documentation on this installation part.

Network Simulator

Without much talking, lets dive into the topic.

Since “long long ago so long ago”, this has been the method of installation. But installing in latest version of Ubuntu is little challenging due to the new gcc version.

Step 1 : Install the dependencies

$ sudo apt-get install build-essential autoconf automake libxmu-dev

Step 2 : Download ns-allinone-2.35 package from NS2 official site. At the time of this writing, the latest version was 2.35 RC7.

Step 3 : Place the ns-allinone-2.35.tar.gz file in your home folder(/home/sunshadow in my case). Extract the contents of the archive to a folder of the same name.

Step 4 : Open terminal and change directory to the ns folder.

     $ cd /home/sunshadow/ns-allinone-2.34
Step 5 : Editing files to remove X::X construct – Edit the file ns-2.35/tools/ranvar.cc and change the line 219 :

return GammaRandomVariable::GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);
to
return GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);

Similarly, change the lines 183 and 185 in file ns-2.34/mobile/nakagami.cc :
resultPower = ErlangRandomVariable(Pr/m, int_m).value();
and
resultPower = GammaRandomVariable(m, Pr/m).value();

Step 6: Begin ns2.35 installation

     $ sudo su

     $ ./install

The installation runs for a couple of minutes. Don’t get freaked out on seeing the varieties of warnings and messages over there. :P. Its normal. Don’t close this terminal. We got some important information in the last section of the installation.

Step 7 : Add the path information to the file ~/.bashrc

     $ gedit ~/.bashrc

Append the following lines to the file ~/.bashrc

export PATH=$PATH:/home/narendran/Documents/ns-allinone-2.35-RC7/bin:/home/narendran/Documents/ns-allinone-2.35-RC7/tcl8.5.8/unix:/home/narendran/Documents/ns-allinone-2.35-RC7/tk8.5.8/unixexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/narendran/Documents/ns-allinone-2.35-RC7/otcl-1.14:/home/narendran/Documents/ns-allinone-2.35-RC7/libexport TCL_LIBRARY=$TCL_LIBRARY:/home/narendran/Documents/ns-allinone-2.35-RC7/tcl8.5.8/library

Here replace /home/narendran/Documents with the path to your home folder.

Step 8 : Check installation : Thats it, folks!! Now type ns in terminal. A ‘%’ symbol will be displayed denoting that interpreter is working. Installation Success!!

Happily Ever After 🙂

Note : If you are not a serious ns developer or you just want to run a simulation file on your system, use apt-get or yum (based on which Linux distro you use) Eg. : sudo apt-get install ns2 nam xgraph. It is not mandatory to build ns2 from source to use it.