Problem Solving

Problem-Solving Missions at Dev Academy


Kia Ora, this post is about sharing my experiences with problem-solving at Dev Academy so far. The course has been very (very) challenging, but I'm definitely understanding more each day that goes by.




Breaking Down Problems with Pseudocode


One strategy that's been really helpful is using pseudocode. It's basically writing a simplified version of the code in plain English. This lets me break down complex problems into smaller, more manageable steps. Seeing the code alongside these explanations really helps solidify those new JavaScript concepts in my mind.




Giving It a Crack Before Diving In

Before I jump into pseudocode, I usually try to tackle the problem myself first, even if I don't get very far. It's important to give it a shot because the more I practice, the better my intuition will become. Plus, it gets me in the habit of trying things out on my own first, which I feel will be a valuable skill to have as a (free-thinking) developer.




The Power in Quacking It Out

The Rubber Duck Method is a powerful tool for coders. Sometimes, just talking about the problem can be surprisingly helpful. I've had a few instances where I've started explaining my issue in the Discord group (i.e., the discord ducky), and in the process of writing it out, another angle for the solution has come to me. Maybe it's because verbalising the problem helps me see it in a different way, or maybe it's just a coincidence.




The Googling Struggle

While Google is an amazing resource, it can also be a bit of a minefield. There's just so much information out there, and sometimes it's hard to find the specific answer you're looking for. I've found that when I Google to solve problems, that if I don't word my questions perfectly, I can end up down time-wasting rabbit-holes of irrelevant information, leaving me more confused than before!




The Importance of Asking for Help

While I don't always love asking for help, I've learned it's important for me to be doing so. My peers have been super-supportive and helpful whenever I've reached out to them (a huge shout out to Andrew and Joel). The same goes for Shrena and the facilitators in the Discord tech-help channel. Being honest, I have worried about coming across as stupid if I ask too many questions in Discord. But I'm realising through the core teachings of the course, that asking for help is a sign of a growth mindset, not a fixed one, and as a matter of fact - everyone needs help sometimes!




Learning from Errors and console.log

One of the great things in coding is how informative error messages can be, especially from the console.log. It's like having a personal 'know-it-all', who's very black and white, telling me exactly where the code went wrong.

It took me a while to grasp its power, and how to utilise it, but feel I have started figure it out. I was working on a function called concatMyArray that aimed to join the elements of an array into a single string. I was using the .join() method, but the output had commas separating each word.

Running the code through the console.log, I could inspect the state of the array. Examining the output, I saw that .join() was working, but adding commas by default.

A quick Google search with "remove commas from join method JavaScript" had me (for once) find the solution. It turns out, .join() specifies a separator character with a comma by default. By calling .join('') with an empty string as the separator, I could effectively remove the commas and pass the problem of the test. This small fix made a big difference, all thanks to the power of console.log and a little online sleuthing.




Reflecting on the Journey

Taking time for self-reflection has been wonderfully helpful to me. Keeping a daily journal of my goals, challenges, successes, learnings, and doing sprint reflections helps me track my progress and solidify what I'm learning. I'm sure the more I reflect, the better equipped I will be to tackle future coding challenges. I hand write my daily journal reflections as I think it's important to not become too attached to working in a solely digital way.




So... that's my problem-solving journey so far. This whole course has definitely been a challenge, but with a mix of these techniques and a willingness to learn, I'm feeling more confident each day.



Quack Quack (check out how helpful I can be!!)