Back to Home

Dear Diary, JavaScript is hard!

Let me tell you about when I got blocked on a simple problem.

What was the problem?

I am at that stage of the course where a certain amount of problem solving skills are required to complete the given sets of JavaScript exercises. One of them was a series of exercises involving programming a student's gradebook. I had written out all the code that was needed but every time I tried to run the program, it came up with an error message indicating that a function in the program did not run because the program does not know what it is (e.g. push is undefinied).

What problem solving techniques did you use?

I used Pseudocode by writing what I wanted the code to do in the steps that I wanted them done in plain english. Then I tried multiple ways to put the code together, when it didn't work, I tried again. When it still failed for the same reason, I tried googling examples of the what others have done in a similar setting but those methods still failed. I then reached out to my tutor for advice and to get a fresh pair of eyes on things. It turned out that I basically can not spell to save my life and had the name of the functions spelt wrong and used the wrong symbols to access the information that was in another block of code that I had already written.

How did you feel throughout the process?

It all started with mild curiosity then moments of clarity which was closely followed by frustration, sense of determination, and then rage. On and on it went in a loop until an aswer was found.

What did you learn?

When in doubt, sleep on it...? Kidding.... mostly.... Aside from the actual JavaScript codes and functions that we needed to use to complete the coding exercise, I learnt that as great as it is to be able to solve a problem on your own, a little help goes a long way. Both for the morale and the rate of success.

Here is one about when I actually solved a problem in an elegant way.

What was the problem?

It was a section of the exercise where the purpose of the code was to find the average number of all the numbers in the list of test scores that was given for each student. I actually managed to write the code out line by line without needing use a reference, and it worked first time!

What problem solving techniques did you use?

I used console.logging to isolate particular parts of the code to see if they are working as intended. Basically getting the computer to try to produce a result at each of the steps that I wasn't sure about.

How did you feel throughout the process?

I felt excited and motivated. Probably like what Dr. Carol Dweck was talking about with Growth Mindset, believe that hard work pays off and the confidence you get from it encourages you to enjoy the task. The production of Dopamine in your body is the best motivator.

What did you learn?

I learned that practice does make perfect and that I most certainly have the capacity to learn new things with hard work and a bit of patience.

Reflect on how confident you feel using the problem solving techniques and process:

Pseudocode 8/10

I used this method the most as it is the most effective method of organising my thought process and finding exctly where my knowledge of lacking.

Trying something 6/10

I do have some issues with this method as I tend to prefer knowing what I need to do more than diving into things head first. I do a lot more research than actually trying new methods until I get a basic idea of what things are meant to look like before trying them myself.

Rubber ducky method 9/10

My partner is currently my rubber ducky. I talk at my rubber ducky the most when I am troubleshooting my code as that is when I need the most clarity. It helps me break down the processes which I have taken and sometime helps me work out what I am missing from my work.

Reading error messages 8/10

Its very hard NOT to read the error messages when there are more of it your code... Bright red and angry looking it screams "THIS THING YOU'RE TRYING TO DO DIDN'T WORK!!". But yes, it is useful at narrowing down what could have gone wrong with your method and sometimes tell you exatly what the problem is. Eventually you get used to getting the same error messages and remembering how you went about fixing it the last time.

Console.logging 7/10

I use this method often throughout the process. It is the fastest and most direct way of finding out if each isolaed piece of coding method works or not.

Googling 10/10

Dr. Google is my friend! Need I say more?

Asking your peers for help 8/10

I have, on several occasions in this course, asked for help from some of my peers. Especially those who have raced through the content and are clearly masters in disguise. In a sense it is a little bit easier to ask another student for help when you know that they are going though a similar process as you.

Asking coaches for help 7/10

When all else fails, ask the masters. I always do as much as I am physically able until I really hit a wall then I will ask one of the coaches/tutors for help.

Improving your process with reflection 7/10

I often make a habit of writing notes in my code/program that I learned during the exercises so that I can look back and reflect on how I approached the exercise and what was used when it was solved.