Coding Tip: Starting on a Problem

Coding Tip: If you're working on a particularly large problem/feature/technical challenge, step away from the computer.

Go for a walk, wash the dishes, sweep the floors - occupy yourself with something fairly routine and automatic, and just think through your problem.

If you're overwhelmed and not sure where to start, try this:

  1. What does your output need to look like? (Output could be the return value of a function, the output of your application, or the UI)
  2. Does your output need to look like that? (Reframe your problem, and spend time thinking of how you might make the problem easier if the output were different from #1)
  3. Think of your input(s), and again ask: could you use more inputs, less inputs, or a different kind of input altogether? (Inputs can be function parameters, user input, etc.)
  4. Now, work outside-in, top to bottom: You have your input, what's the first thing you need to do to get the inputs in the right state? Should you filter? Should you clone the array? Enrich? Supplement? Aggregate? Convert data types?
  5. Visualize the problem: use something physical as your inputs, or draw boxes on a paper. Show your output below it. Go through the motions of changing your inputs to your outputs.
  6. Pause. Take a step back - i.e. on step earlier in the process, and one step later in the process. Reframe again. How else could you do it, if the earlier/later steps looked different?

Reframing is an incredibly valuable tool - sometimes we skip it, sometimes we just do it subconsciously, but it's important to consciously reframe.

Spend time asking how this piece can contribute and so that the whole is larger than the sum of its parts.

Popular

Let's Clear Up The Ambiguity!

Work Experience vs Professional Experience

FAQs for a Software Engineering Hiring Manager

7 Steps to Writing an Amazing Resume

7 Steps to Building your Portfolio MVP