I'm relatively new to programming and trying to understand how developers organize their thinking when facing an unfamiliar problem. For example, suppose a program needs to accept a time such as 12:13 and print it in the terminal using ASCII art that imitates a seven-segment display. I can imagine using arrays, dictionaries, lookup tables, or hard-coded conditionals, but having so many possible approaches makes me feel overwhelmed. Is there a general process or checklist you use to break a problem down, choose an approach, and decide when a solution is good enough?
5 Answers
You can work from both directions. Top-down, imagine the main operation and give names to the helper functions it needs, such as readTime, renderDigit, and printDisplay. Bottom-up, implement and test the easiest pieces first, perhaps drawing one digit or even just the digit 8. Gradually connect those pieces until the complete program works.
The input-process-output model is a useful starting point. Identify what the program receives, split the processing into small operations, and define the desired output. Here that might be: read and validate the time, separate its digits, look up the display pattern for each digit, combine the patterns into rows, and print them. Think of each step as a small building block that can be connected to the next.
Start by decomposing the problem into small, testable steps. For this example, you could assign names to the seven segments, map each digit to the segments it uses, decide how one segment is drawn, and then build the terminal output one row at a time. Each piece is much easier to reason about than the entire display at once.
For a new problem, it’s fine to choose a reasonable first approach and implement it before worrying about finding the perfect one. Once something works, you’ll understand the problem better and can compare alternatives. A lookup table is probably clearer than many nested conditionals for the digit patterns, but the important thing is to get a clean, working version first rather than optimizing prematurely.
Efficiency matters when the input is large or performance is important, but for a tiny display program, clarity and correctness are usually more valuable. Consider optimization after you know there’s an actual bottleneck.
A helpful framework is computational thinking: decomposition, pattern recognition, abstraction, and algorithmic thinking. Break the task apart, notice repeated structures such as the shared seven-segment layout, ignore details that don’t affect the current step, and write a sequence of operations. Practice is what makes these patterns easier to recognize, so experimenting with a few implementations is part of learning rather than a failure.

This is often the key difference between beginner and experienced developers. Large tasks become manageable when they’re divided into independent pieces, and you can save or test your progress after each piece.