?

Log in

No account? Create an account
 
 
24 November 2015 @ 09:41 pm
How to solve problems  
Here's relatively simple algorithm to solve problems:
1) Understand problem.
2) Consider possible solutions.
3) Test if solutions work.
4) Apply the best solution.

All steps are important. If you skip a step then you are very unlikely to solve the problem.

Unfortunately most people can not consistently apply that algorithm when they try to solve hard problems.

For example, weak programmers are trying to find solution to a bug without getting clear understanding what the bug is.
They skip to the step 2 and start considering possible solutions to the bug. But they are not able to test if their solutions work, because they do not understand what was the bug is in the first place.
 
 
 
rezkiy on November 25th, 2015 03:10 am (UTC)
Dunning-Kruger prevents non-experts from understanding whether they understand the problem or not.
журнал закрытjuan_gandhi on November 25th, 2015 04:19 am (UTC)
Oh shit. It's a metaproblem.
(no subject) - gineer on November 25th, 2015 04:03 pm (UTC) (Expand)
(no subject) - gineer on November 26th, 2015 01:39 pm (UTC) (Expand)
(no subject) - dennisgorelik on November 27th, 2015 01:27 am (UTC) (Expand)
(no subject) - gineer on November 27th, 2015 08:13 am (UTC) (Expand)
(no subject) - dennisgorelik on November 27th, 2015 09:28 am (UTC) (Expand)
(no subject) - gineer on November 27th, 2015 10:10 am (UTC) (Expand)
Dennis Gorelikdennisgorelik on November 25th, 2015 06:37 am (UTC)
That's true: Dunning-Kruger is a major contributor into making non-expert to skip "Understand the problem" step.

My frustration though is about the case when junior uses my help inappropriately:
Instead of carefully checking with me if his understanding of the problem is correct, junior is starting throwing crazy suggestions that do not make sense.
So time is wasted, problem is not solved and junior still has no understanding of the problem.
gineergineer on November 25th, 2015 04:03 pm (UTC)
журнал закрытjuan_gandhi on November 25th, 2015 04:18 am (UTC)
Hmm... can you solve P=NP? Start with understanding the problem. Apply the best solution.
Dennis Gorelikdennisgorelik on November 25th, 2015 04:54 am (UTC)
If I try to solve P=NP I would exactly start with understanding the problem.
And would not just to the step of suggesting solutions until I understand the problem.
So, since I did not complete step 1 and am NOT going to waste time on steps 2, 3, and 4.

Does it make sense?
(no subject) - juan_gandhi on November 25th, 2015 05:37 am (UTC) (Expand)
(no subject) - dennisgorelik on November 25th, 2015 07:31 am (UTC) (Expand)
(no subject) - juan_gandhi on November 25th, 2015 05:44 pm (UTC) (Expand)
(no subject) - dennisgorelik on November 25th, 2015 09:26 pm (UTC) (Expand)
(no subject) - gineer on November 28th, 2015 01:15 pm (UTC) (Expand)
(no subject) - dennisgorelik on November 28th, 2015 04:57 pm (UTC) (Expand)
(no subject) - gineer on November 28th, 2015 05:34 pm (UTC) (Expand)
(no subject) - dennisgorelik on November 28th, 2015 06:21 pm (UTC) (Expand)
(no subject) - gineer on November 28th, 2015 05:38 pm (UTC) (Expand)
(no subject) - dennisgorelik on November 28th, 2015 06:25 pm (UTC) (Expand)
(no subject) - gineer on November 28th, 2015 01:11 pm (UTC) (Expand)
(no subject) - gineer on November 25th, 2015 04:08 pm (UTC) (Expand)
VoidExvoidex on November 25th, 2015 04:54 am (UTC)
How to understand whether you understand problem or not?
Dennis Gorelikdennisgorelik on November 25th, 2015 05:03 am (UTC)
> How to understand whether you understand problem or not?

1) Talk with people who complain about the problem:
- Express problem in your own words.
- Ask other people if your explanation is correct.

2) Talk with experts in that space.
- Express problem in your own words.
- Ask experts if your explanation is correct.

3) Explain the problem to yourself.
Ask yourself if that explanation is correct.

There is no guarantee that your explanation is complete, of course.
If you cannot suggest possible solutions, then your understanding of problem is not sufficient.
So go to step 1.

If solutions that you suggest do not work - then your understanding is not complete, so you are back to step 1.

Does it make sense?
(no subject) - voidex on November 25th, 2015 05:17 am (UTC) (Expand)
(no subject) - dennisgorelik on November 25th, 2015 05:45 am (UTC) (Expand)
(no subject) - gineer on November 25th, 2015 04:24 pm (UTC) (Expand)
(no subject) - dennisgorelik on November 25th, 2015 07:34 am (UTC) (Expand)
Yaturkenzhensirhiv - a handheld spyyatur on November 25th, 2015 05:39 am (UTC)
Well, if we talk about software bugs, your meta-algorithm is correct. Many people indeed refuse to follow it. On the other hand, refusing to follow it may be exactly their goal: in our company a very popular method of investigating bugs is "I turned off feature X and the bug disappeared. Therefore, it must be a problem with feature X, so I will simply assign it to the team that designed feature X, and now it is their problem.".

But I digress. For more complex problems, you may run into trouble even with step 1 (do I really understand the problem), not evening mentioning step 3, as testing a solution may actually create much bigger problem than the one you were trying to solve.
журнал закрытjuan_gandhi on November 25th, 2015 05:50 am (UTC)
Right. Write a function f, in c, that takes an int x and returns f(x), such that f(f(x)) = -x.
Easy, eh.
(no subject) - yatur on November 25th, 2015 05:51 am (UTC) (Expand)
(no subject) - juan_gandhi on November 25th, 2015 05:55 am (UTC) (Expand)
(no subject) - yatur on November 25th, 2015 06:03 am (UTC) (Expand)
(no subject) - yatur on November 25th, 2015 06:41 am (UTC) (Expand)
(no subject) - rezkiy on November 25th, 2015 06:22 am (UTC) (Expand)
Dennis Gorelikdennisgorelik on November 25th, 2015 07:13 am (UTC)
> do I really understand the problem

Just answer these questions:
1) How properly working system looks like?
2) How incorrectly working system looks like?
3) What are the differences between properly working system and incorrectly working system?

That does not guarantee full understanding, but it allows you to start producing meaningful suggestions and evaluating them.

> testing a solution may actually create much bigger problem

These are special cases which need to be resolved individually (use different testing techniques). In any case, issues like that do not prevent us from using "understand problem -> generate idea -> test -> solution" approach.
pr_xpr_x on November 25th, 2015 05:40 am (UTC)
Nature is famous for solving problems without understanding.
It tries intensively and selects the best
Dennis Gorelikdennisgorelik on November 25th, 2015 05:51 am (UTC)
Good point. Nature is good at solving problems like that.

However "brainpower" of nature is many orders of magnitude bigger than brainpower of humans.
Our thinking algorithms must be much more efficient in order to successfully compete with nature.
vit_rvit_r on November 25th, 2015 06:47 am (UTC)
5) if the "best solution" was wrong, return to the step 2)
Dennis Gorelikdennisgorelik on November 25th, 2015 07:14 am (UTC)
Or return all the way back to step 1 (re-understanding the problem).

Edited at 2015-11-25 07:15 am (UTC)
(no subject) - vit_r on November 25th, 2015 07:53 am (UTC) (Expand)
(no subject) - dennisgorelik on November 25th, 2015 08:57 am (UTC) (Expand)
(no subject) - vit_r on November 25th, 2015 09:55 am (UTC) (Expand)
(no subject) - gineer on November 26th, 2015 01:39 pm (UTC) (Expand)
(no subject) - vit_r on November 26th, 2015 01:43 pm (UTC) (Expand)
(no subject) - gineer on November 26th, 2015 01:46 pm (UTC) (Expand)
(no subject) - vit_r on November 26th, 2015 01:49 pm (UTC) (Expand)
(no subject) - gineer on November 26th, 2015 01:53 pm (UTC) (Expand)