Hacker News new | ask | show | jobs
by username90 1949 days ago
> Hammering away at a hard problem usually makes a big mess

How can this be? Did you never learn how to use source control? Coding is the best way to explore the solution space, doesn't mean you use whatever you write right now.

4 comments

Coding is a good way to explore the solution space, but not the best or only way.

My current guidelines for myself are

1. Take a few minutes (or hours, depending on problem size) to write a clear plan for a proof of concept. What's the terrible, crappy, bare minimum that shows your goal is feasible?

2. Run that document past another person. See if they can simplify the plan for you or find things you overlooked.

3. Hack out the POC.

4. Run the POC past a real person. See if they catch issues in your approach that would be blockers in a production version and resolve them if possible.

5. Write the spec for the actual feature/program based on what you learned from the POC. It doesn't need to be super-detailed or perfect; it just needs to capture the lessons you've learned and give a clear direction for building the real thing.

6. Run the spec past another person. Incorporate their feedback.

7. Write the production version.

This works out pretty well if you keep your specs as plain text in the project repo. You can do the whole process with a standard code review flow.

Code tends to be a liability rather than an asset.

A no code solution to a problem tends to be better than one with code

For me, coding is a great way to explore the solution space when you're down to the last few details. Because coding is implementing a concrete solution, exploration in code tends to only cover a very small subset of the real solution space. On the other hand, if I take a few steps back and look at the problem from a wider angle, I can often find a solution that is both better for everyone and easier to implement.
Code forces you to solve all the details. If (you think) you're close to a solution, sure, then yes, hammering away is a good thing.

But if you're still at the big picture level, code is a horrible way to express that. It inevitably takes you into the weeds.