Problem-Solving

A time I was blocked on a simple problem

On my journey at Dev Academy, I faced many problems when I was introduced to JavaScript. I have taken some basic online courses before, but I was not confident with functions and loops yet. And then, I've got many of these exercises which I had no idea how to do. One in specific that I can recall was about inserting a list of students as properties of a grade book object in which the insertion order had an impact on how I should handle the data since other parts of this exercise would be based on that as well. At first, I used Pseudocode. In simple words, I described the problem and the steps I should take to resolve it. Then, I googled the methods I would need to use to achieve the expected outcome, and after that, I tried to implement the code while checking each step via the console.log to see how it worked. Sometimes I want to solve the problem as fast as possible, but I got to understand that it doesn't happen like that when we are learning. In the end, when all the tests passed, I felt great. And that was what I've learnt, be patient and try most all of problem solving techniques because it really works.

A time you elegantly solved a problem

I got a bit frustrated in an exercise that required me to transform a data structure into another one. I found it pretty challenging because as they are different, they need to be handled differently as well. Some of the techniques that helped were pseudocode the solution and google the methods that could be used to achieve what I wanted and what was expected. After finding the right methods to use by using the language documentation, I came up with an approach, and I fixed the problem in one line of code.

How confident I feel using each of problem-solving techniques/processes

I think problem-solving is a skill which is developed over time. As I am able to use it every day not only as a developer but also in my personal life, I am certain it is going to improve. I believe I will get more and more confident in that, and I can clearly see how helpful and useful those techniques are for any developer, it helps us to come up with the best approach to solve a problem, and it can save us a lot of time. Having said that, I would like to list here the problem-solving techniques ordered by the ones that I believe are the most useful.

Pseudocode: I believe it is one of the most important approaches before diving into the code. It helps me to break down a big problem into small pieces and easily walk through each of them.
Trying something out: This one might be the first approach that I take when I find something very easy. Sometimes I try something out straightaway, others I do that after pseudocoding my solution.
Rubber ducky method: I practice this one in almost all of the exercises. After writing a piece of code, I try to explain it to myself line by line and, after that, explain it to my husband. It helps me to prove to myself that I can really understand what I implemented.
Reading error messages: The first thing I believe a developer should do when he gets an error. Error messages are pretty handy and can help us to fix silly mistakes.
Console.logging: I am getting used to this one. Sometimes I am not sure what to log, but when it is clear, e.g. a result that didn't come as expected, then I know console.log will help to better understand it.
Google: Google is an awesome tool. We can find official documentation, tutorials, and forums where people are discussing similar problems. This is a must, and I can't see how a developer could get by without it 😀.
Asking your peers for help: When I get stuck with something and I know that I have tried all of above listed techniques, I ask a senior developer (my husband) for help. He can point the right direction and help me to spot what I have missed.
Asking coaches for help: I haven't tried this one so far, as I haven't faced anything that one of the previous techniques couldn't help.
Improving your process with reflection: I know this one is very important. Understanding what we can improve and how to better handle our work and problems but it is a work in progress.

A time I was reluctant to ask for help

I try to be independent, so I use all the techniques to solve a problem by myself before asking for help. But when I see I haven't found a solution for the problem in any way, I don't hesitate to ask for help. It can result in a waste of time if the problem is simpler for someone else.