Skip to content

Prep: Engineering Topics

all1124 edited this page Sep 28, 2019 · 3 revisions

Prep: Engineering Topics

Steps to follow when solving a problem

  1. Read the problem completely twice.
    • Make sure you completely understand the problem
    • Can you explain the problem to someone else?
  2. Solve the problem manually with 3 sets of sample data.
    • When you are solving the problem manually, recognize what your brain is going to solve the problem
    • Write out everything that is going on in your head
  3. Optimize the manual steps.
    • Figure out if there is another way you can solve the problem easier, or if there are some steps you can cut our or simplify
  4. Write the manual steps as comments or pseudo-code.
    • Capture all the steps we created and now either put them into our editor as comments or write them as pseudo-code that we can translate to real code
  5. Replace the comments or pseudo-code with real code.
    • Take each comment and convert it into a real line of code.
  6. Optimize the real code.
    • Take a look at your code and figure out if you can cut out a few lines or do something simpler.
    • Make sure all your variables are named with meaningful names

How to think like a programmer

  1. Understand
    • Know what is being asked
    • Write down the problem, make a diagram, tell someone about it
  2. Plan
    • Plan your solution
    • Give your brain time to analyze the problem and process the information
  3. Divide
    • Break the problem up
    • Solve each sub-problem one by one. Start with the simplest.
    • Once you've solved every sub-problem, connect the dots
  4. 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. Is there anything that can be abstracted to a more general approach?
    • Research: Google. Find other people's solutions/approaches and learn from them.
  5. Practice
    • SOLVE LOTS OF PROBLEMS

Five Whys and Five Hows

What It Is

  • A questioning process
  • By repeating why five times, the nature of the problem as well as its solution becomes clear.
  • The five whys are used for drilling down into a problem and the five hows are used to develop the details of a solution to a problem.

When to Use It

  • When we want to push a team investigating a problem to delve into more details of the root causes, the five whys can be used with brainstorming or the cause-and-effect diagram.

How to Use It

  • Draw a box at the top of a piece of flip chart paper and clearly write down the problem or solution to be explored.
  • Below the statement box draw five lines in descending order.
  • Ask the “Why” or “How” question five times and write the answers on the lines drawn from number one to five.
  • It may take less or more than five times to reach the root cause or solution.

Pretend Your Time is Worth $1,000/Hour and You’ll Become 100x More Productive

  • Most people prize being busy
  • But for most people, this “busyness” is nothing more than distraction and procrastination from what really matters. They just like feeling busy.
  • Deep work means absolutely not tolerating distractions and producing monumental quality and quantity in a very short time.
  • This is how you can complete far more with focused efforts than unfocused efforts with far more time.
  • Every time you say yes to something, it means you’re saying “no” to a dozen other opportunities.
  • The world’s most successful and extraordinary people say no to almost everything, but yes to a few things.
  • Really successful people say no to most things, because most things won’t get them to where they truly want to be.
  • Value your time at what it deserves to be
  • You probably need to say “no” more.

Additional Resources:

Eloquent JS

ES6 Features:

YDKJS

Clone this wiki locally