Problem Solving
How to get things done
May 8, 2022 by Tim Greenslade

A time I got unstuck; using .map() method to capitalize each word:
I was stuck on how to select each word within a single string using the .map()
method. It made sense initially, all I had to do was run the map method on the string. Make an array with all the elements and capitalise them, simple as that. However, the string was just a single element. I needed a way to make each word an individual string element, so that I could run the map method on each of them. I googled and did some research ("how to split a string into multiple elements"). I discovered the .split()
method. MDN says "The .split()
method divides a String into an ordered list of substrings" and I knew I'd found the final piece of the puzzle. All I had to do was tell the map function exactly what I wanted it to do; first index in each element `.toUpperCase()` and the indexes after that to .substring
.
I wrote out what I wanted each step in the function to do, took the puzzle pieces, tried various iterations to finally find one that clicked everything into place. This was one of the times I did not ask for help from a facilitator or other students, so I felt a bit lost at times, but I had a sense that I was making progress and in the learning zone, so kept at it. And to be honest, it felt great; a tiny victory is still a victory.
How confident I feel with the following problem-solving techniques and processes:
Pseudocode:
Using pseudocode really helps me flesh out the problem and break it into smaller task. It also helps me find the spots where I have a gap in my knowledge. I may know what needs to happen but have no idea how to make it happen. Before thinking things out with pseudocode, I found it hard to locate specific weak points in my understanding.
I also find revisionary pseudocode very useful. After I have solved a problem, I break the solution down and more clearly define what is happening at each step.
Trying something:
I have always used this method in problem solving, and with patience and precision, it can be a powerful tool. Often, I find that I have all the pieces of a puzzle but don't quite know how to put it all together. This is where just trying something, and then trying something else slightly different, can really help me.
Rubber ducky method:
The Rubber Ducky method is fantastic! There is such power in speaking out loud what you're thinking. It is like pseudocode, except through speaking it to an object (A very friendly Chocobo plushie for me), and committing to making myself understood, I hold yourself to a higher scrutiny. It often results in the realisation that I do not, in fact, have this, and where I am tripping up in my understanding
Reading error messages:
I still struggle with this one, finding some of the messages a bit intimidating and confusing. I have been putting more effort into slowing down to focus on what the errors are saying. Half the time it points out a tiny thing (a typo, wrong syntax) that is easy to fix. Other times I need to google what it means or ask for a second opinion.
Console.logging:
When I finally got how this worked, it unlocked a lot for me. The idea of just looking to see what the function is outputting at any given time is very useful. It is particularly useful, when used step by step, line by line, for finding exactly where my solution has gone awry.
Googling:
I solve so many of my problems in life with a good Google. Coming from a library background, I know that pretty much any question has an answer if you phrase the question correctly. I can't overstate how powerful a search engine of this magnitude is and how useful it is.
Asking your peers for help:
I have done this a few times, but really need to reach out and try this more. When I have done it, it has helped me view problems in different light .
Asking coaches for help:
I have been improving with this, initially I took on a completionism mindset of needing to solve it all by myself to unlock an achievement. Now I'm not letting myself get bogged down on things that are tripping me up.
Improving your process with reflection:
Once I have solved a problem, I go back and reflect on how I did it, then I try to break it and try a slightly different solution. I also look around at other solutions and approaches. I take these learnings into my next problem.