4 min read

There's .method() to the madness

There's .method() to the madness

Ironhack Week 4

So, first of all: I switched over to counting weeks. It's very confusing to enumerate the days because I have three Ironhack days per week - I just lose track. I decided to group the experience in time units rather than content - I'll try to make sense of it while I write, I promise!

Most of this week's work was on methods - more specifically, on the probably most helpful array methods .map(), .reduce(), .filter(), .sort() and .reverse(). And it was about working with Objects (well, again, I should say) - because working with Objects in Object Oriented Programming is kind of mandatory, I should think.

My own method of approach is to do the "homework", the labs, before the material is covered in class. Thanks to my months of prepwork I understand the documentation that's given to us and can work on the labs beforehand, and if there is ever a problem I don't understand or something I don't grasp completely, I can still wait for class and see if it won't be cleared up then. And if necessary, THEN I can ask questions.

So I went through the doc material and little exercises on the most prevalent methods there are and practiced, practiced, practiced. The lab work this time centered around movies (every lab has a little backstory that makes it all the more enjoyable) - and so I set out to map and filter through lists of movie objects, reduce their properties according to some arbitrary commonalities, accessed certain properties by the occasion of OTHER properties - and so on. I basically did what I call JavaScript magic. You write a bit of code and suddenly, stuff happens

It was a lot of work - the lab was divided into two parts - but I sat down and used the free time I had to work on those exercises.

I had learned from JavaScript30 and other challenges that not only do I (and that's just me personally, though I'm sure others are similar) need a problem presented in English (I mean, I will present that to myself in my own head), it helps to have lore - and I need to put the code into a little project to understand what it does and why it does it. And then I understand the fundamentals. And that is important to me.

Manipulating Space and Time

Since the third day of every Ironhack Week is a long day, we split it up pretty much into two parts. And you could see it from the perspective of preparing you for the labs, but also preparing you for being able to talk about coding - interview questions and such.

So first and foremost we touched on the topic of DOM manipulation - basically the altering of what you see on your webpage via HTML through JavaScript code. When I first heard of that idea it was super wild to me. I thought that what you write in an HTML file is unchangeable (unless you actively rewrite it). But just set up a .js file, grab a few tag elements via the DOM API, and just switch a bunch of stuff up!

Again, I was very glad that I had done stuff like that prior to the lesson, because otherwise I would have been completely lost - and I'd think, also very discouraged from learning it. But this way I was able to make sense of the exemplary code and bring it to it's conclusion - grabbing information from various objects in JSON notation and presenting them on a webpage via JavaScript including some nice styling. Sounds trivial when you just write it in plain English, but it was way more fun in code.

The second part of the day we talked about hoisting and shadowing in JavaScript, the fact that some code get hoisted to the top of a function and some doesn't, culminating in the topic of asynchronicity and ultimately, the setting and clearing of timeouts and intervals.

It's so funny to me. Timeouts, intervals, the Date or Math object - all of that stuff by itself seems so useless to me. It still does! What am I going to do with the Math object in real life? And then you start thinking about it in logic and coding terms - when does some process ever use a seemingly random number? When does something get repeated, over and over again? This code is everywhere.

The challenge our instructor cooked up was building a "Simon Says" game - like the plastic children's game, not the plot device from Die Hard 3. (We also had a choice of Whack-A-Mole, but I asked my classmates to consider not normalizing violence against animals.) And so "we" started coding. Our instructor wanted to only write instructions in pseudocode but ended up writing up about 95% of the whole game. We just had to piece it together here in there, and I almost got it done. I wasn't able to finish it during class though, since the lecture was actively going on and I do prefer to be able to stare at my code in silence for a while.

Overall, this week was again incredibly information-dense, obviously fun, and challenging too! I had worked ahead on a few more labs that focussed on DOM manipulation - but our TAs today pulled access to the labs that are coming up on the grounds of keeping everyone's pace the same. While I don't really agree, I picked up the book "Eloquent JavaScript" since I found it covers all of Module 1 and some of Module 2 and should provide adequate additional exercise. I'm stoked and excited for more of this bootcamp, to learn and code and just stuff my head full of all of it. Maybe I'm fanboying a bit much.


In this series of blog post I write about my experience at Ironhack bootcamp. The material is available to anybody and free to use on the internet - I do not work for Ironhack (I paid to participate in a bootcamp, so...). These posts are not supposed to be deep-dive anything, just reflect what I learned about various programming techniques. If anybody finds them while googling, cool. If anybody finds them helpful, even cooler! If nothing happens - also fine.