Class one reading notes
code 102 notes
Class one reading notes
How to solve programming problems
Common mistakes
- improper allocation of time
- understand the problem before writing code
- keep it simple
- 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.
Read the problem completely twice
- most important step
- read the problem many times when necessary
- if you can’t understand the problem you can’t solve it
- nothing can be automated that cannot be done manually
How to think like a programmer — lessons in problem solving
- Understand
- Plan
- Divide
- Stuck? Practice.
5 Whys: Getting to the Root of a Problem Quickly
- used for troubleshooting, quality improvement, and problem solving
- Counterintuitively, 5 whys involves seven steps:
- assemble the avengers
- define the problem if you can
- ask the first why: why is the problem occurring?
- For each answer generated during step 3 ask ‘why’ four more times - not unlike a child who asks why repetitively
- Unlike the child, know when to stop asking why
- the five in 5 whys isn’t really important
- go further than assigning blame
- develop countermeasures
- Address the Root Cause(s)
- Monitor your measures
Lecture Notes
Node Runtime
- Runtime is a place for code to run
- most of the time JS runs in the browser
- somethings can be done only in the browser, some can be done in node
- Node has different concerns than the browser
- Node gives the developer a lot more power
- What is my computer doing (and other machines) > what is the browser displaying