JavaScript Course

So in “O’Reilly HeadsFirst JS” (a major textbook resource I’m learning from) we build our way up to creating a small (Battleships Game) app using very little HTML, CSS (other than what’s necessary) and focusing more on the core fundamentals of JS. The old saying “The best way to learn is to teach” is so relevant in programming because it forces you to communicate better/ to non technical people. (required to get a job and keep a job in most cases) And it makes you dig up everything you just learned and explore any nuances you had forgotten about. It’s for this reason I’m putting out a series that parallels with my journey in learning JS. I’ll just go through it step by step as I’ve learned it. I’d rate it as a beginner course but also important to get right before moving into more complex programming, frameworks, hosting options, and testing.

If you have an interest in coding, ethical hacking, the web, then this is for you! JS is the language of the web and builds behavior, logic, and vast computing tools into otherwise static, boring old html/css websites. This language makes possible things like accounts, with different levels of privileges(user, moderator, admin), and dynamically communicate with users, events, and different computers in the network (by network, I mean whole freakin internet!).

Also, to touch briefly on Meta Cognition; that is, the idea that you won’t remember all the boring, mundane things. In fact, the technical details of getting a computer to do something is, for primal part of our mind, probably the most boring thing on the planet! The trick is to get your brain to see the material you’re learning as Really Important, as Important as if a Tiger were to jump out of the woods at you! (Or, at the other end of the spectrum – if that hottie you like starts hitting on you. :D) It gets your blood pumping that is! Thinking this way hacks your mind into remembering what you WANT to remember, and not just what your fight/flight emotional brain is telling you what it perceives to be important enough to remember. So try to tie what you learn in programming to things that you find fun, exciting, or terrifying.

Over the next 8 sections I’m going to teach you how to build a basic web app game; from learning the “what and how” of JavaScript, and how it communicates with the browser to the technical details of building a beginners project that will teach you important fundamentals of working with JS as a programming language. We’ll go over it’s object oriented nature, why it’s asynchronous and considerations to make, and all the moving parts that go into a wee little game like this.

A birds eye view lays out the course as follows:

  1. We’ll start out by building a couple basic programs. By using some of JavaScript’s built in functions we’ll be able to code out an algorithm that creates the “99 bottles of beer” song as text, rather than having to type it all out. We’ll examine what we did and the pieces we used to accomplish this.
  2. We’ll build a game that uses conditionals and loops. We will chart the flow of order of operations, write pseudo-code, do a little quality assurance, and touch on keeping your code brief/efficient/readable (verbosity).
  3. Calling Functions, passing values to them, returning things with functions, scope in functions, the lifespan of variables.
  4. Arrays – How they represent multiple values, iterating over an array, post-increment operators, sums up everything you need to know for procedural programming.
  5. Objects. How to create objects and their properties, holding objects in a variable, passing objects to functions, this keyword, states, where else you can find objects.
  6. Interacting with the DOM(Document Object Model)/How JS interacts with your page, DOM tree, getting elements from the DOM, events and event handlers, what to do with the values you get from the DOM.
  7. Data types and how to handle them (eg: as an error).
  8. Putting all the pieces together to build an app using a MVC (Model-View-Controller) Architecture. I’ve already built a Battleships game but am considering having a go at building something different but that still uses the same concepts; maybe Hangman, an adventure game, or a memory matching game.

Here’s all you need to get started:

Google VS Code download(text editor for programming languages.), download appropriate VS Code for your system. – That’s It!!

Note: If you want to understand javaScript better, you need to know how it fits into the broader web development/computer sciences world at a least at a surface level. If you don’t know anything about HTML, CSS, do some reading up on that first. (JavaScript is almost always manipulating the DOM so maybe build a basic static site for your pet or something?) And I’d learn the basics of how the web, browsers, and computers work. Just keep it High Level, which is to say; learn what simplifies the concept for you, not it’s inner workings in byte-code, or all the complicated shit. I’m talking basic surface level stuff – watch vids on: IP, HTTP(S), TCP, caching, processor threads, clients, servers, keep it BASIC! – there’s no need to be an expert in networking. While this isn’t required to learn javaScript(other than HTML/CSS), eventually, you’ll need to know it.

Author: John McKirdy

Husband, Father, Computer nerd, Fat fitness junkie, MMA fan, Wildebeest

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s