Sunday, December 30, 2007

A hope is lost ....whom we suspect

The day 27/12/07 would be remembered as question to PAK democracy forever because Benazir Bhutto, was assasinated just after she had finished addressing a large public rally. We can compare Indira Gandhi with her. Many similarities are there in their political life. "Benazir Bhutto 54, was expecting it, but the suddeness and violence of her death has left the world sheelshocked" says Seama Mustafa reporter of DC news paper. She is really brave. Her dedication to reestablish democracy had given her this much courage to face death. On the first view, we can suspect the Pervez 's goverment itself. Second thing is Benazir's spoke person Farhatallah words give us there was some inner conflicts in her party itself " She has been killed under plan. There were jealous of the response she was receiving from public". PPP leader Farzana Raja said " It ( the killing) was a conspiracy. Some elements were trying to martyr her since she arrived back. They were jealous of her popularity". Third thing , In Rawalpindi former Prime minister Nawaz Sharif rushed to the hospital and addressed the crowd " Benzair Bhutto was also my sister and I will be with you to revenge for her death. Don't feel alone. I am with you, we will take revenge on the rulers". The fourth, "We can suspect Qaeda militants and the Taliaban behind the assassination".I don't know who others play behind that . Whatever may be the truth I always pray for peace in Pakistan.

Friday, December 28, 2007

Follow tips to excel in your career

Very attractive article in Deccan Chronicle Chennai news paper. First the DC correspondent says " update yourself on the latest technologies. Adapt to it because there in lies the future. Learn, learn, learn should be your mantra. Learn about different races and the traditions. Start reading more about your own professional line. Update yourself, be prepared to reinvent yourself and more skill to your armory. Be cheerful and willing. A cheerful and disciplined person is an asset as he or she creates a positive environment that produces higher productivity. Learn to adaptable and welcome changes, get yourself think out of box". The article concludes like this "while some of these skills may be easy to achieve and some more difficult to attain , the fact that you are trying will give you the confidence to move a head to bigger opportunities" ......... It's really motivating to be prepared .

Failure to follow English lectures drives students to commit suicide

When I read this article in Chennai Chronicle( DC ) news paper, I had remembered my plus two classes. I did my schoolings from Malayalam medium. When I reached plus one , I realized that I could not even read simple words meaningfully. I struggled a lot in those days. I will agree that without English, we can not compete with others or face an interview. The main reason is almost all knowledge and all informations are in English. In order to access knowledge we must need English. But I am not get depressed. " A student is who he knows what he don't know". Use the opportunities that we get in daily life...... this is my principle to improve myself
Mr. Thangam Thennarasu, the minister for School Education, Tamil Nadu says, "we have planned to set up English language labs for Tamil Nadu schools including those in rural areas within two years"( DC article). In my view it's a good move.Because in Tamil Nadu, children are not at all giving importance to their education.Besides the English labs, computer labs are also very essential for students.Psychologist R.Manoj points out that" it is not the cultural differences that compel students to commit suicide and it is the low motivation levels. The students who come from Tamil medium to professional colleges are generally the brightest in their schools and they are not prepared for such a drastic change . It takes them a while to adapt to the new environments"( from DC article). I think determination can change every thing. Through small small experiments we can change ourself ......... don't expect a sudden change.

Sunday, December 23, 2007

Silly things........

Actually there was no core topic to write. So I decided to write about my life problems.Actually these were not happy days for me. I will always have stomach problem if there is any food change or climate change. My diagestion system was totaly broken down for last three days. I couldn't eat.... Full day sleep, no need of food and water. And I had diarrhea also. http://en.wikipedia.org/wiki/Diarrhea. I had some ayurvedic medicine, But it took three or four days to recover from this disease. In bed rest time I read wiki pedia about diarrhea and how to prevent that. I understood that these type of studies give me more knowledge, satisfaction and even relief than a casual book study.

Wednesday, December 19, 2007

First Home Visit....lessons and experience

On 18 th december I had gone to home from chennai. It was a sudden decision.It didn't have ticket till 7.30 p.m on that day. God grace, my friend took a chennai - allapee general compartment ticket for me. It's cost only 150 Rs to chennai to allapee. And we decided to get the seat when the train come for parking. But unfortunately we missed the trains arrival for parking. When we realized that the train already had come in the station, we ran for seat. But the rear compartment's seats were already filled.Then we ran for front seats. At the end of the marathon we got side seats.I had got some kind of relief then, because the thought, "I can have homely food and air for 3 or 4 days". But I really struggled to move that night in train.I couldn't sleep, But I had tired. One thing I understood on that day was, bring or buy some good water and food before getting into train even if you are not at all hungry or thirsty. It is very difficult to book and get the train tickets in chennai. My friend said main reason for that is some mafias are working behind that.They will book the tickets at the opening day itself and sell for more money.

Monday, December 17, 2007

Can I make changes.......doubt????

Two days of severe headache make some retardation in me. Sunday I went to consult doctor because the medicine I bought from medical shop without prescription, was not enough to reduce the pain. I know that it would be Sinusitis headache. Consulted doctor unfortunately ,he know only Tamil and English, in that two language I am not at all fluent.... . But some how I expressed my pain. Because I can't tolerate that.Doctor said the pain was because of climate change..... it was almost same as my mind told..... I got some relief because ,it was not complicated head ache disease.Today I search for "what is sinusitis". I got a good answer http://www.entnet.org/healthinfo/sinus/sinusitis.cfm

Friday, December 14, 2007

Spiritual heat......

Last two Sunday and Saturday (holiday day for me ) , I had gone to some temples in Chennai. I can divide the people in Chennai into three. 1. fast track people:- they want only money,pleasure and business.In this category most of them are from outside, not Chennai born people. 2. People who are keen about their religious activities. Actually these people are maintaining the ancient Chennai culture. 3. Very poor people:- I don't know what I can say about them. Sometimes when I have seen small,small huts or sleeping people on roadside, my mind automatically ask two or three questions "How can they live there? How better I am ?? Nobody to look after them?? " . But sometimes these people are very dangerous . I had some experience . Surely I can say one thing , we are only those can help them. Actually this was not the topic I prepared to blog. First I had seen Mahalashmi temple in Basanth Nagar.Beautiful thing about these temple is a christian church stands very close to it. This temple is for Goddess Mahalashmi. My friend told me that she had nine avatars . This temple consists of lot of chutambalams ( small temple inside the big temple ). In there we can see sculptures of Mahalashmi's avatars, Hanuman, Parasuraman .... I can't remember all of them. Second temple that I had seen for God Ganapathi. People were sitting in front of the God and singing God prayer( in Tamil ) . Third was Kapaleeshwarar temple at Luz in Maylapore ...... very famous. http://en.wikipedia.org/wiki/Kapaleeshwarar_temple . It's big and beautiful temple. What a magnificent architecture. In temple walls we can see lot of sculptural works. The wonderful thing is somewhere light of sun is coming to darkness through the slits in the roof, and it is always in front of the God or Goddess. There is a small chutambalam for nine planets including sun. We have to round it nine times. If we scientifically think, it will be wrong. But in that BC also people have the knowledge of planets and sun. In every chutambalam there will be a priest. He will give some fire and basmam. The heat I got from there gave me some kind of support and confidence in that morning. Fourth was Sai Baba temple. I don't know more about him. But in that temple I had seen some kind of calmness. We can sit there in floor, and feel the low pitch prayer song. From there, one priest drew red kuri(line) with his hands.

Saturday, December 1, 2007

Cricket crazy.......enjoy Indians, this is our year

I don't know this is our Indian Cricket team . Of course this is the year where all Indians can proud of, about the Indian cricket team. Yesterday , how beautifully Indian batsmen were played . When Wasim Jaffer and Dravid were on crease, I couldn't understand who was batting and who was on the bowler's side . I think Jaffer is our next Dravid.... How beautifully he was driving the ball!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Friday, November 30, 2007

"STORMING" period for me....

In a team 'storming period' means , the team is undergoing lot of conflicts,confusions and changing .............. Atfer storming it will align itself .. this stage is known as 'Forming'. For me this is a storming period. My colleauges have little bit higher standard than now i have. So this is changing period for me ..... I think so.. and I am trying to change as much as possible. Today we got a class on business lines.I didn't get much from that class.I am very sad to say that . But at the last of the slide she(Sangeetha) put a quote , that was the words of our father of nation( Mahathma Gandhi ).

" Live to die for tomorrow
Learn to live forever "
Mahathma Gandhi

Wednesday, November 28, 2007

Team Work needed everywhere .....as an individual also

In Office I have to work as a professional, having more quality than actually I have . And I need to work in a team.I don't know how much i can perform. But todays class about "Team Work" really teach me how important team work in an organization. Without team work and changing mentality, no organization can exist. I think this principle is applicable to 'home' and individual person. In a home the team spirit of father, mother, son and daughter will guide the success of the family. As we talk about an individual person if his mind ,brain,body and every part work for particular goal with a team spirit , he can easily achieve his ambitions. "Synergy " is the important characteristics of a team . Synergy means synchronize + energy .........means , one person can drag 20kg and another person can drag 30kg , then they can together drag more than 50kg.... that is synergy.This is a physics principle. Concentrate or synchronize mind and body, then I realize that I can achieve a lot

Tuesday, November 27, 2007

Searching For part time online business

Now days all my friends are talking about how to make money fast. ...... That discussion create a curiosity in me of searching for some internet business. I think my friends are going in the wrong way ..they are going to invest amount on money chain. My father already had told to me that money chain is way of spoiling your money. Now I am thinking about building a website of my own that will increase atleast my creativity . I am not looking at a big profit .But I need my site must do some kind of social service to the internet browsing people for free of cost. I know that web designing is not a simple thing .... I cannt easily start coding . For I need to first find out some free webhosting sites so that I can script in php and do some web hosting experiments........

Sunday, November 25, 2007

Chennai ......good place to grow fastly

This is the first time I am staying in a state other than Kerala ........ new people ,new customs , new traditions ...... . Mostly we can see mixed culture in chennai ...... I have joined in Hcl Tech last month . I got 'Testing' as my stream . One thing is sure that these chennai people know how to make money and how to play with that. Lot off IT parks are there. I got the luck to see the IIT Madras campus . Big campus !!!!!!!!!!!!....... For neatness this big city far behind our state. Climate is very bad compared to Kerala .... When rain started , two day continues non stop pouring ..... Roads become pools and rivers .....sometimes we cant see where is tarred path. Drainage system not at all managed properly in chennai .... What a rush there in T.Nagar the center of Chennai!!!!!!!!! we cant even walk .Anyway I am adapting with these City..... I believe that I can learn lot off things from these city........ First thing I started reading tamil words !!!!!!

Tuesday, August 28, 2007

think of a meaningful Onam

Festivals have special role in the society's integrity. We , all malayalees celebrate Onam . Its a memory of a humble King, who we believed in his visit to people of kerala every year. After the 6 years gap(+2 ,Btech) , I got a chance to celebrate Onam . I really enjoyed the taste of “payasam” ,which we got from our neighbors.. It is the celebration of the harvest tied with the memory of the golden age of prosperity .My mind went to my past school days...gathering flowers , competing for making "pookalam",playing with friends......lot to say . For a fun yesterday I searched for wikipedia entry of Onam…………..there isss,… http://en.wikipedia.org/wiki/Onam . Thus the old story of Mahabali had came to my mind again ...... Great Sacrifice and forgiveness. In wiki there is a sentence “Prana (life) and Maana (honour) are like the two eyes of a person. Even if life goes, honour should be protected. Knowing that the person that has come now is the Lord Himself, I should be the most fortunate one as the Lord, who gives everything to mankind, is seeking something from me."…. Onam is a good subject for meditation.

Saturday, August 25, 2007

why has Mahabali been behaving this much cruelty to P.J Joseph's Kerala Congress group??

In last year (2006 )onam season P.J Joseph had to resign from his Public Work Ministery Post in the light of Inspector-general P Sandhya's finding that there was some substance in the allegation that he had misbehaved to a woman co-passenger while flying from chennai to Cochi on August 3rd. In his vacancy T.V Kuruvila (Joseph's group)had posted as new Public Work Minister. ...But Mahabali is not ready to leave them. This year T.V Kuruvila is facing a big allegation in the controvecial land deal between his family and KGA Group in Rajakumari village of Idukki district.The problem is hoisted by the Idukki district collector Raju Narayanaswami.This will become a real head ache to Achu in comming days... - A person from his cabinet is facing an allegation that he has links with land mafia when govenment is going on movements against this land mafia....... At last we will reach in the same question - who can I trust??

Wednesday, August 8, 2007

Could Madhani’s release impact Kerala Politics???

On February 14, 1998, shortly before BJP leader L.K Advani 's poll meeting, a serial blast rocked Coimbatore. Fifty-eight people were killed and more than 250 were injured. Nine years later, when verdict in the case was delivered on August 1, the reactions were mixed. Peoples of Democratic Party chief Abdul Nasser Madhani's family and followers are happy. Madhani was acquitted along with seven others, while al-Umma founder S.A Basha and 152 ohters were found guilty of conspiracy.Madhani's home-coming is expected to change the profile of minority politics in Kerala. The LDF government headed by E.K Nayanar projected Madhani's arrest as acheivement. Though the ruling UDF passed a resolution in March 2005 seeking Madhani's release, an angry PDP allied with the LDF to help its return to power last years. However he said in his Kairali channel interview that PDP would work for social revolution and party derived strength from all backward sections, including the Dalits. Whatever may be the declaration, one thing is sure that return of Madhani will put Muslim League on backfoot. In his speech at Thiruvanadapuram on day after his release was flooded with his supporters. From his speech we can conclude that as of now PDP will continue its alliance with LDF.

Tuesday, August 7, 2007

Multithreaded programming in JAVA

Last days I spend a few time for understanding multithreaded programming in JAVA. In C language it is done by including the header file pthread.h and the function pthread_create use for creating a new thread.

All modern operating systems support multitasking. However there are two distinct type of multitasking: process based and thread based. In thread based multitasking environment, the thread is the smallest unit of dispatch able code. This means a single program can perform two or more tasks simultaneously.

Creating a thread in JAVA:
Java defines two ways in which this can be accomplished.

1. implement the Runnable interface
2. extend the Thread class itself

Implementing Runnable
The easiest way to create a thread is to create a class that implements the Runnable interface. Runnable abstracts a unit of executable code. To implement Runnable, a class need only implement a single method called run().

After implements Runnable, instantiate an object of type Thread from within that class. Thread defines several constructors. The that we will use

Thread (Runnable threadOb, String ThreadName)

After the new thread is created, it will not start running until we call its start()

class NewThread implements Runnable {
Thread t;

NewThread() {
t = new thread(this,”demo thread”);
System.out.println(“child thread: “ + t);
t.start();
}


public void run() {
try {
for(int i=5; i >0; i - -){
System.out.println(“child thread” + i);
Thread.sleep(500);
}
}catch(InterruptedException e){
System.out.println(“Child interrupted “);
}
System.out.println(“child exiting normally”);
}
}

class ThreadDemo {
public static void main(String args[]){
new NewThread();
try{
for(int i=5; i >0; i - -){
System.out.println(“Main thread”);
Thread.sleep(1000);
}
}catch(InterruptedException e){
System.out.println("Main thread interrupted");
}
System.out.println("main thread Exiting");
}
}

In this program main thread and child thread will count five to one downwords simultaneously. But execution of main thread will be completed only after completing child thread execution.Because of the thread delay given in for-loops. Main Thread finishes last, because the main thread sleeps for 1000ms, but child thread only for 500ms. In fact some older JVMs, if the main thread finishes before child thread completed, then the java run time system may “ hang”. In above program it is done by sleep. However it is hardly a satisfactory solution.
There are two ways to determine , whether a thread finished . First, call isAlive() on the thread. The isAlive() method returns true if the thre upon which it is called is still running. It returns false otherwise.
class NewThread implements Runnable {
Thread t;
String name;

NewThread(String threadName){
name = threadName;
t = new Thread(this, name);
System.out.println("newthread:" + t);
t.start();
}

public void run(){
try{
for(int i=5; i > 0; i--){
System.out.println(name +":" + i);
Thread.sleep(1000);
}
}catch(InterruptedException e){
System.out.println(name + "interrupted");
}
System.out.println(name +"exiting normally");
}

}
class Demojoin{
public static void main(String args[]){
NewThread ob1 = new NewThread("One");
NewThread ob2 = new NewThread("two");

System.out.println("thread one is alive" + ob1.t.isAlive());
System.out.println("thread two is alive" + ob2.t.isAlive());

try{
System.out.println("waiting for thread to finish");
ob1.t.join();
ob2.t.join();

}catch(InterruptedException e){
System.out.println("main thread interrupted");
}

System.out.println("thread one is alive" + ob1.t.isAlive());
System.out.println("thread two is alive" + ob2.t.isAlive());

System.out.println("main thread exiting");
}
}

In output of this program ob1.t.isAlive and ob2.t.isAlive are true at first call, since threads are running at that time. ob1.t.join and ob2.t.join will wait for the child thread to complete execution.Second call of ob1.t.isAlive and ob2.t.isAlive returns false,since child threads completed their execution.

Friday, August 3, 2007

A mystery man came to play in kerala politics

Last week kairali channel went for Farris Aboobecker who donated 60 lakh Rs for E.K Nayanar memorial foot ball play and who gave 1 crore Rs for P.T Usha 's sports school. Everybody thought that he might be an old person.But when I saw him in front of John Brittas (Kairali channel MD) , I surprised, I understood Farris is a young , handsome man. In this story , interesting thing is , Kairali channel is CPI(M) party channel.Why did this party channel take interest in this mystery man??......He was sending arrows against CM of Kerala in his first and second interview. At the same time he refused or intentianally go backward when Brittas asking him about his background and asset . But at present present one this is clear, he is main share holder of Deepika news paper.....This mystery man proved that he could play lot off politrics in kerala.....

Tuesday, July 31, 2007

POLITRICS IN KERALA

I use to see the program POLITRICS in India Vision channel . You guys , don’t need any comedy shows or scenes to laugh, you just need to watch the actions of the MPs and MLAs ( especially ministers)…What a standard people !!!!!!! beauty of words from their mouth is really funny. At present the CM of kerala- achu - is trying to make a revolution in Munnar(may be for improving his image). It was a good movement in my view. All encroachment into the govt. land by the BIG Bs must be prohibited, without harming the poor. He had to face allegation from his own allies. Meanwhile there is a statement from opposition leader- ‘kunjukunju’- that he is going to donate his land to panchayath. It is described as a drama in politrics……It was really a funny drama. Now the GODS OWN COUNTRY is named as “KODI KOZHA COUNTRY” ( crore bribe ): .Deshabimani had to face a crore bond (cartoonist convert this word to bonda) allegation. Party punished the dealers….. But kerala police failed to investigate . For a counter attack , an allegation against congress leader that he had received money (crore) from himalaya group- reinvestigation of kanichikulagara murder case. But one thing must be in all keralites mind that one family is still suffering in that incident–they lost their daughter, son and father. If there were any mistake in probe, govt should go for reinvestigation . But don’t use this for counter attack . Sad thing (in politrics view :funny thing) is that, this case refreshed not as murder case, but as a bribe case.

Friday, July 27, 2007

Exception-Handling Fundamentals in JAVA , PYTHON, C

An exception is an abnormal condition that arises in a code sequence in run time. In other words, exception is a run time error. In computer languages that do not support exception handling,errors must be checked and handled manually.
* JAVA
Java Exception handling is managed via five keywords: try, catch,throw, throws, and finally.All exception types are subclasses of the built-in class Throwable. Immediately below Throwable are two subclasses that partition exception in to distinct branches. One branch is headed by Exception. This class is used for exceptional conditions that user program should catch.There is important subclass of Exception, called RuntimeException.The other branch is topped by Error.

This small program includes an expression that intentionally causes a divide-by-zero error.


NOTE: intentation gone when i published the post

class Exc0{
public static void main(String args[]) {


int d = 0;
int a = 42 / d;
}
}

When the Java run-time system detects the attempt to divide by zero, it constructs a new exception object and then throws this exception. The default handler displays a string describing the exception, prints a stack trace from the point at which the exception occurred.

javac file.java
java Exc0

output:
java.lang.ArithmeticException: /by zero
at Exc0.main(Exc0.java:4)

* How to use try and catch

class Exc2 {

public static void main(String args[]) {
int d, a;
try {
d = 0;
a = 32 / d;
System.out.println("This will not displayed");
}catch (ArithmeticException e){
System.out.println("Division by zero error");
}
System.out.println("code execution continues");
}
}

To guard against and handle in a run time error, simply enclose the code that you want to monitor in a try block.

This program generates the following ouput:

Division by zero error
code execution continues

Notice that the call to println() inside the try block is never executed.Once an exception is thrown, the program control transfers out of the try block into the catch block. Simply passing the exception as an argument to println() ,we can print the description of error . Add this peice of code -
System.out.println("Exception" + e); in catch clause.

throw
So far, we have been catching exceptions that are thrown by the java run time system. However, it possible for our program to throw an exception explicitly, using throw statement.

Class ThrowDemo {
static void demoproc( ) {
try {
throw new NullPointerException(“demo”);
}catch( NullPointerException e) {
System.out.println(“Caught inside demoproc”);
throw e;
}
}

public static void main(String args[]) {

try{
demoproc( );
}catch (NullPointerException e) {
System.out.println(“Recaught; “ + e);
}
}
}

This program gets two chances to deal with the same error. First, main() sets up an exception context and calls demoproc ( ). The demoproc( ) method then sets up another exception handling context and immediatelythrows a new instance of NullPointerException, which is caught on the next line . The exception is then rethrown.

Caught inside the demoproc
Recaught: java.lang.NullPointerException: demo

throw new NullpointerException( “demo”);

Here new is used to construct an instance of NullPointerException.


PYTHON

def fun1()
a = 2 / 0;
return a
try:
b = fun1( )
print b
print ‘hello’
except:
print ‘error’

NOTE: intentation gone when i published the post

Here we intentionally makes a divide by zero error. In python language , since the code is placed in try block, the control goes to except clause and print error. It will not print hello.


C – language

include the header file setjmp.h

jmp_buf env;

fun1(){
//longjmp(env,2);

printf(“hello”);
fun2();
}

fun2(){
/*normally this code will do something useful and longjmp on failure */



longjmp(env,3);
printf(“world”);
}

main(){
switch(setjmp(env)){
case 0: fun1();
break;
case 2: printf(“jumping from fun1”);
break;
case 3: printf(“jumping from fun2”);
break;
}
}

int setjmp(jmp_buf env)
Sets up the local jmp_buf buffer and initializes it for the jump. This macro saves the program's calling environment in the environment buffer specified by the env argument for later use by longjmp.

void longjmp(jmp_buf env, int value)
Restores the context of the environment buffer env that was saved by invocation of the setjmp macro in the same invocation of the program. After longjmp is completed, program execution continues as if the corresponding invocation of setjmp had just returned. If the value passed to longjmp is 0, setjmp will behave as if it had returned 1; otherwise, it will behave as if it had returned value

In the above C code , setjmp is called in the main program.fun1 calls the fun2 and in fun2, longjmp is called with value as 3.So control of program will go to setjmp which returns 3. It will execute the case 3 in the switch statement and prints out “jumping from fun2” as in the screen

referance from wiki pedia, is quite helping one http://en.wikipedia.org/wiki/Longjmp

Tuesday, July 24, 2007

Simple electronics projects

I could not get enough (or not utilized ) time to do electronics experiments in my B.Tech course . I studied lot of interesting theories of the basic electronics,op-amps, Markov chain (http://en.wikipedia.org/wiki/Markov_chain) , signalling of telephone networks.Today I searched for some hobby circuits and projects in electronics.I found two interesting sites http://www.hobbyprojects.com/ and http://ourworld.compuserve.com/homepages/Bill_Bowden/.

Monday, July 23, 2007

starting with smile

First I heard the word blogging in FOSS NITC calicut. Then I decided to start one. I believe that words can change life and it can motivate others too.