Day 21 (week 5) — BEF Begins

BEF — stands for Back-End-Fundamentals.

We started with an explanation about how Node.JS and vanilla JS are different. Things like the global object in Node and the window object in your browser. We discussed the differences and how to use those differences in our code.

We also talked about how modules and require work in Node. A brief description of using modules.exports to make visible only the objects you want from a particular file. I think for some folks, this seemed a bit confusing since we really haven’t written any larger programs that required multiple files. We also covered how to use npm to install packages from the web and use them in our own projects. This led to a discussion about package.json and what information is stored in that file.

We had a brief pair-programming project that involved writing a simple program that asked the user to input two numbers and then print them back using the readline library. This activity should prove very useful as we start to talk about asynchronous programming. It’s one thing to say that you know what asynchronous programming is and it’s quite a different thing to debug a program with multiple asynchronous events happening. I know I’ve been burned several times by this. I imagine that at some point we will see more examples of this in class. Here’s what I wrote. In my solution, the user can enter as many numbers as they like separated by newlines. When they press ctrl-D to close the input stream, my program calculates the sum of those numbers and print that to STDOUT.

We watched an excellent YouTube video on how to give and get help. I’ve linked it here. There are many excellent points made by the speaker, and I can identify with most of them from both a student and teacher perspective. I think my favorite is the one about telling the person who you’re asking for help how far along you are. Are you just starting in the project, or are you close to being done. That really helps the person you’re asking determine what feedback is appropriate.

After the video, we had a good roundtable discussion about it. I find it very interesting to listen to what others have to say. Things like how long they should wait before asking for help. Trying to deal with the frustration of not being able to figure things out on their own. All of these things I have experienced at one point or another. On average, I’d say that my personality tends to drive me towards the ‘figure it out on my own’

The daily project was released a little before lunch, and I finished it before lunch. It was a program that printed some date information by using moment and chalk. You can check out my code here.

I spent the rest of the afternoon working on my music player weekly project. I’ve already finished all the requirements for the project, and now I’m working on getting Spotify authentication working so that a user can see better album artwork, do more extensive searches, and also add songs to playlists on Spotify.

I’ve got the basic token auth flow working, and can easily make requests to the Spotify API. Now it’s just a matter of figuring out what I want things to look like and what information I will show the user.

Like what you read? Give Eric Abell a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.