The blocks
Block 1: In sprint 3, I had a couple of blocks while
doing the JavaScript Intro Challenge. The first block happened in
Challenge 5 - Conditionals: the if and if...else statement. We are
required to write two functions `isMatch` and `isAMatch`to compare two
values. After I wrote my code, I console.logged each of them in the
browser to check if the code is working and they both worked
perfectly. But when I ran my code in the terminal, both functions
failed. The error message reads: function was not defined. Well that
didn't help. So I asked Google to show me how other people have solved
the problem. Then I re wrote my code in a different way but the
exactly same thing happened. At this point, I am certain it's my
computer's fault. I decided to leave it for now.
A couple of days later, we had a home group meeting. During the
meeting, I asked our group facilitator John for help. We did a 1:1
coaching call so John could have a look at my code. And guess what?!
It was indeed my fault, not the computer's. What happened was that I
missed an 'A' in the second function's name. It was a spelling
error!!! As soon as I corrected the name of the function, my problems
solved.
Block 2: Another block happened in Challenge 7 - Loops Q4 & Q5. I tried all the techniques I used previouly and more. I wrote pseudocode, googled, read error messages, re-wrote the code in a different way, tried to read through on the discord channel to see if others had similar problems. But nothing worked. So I reached out to the discord community. And sure enough, a fellow student who had the same problem shared what worked for them. While their solution did not immediately work for me, it pointed me to a different direction. I kept it running at the back of my mind and carried on with other tasks. I tried to tackle the problem again the next day, still not working. So I pondered on it for another day. I think it might be the third or the fourth day that all of a sudden it dawned on me what the solution was. It was so clear to me like an AHA moment. Lo and behold, it was the right solution to passed the test.
Have you tried explaining the problem to the rubber duck?
Apparantly, web developpers talk to rubber ducky about their problems. Who knew! I have not tried this technique yet so I cannot testify to that. But I am intrigued by what the rubber duck will do next time I encounter a block.
![](../images/ducky.png)
Other problem-sovling techniques
- Pseudocode
- Trying something
- Reading error messages
- Console.logging
- Googling
- Asking your peers for help
- Asking coaches for help
- Improving your process with reflection
I tried all of the techniques above during the code challenges, except the rubber ducky method. I find googling is the most efficient way to solve problems. Because chances are, whatever problems we are having right now, other people already had them and had found solutions for them. Google normally solve 90 percent of my problems. Try asking the question in a different way will solve another 5 percent of the problems. As for the last 5 percent, ask for input from the real people that either had the similar experience or are on the same journey as you.