I’ve been thinking about whether it’s better to plan everything out before I start coding—or just dive right in. Personally, I tend to figure things out as I go. When I'm working on front-end projects, I usually have a clear vision for how I want the webpage or CSS layout to look before I write a single line of code. But beyond the visuals, I mostly jump straight into building.
Looking back, I realize there have been times when stepping back and planning things a bit more could have saved me hours of rework and debugging. Still, there's something about the spontaneity of coding on the fly that feels natural—almost like solving a puzzle in real time.
This internal debate reminded me of an insightful passage from Hackers and Painters by Paul Graham:
“For example, I was taught in college that one ought to figure out a program completely on paper before even going near a computer. I found that I did not program this way. I found that I liked to program sitting in front of a computer, not a piece of paper... Instead of patiently writing out a complete program and assuring myself it was correct, I tended to just spew out code that was hopelessly broken, and gradually beat it into shape... If I had only looked over at the other makers, the painters or the architects, I would have realized that there was a name for what I was doing: sketching.”
That really struck a chord with me. It reframed my messy, iterative approach to coding as something more creative and fluid—like sketching an idea rather than engineering a machine from a rigid blueprint.
So I’m curious—what’s your approach?
Do you follow a specific structure when you code?
Do you map everything out beforehand, or do you figure it out as you write?
Top comments (2)
🔥🔥🔥
I directly jumps on my pc to start writing
But when I opens editor, I start blueprinting/thinking what I've to do, what I can do, how can I do and based on that a small structure I've in mine I start coding
Amd on the way it gets updated