How to Know What to Code - Recursive Descent-Style Development

If you're programming something you already have experience with, it is usually best to plan ahead. But when you're programming something for the first time, where do you start? This is the question I faced when creating my first game engine from scratch, and, as I usually do, I answered it in the simplest way I could think of: start at the beginning, and make everything I need when I need it.

Don't ask questions like, "will I need X?", or, "how do I make this system generic?" Instead, ask: "What is the specific program I'm trying to make, and what does it need first?" When Thing A needs Thing B, code Thing B right away, then return to Thing A. Eventually, one piece at a time, you'll assemble everything you need for your program. Here's a sample of how it went for my first from-scratch game, Grapestomper Rescue:

And so on. You can imagine how it went when I needed to add sound and music! Or maybe you can't... I ended up creating my own GUI music creation program from scratch! In hindsight, that wasn't the fastest way to get a game made - but it was a great experience. However, the Path will not be requiring that particular diversion.

Lastly, remember: recursive descent is how I program things when I don't have enough prior experience to plan ahead.