Tech blogs

Problem Solving


September 22, 2022

A time when I was blocked on a simple problem

I have been encountering a lot of problems during the challenges throughout foundations, one of the most common and simple ones are misspelled words most specifically a missing letter like it should be numbers instead of number or I forget to capitalise the starting letter of the second word, etc. I spend quite a bit of time looking at the codes and wondering where I have gone wrong because I know the logic is correct I just couldn’t figure out why it’s not working until I take a quick break and when I get back to it with a fresh eye, I spot a misspelled word or a dot missing or I used a colon instead of a semi-colon etc. These may be simple things but they sure are very important to make a code work. A recent incident is when I was doing the warm up challenge in the JavaScript Olympics. It is a very simple one. I wrote the code quickly and confidently but it did not pass. I am pretty sure I used the object literal notation which is pretty straight forward. After taking a short break and googling how to write an object literal notation, I figured out that I was using a semicolon after each value when I am supposed to be using a colon instead. When I changed every semicolon into colon, it finally passed.



A time when I elegantly solved a problem

One problem that I recently solved elegantly is getting the average in the Gradebook challenge in Repl.it. When I was in school, I really loved Math so I got excited when I saw the challenge about getting the average because I could apply my learnings from back then. I didn’t have to google my way while solving this problem because I had the idea on how to get the average. It was just a matter of how I would write the code for it. With the help of the hints, I got my way through it.



Confidence on problem-solving techniques/processes

Pseudocode: I am not yet confident in this problem solving technique as I have the tendency to jump on writing the code immediately because I am quite afraid that I will lose my line of thought and that I am under pressure of time. I find it as extra work for me at the moment. Although, I appreciate the reason behind doing this, I may need some time getting used to it. I will probably practice doing it when I have a bit of extra time in my hand.

Trying Something: This technique is probably my most used method next to googling. At the moment, when trying to solve the challenges, my code writing usually involves trial and error. I try different ways to solve the problem until I get the code that will work.

Rubber Ducky Method: When I learned about this method, I immediately thought of myself as the rubber ducky. I have the habit of talking to myself when trying to process something. I do this at a very young age. When I explain to myself, that is when I truly understand a concept or find the answer to my questions.

Reading Error Messages: I am not fully confident in reading error messages yet as I believe I still have a lot to learn about. At times, when error message pops up, I understand it however the solution does not always come quickly to me.

Console.logging: I find this method useful as well because it gives you a snapshot of what is happening or if your code is working. This allows me to have a peek into my code while it executes which helps in troubleshooting bugs as well.

Googling: This method is my bestfriend at the moment. Although at some point, especially when I get super stuck in a problem, I may have atleast 10 tabs open just to find solution the problem. It can be sometimes be very time consuming having to read a lot of resources and different examples but it does the job.

Asking peers or coaches for help: I need to improve in this method because I find it hard to seek help from my peers and facilitators, most probably because I am too shy or afraid that I may not be able to express myself fully. I am usually the one who is a silent reader. I really appreciate those who seek help in discord because I get to learn from the thread as well.

Reflection: During the early days of the foundation, I really didn't find the core reflections useful because I want to soley focus on the technical part of the course. However, as I was writing my reflections throughout, I found its importance. As much as having to learn the technical part, it is important to undergo the process of self evaulation as well. For me, it's like a reality check of my progress and where I am at the moment in this learning journey of mine. At times, it's a great way to just let your thoughts out and get reassurance that I am not alone during the highs and lows. That I have other people who share the same sentiments, and possibly celebrate small wins too.