Hacker News new | ask | show | jobs
by fsmv 1695 days ago
I start at step 1 in the task I'm trying to accomplish. First write the main function then put in the first thing your program needs to do.

I guess I usually have a plan before I even sit at the editor of what I'm going to accomplish with the project. You don't have to know all the classes and data structures you'll need at the start, you will discover it along the way when you find you have data you need to group together or code you need to call in multiple places.

I think of writing code like writing a list of instructions to tell the computer how to do something. The natural place to start is step 1. Then of course you can start roughing out the major steps in order and filling in the details once you have something you can run and start testing parts with (either manually or automatically).