Problem solving
A time I got blocked on a simple problem
A simple problem that I got blocked on was this sprint and it was during the JS Olympics. Even though I had got stuck multiple times before during the FizzBuzz challenge and also during the Scooby challenge, I think this issue was simpler that those. It was the “Bulk Up” challenge and I had to get my code to add a new property to an object and also log “{name} won the {sport} event!". When I started the challenge, I had no issue is using a function to add a property to an abject but I had no idea how I was going to simultaneously log a phrase as well.
I solved the problem by stating with some pseudocode to lay out a plan of attack on how I was going to approach this issue. Then the Googling started, and there was a lot of it, I finally found some snippets of code that could help me. It used the “forEach” function which I hadn’t thought about using, and this helped me find my solution. During the process I did feel frustrated at times however I felt very accomplished when the solution worked. And I learned that there are a lot of resources out there to help me on the internet.
A time I solved a problem in an elegant way.
A problem that I solved in an (what I feel is) an elegant way was the unjumble your words challenge in the JS Olympics. When I looked at this problem, I didn’t have the slightest idea on how to start on this problem. So, this time I decided to forgo the pseudocode and get straight onto Google. I felt that as I had no idea how to do this challenge Google would be a better way for me to find a solution than starting with pseudocode.
I consulted Google and found that there are three built in functions which would make this challenge easy to complete. These were split, reverse and join. The split function would take my string and split every character from each other and put them in an array. I then used the reverse functions to well reverse the order of the array. Lastly, I used join to take the array that I had made and turn it back into a string. I felt very good while doing this challenge as it provided me with a challenge, without being too difficult for me to solve.
Problem solving techniques
Pseudocode
Pseudocode is a very quick way to solve small problems by laying out a plan of attack, however I generally will need to use another technique with pseudocoding.
Trying Something
I like this technique of just having a go, if it only partly works, I am still closer to a solution than I was before.
Rubber Ducky
I found this funny and didn’t think it would really help that much for me but I have used it a couple of times now and it really has helped me.
Reading error messages
I feel like this one is only helpful in a small amount of cases for me, like syntax errors. But generally it doesn’t help to much with the actual problem solving.
Console.logging
This one I am a big fan off as it is a small window into what your code is doing and can really break down a big issue into smaller portions. A console.log can show how close you actually are to solving your problem.
Googling
My most used and favorite way of solving problems. I found that virtually any problem and a solution to this problem is on the internet. As I feel that I am good at googling this is my bread and butter for problem solving
Asking peers/coaches for help
I am not afraid to ask for help, however this will generally be after I have exhausted all my other problem-solving skills. I generally will provide them with a solution of what I think I should do and see if they agree.
Improving your process with reflection
This is one that I need to work on more as it will help me remember things that I have learned from my challenge long term.