Karthik selvakumar's log

All my Garbage talks and junk codes

2010 in review

The stats helper monkeys at WordPress.com mulled over how this blog did in 2010, and here’s a high level summary of its overall blog health:

Healthy blog!

The Blog-Health-o-Meter™ reads This blog is on fire!.

Crunchy numbers


A Boeing 747-400 passenger jet can hold 416 passengers. This blog was viewed about 7,800 times in 2010. That’s about 19 full 747s.

In 2010, there were 19 new posts, growing the total archive of this blog to 79 posts. There were 12 pictures uploaded, taking up a total of 2mb. That’s about a picture per month.

The busiest day of the year was March 22nd with 86 views. The most popular post that day was twitmdu2010 meet – A good init on twitter awareness .

Where did they come from?

The top referring sites in 2010 were karthik.tk, karthikselvakumar.com, google.co.in, digg.com, and mail.yahoo.com.

Some visitors came searching, mostly for easycam ubuntu 9.10, pokemon ball, easycam2 ubuntu 9.10, ubuntu 10.04, and ubuntu 9.10 easycam.

Attractions in 2010

These are the posts and pages that got the most views in 2010.


twitmdu2010 meet – A good init on twitter awareness March 2010


Ubuntu 9.10 release November 2009


Installing Network Simulator 2 in Ubuntu February 2010
19 comments and 1 Like on WordPress.com,


Make your own OS November 2009


Facebook mouseclicks hack ! January 2010


Happy bday Don And Chezhian

நண்பர்கள் கூட்டத்தில் மரியாதையை கொண்டவனாய்

உன் குடும்பம் பாராட்ட பொறுப்பில் சிறந்தவனாய்

நண்பர்கள் பஞ்சமில்லா அனைவரிடமும் நல்லவனாய்

கட்டளைகளிலும் கை அசைவிலும் வல்லவனாய்

கல்லூரி வரலாற்றில் யாரும் காணாத

தொலை தேடல் கொண்ட GSஆய் நீ இருந்தாய்

உனக்கென்ன இருக்கும் உறவுகளை உயிராய் கருதினாய்

ஆனால் அவளுக்கென ஏங்கி  ஏன் இன்றும் நீ வருந்தினாய் !

உன் சிந்தனைகள் அனைத்தும் ஐன்ஸ்டீனை   மறு வடிவமாய் காட்டி

உன் சிறு கருத்துகளால் பலரின் வாழ்க்கையே மாற்றி அமைத்தாய்

நீங்கள் இருவரும் அவதரித்த இந்த நாளிலோ இரு சூரியன்

கொண்ட உலகாய் மலர்ந்தது  எங்கள் கல்லூரி வாழ்க்கை !

என் நண்பர்களுக்கு இனிய பிறந்த நாள் வாழ்த்துகள்

மரியாதைக்குரிய Respectable Don and GS Chezhian 🙂

நண்பனின் காய்ச்சலிலே …

உடல்நலமற்ற தோழன்
உச்சக்களிப்பில் நான்

ஓய்வின்றி நடமாடிய நீ
இன்று நோய்வுற்று மடி சாய்ந்ததால் !

தாலாட்ட இங்கு தாய் இல்லை – இருந்தும்
கவலை உன் கண்ணில் துளி இல்லை
இன்னும் உயிரோடு நான் இருப்பதாலோ !

உயிருள்ளவரை என்னை நினைப்பாயோ !
குணமானபின் நொடியில் மறப்பாயோ !

எதிர்பார்ப்புகள் இன்றி சேவை செய்கிறேன்
என்றென்றும் காத்து கிடக்கிறேன்
மறுமுறை மடிசாயும் தருணத்தை ஏங்கி !

– கார்த்திக் செல்வகுமார்

Session On Java Basics

i) Is java purely object oriented language ?

JAVA is not because it supports Primitive datatype such as int, byte, long… etc, to be used, which are not objects.

ii) Write once run anywhere concept ?

Java source code is compiled into class file . This file is executed on any platform which has JVM

iii)  public static void main(String args[])

java environment needs acces to execute it –> public

without creating instance need to run main method   –> static

main method doesnt return anything — > void

all arguments passed are of string type and placed in a string array  –> args[]

iv) diff between == and .equals()

== compare reference

.equals compares the content

v) Access specifier a quick play

public , private protected , default

vi) final , finally and finalize

final – to declare constants and avoid inheriting a class

finally – in exception handling to run a piece of code even exception occurs or not

finalize – whenever garbage collection is about to occur finalize method will be called

vii) java API swing , applets , servlets

viii) no global variable in java ?

referential transparency

namespace collision

ix) Numeric promotion

after any arithmetic operation  (byte,char,short)–>int–> long–>double

x) first argument of args[] in C and java

in C first argument will be the name of the program but in java it is the first argument passed

xi) library methods stringtokenizer

StringTokenizer st=new StringTokenizer(“karthik:be:cse”,”:”,false);


print(st.nextToken()); {

points about java :

* No pointers –  Unauthorized access prevention

* No operator overloading – ambiguity is possible

* No destructor – instead finally is present

* Multithreading made thro language – concurency

* new to allocate memory to object … memory release done by garbage collector

How To Create your own Domain with zero cost !

From the day I started browsing I used to think of whats this .com and why can’t i get my own . I  browsed among various sites and finally found its all money stealers  and they are not running charity anyway :P.

As a frequent surfer I came across a site  which proviedes domain for free .For the first site it also seemed weird for me but still I proceeded with registration process .Then it needs a paypal account and I created one with my dad’s ATM card  ( our only source of money 😛 ) .

Then I got my link working after 3 hours without any amount deduction . Now when i got my link working I will disable my card in Paypal  😀 . I can enjoy .com domain for 1 year and  ofcourse for the next year I would be working in a reputed IT company ( even possibilities are less ) and 9 dollar for renewing my domain would be not at all a great thing 🙂 .  The link to the website is here. And expecting every one to get their own .com domain  .


தவறி தவிக்கிறேன் !

மொழிகளின்றி பேசிகொல்கிறோம்
மூன்று வருடங்களாய்

வழிகள் அத்தனையும்
சலிக்காமல் வந்தேன்
தவறியாவது ஒரு முறை
பார்ப்பாயா என்று

விசித்திரமாய் சந்தித்தோம்
அன்று இடித்தாய்
அணுவும் வலி இல்லை
உணரவும் மனமில்லை
எதுவும் செய்யாமல்
இன்று தெரிகிறது
என்னில் இரண்டும்

உன்னை கண்ணில் கண்டது
ஒரு சில முறை தான்
ஆனால் கனவில் தெரிகிறாய்
பல கோடி பிம்பங்களாய்

நீ பேசும் மொழி வேறாயினும்
நாம் படிக்கும் கல்வி ஒன்றானதே

கைக்கு கிட்டாதே பொருளுக்கே
மதிப்பும் அழகும் அதிகம்
நிலா நச்சத்திரம் மற்றும் நீ

ஆதலால் நீ என்றும் கிடைக்காமல்
இருக்க வேண்டி கொள்கிறேன்
தொலைவில் இருந்தே ரசித்து செல்கிறேன்

-கார்த்திக் செல்வகுமார்

GIT – a widely used version control system

git is a widely used version control system with its flexibility and rich command sets .

Here covers three most basic and important functionalities in GIT .

i) Creating a new repository and committing

ii) working with branches

iii) Cloning and distributed working

Creating a new repository and committing

This is a basic operation in any version control system. Assume a scenario  where you are creating a maths software using C .

now each project should have a name ( I will be speaking package , software, project and repo interchangeably )

let it be myCproject . now to create a new repo the steps are :

step 1)

create a new directory of that project name

>> mkdir  myCproject

step 2)

get into the project and intialis it for git database

>>cd myCproject

>>git init-db

now your project is initialized and ready to accept files .

step 3)

start coding some files and place it myCproject directory . eg ) add.c,mul.c,sub.c,div.c

now this files wont get added to git unless you add into it

>> git add .

>>git commit -a -m ” Your first commit “

step 4)

now your first version of the software should be commited and you can check it by

>>  git status


>>  git whatchanged

step 5)

whenever you perform more than one commit then use

>> git diff

to get the changes from first and second commits .

Sample window :

Working with branches :

now placing all files under single category may be tiresome . So we can group similiar files under a branch .

branch is something like a sub-repo

step 1)

first create a new branch under which you are going to work

let us say math software needs a gui

>> git branch gui

this will create a branch named gui .. to see the list of branches in project you can use

>> git branch

step 2)

by default git will be in branch named master .

to switch over to gui  branch use

>> git checkout gui

now your workings will be placed under gui branch after changed dont forgot to commit

>> git commit -a -m ” commit from gui branch “

step 3)

now to switch back to master branch use

>> git checkout master

step  4)

to merge all the changes done by the branch gui to master use

>> git merge gui

and after merging if the branch is no more needed then delete it

>> git branch -d  gui

to get a graphical view of branches and files use gitk

Cloning and distributed working :

step 1)

whenever more than one user works with a project then sharing should take place . say two user alice and bob .

bob wants the myCproject from alice . then bob should issue

>>git clone /home/alice/myCproject

now bob will get a copy of alice in his current directory

step 2)

similiarly commit and add are done as

>> git add sub1.c

>> git commit -a -m ” commit from BOB “

step 3)

to get the changes made by bob alice will pull bob and get the changes by

>> git pull /home/bob/myCprojects

Commands overview :

git init-db     = initialsises the repository

git add file1 file2 file3   = adds the files to git repository

git commit -a = commits with the next version

git status = current status of files and branch name

git whatchanged = history of all versions

git diff = difference between previous and next version

git branch branch-name = creates a new branch

git branch = lists the all available branches

git checkout branch-name = switches to particular branch

git merge branch-name = merges with other branch

git branch -d branch-name = deletes unwanted branch

git clone repo-url = clones a existing project from other url

git pull repo-url = gets the changes from other repo

jGateway – My simple remote shell using twitter API

Requirments :

i) Any operating system ( Linux is preferable )

ii) Java Runtime Environment

ii) Two twitter accounts

Setting up:

Step 1:

Create two twitter accounts one for SERVER and one which acts as CLIENT here :

jGateway account acts as server ( runs on the host machine )  and

karthikselva account acts as client ( RemoteAdmin for the system )

Step 2:

Download my jGateway file from here

always copy execid file along with jGateway.jar

Step 3 :

open a terminal and run the file as  java -jar  jGateway.jar

if you also need to run admin commands run sudo java -jar jGateway

enter the server username and password of twitter account

Start Server

this will listen to incoming commands

Step 4:

now to send a shell command to server from any machine just login into your twitter account

and send a direct message to the server account from your account

Send command from client

note : remember both of the accounts are following each other

Step 5:

After the command has been read by the server it will execute  the command in same java window .

After Execution in server

if the command is valid and has executed succesffully then the server will tweet as <COMMAND_NAME> <SUCCESS>

tweet by server

else the command have failed it will display as <COMMAND_NAME> <FAILED>

Disclaimer :

I have tested my code in Ubuntu 10.04 and its working . If you get any twitterException while running then either your account must be blocked by twitter.com or  Check your internet connection before running.

twitmdu2010 meet – A good init on twitter awareness

Plot to escape :

I used to worry at every Sundays why I have to waste my precious hours in boredom CAT class in TIME and always used to seek a chance to escape from it . By this time I got a tweet from twitmdu2010 .Its really amazing to hear a IT techtalk being organized even in madurai that too free of cost ( rather not like other money gaining useless workshops or conferences ) .Even I didn’t had a chance to register online I went directly there asking for spot registration.

Welcome to twitmdu2010:

Fortunately their welcome was pleasing and well-organized which I didn’t even expect . Then after a short intro to twitter and how it works they started the session .

Why and how to use twitter :

At the start they frankly mentioned twitter is used by 90 % people for their boredom and to kill time on something. Well then bloggers too used  spam their followers with unwanted posts an blah blah ..But the main aim of every twitter user is to gain as many followers as possible . They may be ranging from  personal thoughts about a user or a brand based canvasing or any tips and new things about technology.Anything it may be the main mantra to get as many followers is Quality Content in your each and every tweets.

The two keys @ and # are explained where @ is to gain attention of particular user and # tag to make other people make their search way easily to you.Then inorder to contact celebrities you like and ask them or to know what they are doing at present is easily possible through twitter since it has  ‘on the go’ support from iPhone or PC even through sms  channels around the world .

Do’s about tweets:

Even they clearly mentioned 140 characters is more than enough for displaying your view try to make it within 100 characters  . Because  retweets may add you name with @ tag . Next thing is choose you name as small as possible . Lecture by Mr. Kalyana sundaram he said why he choose his user name as “$5” was really good and others too try to have shorter one like that .

Don’ts about twitter:

If you tweet about several things and diverge the followers from what they want then sure you gonna loose them .So streamline your passion towards a single line or at least HashTag your tweet with appropriate words.Bad thing you may have to be mentioned about twitter is following huge number of peoples with a intention that you may get huge knowledge from all parts of the world by doing so. Best case is to have 35 to 50 followers whom you think worthy and you actually know about him.Tweets are not intended for grocery or wholesalers business ( you can try google business as choice for that ) . IT and IT related stuffs gain more trends and importance in twitter.

Tweets as News Agent:

Amazing facts are even NASA tweets the current status of space and many geo-testing plants tweet the earthquake prone area to save people . Many news like tiger woods have been first put on twitter other on any outstanding news channels like CNN or BBC .

Twitter API development :

Going on towards twitter development any one can start developing twitter application using twitter API for any language. I tried it with java and python and found it working 🙂 .Choice of which API to choose depends on the programmers perspective and its speed of refreshing .I heard something like more than 250 times ping from API  per hour will black list particular user and don’t show further tweets. Its a sad news for me :(. But  developers can claim a 20,000 ping per hour by just priory asking permission to twitter developers :).

Added services on twitter :

For URL shortening and spamming others ( sometimes useful :D) use bit.ly.

similarly you can share anything as in other social network like .

* picture upload by twit.pic

* feed updater by twit.feed

* upload a video by twit.vid

and so on additional services are emerging for twitter .

Sad Incident about # tag :

Then heard a short session about CCD sucks with tag  #CCDsucks . Really humorous 😀 .To be in precise whenever yu get a negative remark about you in twitter with a # tag say for e.g) #karthikselvaSucks

just dont reply to it by using same tag but reply to such negative tweets by adding #karthikselvaResponse tags and  mention you reply clearly to particular user who gave you such remark. Never use the same hash tag to reply and loose your reputation yourself.

Im sorry I missed the afternoon session and I found really worthy  to spent my time there @twitmdu2010

Thank you for organizing such a great event twitmdu2010 and expecting more camps like this 🙂

But I still have a doubt how and why twitmdu has to organize this informative camp for free ??

Setting up a Virtual Network

* Make sure all your network harware works properly (e.g. Ethernet Cards, Network cables etc.)
* Click the NetworkManager Applet in your top panel of GNOME environment.
* Select VPN Connections | Configure VPN
* Choose Wired tab
* Click Add button
* Provide your new connection a name
* Trace the MAC address of your Ethernet Card from the existing connection (e.g. Auto eth0)
* Choose IPv4 Settings tab
* Set the Method as “Manual”
* Under Addresses section, Click add button.
* A new tuple (or record or row) appears.
* Fill the column with appropriate data. (e.g. | |
* The subnet mask address must be given as per your IP address
* Click Apply
* Now back to the Network Connection window
* A new network connection will be displayed
* Close it
* Click NetworkManager Applet in the top panel of the GNOME
* Select your network setup
* Wait for a while
* A new network has been set up

Nota Bene:

Do the same with different IP address for different computers.
Ensure all the IP address fall in the same network.
—- and falls in same network,
but and is not the same.

Now transferring files between two systems and remote shell login

* Ensure your computer has  OpenSSH installed in it.
* Else, please spend some time installing it.
* It can be installed by “sudo apt-get install openssh*”
* After installing SSH, type the command to restart it
* sudo /etc/init.d/ssh restart ( in all computers )
* Now check the ssh by the command “ssh localhost”
* If it works properly, now are ready to transfer and share fun

Transferring files:

* Have the file to be transferred in a place (let we take sample.txt)
* We want to transfer the sample.txt to strawberry user at
* The command is: scp sample.txt strawberry@ ( . represents home folder)
* Cool, work is done

Courtesy : P U Karthik