My Tech Bootcamp Experience: Week 4 - JavaScript

In previous posts in this series, I've been a bit remiss in failing to mention several of the tools we worked with, because now they're so second nature that it's a bit like, "well, of course you need a hammer to build a house!" But each was a learning experience in its own way to someone like me, whose few fledgling coding experiences before bootcamp involved either online code editors or Vim.

(If the Vim part surprises you, well, my husband is also in tech, and every computer in our house ran Linux until I bought a MacBook Air specifically for bootcamp. I wanted to be able to install whatever programs I needed and troubleshoot any issues without his help. Getting things to play nicely with Linux is a whole separate set of tech skills unto itself and I don't have it, at least not yet. But I do know how to quit Vim without looking it up!)

So...tools. Upon acceptance into DigitalCrafts, I was invited to sign up for Slack and join the DC workspace. This is where the majority of DigitalCrafts' communication happens unless they need to send you documents. Each cohort has a channel created specifically for them, and there are channels for Career Services, job postings, general information, and more. (There's also supposed to be an alumni channel, but I don't think I've been invited to it yet.) Your cohort manager, instructor, the Career Services folks, and pretty much anyone else you could want to speak with are available via DM. Most companies are using Slack or something like it these days, especially those with a distributed workforce, so this is a good way to get comfortable with it quickly.

Next up was Github. Basically anywhere you work in this field is going to have some sort of version/source control software, and Git is the most popular right now. In the pre-work, we were given an introductory video to watch and invited to create an account. As part of the HTML/CSS section of the pre-work, we were supposed to make an "About Me" page, and we were then invited to create our first repository and upload the files for our page to Github. This seemed pretty straightforward at the time, but once we started working on projects with multiple contributors, it was a lot more to wrap your head around! We definitely used Github on the daily throughout the bootcamp. We had a cohort-specific repository with .md files that outlined our in-class activities and daily assignments, occasionally alongside other files needed to accomplish those tasks. Our instructor, Azam, also preferred to teach by coding while lecturing, adding key points as comments to the code. He would then push each day's code file up to the class repo after lecture, so that we'd have it as a reference as we worked on the assignment that afternoon.

The last big tool we'd been using at this point was VSCode. In theory, you could use whatever code editor you wanted for the course, but you'd likely need to download VSCode either way. Azam used VSCode and liked its LiveShare feature, which lets multiple people remotely sign in and code in the same window. He used it several times throughout the course while reviewing the previous day's assignment or if the start of the current day's work was substantially similar to what we did before. So you at least needed VSCode for that, even if you did all your individual work in another editor. I liked VSCode well enough and it's still my primary code editor today.

Full disclosure - I was not the biggest fan of the LiveShare. It always wanted to choke and prevent at least a few people from getting signed in, and it didn't seem to provide much functionality beyond our instructor just calling on people and having them verbally tell him what the next steps would be. Others might have a more favorable opinion, though. For me, I ended up as the defacto notetaker for the class, and it was hard to take good notes and still be ready to jump in with the next line of code at a moment's notice if he called my name.

A better use of the LiveShare functionality might be having people work through the in-class activities as pair programming sessions. We didn't really do any pair programming throughout the course, which has surprised some of the interviewers I've met with so far.

Anyway...week 4!

The zero-to-60 continued right off the bat. Our first day this week was essentially "do everything we did with the first two weeks of Python, just in Javascript". In a day. Our assignment was a whole host of relatively simple functions (FizzBuzz, is this string a palindrome, etc.), as well as creating a BankAccount class with methods to open an account with a set initial balance, withdraw funds, transfer funds, and charge a negative-balance fee. This seemed like a LOT. But it drove home the point that once you have basic programming concepts down, applying them in a new language is mostly just a matter of getting the syntax right.

Tuesday was the start of what the nuts and bolts of the bootcamp was all about - taking user inputs from the UI and connecting them to JavaScript code! With document.getElementById, we tied a webpage's background color to a button click, took an image URL from a textbox and displayed the image on the screen, and more. Our assignment was to recreate the to-do list from the end of week 1, where you could add/delete/view tasks, but now on a webpage! We also had the added wrinkle of moving tasks between a "pending" list and a "completed" list on the click of a checkbox.

Wednesday was the first day I could truly see that we had already gained marketable skills, just a month into the program. We learned about template literals and just a few of the many array helper methods (map, filter, and find were what we covered that day). With just these few things, we were able to create a decent-looking restaurant menu website that pulled data from a JSON file! Here's mine:

I don't know that you'd make all that much, but it would be entirely possible to market yourself as a freelancer to small businesses with no more knowledge than what we'd learned up to this point. And I did this in basically a single afternoon; with more time you could certainly expand it and make look better. You could create static sites that list their hours, contact info, product info, etc. Given how many small businesses (especially family-owned restaurants) have a Facebook page and nothing else, I could see there being a market for that.

Thursday we delved into not just displaying data from another source, but manipulating that data before display, and/or refreshing the display on a timer. Our assignment was to display a list of news stories from a JSON file, but some of the stories had an author or description listed as "null". I ended up both writing a null check to keep those from being displayed and looking up a regular expression to take a timestamp that looked like this:
2019-03-07T12:50:00Z
and change it so it just read:
2019-03-07.

Friday we learned about forms; how to make certain fields required or make sure an entered e-mail is valid (not [email protected]). Our assignment was to create a slideshow that changed pictures every second and looped around to the beginning once it was complete.

Next week we would learn how to get data from actual external sources rather than JSON files, opening up a whole new world of possibilities!

33