Midway through Makers

Katy Day
3 min readFeb 23, 2021

I’m partway through my Makers Academy bootcamp and am attempting to get into the good habit of logging my learning. While I have done this in different ways, I have come to the conclusion that I am a free-form thinker, and that doing it as a blog will suit me.

Before learning to code, I spent most of my life in the world of English literature, both in analyzing it and in writing it. With fiction, I think the important thing to remember here is: get something on the page! Don’t overthink what you’re going to write. Just write it! You can always edit it later.

Which is actually kind of apt for coding as well. I just had my first review, which is a VOLUNTARY thing where you sign up to have someone watch you code for an hour and assess you. Nerve-wracking? Yes. Useful? Also yes. But mostly nerve-wracking.

Making it more intense, I decided to do it in JavaScript. This felt bold on my part since I’ve spent about two months now learning Ruby, and have only spent the last two weeks learning JavaScript. But I thought that JavaScript would be more of a challenge, and wow, was I right.

In any case, the reason why ‘just writing it’ is useful for code is, in following the TDD process, I felt very stuck at first on what output I should be testing for. This should have been a hint to what I should be doing, because testing your output should be a pretty basic thing. Without giving away too much of the game, my reviewer tasked me with returning the number of certain things from a string, in a string. As in, if given “Popsicles, Rainbows, Unicorns, Rainbows, Rainbows”, they wanted a response similar to “Popsicles: 1, Rainbows: 3, Unicorns: 1”. So my first step should have been testing for output that read like “Popsicles: 1, Rainbows: 3, Unicorns: 1”. BUT because my brain likes to think it’s smart, I skipped that first step and jumped to the thought, “Aha, I know I’ll need to split the parts of the string up, so I know I’ll want to actually get “Popsicles”, “Rainbows”, “Unicorns”, “Rainbows”, “Rainbows”, so I should test for that!” Wrong move, self. Don’t skip the hard-coding.

The most important thing I took away from my review was this: first, focus on the end output, NOT the path. Always have that as a guide for where you want to go. Because then you can refactor your tests and your code, but you always know that the first test will have the output you eventually want to get.

Look, there is a path — BUT WAIT, DON’T FOCUS ON IT! Focus on the ending up ahead.

While I didn’t completely fall apart in my review, I definitely need to improve, so will be signing up for more of them. What joy. BUT I know the next time will be better, because even if I just hard-code my answers first, it will be better. It will also be useful to look up how to count things in JavaScript arrays…I think I will have to use a loop…or discover what this whole regex thing is…

--

--

Katy Day
0 Followers

I'm a transatlantic bookworm on a magical journey of learning to code.