Problem Solving
Today we're writing about problem solving. We're going to cover a time I was stuck on a simple problem, a time I solved a problem and some other stuff too!
A time I was blocked on a simple problem
Recently, during the Javascript Kata challenge for "5-builtin-methods" - I got stuck on the "whereAreYou.js" problem. I was getting unexpected results when using console.log functions and there were no obvious errors appearing.
Here, I was expecting the output of the code to be "{ doorNumber: 2, hiding: 'Scooby' }" but it instead was stating "doorNumber: 1". After rereading the code a couple of times I couldn't immediately see what the problem was. Instead of getting stuck and mulling on the problem for potentially hours, I reached out for help in the #tech-questions Discord channel at Dev Academy. Pretty quickly, after having someone else look at the code it was apparent that I has used an incorrect operator of "=" rather than "==".
Problem solved! The staff running the #tech-questions channel had been putting in effort to make using the questions channel less intimidating, and as such I felt comfortable using it.
Learning Outcome
Overall from that, I learnt that fostering a safe environment to let people speak openly and comfortably allows for improved communications. By improving communications, problems can be solved for efficiently by allowing people to work together.
Problem Solving Techniques
Honestly, I think this should be a whole other blog entry but here are a few problem solving techniques, and how I feel about using each of them:
1. Psuedocode
This one's an all-time classic. Psuedocode is a way of formulating out a coding problem by using coding concepts to plan out how you might approach a coding task. It's a great first step for planning and solving a coding problem as it allows you to think through your problems before approaching them. I prefer drawing diagrams on paper and using those to then potentially create some psuedocode. When you're familiar with a language there isn't a huge benefit to using psuedocode. B tier.
2. Trying Something
Another great one! When you don't know how a specific function that you want to use works, trying it out is the best way to understand how it works. Rather than getting stuck in the weeds about how your whole solution will work, just trying to get a part of it working is fantastic. A+ tier.
3. Rubber Ducky Method
This is the one where you make best friends with an inanimate object and talk to it about your problems. I haven't gotten around to it yet, but it's pretty highly regardedd as a useful problem solving technique. I have found listening and looping to be a useful technique for talking about my problems, this is basically the same thing but without the looping. B+ tier.
4. Reading Error Messages
You run your code, and a whole lot of bad stuff pops out into the console that you didn't expect. This stuff's there for a reason. If you know what it means, you can use it to investigate your problems. If you don't know what it means, you need to figure out why it's popping up. A tier.
5. Console Logging
You run your code, it does a bunch of complicated stuff then spits out an output that's not quite what you wanted. You need to find a way to probe into your code and find out where the problem is coming from. The easiest solution is sometimes the best, so we simply log different states of the program as it runs. This is a great way of getting insight into how your code works, and is useful even when your code is running correctly, just to make sure that it's still running well. A+ tier.
6. Googling
In the old days of yore, man would have a problem and the first solution would be "just Google it". Today, we live in the beginning of the AI Chatbot Era. Googling, as a problem-solving technique, has been automated and built into all-in-one solutions like ChatGPT and thusly, is now deprecated. C tier.
7. Asking Your Peers For Help
Socialising is good. In the Dev Academy course, your peers will be doing the same sort of content as you. They will be facing similar problems and have their own solutions for things. It can always be a bit intimidating to ask other people for help, but it can help build social relations, and is a pretty direct solution to solving the problem. This one should be used sparingly, but definitely not be ignored. B+ tier.
8. Asking Your Coaches For Help
You've got coaches, you paid for them, use them. They're here to help explain things in the most human way possible, they know the curriculum and goals you're trying to achieve and they want to help. A+ tier.
9. Improving Your Process With Reflection
This one's for solving the bigger problems. The problems' problems. Taking the time at the end of a session, to reflect on how things went and improve your processes is an undeniably important skill to use for success in all domains of life. S tier.
S Tier
Reflection
Taking a Break
Sleeping
A Tier
Trying Something
Console Logging
Asking Coaches
Using Chat GPT
B Tier
Ask Your Peers
Rubber Ducky
Psuedocode
C Tier
D Tier
F Tier
Quitting
Giving Up
A Time When I Was Relucant To Ask For Help
Lately I've been going to yoga classes on a regular basis to try and get into the activity. Quite often that leads to me feeling unsure of how I'm doing in terms of pose quality and it's hard to ask for help because I don't want to disrupt the flow of the class. Next time I go into a class that I am unfamiliar with, I will make an effort to talk to the instructor before the class to let them know that my goals are to get better at the postures and wanting to learn. That will prime me to feeling less awkward about it, by breaking that initial barrier.
Return to Home