Disscuss about a time you were blocked on a simple problem:
During this week, I had to write a function to capitalize all the first letters of the words in a sentence. The first solution I wrote was't getting to the result I expected. So I kept trying to change my code, based on instructions in the challenge and material I researched online. After a little bit of research and some changes in the code, it was giving me the result expected when I console.loged it (printed the answer the computer was seeing in the screen so that I could see it too), but still failing the test of the function ( the test is the code that our teachers write so that we can check that we completed the challenge).
After trying a few different thing to make it pass the test, I decided to ask for help on Discord. One facilitator answered and pointed that part of my code was printing out with console.log, but wasn't linking with the function, when it was called, thanks to his answer, I could go back and fix the code (using one more function), and a few minutes later it passed the test. How wonderful!
To try and find a solution for my problem, I used some of the resources we explored this week, for problem-solving. Usually, the first thing I do to try and solve a coding problem is to read it through and try to break it down in steps to follow (Pseudocode). Then I try something following the steps I marked before, or I Google to find some method that will help me.
While I try something that I have learned before or read during my research, I use console.log to check how the code is working and if it returns the result I expect. In case it doesn't, if I receive an error message i read it to see what kind of error is it finding, to guide the changes I'll make. It isn't always easy to understand the error messages for me, but they helped me think of what directions to follow next
Although I feel I have spent too much time in the process of solving each challenge, I enjoyed the process and I learned in each step of the way. I not only learned about coding, but also about time management, problem-solving strategies that can be used in any challenge I face in the future, and the importance of asking for help when we can't work things out on our own.
Discuss about a time when you elegantly solved a problem
Also during this week, one of the challenges was to write a function that would give me a certain item in a list (array), that was hidden. At first I thought it would be a very complicated problem to solve. The function should work even if the item changed to another position in the list.
I broke the problem in smaller steps to follow and did a quick research in the method I was required to use for that exercise. I read through the material on MDN and found a line that seemed to me that could work for that problem. I went back to my file and wrote my function, using the steps I had written (sketched) on my notepad and the info I found online. It worked beautifully in the first time I tested it and I was filled with joy.
Reflect on how confident you feel using each of these problem-solving techniques/processes:
I wrote it inside of the code n some exercises, but sometimes i just prefered to sketch it in a note book. I helps a lot to break the problemm you are given to solve, in smaller problems that you can focus to solve the whole situation.
I'd say this is probably the first thing I try after reading and , sometimes, breaking down the problem. If I have some idea I believe that could work I usually try it before diving in deeper research.
I have never talked with a rubber duck before, but what I do is usually just talk to my self (maybe I look a bit crazy doing that and the duck could help with that) and review the whole process step-by-step. Sometimes it is enough to give me that 'click' I needed to sort thing out. Some other times it points me to the right direction for the next step to take.
I do my best to read the error messages, despite the anguish they cause in me (It stresses me out a bit to see those red words and exclamation points). They are not the problem, the problem is in the code that I wrote, they only point me in the direction to find the write answer. Sometimes it is a variable that is undefined, aome others it is just a misspelling issue.
It shows me what the computer seem when I call the function, so it is beyonde useful. I used it a lot to check if the function I was working on would return the value I expected.
Oh, I don't know what would happen with my life without Google search (and GPS navigation). I use Google search all the time, it is amazing how we can quickly gather so much information regarding any subject.
Through out this week, after i asked a question on Discord about a problem I was working on for a while, one of my peers offered to help me trhough the challenge I was stuck in. He helped me to understand the changes that I had to make for it to work and also he thought me some short cuts that were very useful.
Coaches/facilitators in Dev Academy, are incredibly helpful, and whenever I post a question about something, they are very quick to answer. I know I can count on them to guide me when I need help solving a challenge, or even if the code works but i still don't understand the 'why'.
After each challenge I took some time to reflect on what I had learned during that challenge and it wrote it dow in a little note book where I write some of my reflectons. The reflections we need to fill after each task and sprint also help to put the learning process in the right perspective