Member-only story

Don’t Just Write Code, Solve Problems

Focus on problem-solving to improve your code skills

Rubik’s Cubes
Photo by Fletcher Pride on Unsplash.

You’ve gotten stuck so many times while coding. We all have. Some hard, nasty problem. Many conditions. Maybe this can be broken down into smaller problems. Maybe some dynamic programming could help. There must be some famous algorithm behind this.

“I know I wouldn’t have a hard time writing this code. If only I had any idea of what code to write.”

After being through this a few times, you start to notice patterns. Little strategies. There’s always some similar problem. A sketch always helps. All of these small things that don’t seem important but end up helping a lot.

Well, it turns out someone discovered and shared most of those “little strategies” a long time ago. In 1954, to be more precise. The man was named George Polya, and he was an amazing mathematician. He devoted a considerable part of his career to figuring out systematic methods of problem-solving, discovery, and invention.

George Polya
Source: Alchetron

I’m not sure if Polya expected 21st-century software developers to read his work, but it has certainly helped me. And I’m sure it will keep being valuable for decades to come.

Here’s what he has to say.

Problem-Solving Is Not a Gift

“Solving problems is a practical skill like, let us say, swimming. We acquire any practical skill by imitation and practice. Trying to swim, you imitate what other people do with their hands and feet to keep their heads above water and, finally, you learn to swim by practicing swimming. Trying to solve problems, you have to observe and imitate what other people do when solving problems and, finally, you learn to do problems by doing them.” — George Polya, How to Solve It

Polya states this quite early in his book, and with good reason. You can't start learning this if you think it is only for some gifted, special people.

Problem-Solving Is Not a Purely “Intellectual Affair”

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Douglas Navarro
Douglas Navarro

Written by Douglas Navarro

Software engineer @Carta | Paulistano | Biker

Responses (4)

Write a response

Excellent post! I'm also a coder who recently read and enjoyed Polya's How to Solve It. Great job showing how his ideas apply to solving problems with code.
I'm also a coding educator. Teaching problem solving explicitly is something we haven't…

12

Great advice. This is a skill a lot developers lack sadly

4

I frequently find myself falling back to something that I learned years ago from an IBMer – ask the question, “what is the problem that you are trying to solve?”
The answer to that usually moves problems in the right direction.

11