Prep: Engineering Readings
How to think like a programmer
programmer = a more effective way for problem solving
solve a problem: a) having a framework
b) practicing it
Problem-solving skills are almost unanimously the most important qualification that employers look for
“The biggest mistake I see new programmers make is focusing on learning syntax instead of learning how to solve problems.” — V. Anton Spraul
Steps to encounter problem:
- Understand
“If you can’t explain something in simple terms, you don’t understand it.” — Richard Feynman
- Plan
Don’t just dive in
- Divide
Connecting all your “sub-solutions” will give you the solution to the original problem
- Stuck?
Debug: Go step by step through your solution trying to find where you went wrong. Programmers call this debugging (in fact, this is all a debugger does).
Reassess: Take a step back. Look at the problem from another perspective. Is there anything that can be abstracted to a more general approach?
Research: Ahh, good ol’ Google. You read that right. No matter what problem you have, someone has probably solved it. Find that person/ solution. In fact, do this even if you solved the problem! (You can learn a lot from other people’s solutions).
PRACTICE (reference: https://www.youtube.com/watch?v=vPEJSJMg4jY)
Solving Problems
be aware of time management
- Read the problem completely twice
most important step can’t do problem without understanding
- Solve the problem manually with 3 sets of sample data
“Nothing can be automated that cannot be done manually!”
- Optimize the manual steps
much easier to rearrange and reconstruct and idea or algorithm in your head than it is in code
-
Write the manual steps as comments or pseudo-code
-
Replace the comments or pseudo-code with real code
Create a list
Sort a list or array
Create a map or dictionary
Loop through a list, or dictionary
Parse strings
- Optimize the real code
REFACTOR
As much as 70% of our time should be spent in steps 1-3
(reference: https://www.youtube.com/watch?v=vPEJSJMg4jY)
The 5 Whys
Sakichi Toyoda, the Japanese industrialist, inventor, and founder of Toyota Industries, developed the 5 Whys technique in the 1930s
The 5 Whys uses “counter-measures,” rather than “solutions”
A counter-measure is an action or set of actions that seeks to prevent the problem from arising again, while a solution may just seek to deal with the symptom
As such, counter-measures are more robust, and will more likely prevent the problem from recurring
when a problem occurs, you drill down to its root cause by asking “Why?” five times. Then, when a counter-measure becomes apparent, you follow it through to prevent the issue from recurring
How to Use the 5 Whys:
-
Assemble a Team
-
Define the Problem
-
Ask the First “Why?”
-
Ask “Why?” Four More Times
don’t stop asking why and breaking it down more don’t look for holistic answer
-
Know When to Stop
-
Address the Root Cause(s)
-
Monitor Your Measures
(reference: https://www.youtube.com/watch?v=vPEJSJMg4jY)
The Super Mario Effect
trick to success in learning, finding right framework, motivation
reframe challenges
(reference: https://www.youtube.com/watch?v=vPEJSJMg4jY)
Questions
- What’s the one thing I bring to this career (and a potential employer) that nobody else can?
I don’t know it know, but I promise I will get back to you with a thorough answer and then some; my motivation of my family and holistic health drive me to be here, passion is great, obsession to improve is better
- What are 3 things I’ll start doing to “un-stick” myself whenever I get stuck on tough piece of code, logic, or feature?
Optimize the manual solution
Write pseudo-code or comments
Replace comments with real code