30 September 2009

Problem Solving - Tools are Different, Techniques are Same

It has been a while and restless search to desperately find something, something that is invaluable to me - the experience in solving problems. Without knowing what to do, I have been wandering here and there for a while (close to seven years) only to find that problems can be difficult, the problems can be different, but the solution is common. The solution is to solve them. During my wandering, I found that algorithm of solving problems is same. But the application of algorithm will be different. Let me explain with an example.

In order to explain with a software engineering example, let us take "traveling salesman problem". This algorithm gives near optimal solution to reach nodes of a graph. This is a single algorithm but can be applied in courier distribution, aircraft industry to optimally fly aircraft between destinations and many more. A mathematician cannot say that he cannot solve airline problem if he can solve traveling salesman problem. If this can work for math, can't it work for solution problems?

Yes, it will work perfectly fine for solving problems. If we have experience in solving a single problem, it gives us knowledge to solve many problem and we understand the process of solving problem. When we are trying to solve the problem, it is the approach that gives us solution. The solution is not really the outcome of knowledge you possess but an outcome of the process you follow, the approach you choose and your ability to think through the problem - techniques are same, tools may be different. In order to solve the most difficult problems, first you need solve one problem and the rest is matter of time.

This is one of the priceless lessons that I learned when I wandered like a mad guy. :-)

29 September 2009

OOPS - What is Abstraction?

There is song in a movie in Tamil (Alavanthan) and the song sequence happens in a party. Everyone would crack joke and our hero would share a joke. Here it goes. "A little kid asks his parent. What is the meaning of sex? And their parents explain with a lot of struggle. and try to explain the meaning of sex. Finally the kid just asks, Should I check male or female in the application form". We, the developers, without understanding what is abstraction try to develop application. For a kid it does not make sense to say intricacies of something as it incapable of understanding that something (example, sex). The parents should abstract the idea in a form that is sufficient or needed for the level. And sometimes the details are not required.

Another example of abstraction in real world could be appearance of beach sand. For someone who sits on the beach, the sand will appear course but for someone who is traveling in an aircraft few kilometers above the sea level, the beach itself appears as a thin line. In the real world, the abstraction is quite common and we human being appreciate abstraction quite well.

Let us take another example. How will you tell your find that you are going home? Assuming that your home is in "Nanganallur, Chennai, Tamilnadu, India, Asia" and you are in S"an Jose, California, US, North America". You just say that you are going to India. But when you are in India, you give more specific address.

Yet another example of abstraction is someone taking bath. If someone is taking bath, you hardly worry what he is doing inside. You never try to investigate what someone is doing in bathroom. But the guy who is taking bath, he does it with a lot of details. You shed out details when it is not required. Interestingly, in real world you clearly know when to shed out details.

So abstraction is something that gets built up as you move up the hierarchy and you leave out details intentionally to make the concept more generic. Now again, go back and reread the real world examples. It should make sense. Then correlate with abstraction in object oriented programming.

28 September 2009

Article Publication - Mere Coincidence

It is an important milestone in my life and my career. I m completing five years as author of Linux for You and I am wondering how I still continue to write. I still remember the day I had a discussion about threads with my colleagues and went ahead to write a multi-threaded program in Linux with POSIX threads. Fortunately, my lead was writing articles for LFY and thought I could also write articles. I contacted them and they were prompt to reply that "Introduction to Threads" was already published and asked me whether I can extend it.

I suggested another topic "Synchronizing Threads" which was accepted. The next article was implementing the system call in Linux. The first two articles were written in quick succession and still remember those moments. For all these years, I have written more than 20 articles in many areas - Linux, Network Security, Java, Javascript, Tools and Design Pattern. Later this gave me confidence to speak in conferences that are related to Open Source like LinuxAsia, GNUnify, OSI Tech Days, and Software Testing/Engineering like STEP Auto.

I remember the editors who helped me during this journey - Rahul, Tina, Samartha, Atanu, Sujata and Atul. I made so many prints because of you guys. Thank You. You played a very big role in making me an author :-).

But writing for LFY was mere coincidence but I can say for sure that it ignited me to move towards excellence. It gave me a very big platform to continuously learn and share with others. Overall a period of time, I was able to write something on my own that makes sense and of use to others. You can find all the articles published by me here. It is a wonderful feeling to be part of Open Source community and writing in Asia's best open source magazine. Thank You Linux for You.

Looking forward to collaborate with you.

List of Articles Published in Linux for You (scroll down the page and go to Publications section)

27 September 2009

OOPS - Rules of Overriding?

This is a typical interview question. What are the rules of overriding. Here goes the answer
  1. The method in the subclass should have the same signature as that of the method in super class
  2. The method in subclass should not be more restrictive in the context of access specifiers
  3. The method that overrides the method in super class cannot be through broader exception meaning that it cannot throw the super class of exception thrown by super class.
  4. "final" method cannot be overridden
Leaving out the last condition, as it is obvious, is there a reason for top three conditions. Why does Java (or any object oriented programming language) have this as rule? Is there any logic? BTW, this is not a standard interview question. But a question that provokes thinking. Will post the answer in couple of days (meanwhile if you know the answer, write in comments)

26 September 2009

Big Aspiration - Making Myself An Architect

I have written in the past about my lack of focus. I feel that if I focused more I would have feeling better now. When I sit back and think, I have few reasons to cherish and to feel good but overall I feel that I could have done better. I have come up with a list of things that I should do and planning to correct my approach with a year long immersion and self realization program. Yes, in a year or so, I planning to transform myself as a software architect. The primary purpose of this immersion program is to bring in focus and discipline in my efforts. I need to think properly and realize importance of channelize my efforts.

Hope many of you agree that as we become more experienced the things that are expected of us will grow exponentially. An experienced guy cannot create wow by just putting efforts. Even at a personal level, the satisfaction due to hard work will be for a while but fades out gradually. The satisfaction due to thinking, mapping the results against the decisions due to the thinking and impact created to fellow human beings due to the results will drive us towards excellence. Becoming an architect is the first step and during my journey I will share my thoughts through this blog.

If everything goes good, I will be rolling out a workshop on software design and architecture. I aspire to conduct workshop to change perspectives and remove prejudices that are not needed or hinder healthy thinking process. To stay on course, I have created a page, TinyThoughts and this will be under construction for a year. After a year, TinyThoughts will take shape.

This is another way of taking control or becoming an architect of one's own life. It is great feeling :-)

24 September 2009

Innovation - Simplification and Abstraction

I had a very vague understanding about innovation and trying to get good perspective by reading books, sharing experiences and seeing innovation live. Innovation is all about seeing things differently when your trousers go down :-). In my life, I had a great opportunity to live very closely with a person, who, in my perspective is very innovative. She is my elder sister who always moves through the problems to find solutions. She literally sees things in a different angle and many times she solved my problems. She has a great skill - she can simplify a problem and register the problem/solution at a very abstract level so that it can be applied to a different unrelated problem.

Innovation is about abstraction and simplification. You are working on a problem and it is highly likely that you will come up with a solution. This experience gets registered in your mind. Whenever you encounter a similar problem, you just apply it. You become machine. But on the other hand, the innovation is more about applying your experience and learning to a totally unrelated problem. That is humane. The first step towards innovation is simplification and abstraction. Then comes, the application of acquired knowledge.

19 September 2009

Fantastic Day - Let everyday be like today

It was a great day today and the best day in my career. For the past few weeks, I have been involved in recruitment and conducting interviews. Today is the second in this month that we sit for interviews. Today, I did over twenty interviews that I will forget in my life and I did two interviews, I will never forget in my life.

First one, a candidate with two years of experience was doing a decent job but there was little gap. I sat with the candidate and give feedback about the performance and how it can be improved. The candidate was moved and said "no one so far gave me feedback" and thanked me. I feel that it is not usual thank you but heartfelt one. That moved me and showed me that I was doing something right :-).

The second instance was interview whom I thought ordinary but he turned the interview extraordinary. He had basic knowledge of Java. With his knowledge, he was able to connect the basic knowledge and came up with a system that is flexible. Soon he is going to join me at work. I promise you that I will have him write a post about his experience. Whatever he did was simple but elegant at the same time. I feel that I played a crucial role in asking him right questions to unblock his mind. He played a very very crucial in connecting those. He is a thinker.

Thank you guys.

Overall, a fulfilling day and I wish everyday pan out to be like today.

18 September 2009

Leadership 101 - New Journey, Great Aspiration, Absolute Followership

It is always great feeling to follow someone. If that "someone" is very close to you and inspires you daily to do more and in fact make you do more, you need to realize that you are getting ready for a paradigm shift, a transformation, a pleasant storm taking everyone by surprise and you are going to be an absolute soul. A month back, I had a new start at work and life is more exciting than it used to be.

I have a great aspiration of touching at least billion lives directly and indirectly. I aspire to facilitate growth for the people who have potential and fire excel by helping them to mobilize their potential at right time, right pace and right level. I strongly believe that this is going to be a great learning experience for me, not only technically but also managerial and leadership skills. Sometime back, I read the book "Transform your Workplace" by Ken Blanchard. In his book, Ken Blanchard talks about Servant Leadership and inverting the pyramid. I also happen to work in a place that asks people to "invert the pyramid". Next few years is going to be absolute excitement and new learning.

I am really looking forward eagerly for some of teammates to lead me :-) I will keep you posted about my learning.

09 September 2009

Web Goat - Deliberately Weak

We generally call "scapegoat" and in web application security world, there is also a scapegoat "WebGoat". WebGoat is deliberately vulnerable web application that helps us to learn web application attacks and this knowledge helps us to avoid those vulnerability in the application we develop. WebGoat is written in Java and so we can install on any operation system. All the web attacks are discussed in 30 lessons and it also comes with install guide. WebGoat is being maintained by OWASP. The details can be found here.

06 September 2009

Open Gyan - An Update

Some of you know that I have started an initiative for the students. Few folks joined with me later to when I started the website and Badhri created a Orkut community. As I promised you in one of the previous posts, I here to give you an update. There are reasons to be happy and finally we have given another dimension to Open Gyan. We have launched a long training program for the students who have at least 2-3 years to complete their degree (BE, MCA, ME, MSc). This program comes from a collective experience of 17 years and we are positive that many more people will join us.

This program is an attempt to help students to improve their experiential learning. If you have any of your friends who are in college, you may want to pass this information to them. The detail of this program be accessed through this link - Open Gyan

03 September 2009

When do you Look Out? It really Matters

The world throws out enough of case studies and sometimes it will stunning that you happen to learn each minute. Only thing that one needs to do is to be open. One of my friends/classmates shared his experience and here it goes. Sometimes, the mangers, who in the name of leveraging or delegating mess up with things. The real shortsightedness makes them so vulnerable without they knowing that they are vulnerable. It is very pathetic and for an outsider it is quite evident. The delegation of your delivery cannot happen across teams but you can always leverage. But when you are leveraging one needs to know what is being leveraged and the risk involved in the leverage.

One risk that comes with leveraging is sudden spike of advantages - immediately you will have advantages however you will not have the experience that comes with building the advantage. But when you leverage you are going against the nature and evolution. In this world, the advantages brought by evolution is relatively stable. When we leverage and if we do not know the associated risk, it is like crossing a free way - you may luckily get away but you may also get crashed. So, the managers need to use "leveraging" as getting to a place fast but always should invest time in getting something organically. Always organic is good. When you look out is more important. If you look out for something which you need to build in-house, the end results will be tragedy. So, always (or most of the times) do not look out for leveraging. If it takes hard work to do, just do it as the hard work will strengthen the system further.

What you are leveraging, when you are leveraging and the associated risks have to be studied before leveraging. Don't leverage something which takes only few minutes to think/build. (It sucks).

02 September 2009

Informative Talk on Entrepreneurship

It took me 29 and odd years to understand that simplicity and modesty is the way to start. I was fortunate to attend a talk by Mr. Raju Venkataraman, a serial entrepreneur at IIT Madras, Chennai. He was talking about entrepreneurship and qualities. When to take risk, how to take risk and how to sustain the own venture talking examples from his life. He quoted in many places about Tata, Ambani, Gates, Steve Jobs and many others.

During his talk one thing that stood out was his - simplicity and modesty. He quite often connected the dots and making the participants to know the unknown through known simple principles of life. He never tried to force things. When some asked a question about being ethical. Without any prejudices, he answered "being ethical" is part of your value system. I would say that is an important take away for me and anyone who is trying to become entrepreneur. Apart from whole a lot of inspiration, having a value system is quite important.

Being ethical or unethical is the manifestation of one's value system. It is "ok" to rob if you are a thief because it is your value system. He doesn't mean or want us to have low value system but his point was to convey the importance of "value system". I feel that I need to spend sometime reflecting about my value system and make it "real" value system.

Great Insights.

01 September 2009

Open Source Appliances

As a follow up to my previous post, this one talks about appliances in open source. When you say appliance and immediately Linux comes to my mind. I haven't seen any other open source operating system that is widely deployed as Linux. Today, most of the appliances (watch, microwave, routers, switches and many more) are powered by Linux. Unlike general purpose computers like workstations or PC, the appliances are built for specific purpose. The appliance should be an "expert" in doing something. For example in the case of router appliance, the appliance characteristics should be throughput and performance in routing packets.

The appliance market is quite heated up and there are many small players turning the heat and screwing up big market players and industry leaders. They do not have "low cost" as their only advantage but they are in a position to give features, performance and throughput on par with industry leaders but at the half the price or even less. From here on, I believe open source appliances is going to get into mainstream and slowly open source appliance will take more market. Making open source appliance (or take it from me, it makes sense to make Linux appliance) is the way to go. The appliance also gives us a viable business model to sell products and services particularly in a developing countries like India.