Skip to content

Latest commit

 

History

History
135 lines (82 loc) · 3.88 KB

File metadata and controls

135 lines (82 loc) · 3.88 KB

Solving Problems

Solving Problems 💢

1⃣ The most common mistake when someone tries to solve a programming problem is they try to start writing code ASAP.

make sure to take enough time to think before starting code.

2⃣️ Another mistake is trying to solve all the problems the first time.

Just broke the big problem into pieces (small problems).

Simple steps for any algorithm-type programming problem:

  1. Read the problem completely twice

    most important step

  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.
  • 70% of our time should be spent in steps >>>(1-3)



How to think like a programmer

How to think like a programmer

WHY🤔 ??

  • Because it’s the more effective way for problem-solving.

HOW🤔 ??

  • The best way involves : a) having a framework and b) practicing it.

  • Here are the steps:

    1. Understand
    • Most hard problems are hard because you don’t understand them.
    • When you can explain the problem in plain, you understood it.
    • you should write down your problem, doodle a diagram, or tell someone else about it.
  1. Plan
  • 'In programming, this means don’t start hacking straight away. Give your brain time to analyze the problem and process the information'
  1. Divide
  • it's important step
  • break (one big problem) into sub-problems. These sub-problems are much easier to solve.
  1. If Stuck ?
  • here are three things to try when you stuck :

    • Debug: Go step by step through your solution trying to find where you went wrong. (debugging)
    • Reassess: Take a step back. Look at the problem from another perspective.
    • Research: No matter what problem you have, someone has probably solved it. Find that person/ solution.
  • Practice to get the experience.




5 Whys To

5 Whys

Getting to the Root of a Problem Quickly

How to Use the 5 Whys (seven-step)

  1. Assemble a Team
  • Include someone to act as a facilitator , who can keep the team focused on identifying effective counter-measures.
  1. Define the Problem
  • Discuss it with your team
  • write a brief
  • clear problem statement that you all agree with it
  1. Ask the First "Why?"
  • many questions (Why's)
  1. Ask "Why?" Four More Times
  • For each of the answers that you generated in Step 3, ask four further "whys" in succession.
  1. Know When to Stop
  • you may reach this point before you ask your fifth "Why?" If you do, make sure that you haven't stopped too soon
  • The important point is to stop asking "Why?" when you stop producing useful responses.
  1. Address the Root Cause(s)
  • you need to discuss and find the solutions for the problem.
  1. Monitor Your Measures
  • keep watching



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

  • 'You have very few hours here on on this earth.'

Imagine that an hour of your time is worth $1,000 , What would your life look like ??

  • “Being busy is a form of mental laziness.” -Tim Ferriss

    It takes discipline to not become “busy.”




Solving Problems

think like a programmer

5 Whys

Act like you make $1000/hr