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.
A birds eye view lays out the course as follows:
- 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).
- Calling Functions, passing values to them, returning things with functions, scope in functions, the lifespan of variables.
- Arrays – How they represent multiple values, iterating over an array, post-increment operators, sums up everything you need to know for procedural programming.
- 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.
- 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.
- Data types and how to handle them (eg: as an error).
- 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!!