Problem solving strategies - 401-advanced-javascript-jv/seattle-javascript-401d30 GitHub Wiki

Computer science involves solving problems. Practically everything involves solving problems, but computer science exists to solve repetitive problems in ways that are more efficient than solving those tasks manually. Because this is such an important concept, being able to solve a difficult problem, large or small, is critical to success. Luckily, solving problems is a process that can be learned.

The basic premise behind solving any large problem is to try and break it down into smaller pieces, more and more, until you feel comfortable with solving a single piece. If solving a piece of the problem feels like falling down a rabbit hole, then the problem needs to be broken down into smaller pieces. If a small piece is still too complex, then the small piece should be simplified, step by step, until it becomes manageable.

Once the smallest, simplest issues get fixed, the complexity should be added back until the original problem re-emerges. By then, the solution should simply be a matter of combining all the smaller pieces into a cohesive whole. It may not be the most efficient or pretty, but code can be refactored to look and work better, and give the final product a more polished feeling.