Saturday, October 18, 2008

Is it right time to invest?

The recent meltdown in the US has caused panic across the world. I still remember few days before 1-Jan-2008 NDTV Profit, a popular news channel in India, was telecasting a program. The program was interviews with Fund Managers from big houses and the program was shooted in the cruise. These fund managers were high profile big shots from big mutual fund compaines. They talked about "Where the sensex will go by 2009?". There were very few people who could have guessed it correctly. All the fund managers unanimously said, the sensex would move up to 29,000. Today, it is closed well below 10000 and all those decoupling and growth stories have turned out to be mere day dreams.

Not to blame the fund managers. They have little knowledge about the whole crisis and interestingly the guys who are worst affected like Bear Sterns and AIGs did not know how deeper the problem. The crisis in housing led to a crisis in US financial markets which in turn heated up on US banks. The banks stopped giving loans to people and companies to expand their business. As there is no enough funds, there is no investment. Unlike the dotcom burst, this crisis is much deeper as it affects the entire spectrum affecting the growth of all industries. So, we have reached a place where the governments are trying to infuse money and give a rebirth to the banks.

On the other side, with the current crisis and if you are the first time invester, a good question pops up "Is it right time to invest?". Without getting emotional, a typhical trader/invester has to buy in low and sell at high. Since the stocks prices are going down many investers are pulling out of stock markets and sit in cash. Same is the case with mutual fund redemption. But everyone is not like. Certainly Warren Buffet thinks differently. Few weeks back, he invested $5 billion (read it as five billion dollars) in a bank and surely he is going to get back $50 billion dollars in another ten years. "All time is good for investing" as long as you invest in the righ company.

As far as India is concerned, these days you get many stocks for throw away prices. Shares are sold like mangoes, banana in Sunday markets. Certainly, sensex will not go up to 3000 or 4000 (though reaching 6000 is not ruled out, in a worst case). But on the other side, many long term investers believe that India is going to have a bull market and this bull market is going to be the mother of all bull markets. In a worst case, one can get 100% returns on their investment.

Be a wise invester - buy in dips and sell in highs. Panic will not give you money.

Hope to see the similar program this year. However all the fund managers may be sitting in a 2 Star hotel or near a swimming pool and still talk about so many things which we do not understand. That is why they are what they are.

Happy Investing.

Friday, October 17, 2008

Nachiketas’s Dedication and Involvement – Learning from ancient stories

I happened to hear a discourse on Upanishads sometime back. And I am currently reading one of the modern day recipes of attaining wealth in life – Think and Grow Rich by Napoleon Hill. The book is the outcome of research done by Hill. Hill interviewed, studied the life of successful who build wealth of big magnitude and strikingly he identified certain common traits among so many people like Edison, Barnes, Ford. He identified the common traits and written those traits as chapters.

After I read first few chapters and when I was thinking about the essence of the first chapter. The first chapter talks about burning desire, obsession and creating a mental map of that one has already acquired the wealth which he is aiming for. One cannot find equivalent words in any language to express it but Hill did a tremendous job explaining to the readers, not by words but by stories.


However, I find an interesting and much inspiring story from Upanishad. A king named “Vajasravas” was performing sacred ceremony to Lord Yama. During those days, the sacred ceremonies are carried out by priest and it is the duty of the person who is performing the ceremony to offer a lot of cows and wealth. Only then, the ceremony will be complete. After the ceremony was performed, the king gave cows. However, his son, “Nachiketa” felt that the cows offered were bad (though it was good in reality). He argued with his father continuously and he was persistent to know why the priests where offered inferior cows. At some point of time the king was shouted at his son and said that he would give his kid Lord Yama in order to stop his son’s intriguing questions.


On hearing, the little kid kept slient and he believed that his was going to give him to Lord Yama. He started to prepare himself. He was thinking about serving Lord Yama and imagined that he would want to be at least an average servant if not a best servant. In his mind, he started to see himself serving Yama. He was so dedicated and involved in his father’s worship and he visualized being an obedient servant. He had a burning desire to make his father worship successful. A quite impressed Yama by the thoughts and involvement of Nachiketas explained him “What is Brahman”.


In this story, his burning desire and mental map of serving Lord Yama itself gave Nachiketas, the answers to the questions which is beyond human comprehension. By this, Nachiketas is an ever standing evidence for dedication and involvement. So was the case with Prahladha.



You can find this story told in a much better way however I wanted to reflect and dig into ancient storied to bring out modern day management/self development concepts. Truly, I believe in burning desire and if you want to pick up those qualities, read “Think and Grow Rich” and of course my blog :-). Dig deeper into your inner mind, you will find invaluable thoughts and end your day with a nice book. Good books are sleeping pills


Tuesday, October 14, 2008

Freedom by OSHO - Completed first book

This posting is from a half baked potato. This blog (like my other blogs) may sound illogical, funny and sometimes incomprehensible. After my 12th standard, I got an opportunity to read a full book - cover to cover. I was happy for two things. First, I completed reading a full book. If you know me, I am one of the guys who get book, read few pages and build a personal library. Never cared to pull the book back once it is arranged in my library. I buy books like manic. Secondly, I think that the book I read will take me to the ocean of knowledge, profound understanding and a better human being.

Before reading the book, I thought OSHO as just another trainer. But after reading few pages of the book, I understood the powerful thoughts and in most places, I felt that OSHO was sitting very near to me and presenting a discourse - only to me. The book talked about the social and religious conditionings. The entire books of just painted around single word "Freedom". "Freedom" seemed to be a single word when I started to read the book and after I complete the reading I understood it is the way of life. The book clearly brings out the difference between "Freedom" and "Irresponsibility". In so many places OSHO pops up so many questions. When you read it for the first time, you will never agree it (if you are conditioned in every walk of your life) and slowly you will digest it.

Oh. I forgot to tell you the book, it "Freedom" by OSHO. One of my friends gave me the book (but he got back the book) and I m planning to buy one.

Some other day, I ll be writing a blog which you can digest on "Freedom". Until then, have the freedom to explore freedom on your own.

Sunday, October 12, 2008

India Next Generation - A Burning Desire

These days, it seems like I too much carried away with few terms like potential, goals, thinking, creativity, maturity and freedom. Though I have picked up these words from the books of OSHO and from many self development books. One thing that excite me is converting potential to action. The potential is necessary to build oneself but not sufficient. One needs to nurture oneself to convert the potential to kinetic and to mobilize things. In the blog I wrote yesterday, I talked about our role and being socially responsible. I had an opportunity to change the thought process of few students positively. Though, my contribution was so little and can be quantified to negligible. It gave me immense satisfaction because of the fact that I was able to initiate some thought process. (or at least I think that I can initiate). I didn't know anything of my potential unless I see something which can actually take place only if I do some action. Having the potential and not using is sin which is equivalent to not having at all.

Now, I would like to look from another perspective about the gift of giving. It is the natural law and Mother Nature ensures that the person who gives get more happiness than the getter. I am not sure how the getters are going to feel after a period of time. However, the giving elevates one's confidence apart giving him an enriching experience. This particularly idea can be proved correct and one can validate it. For example, I was little known to motivate people just by my talks however by sharing my thoughts I was able to understand my very nature. I should thank Mother Nature for holding this law.

I also feel that if one engages oneself in giving particularly knowledge, the idea can be transmuted to reality and due course the idea spreads like virus. Yep, any idea is contagious and that is "The Tipping Point". Once it crosses the threshold, there will be so many people catching up the idea and buy in to the idea. Each one of them who connect to it emotionally will end up transmuting the idea to reality. This transmutation and the concept of "The Tipping Point" is sufficient to build a great India. Or to put it simply in the words of Dr Kalam, to become a biggest super power.

But all these takes little step on a daily basis. As Robin Sharma says, "Your hours are the miniature of your life". I have prepared to join with rest of the people who are dreaming to make India, the biggest and I want to see human evolution at its top before I die. I want to honestly engage for this cause to make India Next Generation simply because it gives be a great satisfaction and learning. It is a Win-Win composition for both the givers and takers (tilted towards the giver).

Saturday, October 11, 2008

Started to Live :-)

It was a great experience and most fulfilling for me. I was invited to speak at Pavai Engineering College at Salem, Tamilnadu. It was an inaugural fuction of a department's association. I prepared few topics that are bit technical (Linux and Open Source). I wanted to revolve around the concept of Open Source Software and how the students can build their career using Open Source Software. There were quite a few thoughts came to my mind. Another topic was in Linux - Basics. So, I was all set for the function thinking that I would speak to the students on these areas.

Two days before the function, I was told that I needed to give an inaugural speech. Though I didn't feel that I was competent to be a chief guest, I didn't want to turn down as it might spoil the entire game. I was sitting with other dignitaries. Except me, all were highly accomplished in their careers and served for the society which was equivalent to my age. I was moved by their presence and their very presence motivated me. I felt that it was my responsibility to pay back the students with due respect and so I decided to devote my entire day with them.

After few speeches (Welcome address, oath and address be Chairman of the college), I was invited to speak. When I was about to start, I could see the entire conference hall was full of students and I could see sparkles in everyone's eyes. The students were hoping to get something from me, since I was from IT industry and they thought I knew more (which is not true). I didn't want to give a monotonous talk but thought I could touchbase with the students. I wanted to hear from them what they wanted from me. For the next 2-4 minutes, the room was in a pin drop silent and with little bit of motivation few voiced their thoughts. Being from rural background many of the students were so closed and even if they were willing to open, they were mouth-tied. On a contrary, I was talking like a guy with oral diarrhoea.

All the dignitaries were helping students to open up and I triggered a question "What do you think you can't do?" There came an intelligent reply from a boy, "I can do anything". My question was "Can you give birth a baby?". The answer was obvious. Slowly and gradually nearly 10 percent of the gathering open their voice and told they can do this, they can do that. Then we discussed about IT industry, the future (why they get job?) and what it takes to come to IT. The first leg of the function got over with a small mind game.

The second half started with a workshop and various technical topics so that they could pursue their areas of interest along with their classmates. We formed 8-10 groups containing 8-10 students in each group. The students talked about various technologies. I really liked and learned a lot from this activity and this activity ran for 2 hours and then we parted for lunch. The post lunch session was on Linux Architecture and actually the prepared one. I covered 4 slides in 90 minutes and stopped the presentation as many students were very new to operating systems.

During my inbound journey back to Chennai, I thought about the differences in India even among the students who are doing PG courses in Software Engineering and Information Technology. The exposure that the village students have is very little. We, the so-called Tech Leads, Architects and everyone working in IT, have the social responsibility. I am not here to preach and ask you do. I feel, serving for the country is very personal thing and no one asked M.K Gandhi to become Mahatma and no one asked Dr Kalam to become lifelong teacher. I wish to follow their footsteps. May God bless India Next Generation.

Overall, after the event, I felt that I started to live and there is a meaning for my existence.

Tuesday, July 15, 2008

Overview on VMWare Workstation and Player

In one of my previous blogs, I wrote on Virtualization and its role in productivity and resource optimization. It also plays crucial part in having power savings by reducing the number of servers. Virtualization, as a solution, is considered very seriously by many organizations. In this blog, the review of one such Virtualization product, VMware Workstation is presented. Before starting, let me clarify. Neither I am an investor nor a paid reviewer. I try to present my personal views based on more than four years of experience with VMware workstation and one year experience with VMWare player.

Running Multiple VMs
VMWare workstation had a modest start and three years back, you cannot have more than one virtual machine running on your system. Meaning that you can create as many virtual machine as you need but you can have only one VM live and running. Over a period of time, this restriction was overcome and now one can run any number of virtual machines. When you start a virtual machine, you need to understand that you are running an operating system inside an application which runs on a physical operating system (or hardware). In order to explain clearly, each virtual machines (called as Guest OS), runs inside VMWare which is an application that runs on Linux/Windows (physical system). Often people forget this and expect that their virtual machines to be rocket fast. Really speaking, for every virtual machine you need to have at least 1GB RAM to run smoothly. Here the key is running so many virtual machines in parallel.

Modes of Networking
The next feature is that one can have so many network configurations like NATed environment, Host only networking, No networking and bridged networking. VMWare comes with virtualized DHCP server which takes care of IP address allocation to your virtual machines. The user has liberty to modify the IP addresses provided by VMWare through reasonably good user interface. Apart from this network configuration, one can form virtual team. The virtual team is the network of virtual machines. The virtual team is similar to that of real network and interestingly VMWare provides ways to configure network packets loss percentage.

Virtual Devices
Since all the devices are virtualized, one can add hardware to the virtual machine. VMWare workstation allows you to create 25 ethernet cards. One can increase the size of virtual hard disk or add new hard disk.


Snapshot Manager
VMWare also has Snapshot manager. A snapshot is nothing but a frozen state. At any instant of time, the user can freeze the state of virtual machine and the snapshot can be restored. VMWare comes with a nice and interactive Snapshot manager which makes archiving the states easier for you. This is the one of the cool feature that I like in VMWare. If you do not have time to analyze an issue, you can archive it and revisit later. The other features like record and playback and suspend are notable features.

Using VMWare workstation one can create virtual machines and run them. Typically, we will not be creating VM all times. We will create VMs once in while and put them in production by running the VMs. So, in order to run a VM, VMWare player is enough. In VMWare player, it just runs only one Virtual machine. You do not have the luxury of running a team or many VMs. By the way, Workstation is commercial product but Player is a free software.

Hope this write up will help you to understand VMWare better. More information can be found here.

Sunday, July 13, 2008

Design Pattern Tutorial (Design Pattern 101)

Learn from the mistakes of others is one of the famous quotes. Each one of us try to apply this in our life and we will be happy if we do it. The same thing, rather there is little different in Design Patterns. Design Patterns are solution to the common design problems. Software community after facing a lot of challenges and solving a problem in so many ways, has finally arrived to a optimal way. And this is called as Design Pattern. It is not at piece of code but concept which can be applied in variety of scenarios irrespective of the language and domain. Having said that, does it really help software community. Yes, really it is.

So, make up your mind to read further.

It has helped so many other developers and hence it should also help you. And one more interesting fact is that a lot of developers use design patterns without being aware that they are using one. For example, if you have used wait(), notify(), notifyAll() is an observer pattern. So you have been using it without knowing. Then why should you learn it. Because all the design patterns are solution to specific problem and focused towards object oriented concepts, reusability, maintainability. And also, it is not just one, there are 23 core design patterns and each one of them have an intent and the specific way of application. It is a reusable concept/solution.

Apart from the solution, the design pattern let the developers to speak a common and a quick language. For example, if you ask someone "how to go to a place where lot of people are standing on a platform to go to a distant place. The people will be carried by a series of wagons that are connected and pulled by an electric or diesel engine. Also, the entire vehicle goes on two tracks that are separated by 1.5 metres". What would be the answer? Aren't you elaborating and complicating too much. Instead of asking the way to railway station, you simply beat around the bush and simply irritating the stranger. The very same (shame) thing happens if you do not know design patterns. Design patterns improves your productivity by making you solve problems in a right way and also to have your discussion short and to the point.

These are some of the reasons why one should know design patterns. After all, it is you, who is going to benefit by learning it. You ll end up giving a better and nicer software to your customer.

Watch out for a series of blogs on patterns.

Upcoming Write-up: Types of Design Patterns.

Virtualization - A new wave

It was three years back, it was an accident that I was hooked up with Virtualization without knowing that one day it would become a hot area. Today (at least from end of 2006), there has been so much advancements in Virtualization. It clearly remember that VMWare workstation was my first virtualization software and Linux was my first virtual machine.

During end of 2004, I wanted to learn Linux and experiment with it but did not have a desktop where I can install a farm of variety of Linux distributions. Once I thought, installing many distributions would make me Linux geek. Soon I realized that it wouldn't and got rid of so many distributions but I retained VMWare workstation simply because it was (is) a cool tool. My first assignment with Linux was to learn POSIX threads and compare the threading behavior with Solaris. As I was doing the first assignment, since I am a monkey, I wanted to jump to writing system calls. Taking a snapshot in my virtual machine (which will save the current state), I moved to a fresh state and started the experimentation of Linux system call. (Actually I completed both the work and published two articles in Linux for You - Confession to say that I m trying not be a monkey).

Two years later, I got a chance to install the new version of VMware workstation and to my surprise it had hell a lot of features like running multiple VMs, networking them, wide range of virtual hardware configuration, record and play back. After exploring the entire VMWare workstation, I realized that it is killer tool which could actually be used for maximizing resource utilization and also to improve productivity. If you are impressed and want to read more, I would recommend you to read some white papers on Virtualizaton from VMWare

These days, many of the organizations are trying to use virtual machine to reduce the cost of hardware and more importantly I feel Virtualization has key role to play in making this world green. Since you virtualize so may PCs, you end to using lesser power and your system dissipate less heat which is good for our planet. If you are a software developer or a decision maker and an environmentalist, you got to seriously consider in using virtualization.

Apart from commercial virtualization software, you can also find few open source or free virtualization software. Shortly, I will be writing on more blog on virtualization products. both commercial and open source.

Phishing - We are in six month high

A couple of months back, my friend and I spoke at a Conference on Software Testing held at Bangalore on Web Application Security. It was a just few days after one of the famous Indian bank's E-Banking website was attacked. The attacker launched the attack from Asia and the news came in almost all popular dailies.

Roughly after six months, today, I happened to read an article on Phishing which says that Phishing is very active and more than 150 banks globally are targeted. Phishing is at six month high. I am sure the list will contain the bank where I hold an account. There are many fraudulent companies which setup web site simple for grab the data and before the world identifies that it is phishing, the attacker would have stolen enough. However, the security agencies need to protect others from falling prey further.

Though the way the software is built itself is an issue, we cannot the entire blame on the software developers :-(. Each one of us, as the users should have security awareness. But the important thing is that we, the normal human being (layman) never try to understand the techniques used by attackers and we don't even care thinking that the probability being stolen due to phishing is very less. You are absolutely right, the probability is less and not zero. We never really care about the current trends in web attacks and certain basic security awareness is very much crucial.

Here are some of the points that one needs to care
1. Try to avoid logging from public systems like Internet cafe
2. Whenever you log off, delete all the history and cookies
3. Don't not click the images in the web banking sites
4. Do not launch your e-Banking website through a hyper link from an external website.
5. Take time to read the address in the address bar. Check whether the address exactly matches the address of your bank's website. Make sure that first part of the address, the protocol, is "https". These days none of the banks and commercial websites use "http".
6. Do not save passwords in the browser and do not be lazy to key in your password everytime.
7. Periodically, change your passwords and use strong passwords (with alphabets, numbers, special characters)
8. Since most of the phishing takes place through fraudulent emails, ensure that you different between the emails from your bank and the attacker. You can find some ways of identifying phishing email in one of my previous blogs.
9. Above all, if you happen to receive any phishing email, report to your bank as they can sensitize other account holders.

And now, if you have time and energy, just go and read about security and phishing especially. :-)

Saturday, July 12, 2008

JVM it too Hot with HotSwap

Right from my first encounter JVM, it amazed me. Before working on Java, I never got a chance to read the internals of any interpreter. I started to read the internals of JVM and roughly three years before I read about Java Platform Debug Architecture. I tried writing simple debugger agent using Java Virtual Machine Tool Interface, Java Virtual Machine Debug/Profile Interface (both deprecated) and Java Debug Interface.

Apart from being specifications and methodologies to write tools, these specification can help you a lot to understand JVM deeply. Recently, I was reading through HotSwap and suddenly wanted to write a simple tool using which I can reload classes in a live remote JVM. I was successful in loading the class. The only disadvantage is that you cannot reload the class if you have added any new members to it. However, this is the limitations of JVM which may be addressed in upcoming Java major release. The rest of this write up gives you, the specification and algorithm (simple steps) used.

Specification
Write a simple tool which let you to reload classes in a running JVM without restarting your application. Also provide a simple user interface (probably using SWING).

Steps
1. Use Java Debug Interface API to connect to remote JVM. In order to connect to remote JVM, you the hostname/ip address of the remote box and port number on which your JVM runs. In order to hotswap the classes, you need start JVM in debug mode and if you start JVM using "socket" debugger.
2. Also subscribe for few important events such as JVM Exit, Disconnect Event. (for more info refer Java Debug Interface API Spec).
3. If the connection is successful, you get an instance of the remote JVM and you can once again use JDI to replace classes.
4. You have to write the logic of reading the class file (flat file) from the file system and give to JDI. JDI pumps the class file to remote JVM which reloads the class after making lot of checks.

Saturday, April 19, 2008

Good to see myself scratching my head

I started blogging ambitiously and also had promised myself that I would be reading and writing quite often. Yet again, I broke my promise. Never mind as long as you highest expectations, it is a fair deal. It is always better to have a great failure than mediocre results. The confession is enough and let us get ready straight away.

Let me start with a simple question “In Java, why synchronization is so important and avoiding over synchronization is much more important?” Probably, from a bookish guy one can expect the answer for the first part of the question. But in order to understand and answer the second part, you need to get to your refrigerator and have to gulp of citrus drink. One needs to understand the internals of JVM or should have known little bit on JVM. Believe me, it is thrill to learn the answer for the second part.

I have found the answer and in coming days, you can find a detailed article right here…

Until then, keep exploring. Happy learning

Thursday, January 10, 2008

UNIX Process - Learning of a Classic never ends

Learning never stops and if it is a classical subject every becomes teacher in no time and student in no time. With a bit of optimism, let me put my thoughts here. Surely comments are welcome and all comments will be put in the hall of fame of this online magazine.

Today, I got sometime to think :-) and thought that I should start writing on processes. For anyone who is new/old the right place to get a start is process. Before getting started, the objectives of this entire article to discuss on process with sufficient details. Moving forward, this blog will have tutorials/scribblings on Unix Externals/Internals.

1. What is process? How it looks like?
2. As an user how one can see the process in your Unix/Linux System?
3. What are various states of process? How they transition?
4. What are the important terminology and data structure needed to continue my journey?
5. Why I need kernel to run my process? I have written "Hello, World" program, why I need kernel to run and get the output?
6. What are various modes/context?
7. How processes switch between modes and contexts? What is the object of those switches?
8. What are the commonly used commands/utilities that are related to the process/process management?
9. Is it going to be a theory? Can you give me code and explain stuffs? Can you also give me license to use the example as per my wish?

Saturday, January 5, 2008

Aspiring journey towards UNIX System programming

It was official hang over with Java for the past three years and within these years the things have changed a lot. I never thought or expected to become a Java programmer however I m successfully traveling in the world of Java for the past three years. Personally, I had a lot of learning and it is in fact most fulfilling learning experience in my life time. Having written bunch of articles in Java Technology (it doesn’t necessarily mean that I m an expert), I m thinking to shift gears. I am planning to enter into Unix System Programming world.

UNIX/Linux as an operating system and a programming environment excites me simply because of being simple. Few years back, I was dreaming that I would become an operating system programmer but ended up being an application developer. But I never felt guilty as I always dedicated my time to read Linux internals. Thanks to the authors of Linux Kernel Development and Understanding the Linux Kernel. Now, I am seriously thinking of learning for heart. Yes, learning what my heart likes.

So my agenda for 2008 is to become a better programmer and learn UNIX System programming, UNIX/Linux Internals and Linux Kernel programming. This seems to be over ambitious goal because UNIX/Linux by know means little operating systems. It really takes considerable of time to understand the internals of the both the operating system. So, let me see how far I come close to my target in 2008. When I say, learn I really mean learning UNIX/Linux as both Art and Science.

Keep watching, suddenly you may find interesting write-ups. It is a matter of time. Unlike the sensex, you will find a lot articles in holidays/weekends :-)

Wishing Everyone, a Very Happy New Year