In every problem solving there's always people who think differently, who come with a 6th option when only 5 were suggested by others, who think "out of the box". Please tell how one can achieve such ability? And what it takes to achieve it?
There is no box!
Don't make assumptions.
Don't think abstractly.
Don't forget the goal.
Never stop learning.
Be a good programmer, not just a good at [programming language].
Don't assume someone is too inexperienced to help.
A lot of it either comes with practice, or is simply innate: some people are more creative than others. But I think a big part of outside-of-the-box thinking comes from having a breadth of knowledge, and knowing (or having the experience to know) when to apply that knowledge to different problems.
May I suggest Pragmatic Thinking and Learning: Refactor Your Wetware (Pragmatic Programmers) by Andy Hunt.
There's no single answer to this. It helps if you mentally exercise thinking out of the box regularly, even in mundane day-to-day activities.
Reversing Assumptions As one of the many possible approaches, you could try focusing on reversing inherent assumptions of a solution or problem:
You start with the problem. Think of an easy solution, a solution that anyone could think of. Then ask yourself: What are the assumptions underlying this solution? Or what are the assumptions on the problem? Now take one (or several) of those assumptions and ask yourself: what if dropped/reversed this assumption? Or what if instead of directly addressing some requirement, I could satisfy it as a side effect of another solution?
I'm not sure that everyone can achieve such an ability, but here are my suggestions for ways to possibly try to get there, assuming you don't already:
Have an open mind and go out of your way to explore as many options as you can about anything. Use this with life, not just programming.
If you only stick with what you know, you'll never have anything to compare with. If you go out there and explore alternatives you'll start to see other ways of doing things. After time, you start realizing you can find links in unrelated objects. A video game you enjoy might have some feature that you would absolutely love to see in the business application you're working on even if it is totally unrelated. Your microwave might have a really cool configuration setting you'd like to implement.
Learn to see the box
Look at the box and understand its constraints. Consider which of those constraints are actually beneficial to solving the problem, and point out which are either in the way or not necessary.
You might think that the answers mentioning assumptions are exactly the same thing, but I'm not sure that they are. Knowing the realm of the problem is important, too. Once you've got a clear picture of the problem and already considered solutions, you can pick up one piece and and see if other potential solutions come to mind.
Expand your box
You can never think outside of the box which is your own mind. So, keep expanding on what you know and have heard about. Things that may seem uninteresting to other people should hold interest for you. There is almost always some detail that you actually could find unexpected and exciting.
All of these random, insteresting bits of information can come together in odd ways when you are analyzing a problem. You just never know what will happen.
For fun and practice, listen to what people say in normal conversations and see how it would work out both literally and by using alternative meanings for the words they've chosen. This can turn into puns or other entertaining misuses of the language, but it also is a rather frequent way to exercise "thinking outside the box".
Know the Box
Break your Mindset
Think of the problem as:
Start at the Other End
Do Something. Anything
Ask Someone Else
I read somewhere that those who consider themselves creative are the ones who are generally more creative in their work or brainstorming. In other words, it strongly suggests that a creative person is a person who's simply not afraid of thinking differently.
I think a large part of "thinking outside the box" is getting a handle on the problem. If you understand the problem well, you will see that sometimes the wording of the question is misleading or would lead people to think down a very specific path when in fact there remains an obvious solution standing in front of you. The other day there was a question on stackoverflow.com in which a person was attempting to convert a input textbox into a textarea once it reached a certain number of characters (I think it was 10). In his complicated solution, it would carry the 10 characters but nothing that exceeded it, which meant that typing quickly frustratingly removed anything beyond 10 characters.
With his code posted, many people were trying to correct it and provide suggestions to retaining the value. I suggested he retain textarea and forget the textbox altogether, modifying only the attribute rows. I saw outside the box not because I'm such a clever guy but because I tried to understand his objective: make an text input field that grows with increasing text. When you put it that way, it seems silly to start with a textbox and then replace it.
Just my 10 cents. ;)
Since we are adding varying amounts of cents here, I will add some of mine.
There is no algorithm..but here are helpful some activities..
2. Pet Programming Projects
3. Question Everything, Don't be Shy
By solving this puzzle. You must connect all the (equidistant) dots in exactly 4 straight lines:
BTW This was the original out of the box question, because...