A time that I was blocked on a simple problem...

The problem I had was in manipulating objects. I was trying to add a child named Ben into Terah's object, but for some reason the test was not passing, even though the same code layout worked for adding the other 2 children. I first Googled to make sure that I was correct with the other 2 pieces of code. When I couldn't find my answer, I asked ChatGPT. It also told me that the code should work. After about 2 hours trying to solve it myself, I reached out to my Facilitator, Lucy. She helped me troubleshoot from the bottom up, to make sure everything was in order. Eventually, we realised that the solution was to use dot notation in order to create this first child.

What I had for Ben, and the other 2 children, looked like this:

terah.children = { ...terah.children, ben: { name: 'Ben', }, }

But I needed this:

terah.children.ben = ben = { name: 'Ben', }

Throughout the process, I felt confused, frustrated and overwhelmed all in one. Because it seemed such a simple question, so in my head I thought I should've had a simple code.

I learnt the valuable lesson of asking for help on time. If I had tried to solve it myself, I could've spent hours and hours on it, but my Facilitator knew which route to take in order to get the task done.

How did I elegantly solve a problem?

Creating the win function for my athletes array and adding the win property to each athlete was the problem I faced. I had what I thought was the perfect outline of the code, I filled it in to the best of my ability, ran the test and… fail. I Googled, I searched through previously asked questions on the Discord chats, then I tried different layouts. I took words out, added more in, and eventually got there in the end through trial and error.

I felt a lot more capable solving this problem than I did with the first one I mentioned above, because I'd seen the way to go about trial and error in some cases whether after speaking with the Facilitator or on videos. Through this one, I learnt patience above all else. Patience in myself to solve the problem.

How confident do I feel using the following:

I was reluctant to ask for help...

Basically any time I had a problem, that little voice in my head would say, "Why are you the only one having this problem?" so I'd look elsewhere like Google until I could solve the problem. When I was mostly reluctant to ask for help was with the simple problem I described above. I like to find the answers myself because the more difficult it is, the more likely I am to remember. But I learnt that sometimes it can take a lot of pressure off to just ask for help, put the answer in, then do my own research after the fact to better understand it.