▲▼▲▼▲▼▲▼▲▼▲
Kia ora, I'm Jessie! I'm excited to be part of the Aihe intake for Dev Academy in 2022.
I'm based in Christchurch and live with three cats, two bunnies and one husband!
You can read more about me and my learning journey in my blog posts and the About page.
▲▼▲▼▲▼▲▼▲▼▲
Problem-solving is a skill that is required for everyone throughout life, at all ages and stages. Little babies have to problem solve how to get their parent's attention and toddlers learn how to navigate around obstacles when learning to walk. Children have to problem-solve to learn their times tables - and students learning JavaScript are no exception!
Adapting your problem-solving techniques based on the problem you are facing is key. You can't apply the same problem-solving steps you used for replacing a damaged curtain rail to dealing with some confusing code!
So - let's look back at some problems from the past week I had when learning JavaScript. We'll start with the hardest one - something I was really stuck on.
One of the challenges this week was the capitalize one. This used the .map() built-in method to change every word in a sentence to have a capital letter. Sounds easy in theory, right?
I struggled.
The syntax...
The order...
The methods...
I googled, again and again and again. I tried to implement what I googled. I tested simpler versions of what I was trying to do. I took a break.
I wrote pseudocode. I spoke the code I was writing aloud. I watched youtube videos on the .map function. I googled some more. I tried some more variations.
I took another break. I reached out for support on discord. I got more confused. I joined a zoom and went over it, but when applying it to my own code I still couldn't get it working.
Eventually Gerard helped me piece it together. About four hours after starting the question.
It was a bit of a nightmare.
I felt stressed, but not actually as panicked as the above meme implies. I think because I wasn't completely panicking, I didn't try harder to get help from a facilitor, or reach out sooner, because I hadn't hit that low yet.
In hindsight, I'm probably just learning to be a bit more patient with myself - which is good, but this led to me waiting far too long before admitting I was going nowhere.
From this process, I learnt that I really need to stop and ask for help earlier. If I'm still not understanding, say that explicitly and try jump into a zoom instead, rather than half-getting it and spending another 2 hours down a rabbit hole.
The next problem was the whereAreYou one. We had to use the .find() method to return the object that "Scooby" was hiding in.
For a while, I was just as stuck as the first time. However, when Gerard helped me earlier he provided the unwoof challenge for me to try.
Reflecting on this made me pause - and realise I needed to call a function within the function in order to get what I needed. So I started experimenting with that.
I wrote some pseudocode to mentally plan out what I needed to do. I copied the instructions and the hints into the main view, so it was all in front of me.
I googled, then googled some more, and then some more.
Eventually, I tried one more thing, and I saw that beautiful response, pass.
I did it, and it didn't take four hours, or even one. I was relieved. I then applied the same information I had learnt to the last challenge, and got that in about 10 minutes - I was thrilled!
Mostly, relief. I was worried that I was going to be just as lost as the previous one, but it was a big sense of accomplishment that I could problem-solve my way through. And, that while it sometimes feels like nothing sticks, something must have for me to be able to get through that problem!
I learned that before diving right into a problem, I need to stop, think and assess. I think forcing myself to write pseudocode is key here - rather than diving in and making a big old mess, I can plan it out and think.
Then, looking at that pseudocode I can reflect on whether I know enough to do what I need, or if I need to do some research first.
Here we have a full list of common problem-solving techniques, and how confident I am for each of them.
What is this?
This is when you write out the steps in a non codey way. For example:
// Get out the chocolate
// Put the chocolate in a bowl
// Take the chocolate out of the bowl
// Put it in your mouth instead silly girl
I feel relatively comfortable with this - sometimes I struggle with knowing how it should be broken down though. Also, I sometimes skip this step when I shouldn't.
What is this?
This is just giving some code a try, even though you don't know if you're right. Worst case scenario is you end up with some errors that you can use to narrow down the issue.
This is my main problem-solving technique so I'm very confident with this.
What is this?
This is reading the code aloud to an inanimate object, a cat - whatever. It's speaking through what you're doing, to try work out where it's going wrong.
I'm pretty confident doing this, and it's a good way to reinforce what I'm actually doing in the code as well.
What is this?
This is using console.log() to see what's currently being printed to the console. It allows you to see where you're going right, and wrong. You can use this to fix issues before they get buried deep in many lines of code.
I don't do this enough. I feel pretty confident doing it, but it's not a habit I'm in. I'll try include it more!
What is this?
Searching for an answer on Google! Using "JS" and keywords from the challenge to help you find an answer or guidance.
I am very confident doing this.
What is this?
Reaching out to peers on discord, either via private message, a post in tech questions or in homegroup.
I'm comfortable doing this, however I find it can sometimes make it more confusing. I also feel bad if I can't help them with something back!
What is this?
Asking in tech questions and getting help from a facilitor.
I'm pretty confident doing this. I find the facilitators are really good at helping. They'll provide the answer but not in a 100% direct way, however not so obscurely that you can't understand. Once you get the answer, you don't just move on - I tend to study it and work backwards to make sure I fully understand it.
What is this?
Processes like this - looking back on an issue you had, how you resolved it and what you learnt.
I could do with more of this - sometimes it feels like it's a bit too much of a rush to learn the next thing so slowing down and revising would be helpful. I have a "to revise" list that I'm working through!