Here's my process.
1. When I should be focusing on something else, I come up with a "brilliant" idea for a game or program.
2. I get in notes on my phone and type out everything I see in my head.
3. I speak it out loud. If it sounds like garbage, it probably is.
4. I see if it would be feasible to make. If the answer is no, you're probably wrong. There's not much a programmer can't do. You might just have to learn some new skills.
5. I get on Google Docs and plan it out in greater detail. The rule is, if you don't write it down the second you think of it, it is almost definitely NOT going to make it into your final product.
6. I pitch the idea to my friends. If they're interested, I make my Google Doc public and send them to the link.
7. I head into Eclipse for Java or Notepad++ for Php or Construct 2 and make it happen.
Rarely do my ideas ever come from just tinkering.