Problem Solving

7th September 2022

The other day when I was writing some code in a website called replit, and I couldnt understand why the code was giving me errors.

I tried to google the errors, then methods I was using to see if I was using them right. Reread through my code at least 10 times. Got abit frustrated. Took a break and came back.

In the end I copy and pasted my code from replit into the browser's DOM console - and weirdly enough the code seemed to run fine there.

At this point I had spent too much time on this problem. It was for a stretch goal anyway so I just left it there.

Looking back I should have asked one of my programming coaches to help me understand what happened.

Another time when i had a problem with my code. I managed to find the issue by testing each function I wrote to see if the output was what i expected.

I found the problematic function - it was returning an undefined value, so rewrote that code to make it work.

From my programming course there are problem solving techniques i've learnt to use somewhat confidently:

Pseudocoding. The rubber ducky method. Reading error messages Console.logging

If those don't work i'll usually default to the following:

Taking a break to reflect, and coming back later with fresh eyes.

Just Googling the issue.

Just testing and trying something in the code.

Asking for help from my peers, coaches and programming friends - which probably includes asking you. :)