100 Days of Code Journey: Day 3 More Reading!

What I did on Day 3?

Yesterday, I planned on reading some more of the You Don’t Know JavaScript (YDKJS) book on scopes and closure, which I did. I also planned on working on a joint project (details below) and to start reading about the Twitch Api, unfortunately I wasn’t able to do any of these. Yesterday, was a Saturday and the final test between the Lions an New Zealand was on, so I woke up early to listen to the game, and got side tracked a little.

However, I was still able to finish the third chapter of the scope and closures book titled Function vs Block Scoping. Just as yesterday I under predicted the time and the brain power it would take to finish this chapter. I think it took over 2 hours to finish the chapter. This may seem like a lot for just reading but from what I’ve learnt, reading programming books is different to reading less technical books. A lot of time is spent trying to understand how the coding snippets work, reading and re-reading the code explanation and then finally being able to explain what is being demonstrated in your own words for your notes. So you can see why it takes so long.

Some of the things I learnt in the chapter:

  1. A bit more on Shadow Identifiers
  2. Hiding variables and functions and why it is useful
  3. What collision and collision avoidance is
  4. Function Expressions and why you would enclose a function in parenthesis ‘()’ or brackets has I call them.
  5. And finally Block scoping and the Let ES6 Keyword.

Why I am reading the YDKJS series?

A question I thought you may have when reading this post is why is he reading a book to learn programming? Let me try to answer. I already have a little bit of experience using JavaScript and know the basics of how to write functions, for loops, objects etc. However, I have noticed I don’t fully understand how these things work, and this may be limiting my ability to code solutions from scratch (understanding what tools are best suited for a given situation e.g. for loop vs while loop vs forEach). The YDKJS series is widely recommended on many forums to help beginners understand the intricacies of JavaScript, and this is why I am reading the series. I’m hoping the series will give me more of an insight in to how JavaScript works, and how I can use the tools I already know to write better code.

How do I feel about my progress on Day 3?

It is going a little slower than I expected with the reading, but I have a better understanding of the topics covered so far than I previously did, and I am also coming across many new concepts to myself, such as Block Scoping. I think if the topics covered in the later books in the YDKJS series are has detailed as they are on scoping, the effort taken to read the series will be worth it. (IF I can retain most of what I have learnt).

Plan for Day 4.

  1. Read chapter four on Hoisting from the YDKJS Book on Scope and Closures. It is a smaller chapter so I should be able to work on a few more things along side this.
  2. Work on my Chingu Cohort Project. I think I need to define this goal a bit better, so here it goes: I want to review the code already written, and figure out how I can take location data (geographical coordinates) from an API, find the city name, and use the city name to pull up an article from the Wikipedia API. Here is some info on the project: the project will attempt mix a few of the FCC (free code camp) intermediate projects into a big single page project. User story: the user can see their location, the weather in their location, wikipedia articles about their location to be pulled from the wikipedia api, for images of the location/people from the location to be shown underneath the wikipedia article and to finish of with some local twitch tv stream (although this may not be as useful and may not be implemented). It’s pretty simple, but the aim of the project for me was to collaborate with another developer, and to learn how to use git/github.
  3. This may be stretching it a little but start researching the Twitch API project for the FCC Intermediate Front End Project. Watch a video tutorial of how to get data out of the API, write down a plan of all the data I would need to pull from the API and read the docs to find out how to get the data (how to build the string for the request).

Thank you for taking your time to read my article.