Problem Solving

How to Solve Your Own Software Problems

Start Right: Prevent Errors in the First Place

Slow is Fast, Fast is Slow.

Did you read the README?... No really, read it. Read the directions. give yourself an overview of the project.

K.I.S.S. Keep It Simple Stupid

How Do You Eat An Elephant? ____________ Don't tackle a large concept or project as a whole project. Break the task and project into smaller, consumable pieces.

Determine what you know about the issue

  • Debug
    • Run a debugging tool
    • Observe the behavior
      • Does an error occur relating to a specific function?
      • Does the application run at all?
      • Etc.
        • Ask yourself questions about the observed behavior of your application.
  • Check the logs
    • Check the application logs, web logs or even the System Event logs.
      • Is there a clear error?
      • Do the logs output specific erring files or lines of code?
  • Is there documentation?
    • You should always have docs open and READ them. Actually read and comprehend the docs if you have an error!
    • Many docs suck, but most people don't ever read docs at all before asking for help.

Explain the code to yourself

  • Go through your code step by step.
  • You should understand each line.
  • 90% of the time, my students see the issue by carefully stepping through the lines.

Isolate the code

Google the error

Don't ask for help without googling the error yourself!

You should know how to use search engines effectively to solve errors. You're not reinventing the wheel. Others have done this before and will have asked questions on sites like StackOverflow and other types of sites.

  • Search the exact error message first
  • Look for recent results, not results from years ago.
  • Don't copy and paste without understanding!
    • This goes for running commands in terminal without knowing what they'll do as well!

If you want to be a good engineer, you need to understand what the problem is and why/how the solution works, not just find the solution.

  • Look for examples of similar code
  • Include environment specific search details
    • Language, Package, Framework:
      • javascript, react, node, mysql, mongo, mongoose, sequelize, PHP, Java, git, etc.
    • Environment
      • MacOS, MacOS Catalina, Windows, Windows 10, Linux, Linux Mint, Ubuntu, Docker, Heroku, etc.

Still stuck? Ask for help.

While waiting for help, do something else productive. Continue to read about the packages or frameworks you are working with. You may learn something to further your understanding and solve your own problem!