How to Think Like a Developer

How to Think Like a Developer

  • Jumping into a problem without much thinking before hand is not the best way to solve a task, and while it seems like spending time on a task before even coding seems like a waste of time, it's actually quite the opposite
  • By following a structured framework for solving problems, we get highly focused on the task itself rather than spending time trying to figure it out, as we would've already spend that on the very start

The Problem Solving Notion

Problem-Solving.png

Step 1: Understanding The Problem at Hand

  • The first step you are obliged to do the second you encounter a problem is to understand it deeply
    • This is best done through asking question
    • You'll get better at this step as you progress through your development journey

Step 2: Break Your Problem into Smaller Tasks

  • This build on the last step, in this step your goal is to break your problem into small manageable tasks that are actionable

Step 3: Do Your Research

  • After step 2, your bound to run into tasks you can't solve, this is where stack overflow comes into rescue
    • It's important that you Program, not code
      • While coding is copy pasting solutions on the internet, programming is understanding the code and how it functions
      • only by programming, do we fully complete the research phase

Step 4: Write Pseudo-Code

  • for highly complex tasks, it becomes profitable to try to pseudo-code the task at hand

    What is Pseudo-Code

    • pseudocode is the representation of our algorithm in precise English (or some other human language):
    • Example:
      1. Pick up phone book
      2. Open to middle of phone book
      3. Look at page
      4. If person is on page
      5. Call person
      6. Else if person is earlier in book
      7. Open to middle of left half of book
      8. Go back to line 3
      9. Else if person is later in book
      10. Open to middle of right half of book
      11. Go back to line 3
      12. Else
      13. Quit