reading-notes

Reading notes for CodeFellows Coding

View project on GitHub

Pre-work reading

Resources:

  1. Solving Problems
  2. How to think like a programmer
  3. The 5 Whys

How to Solve Programming Problems

Common mistakes:

  • Trying to start writing code as soon as possible
  • Trying to over solve the solution on the first iteration

Set of steps to solve programming problems:

  1. Read the problem completely twice.
  2. Solve the problem manually with 3 sets of sample data.
  3. Optimize the manual steps.
  4. Write the manual steps as comments or pseudo-code.
  5. Replace the comments or pseudo-code with real code.
  6. Optimize the real code.

How to think like a programmer

“Everyone in this country should learn to program a computer, because it teaches you to think.” — Steve Jobs

The best way to solve problems involves:

  1. Having a framework.
  2. Practicing it.

Framework:

  1. Understand it
    • Know exactly what is being asked. Most hard problems are hard because you don’t understand them.
    • Write down your problem, doodle a diagram, or tell someone else about it.
  2. Plan it
    • Don’t dive right into solving without a plan. Plan your solution!
    • Give your brain time to analyze the problem and process the information.
  3. Divide it
    • Do not try to solve one big problem.
    • Break it into sub-problems, then, solve each sub-problem one by one. Begin with the simplest.

If you are stuck…

  • Debug
    • Go step by step through your solution trying to find where you went wrong.
  • Reassess
    • Take a step back. Look at the problem from another perspective.
  • Sidenote
    • Another way of reassessing is starting anew. Delete everything and begin again with fresh eyes.

5 Whys technique

5 Whys technique (sometimes known as 5Y) is a simple but powerful tool for cutting quickly through the outward symptoms of a problem to reveal its underlying causes, so that you can deal with it once and for all.

Sakichi Toyoda, the Japanese industrialist, inventor, and founder of Toyota Industries, developed the 5 Whys technique in the 1930s

How to Use the 5 Whys:

  1. Assemble a Team
    • Gather together people who are familiar with the specifics of the problem, and with the process that you’re trying to fix.
  2. Define the Problem
    • Observe the problem in action. Discuss it with your team and write a brief, clear problem statement that you all agree on.
    • Write your statement on a whiteboard or sticky note, leaving enough space around it to add your answers to the repeated question, “Why?”
  3. Ask the First “Why?”
    • Ask your team why the problem is occurring.
    • Search for answers that are grounded in fact: they must be accounts of things that have actually happened, not guesses at what might have happened.
  4. Ask “Why?” Four More Times
    • Each time, frame the question in response to the answer you’ve just recorded.
  5. Know When to Stop
    • Stop asking why when the responses are no longer useful
  6. Address the Root Cause(s)
    • If you identified at least one root cause, you need to discuss and agree on the counter-measures that will prevent the problem from recurring.
  7. Monitor Your Measures
    • Keep a close watch on how effectively your counter-measures eliminate or minimize the initial problem.

<== Back to ReadMe