Tuesday, September 8, 2015

Loading my small java code on servlet start up

I was confused about how to execute my java code automatically when servlet container is started. Found a quick solution on this
http://crunchify.com/how-to-run-java-program-automatically-on-tomcat-startup/

Here init method of any servlet could be used to run or load some code.


Sunday, September 6, 2015

Working with GIT

As the number of files and number of team members increase, It becomes essential to move to some standard code repository management system. We have number of options like Perforce, Svn, ClearCase etc. We decided to move ahead with git for couple of reasons. Firstly, open source nature of product and secondly, available android and eclipse plugin for the same.

However, Due to my lack of knowledge about Git and time constraint, I am still confused about smooth merging of files and branching in git. I found following document very useful in this regard.

http://rogerdudler.github.io/git-guide/

Recently, some one made a mistake in git repository using my user name (I am still not sure if I made those deletes). Thus a lot of work had to be repeated. Thankfully I had some back up files so things worked out for me.

Anyway, Done. Will continue writing about my daily learning. Of all the things, taking up laptop and writing is most difficult to put into routine. Anyway, I am sure it is just matter of starting on a regular basis. Things will be simplified.


Wednesday, August 19, 2015

Problem of Digital Ocean tomcat refusing to start properly


Following commands could be used to find out about the process which is listening to a particular port.

lsof -i :8000
ss -nlp | grep 8000
nmap
socklist
sudo netstat -tapen | grep ":8000 "


Ref: http://askubuntu.com/questions/278448/how-to-know-what-program-is-listening-on-a-given-port

Saturday, July 25, 2015

Social Apathy

I was reading news item on TOI in the afternoon and came across one sad news. A young BBA student (22 year old) died unattended after being hit by a speeding car in one of the most apathetic cities of the world "New Delhi". It is so unfortunate that so many people loose their life and meet their moment of death in such miserable and agonizing way. This happened on the eve of his sister's wedding. I can not imagine the pain his parents must have felt.

In India, 1.4 Lakh people die every year in road accident. More than 5 Lakh people are left handicapped with their limbs or some body part sliced off the body. It is so unfortunate that despite 75 years of our independence, we have not been able to build proper roads. Hardly 2% of the roads are national highways. And this 2% carry nearly 40% of traffic volume. Driving in India is not at all fun. It is pain.

The need of hour is to focus on 4 E's. The first one is engineering of roads. Most of our roads are so poorly designed that even the highways develop foot deep holes after one rainy season. The dracula of corruption sucks all the money provided for road development. Be it private organization or public entity, corruption has hit both of them alike. At national level we do not even have proper national highway development authority. I remember, once I was in Kanpur. I went to appear for UP-PSC examination. I was late, the city hotels were literally full with aspirants so there were no free rooms. I searched in dozens of hotels but all were full. Somehow I managed to find a room but it was too costly. I thought of sharing it with some one. I spotted two other boys roaming around looking like aspirants. I approached them, asked them if they are also hunting for rooms. They agreed to share with me. Anyway, story begins. One guy was nephew of UP minister. He told me about various methods of corruption in official tenders. He explained how a 3000 crore sum of money allocated for road building was siphoned off by fraud organizations without even laying single brick on the road. Official inspection declared that road was built but due to heavy rains and flood situation, it was destroyed in the next season.

Roads are considered the first step in bringing development to any region. Today most of Indian infrastructure problem starts with lack of roads. The lack of backward-forward connectivity results in city becoming island of development while village hinterland turns into ripening ground for naxalism. Sharat Joshi of Shetkari Sanghatan has explained this in his thesis of India and Bharat. Whether it is problem of inaccessibility of colleges or it is problem of overburdening of railways, the root cause is lack of roads. Therefore, It would be prudent for administration to focus on roads if they are serious about projects like Make in India etc. Modi is visionary in this regard. He understand most of these grass root problems but somehow he has failed to follow the right steps despite knowing the solution. One, he has put one of the most corrupt minister Shri Shri Gadkari as Transport minister. And adding salt to injury, Modi is talking of digital roads when we do not even have proper physical roads.


My nephew is no more. :( :( :( :( :(

Will write later.




Friday, July 24, 2015

Numerology


A leader is one who knows the day, shows the way and goes the way. I remember meeting a Jain Saint. He was living in a lonely place. I asked him about his food and health. He told me that holy scriptures says "if some one become a saint, he'll always has at least 10 follower". This rule applies to practical world also. If some one is walking on a certain path of which the world does not know or people are not really sure, the person will always find at least 10 people supporting his way of life. Thus a leader is never alone. He always has 10 supporters. In the lighter vein, I think this is the reason why election commission of India's election candidature form requires 10 guarantor only. EC officials know, whichever caste, class, color, creed a person belong, she can always find 10 supporters. So egalitarian in their approach.

Even I see, most of my blogs have a read count of 10 on first day. Some goes viral to the modest scale of 100 but that happens slowly. I do not claim any sort of leadership. But this shows the serendipity of numbers. May be a proof for ancient number theory experts, the so called omniscient numerologists. I am not sarcastic. I am simply bewildered that why any of these things never work for me.

Anyway, I observed another interesting thing in last few days. I came across a very similar android APP which I am working on right now. This induced me to draw a correlation with common theory of face resemblance. I remember, during childhood days, someone told me that every person has 6 other persons with nearly similar face. It means among the total 7 continents in the world, each face is replicated 7 times. Same is the case with any idea. I feel at any given point of time, an idea is executed by 7 teams or groups of people around the world. Some you may know, some you may not be aware of. Whoever do it with persistence, pace and patience emerges as a winner. NASA today announced discovery of earth like planet. I believe there are 6 other such planets. Anyway, mere arm-chair theorising. Let science do it bit before I speak of it so loudly. Similar is the case with 7 Nakshatras.

Any way enough of random thoughts. Will post the rest of it later and will try to bring some substance.

Phir Likhenge.

Monday, July 20, 2015

Exam Result

This post was due for long time. Last few days brought a new kind of experience. Once again a "no match" search on civil services results file. It was heartbreaking but you can not do any thing about it except thinking what else could I have done to be in the list? Many thoughts criss-crossed my mind. I thought of compiling them but somehow inertia of writing my thoughts kept me at bay or may be I did not want to make them public. Today, My friend asked me to read his article on Medium.com. This inspired me to begin my quest of writing once again. I sorted through my previously unpublished blog where I had listed "Things I wanted to do for rest of my life". I re-read that article. It felt good. So I decided to make it public and follow it in my routine.

Last 3 months were exhilarating. Many things happened. Civil Service Interview, Train journey to Bangalore, Psychology papers, Amritsar trip with friends to Bangalore, Vaishno Devi trip with parents, Sister's engagement, Entrepreneurial experience in Bangalore with friends, developing a product from scratch and working daily 13-14 hours to meet a deadline, rebuilding the confidence that I can make a dent in technology field as well, Civil Services result, and encouraging messages from my friends from Facebook. Especially message, wall posts from friends, and calls from well-wisher telling me what difference I have made to their lives was amazing. It felt really good. I remember 6-7 years back I was having dinner at a pot-luck party with my friends and some body asked me What will make me feel truly happy? I contemplated real hard and eventually answer came that If somebody come and tell me that I have made a difference in their life for better then I would be on cloud nine. The purpose of preparing for Civil Services exam was to reach to a platform where I can make a real difference to people's lives. It provides widest and amazing platform to serve common man. Though I could not achieve my dream but I feel great about my effort and encouraging messages I received from my friends on Facebook and phone. Probably first time in five years (except my sister's marriage) tears came in my eyes reading those messages.

I wonder how a split seconds mistake can change the direction of life. I always believed Interview was my forte. I had flawless mock interview sessions so a sense of feel-good factor was there. I scored 140 (highest score) out of 200 in the state level interview. Earlier I had scored 210/300 at national level. However, This time script had a Shakespearean climax. Interview on that fateful day was not up to the mark. My final score was 727 in written exam and 138/275 in Interview. By any stretch of imagination, The score could not have been worse. So score of 138 this time was indigestible. I contemplated hard on various mistakes I made in the interview. With the advantage of hindsight, I could spot couple of mistakes I made.

Mistake 1:
One of the board member asked me about problems which are plaguing state pollution control board. Somehow, very unnatural of me, I spitted that "Many of these boards have become retirement parks." The person sitting on the other side table was a retired IIT professor, parked in UPSC. And to add to my misfortune, He was the chairman of board who possess the sole discretion of awarding final marks. I could see his face color changing instantaneously. But damage had been done. So uncharacteristic of me, I thought.
Mistake 2:
One member asked me whether excessive criticism of Freud is justified or not. I replied saying, "Sir I can not comment whether the criticism was unjustified or not but his thoughts received lot of negative publicity due to excessive focus on sex and unconsciousness". And to add to my misfortune, The use of word sex was so explicit and I found myself looking into eyes of chair man while saying this. A RSS hardcore. Again it irked him. I guess

Rest was OK. and He awarded me 50% keeping me out of waiting list also. I wonder how two innocent responses could make difference to whole of my life? For all these years of failure or unsuccessful attempts, I always questioned that among the destiny or hard work which one rules? Most of the answers were, "Hard Work can change your destiny". Some people says, Destiny is fixed. You can not change it but I question that. However, seeing this year result I have stopped believing in destiny, hard work, god, religion and many other things. There is only one truth randomness. You can reduce this randomness by working hard but random can hit you under the belt. And that too in most unexpected manner.

In a sense, I feel liberated as well from the shackles of many things. Few things I am listing:
1. Notion that things are pre-ordained to happen is myth.
2. Developed notion that God is just matter of faith and conviction. I visited Vaishno Devi. I was bewildered to see some people 14 km on mountain by walking on stomach and standing in queue 1 kilometer long. It is all faith.

Randomness is the ultimate truth of life. Thus most wonderful thing to do in life is to reduce randomness of life and bring certainty. Technology/ Science has that capacity to reduce randomness of life. It brings stability in human life. Swami Vivakanand said "Service of Human Kind is Service of God". Technology provides best instrument to achieve this goal. Teaching in technology can be much nobler. Anyway, defeats and failures have great corrective influence in life. Year after year, I used to sit down on my chair immediately after seeing "no match" result and used to list my mistakes and make a to-do and not-to-do things for next attempt. This time it was last attempt so felt a void or hole.

I am not sad and I am no more disappointed. Time heals everything. I feel liberated for the reason that I could not have done better. I can stand with my head high. I feel much stronger, much more relaxed and prepared to deal with randomness of the life. I feel more drawn to poetry as well. I feel much more disciplined after years of relentless preparation. And of all the things, I am definitely a better human being, more prepared than ever to embrace failures of life. The knowledge of political science and psychology and other topics of civil services preparation has enriched me heavily. For last 3 months I have lost touch with current affairs but now time has come to pick it up again and do some thing much more exciting, innovative, creative to make this world a better place to live for all of humanity.

Monday, May 11, 2015

Book Review: Bureaucrazy gets Crazier


Completing the full circle. Back to Bangalore after so many years. Traveled 36 hours with waiting reservation. Last time I traveled ticket-less for such long distance was in year 2006 when I decided to visit my home for Diwali at the last moment. so now back to square one.

Anyway coming to more interesting things. I finished reading M.K.Kaw's insiders account of how bureaucracy functions compiled in book "Bureaucrazy gets Crazier". Kaw's book is compilation of his writings on Bureaucratic experience which were published for over 40 years. In one line, it will make you laugh at the fullest capacity of your lungs and explode all the myths about civil services. The book literally lampoons bureaucracy for its so-called nameless faceless and self less "service" of the nation. It is a must read for some one entering into bureaucracy, to set his expectations right and give him fair picture of power play which takes place in high echelon of power corridor. However, It could be demotivating for idealist blokes who take bureaucracy as a holy job demanding high level of renunciation and spirituality.

The book ludicrously typifies various Babu's personality characteristics like a Yes-Man or No-man or Yes-but-no man or yes-man proper. Kaw has drawn full experience of his bureaucratic service in describing bureaucratic habits of saying No or making excuses like "sahab ghusal mein hai or Sahab park gaye hai or sahab pooja kar rahe hai". The family history of bureaucracy gives extra punch to your service to the nation and person knows in his womb when to take deputation or study leave or which ministry to work for or what foreign posting to aspire for. And your patrons like Nana, Papa and Sasur ji all together ensures that right transition takes place at right muhurt and no evil forces obstruct your steep rise.

The book explains politician - bureaucracy relationship with incisive insight. How a difficult political leader is managed by bureaucrats by laying supine in front of them or how a tame leadership is taken for a ride by bureaucracy. Sometimes the politician-bureaucrats travel the journey of career graph together. The relationship graduates from BDO-MLA to DM-MP to Secretary-Minister to Principle Secretary-Chief Minister. As elsewhere, sycophancy pays heavily. Bureaucrats should learn the art of laughing at the same joke n number of times with full capacity of your lungs which can risk bursting your stomach. Laughing on seniors joke or politician tell-tale stories pays in career rise. However Laughing comes with own risk. When politicians fortunes take down slide, the bureaucrats aspiration may also go for toss, unless he changes his side conveniently.

The book displays authors full command over English language and can act as a dictionary of difficult English words for naive readers. Moreover, some difficult jargon demands above-average grey matter to grasp his dark humor and sarcasm. Kaw has taken examples from his own life and from his conversation with colleagues, seniors, sub-ordinates and others in power circles. Thus, book presents most authentic insider's view of bureaucracy and caricaturise bureaucrats in unabashed manner. The description of bureaucrats wives and their influence on Husband's work, the importance of wives kitty parties in Bureaucrats fortune turnaround and necessity to listen to peons, clerks, drivers and other office staff to gather information about other IAS officers is described beautifully in the book.

To sum up, It gives a authentic gossiper's account of how bureaucracy functions from inside. Author has made fun of bureaucracy but conveyed many serious advises in most engaging manner. It is a must read for those who have recently wedded civil services or for those who aspire to wed with civil services career. But it is also a fun read all other species as well.