PROBLEM SOLVING
Technical Blog
01.APR.2016
Reflecting on being blocked on a problem
What was the problem?
During the JavaScript Racer assignment I got blocked trying make the race track length change when the user selected a different distance option in the selection dropdown menu. It was easy enough to get the track to change to a selected distance when the game first loaded, but what if the user wanted to change the length of the track after the game had initially loaded? I needed to create a function to restart the game when a new distance was selected. I started changing some of the other functions which eventual broke the game. Because I hadn’t been using my VM and Github for the development meant I couldn’t easily go back to a certain stage of the project.
What problem solving techniques did you use?
I did a lot of Googling, Rubber Ducky, reading error messages and the Try Something technique. In the end, I was so confused I wiped most of the JS code and started from scratch reflecting on the process I followed last time, then writing some Pseudocode followed by the techniques used above and some console.logging.
How did you feel throughout the process?
This was definitely the most frustrated and confused I’ve felt during an EDA assignment. Now that I have almost completed the JS Racer I’m proud that I conceded to myself that I needed to start again, that it was okay that I didn’t have the answers to fix the problem.
What did you learn?
I learnt that I should be using my VM and Github when doing these sort of projects. I can see the value of using Github and making regular commits and using branches to try new ideas or features. For the problem solving side of things, I learnt that I sometimes get hooked on trying to solve the problem myself and should start to engage more with my fellow cohort members and coaches. Overall I think I have crossed a personal bridge of not feeling inferior or incapable if I ask for help and say that I’m stuck. Another thing was if you get stuck sometimes having a good break from the project and coming back with a refreshed and an open mind can be a huge help.
Reflect on how confident you feel using the problem solving techniques and process:
Pseudocode - I’ve been trying to make this a habit when ever I write code. It feels a bit like brain storming the steps needed to create or make something work. It definitely helped me during the second round of making my JS Racer.
Trying something - This technique came natural to me because I like to give things a crack and work things out for myself.
Rubber ducky method - - I started trying this as part of the problem mentioned above, although I didn’t actually talk out loud I did go through conversations in my head of explaining what I was doing ect. which helped to keep me on track with what I was supposed to be doing.
Reading error messages - Haven’t really had to use the error messages in the past, but did find myself checking for them regularly the further I got into the Racer project.
Console.logging - Console.logging was the same as the above because I hadn’t really used it much during EDA assignments until I started this project.
Googling - I don’t know how programmers survived without Google in the past. Googling is definitely one of my “go to’s” for problem solving. The key to using Googling for solutions, hacks and hints is understanding what you are trying to look for and using the right keys words as part of your search however, I sometimes feel like I rely on it a bit to much.
Asking your peers for help - This is one area I fall short. As I mentioned above, I tend to try and work things out by myself if I can help it although I do think I’m getting better at it though. It makes it easy when you have friendly and helpful peers like I do.
Asking coaches for help - I don’t mind private messaging or asking the coaches for help.
Improving your process with reflection - To me, having a break and giving yourself the time to get away from the problem, then reflecting on your process/experience is one of the most important or useful problem solving techniques.
.map()
The map() method creates a new array with the results of calling a provided function on every element in this array.
.filter()
The filter() method creates a new array with all elements that pass the test implemented by the provided function.
.reduce()
The filter() method creates a new array with all elements that pass the test implemented by the provided function.