Problem Solving


Simple problems

The other day I found myself stuck on a simple problem. I was creating a function that would loop through some data and put them into an object. The problem I was having was that the object that I was trying to put the data into wasn't going in. To solve this issue I turned to the holy console. I looked over at the console and checked the errors. When I looked I saw that the console was telling me that the a variable was not defined. Amazing my code doesn't work because something that I have defined, apparently isn't. So I took a look and noticed that I was calling it as if it was a method so the computer didn't know what was happening. I just had to move it to the left a bit. From this problem I learned that the errors in the console are a very powerful tool that are designed to help you when you are stuck and they should always be looked at when you are stuck.


A Time I Elegantly Solved a Problem

While completing the Super FizzBuzz challenge I elegantly solved the problem of creating the Super FizzBuzz function. Earlier I was asked to create a function called fizzbuzz that took in numbers and return values depending on what the number was. This was done using a few if statements. The Super FizzBuzz function was supposed to do the same thing, but instead it should iterate through an array of numbers. I solved this using the fizzBuzz function that was already made. In my for loop I pushed the array numbers into a new array and used fizzbuzz to check what their value was and return the correct things. This removed about 6 lines of re-written code, making the funciton more compact and easier to read. What I learned by doing this was how you can re-use functions in a way to reduce the amount of code you need to write so you don't repeat yourself.


Problem Solving Techniques

Pseudocode I feel relatively confident with sudo coding. I find that I can right out what I need to do well, but can't seem to code exactly what I have written yet.
Trying Something I am very good at trying random things to fix problems. When I first get stuck, I will always read over my code and just try to change something randomly and see if the code starts working.
Rubber Ducky Method I feel very confortable with the rubber ducky method. I love explaining my code do ducks. It improves my code.
Reading Error Messages I am very confident reading error messages and frequently do so when stuck on a question. Looking at the error type and where the error is is very useful very frequently
console.logging I am very confident using console.log to debug my code or even just to see if code is really working as expected.
Googling I feel that I am pretty good at finding things on google but fair that it is such a skill, I may never be a professional
Asking peers for help I am not sure how I feel about this because I haven't asked pairs for help yet. That being said I don't feel shame in asking and I would gladly help them if they asked me a question.
Asking Coaches for Help I am very confident and have asked coaches a couple times for help already.