HACKER Q&A
📣 throwaway-c7449

How to avoid brute force problem solving?


Dear HN,

Relatively young programmer here. When I encounter difficult problems, I find myself brute forcing solutions in the form of trying different approaches rapidly until I get the result I want. Maybe this is happening because subconsciously I'm trying to preserve the flow I'm in, but I really don't like this state of mind.

I want to be able to slow down and understand the deeper details instead of rushing towards solutions. But in the heat of the moment, it's really hard to steer myself away from a tight feedback loop.

As a side note, I'm aware of countless programmer memes which depict similar behavior i.e. "choosing X hours of debugging instead of reading 2 pages of documentation". So maybe I'm not the only one. Do you experience similar issues? And if so, how do you manage to get out of this mindset and just push yourself towards learning more and getting better?


  👤 fuzzfactor Accepted Answer ✓
Two things in my experience.

In the scientific research lab it's sometimes said that "6 months of research will save you hours of time in the library".

OTOH, it can be helpful if you can position yourself so what requires brute force for others becomes a breeze because of your realigned approach.