Problem Solving

24 Sep 2023


A Time I Was Blocked by a Problem

Recently, I had a few issues during the JavaScript Kata exercise, particularly in section 5 'builtin-methods.' One of these issues was with the capitalize challenge where I had to capitalize the first letter of every word in a sentence. To eventually solve this issue, I used a couple of problem-solving methods, including researching on the internet and using the console.log() method. I found the process of problem-solving a bit frustrating. It's still a relatively easy challenge, and I felt that I should be able to complete it in less time than I did. During this issue, I learned how important the internet is as a resource for solving future problems. It turns out that a lot of the time, it's a lot faster to research how something works instead of trying to figure it out yourself.

A Time I Elegantly Solved a Problem

Another problem I had during the Kata exercise was with the daBee challenge. Luckily, I didn't have too much of an issue with this challenge, but I remember at one point I was very confused about why my code wasn't working. I used the console.log() method to figure out the root of the issue, and after stepping through my code and reading it out loud methodically, I figured out that the problem was being caused by trying to remove array elements in the middle of a for loop. On the suggestion from the internet, I figured out that I could reverse the direction of the for loop to prevent this problem from occurring. Through this challenge, I learned to be careful when modifying array elements directly inside a loop.

My Confidence in Problem Solving Techniques

Of the various problem-solving techniques there are, I find that using console.log() and googling to be the easiest and most effective ways of debugging. I also find reading through my code out loud step by step (similar to the rubber ducky method) to be very helpful, and of course, asking my peers and coaches for support as well. ChatGPT, I have found, can also be a highly valuable tool in fixing issues, and I often use it to help try and solve my issues before I ask any real-life people.

A Time I Was Reluctant to Ask for Help

A time I was reluctant to ask for help was also during the 5th section, 'builtin-methods.' In the challenge 'Where are you,' I had to find and return the first object that "Scoopy" was hiding in. I was reluctant to ask for help because I knew the challenge was very simple, and I felt that what code I had written should be working. It turned out that I had simply made a spelling error, and that was what had caused my problem.