I Went From Dreading JavaScript to Liking It In One Week

A week ago, I expressed apprehension about learning JavaScript. I had the impression that it was going to be a very tough programming language to understand.

Well, I’m actually wrong. It is not really that difficult to understand. You only need to learn its basic terms, concepts, and principles, and voila, you’ll have a working understanding of how it operates.

What We Learned So Far

Throughout this week, that is exactly what we learned in Lambda School — we were taught the fundamental concepts, terms, and principles in JavaScript that will enable us to do effective web development and functional programming.

What were these lessons and concepts? They are numerous, but these are some of the most important:

  • Data Types
  • Variables
  • Arrays
  • Objects
  • Functions
  • Callbacks
  • Closure
  • Function Scope
  • Block Scope
  • Array Methods
  • .forEach, .map, .reduce, and .filter
  • The ‘this’ Keyword
  • Implicit, Explicit, Window, and New Binding
  • Prototypes
  • Constructor functions
  • The ‘class’ Keyword
  • The ‘extend’ Keyword
  • The ‘super’ Keyword
  • Classes

Easy at First

The lessons started out as easy. Data types, variables, arrays, and functions are pretty simple concepts to understand. Data types are the different kinds of data that are dealt with in JavaScript, such as numbers, strings (which can be letters, numbers, and etc., that are enclosed in quotation marks), and Boolean values (i.e., true or false). Variables are just like boxes that can contain values. Arrays are similar to variables but they can contain multiple elements or data, each of which sits on an index. Functions are like little programs that are composed of statements that can do specific tasks.

But as we progressed, our lessons became a bit more challenging. Callbacks are “Higher-Order Functions” or functions that can take in other arguments. Closure refers to the function and the environment within which it is created or defined, including the variables in that environment (i.e., the global scope). Methods are functions that are created inside objects. And so on.

For someone encountering JavaScript for the first time, or relatively recently,  the above ideas are not easy to grasp. A friend in our cohort mentioned to me that it took her many months, or maybe even over a year, to actually begin to understand JavaScript.

What Helped Us Learn

What helped us learn JavaScript are the following:

  1. Reading the curriculum materials/ resources/ documentation prior to class.
  2. Listening intently to the lecture and absorbing as much information as we can.
  3. “Learning with our fingers” (i.e., coding, coding, and coding).

The last one was especially effective for us. As I mentioned before, we would show up to our little office for 2-3 hours before class just so we could review and type out the sample codes in our machines. Then after class, we’d linger for 2-3 hours more just so we could type more. None of this means that we’re good at what we’re doing. It only means that we’re still at the beginner level so we need to catch up by putting in more hours and effort to hammer away at the keyboard.

Awesome Instructor

We are so fortunate because our instructor is such an awesome guy. He is extremely good and experienced in Web Development and he has the ability to teach the concepts in ways that beginner programmers can easily understand. Josh Knell has been in the industry for a very long time. He’s been an adjunct professor in Computer Science and teacher at coding bootcamps for several years. One of the most helpful advice that he reiterates is “Fingers on the keyboard and brain on the lesson”, or words to that effect, which is a really good rule of thumb when learning programming.

One other thing that I really appreciate is that he doesn’t assume that his students can get the lessons right away, or that we can master the concepts quickly or in one go. He always goes to the basics and emphasizes the fundamentals, while at the same time assuring us that we’re doing great.

Layer by Layer

The way the curriculum is designed is that it builds itself up one layer at a time. For instance, on the first day of the week, we powered through the absolute basics — data types, values, functions, and so on. On the second day, we learned about callbacks and closures. On the third and fourth day, we learned about constructor functions, prototypes, and classes. On the fifth day, we tied everything together and applied what we’ve learned in a Sprint Challenge.

So by the end of the week, we already had a good grasp of the week’s lessons. We were given a bird’s eye view of how the pieces come together.

My favorite lesson is the one on constructors and classes. They’re very fascinating. Sets of data, which is what objects contain, are very interesting. They can make a geek out of you. (I’m actually struck by the idea that the process of learning computer science and software engineering is actually a process of becoming a total geek, but that’s a topic for another article.)

Coding Thousands of Miles Apart

Pair Programming

By the way, I really enjoyed Pair Programming. My partner lived in San Diego, so our time difference was huge. But I really loved the experience. It was so surreal to be able to work with someone who’s half-way around the world from you. We did it for almost 4 hours, which is insane, but we hardly felt that time passed. I learned a lot from her, and it made me appreciate more the process of programming.

I think Pair Programming serves multiple purposes:

  • To bring you out of your comfort zone and compel you to become better. You wouldn’t want to be ill-equipped and unprepared when working with a fellow programmer, would you? So the expectation that you’re going to pair-program is going to push you to prepare and practice so that you’ll be able to work at the same level with your partner.
  • To help you develop your communication and interpersonal skills. Social skills are crucial for engineers since they’ll always be working as a team under project managers.
  • To help you learn from your partner and/or impart knowledge and skills to him or her. The students in our cohort are very diverse in terms of background, occupation, profession, gender, age, and location. Some have prior experience with computer science, and some do not. Some are very new to programming, and some have more advanced exposure to the field. There’s always an opportunity to teach and learn.

Cool Tools

I just love our tools! I love to edit with VS Code and tinker with Nodemon. I love the sheer act of typing at the terminal. And I love to add, commit, comment, and push files up to GitHub. I find them to be strangely addictive. Or am I just being too weird and nerdy? Good. A geek is exactly what I want to become (although I already sort of am).

Applying JavaScript

Next week, we’re going to learn how to apply JS on web development. We’ll be talking about Document Object Model (DOM).

I have no idea what that is (or at least I only have a vague clue) but I’m eager to find out.

Leave a comment

Comments (

0

)