HACKER Q&A
📣 lazerbraid

How to be better at problem solving


Sometimes I feel like my approach to solving a problem while programming is not much better than a “guess and check” method where I write some code, see if that part works, and then continue on. Most of the time I feel like I am playing chess where I am only able to think about my current move and maybe the next one or two beyond that, which can lead to frustration when I see that I have made a mistake or an error in design choice that needs to be fixed. This is especially made evident to me in stressful situations like interviews where I feel like my critical thinking abilities take a big hit and I’m left making silly mistakes or overlooking something until later in the interview.

As a child, there was a lot of pressure placed on me to excel in subjects that did not come easily to me such as math and I often wonder if my brain has been conditioned to try to shut down when I encounter problems that I’m unsure how to solve at first glance as some kind of a protection mechanism, despite the fact that in general I am someone who gets great satisfaction out of solving difficult problems or figuring something out.

It seems like some people have an innate ability to see more steps ahead than I usually do, and therefore can move faster and spend less time guessing and checking their work. I think that by improving my general problem solving ability and being more deliberate about how I choose to go about solving things that this will improve with time, so I am wondering if anyone has helpful tactics outside of just programming more that may help me out here.


  👤 ColinWright Accepted Answer ✓
The classic work in this area is Polya's "How To Solve It"[0], but there are quite a lot of books and articles out there on problem and puzzle solving.

What searches have you tried? What articles or books have you read?

You can also try books of puzzles. Not things like Sudoku, but things like Martin Gardner. And don't just skim them, use them as a study resource ... try to understand the ideas and approaches being used in each puzzle.

Without knowing you better it's hard to make more specific suggestions or recommendations. but like learning a language, getting better at problem solving will take time and deliberate effort.

[0] https://en.wikipedia.org/wiki/How_to_Solve_It


👤 ggm
Many solutions emerge from analogizing. Including finding out the analogous model is not as good as you think.

So try improving your "what does this remind me of" thinking.

Many solutions emerge from a change of phase space. If your natural solution is numeric try graphical approaches from time to time. If you think in 2D try some kine of move analogous (ha) to shifting to the frequency domain model.

Talking is good. Whiteboarding is good.

I solved some problems around 1999 using a tape sort algorithm from 1978. No tapes involved. It's just happened to be a good fit for the problem.

Learn how to use Fermi number thinking. Gross approximations can be helpful for estimating all kinds of things including complexity


👤 ssss11
Try learning about critical thinking skills. You could probably practice working through problems and solution trade offs in your spare time. Strategic games like chess may also help.

👤 noobdev9000
Increase IQ