Just Do It !

There is this technique to make easy “a step to start”a doing new things in life. I think everyone has to learn, it’s kind of convincing ourselves to start doing things which we want to do but always stumble upon starting off.  Why do we fail to even start doing? Why it has to be so hard on this earth? I think the answer is simple – we humans are slow at adopting new things into life. Be it starting a gym, start reading a book, getting socialize, or bringing anything new things in life for that matter. We keep thinking that we should start doing it, but that starting point itself seems like a mountain to all of us.

The best way to deal with it is to start with small and very small, and then gradually tries to make a progress towards big.

Additionally there is another complemented technique, and in my view its better than the previous one. All we have to do is imagine the fear of not starting rather than starting it. When we would imagine the fear of not starting we would end up seeing ourselves into very horrible situation and this fear is far greater than the fear of failing. But there is trick to this technique; we need to be constantly thinking of these scenarios of imaginations to build more fear which would lead us to DO IT motivation.

To be continued…


Change required, need of an urgency

I want to change myself, I need to focus on what I want to do rather than what I don’t want to. I am really tired of living the way I am living, in short I am not happy person, i don’t know the reason. Why happiness is short lived, if it’s a happiness? What makes me happy ? Is happiness just a illusion? Achieving goals make me happy? Can happiness be synthesized? Happiness is a natural thing ? I don’t know what do I want from life, hope I will figure out one day before my death. This our mind is so simple or complex, it makes good or evil, just the same source.

I will come back to the above topic later, but I want try to change my life doing things  in baby steps rather than taking big leaps. Okay let me experiment the life just for a week starting today, and will write down the process and outcome of it in the next post.

I will make list of things to be complete this week to myself and see how productive will I be in achieving them.

Hate being 9-5er

I have been thinking a lot lately on by self – I am 29 years old now, and I am working 9-5 job in the IT industry from last 6 years or so, and I hate it. Do I really want to continue doing this for rest of my life, I guess not, I don’t really like to continue doing what I have been doing? I think I want to create something by myself and work for myself. But I don’t know what is that is a big question mark.

Once Steve jobs said – “We will be spending most of our time of life in doing the work, we should do what we love to do, not that what we hate to do. So we need to find a passion, if there is no passion in doing something how can we love what we are doing, and how can we be good at what we are doing. If you haven’t found a passion yet, keep looking for it, you will know when you find it.


I wonder is it really that most of us do the work they are passionate about and love it. The more I think and see around, the less it seems to be true. I think the answer is No, most of us don’t do what they would want to do, and there are various reasons for why it is the way it is. Let’s not get into details as we know most of reasons. But, I think the main reason being the making an EXCUSE to ourselves and avoid doing or at least making an attempt in doing what we would want to do.

So friends we should stop giving excuses for ourselves and having reasons for not even attempting them in the first place.

I am trying to recall this quote on “attempt”, but I vaguely remember it. I would write it down anyways and would update the right one later.

“You can catch a running tiger if you attempt to catch, but if you don’t attempt then you are sure that you can’t”. So the answer is in the attempt, not in the outcome.

Myth: Value Types are always stored on stack

We are always taught and learnt to be that the value types are always stored on the Stack, and this is not true to its entirety. There is this one question which always, from the time I started working on C#, bothered me to ask myself, but until recent time I have never attempted to research to find the reason for it, how shameless of me.

Question:  If the value types are used as part of the object instance, where would that be stored, still on the stack?

So the answer to this particular question at least arises one point which contradicts this famous myth. The answer is – Value types are stored on the heap as part of the object instance, not on the stack.

In process of finding the reason, I came across this topic from Eric  Lippert, http://blogs.msdn.com/b/ericlippert/archive/2010/09/30/the-truth-about-value-types.aspx

He says: In the Microsoft implementation of C# on the desktop CLR, value types are stored on the stack when the value is a local variable or temporary that is not a closed-over local variable of a lambda or anonymous method, and the method body is not an iterator block, and the jitter chooses to not enregister the value.”

Few of other points from his blog:

  1. There are three types of values: Instances of Value types, Instances of Reference Types and, References
  2. There are three kinds of storage locations: Stack, heap and registers
  3. Every storage location has a “life time”. That is, a period of time in which storage location’s contents is valid.
  4. The time between a start of execution of a particular method and the method returning normally or throwing an exception is the “activation period” for that method execution.
  5. If the life time of the value is greater than the activation period, then it’s called long lived value, otherwise it is short lived.
  6. So the choice of the storage location for the complier mostly depends life time of the storage location. How? If the required life time of the storage location is greater than the activation period of the current method execution than the storage is said to be “long lived”, otherwise it is “short lived”
  7. Long lived storage location are always heap locations.
  8. Short lived storage location are always stack or registers.
  9. References and value types are same as far as their storage is concerned: they either on stack or registers or heap, depending whether the storage of the value needs to be short lived or long lived.

Missed the posting of Feb 13, 2011

As I had confessed myself before to write at least one blog post a week, but I missed the shot very early in the game. I think I deserve a punishment for not sticking to my own promise and not being discipline.
So the best punishment would be to write two blog posts instead of one for that week. I need to remind my brain that, eh, I need to write exactly two posts excluding this one 🙂

Design Patterns – Everything in the World have some kind of pattern

Pattern is something which would seem to show commonality of specific qualities or features when every time we notice or observe the subjects.

For example, we can say, almost every human have pattern of walking, eating, talking and so forth. I was watching this movie, Pi, other day, a mathematical scientist gets a notion of the world and says there is a mathematical pattern in everything that exist on this earth, and he tries to prove it.

So the design pattern for that matter is no different. As a developer, we try to solve the problems every day, and few of the times we tend to solve similar problems frequently.

Imagine a world – when we encounter problem as to one we solved before time, and if we could somehow correlate to the problem which occurred a day or long before. And, imagine a world where if we could correlate our first kind of problem which we could correlate to the problems occurred to other people and were solved those problems. What are we benefiting here? The answer is very simple; we could reuse the solution to the similar problem, and we don’t have to reinvent the wheel every time. It all seems like fantasy world, isn’t it, well not that fantasy it is as we have found the patterns of problems here and solutions to them, so the design patterns come to rescue here.

Design patterns are set of recurring software/software component design problems; the solutions are tested and proved which are maintained by software community.

There are three types of design patterns; it is also called Gang Of Four Patterns (GOF)


  1. Abstract Factory
  2. Builder
  3. Factory Method
  4. Prototype
  5. Singleton


  1. Adapter
  2. Bridge
  3. Composite
  4. Decorator
  5. Façade
  6. Flyweight
  7. Proxy


  1. Chain of Responsibilities
  2. Command
  3. Interpreter
  4. Iterator
  5. Mediator
  6. Memento
  7. Observer
  8. State
  9. Strategy

10.  Template Methods

11.  Visitor


Creational Patterns:

  1. Singleton Pattern:

Problem: Maintain a single instance or state of an object.

UML Class Diagram:




Complexity and Frequency of use:

This is simple, widely used and well known pattern among all of the above.

Confession..ya you heard..

This is to confess to myself, and only to myself that I need to, not necessarily that I want to, write at least one blog post every week, to start with. I hope, I would not break this promise, at least not consciously, to myself.

The reason I want to write is because it makes you think what is right and what is wrong and how well and bad you know about your thoughts.