Fireship on YouTube · Open on YouTube
Foundations: programming and problem solving · Novice · Lesson 9 of 98 · 11 min video, then about 9 hours of practice
Problem solving: breaking a problem down before writing code
After this you can take an unfamiliar problem, restate it, work small examples by hand, and write a step-by-step plan before coding.
Why it matters
This is the skill that separates people who can program from people who know a language. Faced with a blank editor, beginners start typing; working engineers first make sure they understand the problem, try examples by hand, split it into smaller problems they already know how to solve, and only then write code. Practise the routine deliberately: restate the problem in your own words, write three input and output examples including an edge case, write the steps in plain language, then translate the steps into code. When stuck, solve a simpler version first. Trap: looking up a solution the moment you are stuck. Give yourself twenty honest minutes first. Being stuck and getting unstuck is the skill.
How to use this resource
From 2020 but the method is timeless and it is short enough to rewatch.