Reading-Notes
code fellows 401
Read: 00 - Prep: Readings … Get Ready for 401
Reading
Solving Problems
Here’s a programmers guide to solving problems.
- Read the problem completely twice.
- Solve the problem manually with 3 sets of sample data.
- Optimize the manual steps.
- Write the manual steps as comments or pseudo-code.
- Replace the comments or pseudo-code with real code.
- 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
1. Understand
- Know exactly what is being asked.
- You should be able to write, draw or explain a problem so that it makes sense to someone else
- Rubber duck method - when you explain the code to an in-animate object, like a rubber duck.
2. Plan
- Write down the steps in order to solve a problem.
- This gives your brain time to think and proccess the information.
- Write it down in comments if you want.
3. Divide
- Create sub-problems.
- Sub-problems do not rely on other sub-problems to be solved.
- Connect the dots when done.
4. Stuck?
- Debug: go through a problem step by step
- Reassass: look at the problem from a diffrent perspective
- Research: basically means to just Google it
- Caveat:
5 Whys
- Assemble a Team
- find people who are familiar with the specifics of a problem
- Define the Problem
- Create a problem statement
- Ask the First “Why?”
- Ask why the problem is occuring
- Ask “Why?” Four More Times
- Ask why the previous explanation occured
- Know When to Stop
- Find the root cause
- Address the Root Cause(s)
- Discuss counter measures
- Monitor Your Measures
- See how well your counter measure works