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 are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.
If this question can be reworded to fit the rules in the help center, please edit the question.

10 Answers
10

There is no box!
There is a specific problem to solve, and a set of constraints which might apply. Work out what the problem is (think abstractly and in real terms), defining it in both specific topic-based terms, and in more general terms.
Examine each of the constraints (don't make assumptions) to see if, when, and to what extent they might apply. Look at the problem from the perspective of who it affects (don't forget the goal) as well as from behind the scenes.

Don't make assumptions.
If you assume certain things are true when they're not, you'll prevent yourself from examining different perspectives. Also challenge existing decisions/assumptions that others have made - there might be a good reason for it, or there might not, or there was one that no longer applies.

Think abstractly.
Learn to see things as patterns and in abstract terms. When you spot a pattern, consider similar things and see if you can apply actions from it to the current thing. If your subject area has named patterns, learn them - but don't treat them as cookie cutter solutions.

Don't think abstractly.
Always try to see things as they are too - remember that "users" are people, and they're not always logical or rational. Practise empathising with the people using what you create.

Don't forget the goal.
Sometimes it's easy to get bogged down with a particular target/implementation (e.g. "how do we fit these X controls into the UI?") instead of remembering the real goal (such as "how do we allow the user to do Y?")

Never stop learning.
General knowledge can be a great source of inspiration - a lot of problems have been solved by someone already - the more you know the more you might remember something applicable to the current situation.

Be a good programmer, not just a good at [programming language].
Don't be scared to learn multiple technologies and techniques - even multiple "overlapping" languages can help you to see things in different terms, but a good variety of different ones may help more. Of course pick a few areas to specialise/master, but also make sure you have a decent grounding in general concepts, which you can gain by learning multiple different languages,

Don't assume someone is too inexperienced to help.
Sometimes people that appear not very knowledgeable, or that have never programmed, can appear to be useless for a programming problem - but that doesn't mean you should ignore them. Everyone has different perspectives and skill-sets, and might provide a unique insight that spring-boards you to a solution.
Young kids can especially be a good source of an "untainted" perspective that can be inspirational.

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.

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.

Oddball answer:

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".

As one of the three answers relating to assumptions, I want to clarify that's not the most important aspect of my answer - just the first one I was able to articulate. As a partial solution to that, I've prefixed it with a summary-ish type thing, which might suggest we are thinking more similarly than first appeared? (Or perhaps I'm still missing a distinction you're making?)
–
Peter BoughtonNov 16 '10 at 16:23

1

@Peter Boughton: It doesn't appear that we necessarily think differently about this. However, when teaching someone else how to think differently, describing it multiple ways with different emphases is more likely to actually get the concept across.
–
John FisherNov 16 '10 at 16:37

Sure - that's the value of Prog.SE - there doesn't need to be a single accepted answer; and saying the same/similar thing in different ways can be very helpful.
–
Peter BoughtonNov 16 '10 at 16:46

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.

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:

Cognitive Behavior Therapy - This can be similar to "rewiring" one's brain. In my case, I've gotten much more used to see how balanced things can be, to see the other side rather than plow on with what I initially think of something. The book, "Mind Over Mood," has some exercises that can help with this if you want to go down this road. This is used for treating anxiety and depression is how I ran across this topic.

Self-help books - For example, Dr. Phil's first book, "Life Strategies," has exercises that can help to try to unlock how you think and possibly if you do the exercises sincerely and honestly, you may achieve a similar result to one. There may be other books that work here but also quite a few that don't work for some people so it can be a bit of a trial and error to find the few that do work for someone.

Grand amounts of knowledge - For example, how many different sorting strategies do you know? I remember a few taught in school like bubble, shell, quick, heap, and merge, so there is the chance that by absorbing ridiculous amounts of knowledge you could have the list of various heuristics to try to solve a problem. Example of heuristics here would include being greedy, divide and conquer, dynamic programming, and use of specialized data structures. In some cases, just knowing a ton of stuff that be enough to think in a box bigger than someone initially thought. ;-)

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?

Hah, I love the "ask a 6 year old" - that's a great way to change perspective and avoid potential biases one might have. At the very least you'll get an entertaining answer, and it may well be helpful too. :)
–
Peter BoughtonNov 16 '10 at 16:27

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.

Since we are adding varying amounts of cents here, I will add some of mine.
As someone who has consistently been described as an out of the box thinker by many of my clients and peers, here are some tips.

There is no algorithm..but here are helpful some activities..

1. Puzzles
One thing I have always enjoyed is having fun with my brain and doing puzzles. Lots and lots of puzzles, specifically the MENSA variety. Buy yourself a book or two of those MENSA puzzles that require lateral thinking. Don't get frustrated, if you get stuck, read the answer and learn how to solve it. Similar puzzles will have similar solutions, and once you learn how to solve it, you will learn the pattern.

2. Pet Programming Projects
Learn as much as you can about the language that you work in. Make pet projects for yourself and work on them in your spare time. The more you know what's available in your particular language, the more avenues for solution you will have. Take other peoples' code and make it do different things.

3. Question Everything, Don't be Shy
If asking questions makes you feel like you are stupid, then be stupid, no shame in that. Learning comes from admitting you know nothing and wanting to grow. Make sure you know the basics, because the advanced stuff always grows off of that, and if your foundation is not solid, the knowledge you build on top of that will always be flawed in some way.

4. Unexpected
Don't dismiss any fleeting idea you come up with until you know exactly what is wrong with it. The best solutions often come from the most unexpected ideas.