Your programming roadmap

In large part, programming is problem-solving. We take something that’s ambiguous and complex, break it down into small pieces, and figure out how to get these pieces to work together.

Consider using the apply first, study second approach with the resources below: try a problem or exercise from the Apply It section first. If you get stuck, then use a course, book, or lecture in the Reference section. Or if you’re completely new to a topic, then learn just enough and apply right away. The point is: the quicker you get to the “doing,” the better the learning. Make your learning active.

It’s important to consistently solve problems as you progress throughout the Pyramid. Problem-solving is a skill that takes time to build, and is essential to our craft. So make problem-solving a daily habit. The resources below will get you started.

Brian Hogan’s electronic book, Exercises for Programmers will give you lots of practice on various programming topics. I mention it a few times throughout the Pyramid, but here I want to highlight this problem-solving benefit: Hogan offers one or more challenges and constraints for each problem. That means, you can solve the same problem multiple times and gain new insights each time through. This is useful to do to expand your knowledge and your comfort zone.

You should also check out these platforms: Exercism and LeetCode. For both resources, you can create an account, then solve problems in the language of your choice. You can also filter problems by topic and by difficulty. Exercism is free, and many of the problems on LeetCode are free.

"Every artist was first an amateur."

-Ralph Waldo Emerson

Tip: If you’re newer to programming, consider this progression: Exercises for Programmers, Exercism, then LeetCode. I’ve found that some problems labeled as “easy” in Exercism are a bit easier than the “easy” problems in LeetCode.

But don’t let your problem-solving process end by only solving the problem. That’s just half of the battle. The other is learning from it: study solutions of others who’ve solved the same problem. This is why I really like Exercism and LeetCode: both offer solutions from others. Once you’ve solved a problem, see “View Community Solutions” in Exercism and the “Discuss” tab in LeetCode.

Tip: Get the problem working on paper first, before you start typing out lines of code.

Solving math problems is a great way to get problem-solving practice. Athletes cross-train, by biking or swimming, in order to push their cardiovascular system in a different way. Likewise, by solving math problems we push our minds in a different way.

I highly recommend the Art of Problem Solving series as a math resource. What I like best is its emphasis on solving problems, instead of memorizing formulas. There are books in this series for people of all levels. Here’s one to consider: The Art of Problem Solving, Volume 1: the Basics by Sandor Lehoczky and Richard Rusczyk. Project Euler is another resource if you enjoy programming challenges that involve math.

How to Solve It by George Pólya is a must-read. In it, Pólya distills the problem-solving process in a systematic way. Although he writes through a mathematical perspective, the principles are timeless and easily applicable to programming. If you’re not up for reading the book, then check out Berkeley’s summary of Pólya’s main ideas or this summary on Wikipedia.