Whenever I've come up with a new idea of something interesting to code, it has always been the "Eureka!" moment type deal. How do you come up with great programming ideas, and if you are having trouble coming up with something, how do you get past that block?
Sleep on it.
Honestly, when I'm stuck with a problem, the best thing I can do is go to bed early. Often the solution will come to me during the night.
I usually come up with ideas based on scratching an itch. That is, I will be doing something and suddenly think "Oh, this would be so much easier if I had a tool to do it for me".
As soon as I have an idea, i write it down. It may happen at all time.
As soon as I have a little spare time, I think about my ideas and elaborate them.
I already have enough ideas for the next years, so i'm not worried about beeing troubled by not having any :)
Look into areas where you or others are experiencing pain in doing something essential or the inability to do something essential or fun and think of ways to make it better.
Every time I have hit a road block type problem I have found the only way around it is to walk away from the PC and do something else. You can do anything as long as it requires no thought and doesn't involve a PC in anyway. I usually go walking or do some gardening and find that the solution to the problem just pops into my head.
I tried to use ideas from the "Cracking creativity" book with varying degrees of success. My favorite is mind-mapping.
Read, read, and read some more. As you start to learn about different algorithms and data structures you'll suddenly start noticing where they can be used to model real-world data and interactions, and it's only a matter of time until this insight leads you to a decent idea that hasn't been done before.
If I'm struggling to work a solution out I'll flick over to my blogs and have a browse through them, not looking for anything in particular just to refocus my mind (admittedly now I go here :P).
I'm also a huge fan of the Teddy Bear principle (http://compaspascal.blogspot.com/2007/12/teddy-bear-principle-in-programming.html), the number of times just saying the problem out loud has saved me hours in my head!
The usual things that help creativity apply here:
Some amount of free time that allows you to think about the subject. Walks and showers are the classical examples. Some people mark themselves as unavailable for a few hours / week on their calendars and use that time to just be still.
Talking to other people and explaining your ideas and problems will help you crystallize them. Don't eat alone, go for a coffee with your coworkers or perhaps the pub after work.
Most things are easier when you're relaxed. If you learn some exercises to help you relax, you can dig your self a mental pothole when everyone else is running around like headless chickens.
You can of course mix and match. Try walking and talking with a friend at the same time =)
I also recommend other ideas in the thread, such as writing your ideas down and the old classic, "sleep on it".
Getting inspiration is a pretty simple process for me:
- get as much information about your problem as you can. Read everything you can get your hands on!
- juggle those facts around in your head for a while, play with them. Any way will do, just get to know them a little better.
- give your mind a chance to subconsciously process the information. Take a walk, go to sleep, meditate. Be careful not to distract your mind, so don't watch TV or read a book. You want your subconscious to process the information, not the latest soap!
- be open to whatever will pop into your mind about this, ponder the stuff that bubbles up, think about it, juggle the facts with it.
- Take your time. If you put yourself under pressure it will take longer. Best is to be relaxed and open.
- Be in the present: don't stress out about yesterday, don't fret about tomorrow. This is useless and will just distract you from the stuff you need ideas about.
Have fun!
Are you asking about ideas for solving problems or ideas for new applications?
When I'm looking for a new project to code I always ask the same question: What problems do I have? Which ones can be solved with a computer? - And that's the starting point.
Ideas for solving problems are both easier and harder. The key thing for me is to talk it out with another coder. Sometimes they already have an idea because they've solved a similar problem - but most of the time the simple act of talking about it forces me to organize my thoughts and thus reveals potential solutions.
In my case, I would say that there's a when I come up with new ideas before the how I come up with the new ideas. The when is generally the situation where I have some task at hand which could be solved easier (or faster or efficiently) if I write a tool or program. I find that new ideas come up from seeking a solution for a problem rather than a solution seeking a problem.
As for what to do if I am stuck with a problem at hand, as previously mentioned by pb, I also find that taking a shower really gives me time to think, get inspired, and seriously digest ideas so I can start coding when I get out.
Another time I really get new ideas is when I'm riding the bus or train and looking out the window to see the watching the buildings move by. I guess being away from the computer for a little bit and letting my mind think without distractions really helps me out.
To me it's not sitting down and trying to come up with ideas, that usually results in frustration. Instead, focus on learning and continuous improvement and keeps your eyes and ears open. If you keep improving your knowledge and skill set and pay attention, there are likely going to be lots of situations where you'll be able to connect problem A with solution B.
Watch yourself and others! You will get new ideas.
Meaning, watch what is that task which is taking too much time, what is that task which is not easy to do? what is that thing that frustrates you too much? what is that thing that you are forced to do manually?
Also, when you read more, learn more, ask people more questions, there are high chances of getting ideas.
Just to jump in on this one, but I've found that surrounding yourself with other innovators and those full of ideas is a great way to get the engine running after a stall. I have a good friend who, despite his impossible ideas, is a great inspiration and motivator. I can't think of one time when he's given me a call and I didn't immediately have a new, or improved idea for a product or concept.
Contact of any kind with innovation is contagious. Chances are, if you're stuck, you've either been doing the same work too long, or thinking far too much. Reach out, ask others their opinion especially if they have no idea what it is you're trying to create. Those are the best judges, as they're opinion is fresh and well, innovative.
If Google doesn't help at all and I'm at the end of line (also past walking around, drinking coffee and eating chocolate) I usually try two things:
- Vizualise the problem: draw some boxes and arrows and little people an a piece of paper until I get a good spatial idea of the problem
or if this doesn't work:
- I start to play with a small set of Lego I've alway got on my desk. Fussing around with it helps me to deconcentrate, to get my subconsciousness come up with an idea.
For me ideas tend to be about and evolution of past ideas.
- We solve one problem, get the job done and then come back and see how it can be even better.
- Listening to user feedback, sometime a comment spurs a new idea.
- Reading ... lots and lots of reading ...
- looking for the connections between things unrelated.
Then sometimes ... they just come when I'm in the shower
Spend more time in the bath, it's a very creative environment. Close your eyes, relax and let your thoughts fly...
try to learn how to communicate with your subconscious mind
tease it with numbers, shapes and sounds that are not related. try to do silly matches between things, and usually the great idea is a silly one at a first glance.
moreover, you have to provoke the idea with the problem, usually our minds work to solve problems not to get ideas out of nowhere. so try to find problems and your mind will automatically work on solving it.