Learning about the DOM in JavaScript, jQuery, and More

A recap of my recent experience with an intermediate JavaScript course on Lynda.

Screenshot of Lynda course
Click the image to watch the preview for ‘The DOM in JavaScript, jQuery, AngularJS, and React’ on Lynda.com.

I recently finished an interesting course on the DOM and different versions of JavaScript. I liked that it was just a taste of JavaScript, jQuery, Angular, and React. It’s called The DOM in JavaScript, jQuery, AngularJS, and React. It was released in 2017.

Much of the course was focused on regular JavaScript. I’m glad I’ve spent so much time studying JavaScript, because a lot of basic things didn’t need to be explained for me in this course.

Although I know about the DOM, using HTML, this focus on the DOM using JavaScript was an interesting approach. For instance, traversing the DOM (with classes and IDs) was fun:

document.body.children[4].children[1]

This selects the 5th child of the body, then the 2nd child from that. This is almost like using CSS selectors to select parent and child elements.

One of the things I love about Lynda is that they recommend additional courses to learn more about related topics. A few courses the instructor recommended included:

  • JavaScript Essential Training
  • jQuery for Web Designers
  • Angular 2 Essential Training
  • ReactJS Essential Training

They may have updated it, but I’ve already taken the JavaScript Essentials course before, so I’ll check if the others are already on my list. Angular is past version 2 by now, but maybe it’s easier to get started with that version.

 

Stuff I learned about Debugging on FreeCodeCamp

I recently got through the Debugging set of lessons on FreeCodeCamp. Here are a few points I learned.

Error Types

There are 3 types of errors:

  • Syntax – misspelled word, missing parentheses, etc.
  • Runtime – detected while running the program.
  • Semantic – detected after testing output. Program works but result is wrong. Be careful!
Short List

1. Use DevTools on Chrome or Firefox

2. Use console.log(); a lot. console.log spits out the value of whatever is in the () to the browser console, which helps you keep tabs on how a value is changing in your code. Sometimes you have to move the console.log to a different place, like before or after another function, because order matters and the value of your value can change.

3. Use console.clear(); to clear the memory of a value in the console. Sometimes it’s ok to forget.

4. Use typeof to keep track of values. For instance sometimes a number is a numeral and sometimes it’s a string. Write console.log(typeof value); and that will tell you the type for value.

5. Lastly, you have to watch out for misspellings, missing brackets or parentheses, using ‘=‘ instead of ‘==‘, or getting the dreaded infinite loop.


Next in FreeCodeCamp is Data Structures!

Learning Regular Expressions (regex)

A very brief overview of regular expressions after finishing the lessons on FreeCodeCamp.org.

Last on my list of JavaScript education was most recently regular expressions, which are ways for a programmer to search for strings in text. I followed FreeCodeCamp’s (FCC) curriculum. You can find more about Regular Expressions on MDN.

The short name for regular expressions is “regex”, or “regexp”. The basic outline of a ‘regex’ goes like this, which tests if “Happy” is in thisLine:

let thisLine = "Happy happy, joy joy!"; 
let thisMatch = /Happy/; 
let outcome = thisMatch.test(thisLine); 
console.log(outcome);

The outcome is true. The test method only results in true or false.

In addition to test, you might also use match and replace. I believe those are the only 3 methods used in the FCC set of lessons.

Let’s try match. If you wanted to match “Happy”, and only “Happy”, you’d write:

let thisLine = "Happy happy, joy joy!"; 
let thisMatch = /^H[a-z]+/; 
let outcome = thisLine.match(thisMatch); 
console.log(outcome);

The outcome is [Happy]. Probably the most important part of regex is using special characters, and that’s what’s going on in this example. The special characters are shortcuts to help you search for a specific string. This examples searches for a string starting with a capital H (^H) and is following by any letter from a-z ([a-z]), and repeats the search for as long as necessary until reaching a break (like a space) (+).

An even simpler way to write the above would be to use a special character (\w) to search for any non-digit character and flags to allow upper or lower case (i), and global to search the entire string (g).

let thisLine = "Happy happy, joy joy!"; 
let thisMatch = /^H\w+/ig; 
let outcome = thisLine.match(thisMatch); 
console.log(outcome);

You can also return only non-alphanumeric or digit characters.

let thisLine = "Happy happy, joy joy!"; 
let thisMatch = /\W+/ig; 
let outcome = thisLine.match(thisMatch); 
console.log(outcome);

The outcome is [" ", ", ", " ", "!"]

There are many more examples of special characters, and I’ll be honest in admitting that I find it confusing. It took me a little while to figure out the second example above, partly because MDN separates their special characters onto different lines. Try these out in jsbin.

Anyway, regex are good to know if you need it.


From FreeCodeCamp:

Regular expressions are special strings that represent a search pattern. Also known as “regex” or “regexp”, they help programmers match, search, and replace text. Regular expressions can appear cryptic because a few characters have special meaning. The goal is to combine the symbols and text into a pattern that matches what you want, but only what you want. This section will cover the characters, a few shortcuts, and the common uses for writing regular expressions.

My Favorite Pro-Tips from NYPL Experts on Crafting a Resume

Resume writing tips to help you get that interview.

Over the past few months, I’ve gone to the Science, Industry and Business Library (SIBL), a research branch of the NYPL, for seminars related to job hunting. The library is a great resource for all things related to business and work. They offer free seminars on entrepreneurship, retirement planning, and job hunting.

Like other NYPL free library events I’ve been to, such as the author and book talks at the Mid-Manhattan library, I initially wondered what kind of people would be there. Public libraries tend to bring in all kinds. One day I sat next to a woman with the neatest and most beautiful handwriting I had seen in a long time. I wondered why someone with such meticulous handwriting would need a seminar on job hunting. Everyone’s story is different and a lot of different people go to the library for different reasons. Anyone can use these tips regardless of their employment status. Remember: anyone can find themselves needing to update their resume!

Anyway, I’ve been sharing some of the things I’ve learned with friends, but I wanted to formally write down a few tips I’ve learned, specifically on resumes. I know how daunting it can feel to face a blank page and feel like you don’t know where to start. Or the feeling you get, driving yourself nuts, trying to update your resume for this job and that one.

So here they are. These are not my tips. These tips are the collective advice from different seminars, from about 4-5 job hunting specialists. Like all things, do what works for you.

  1. Put the job title at the top of the resume and match it to the job posting. If the job says Instructor, but your last job was Teacher, write Instructor up top. If your last job was Web Designer and the posting says Web Specialist, put Web Specialist at the top. Pretty simple. Also, if you’re not putting the job title at the top, you should!
  2. Keep it to one page, but don’t sell yourself short. Meaning, don’t write an essay, but if you’re cutting off your accomplishments in an attempt to get it to one page you’re only hurting yourself. I’m guilty of this one. I have been so focused on one-page, it’s led to cutting off a lot of good info. Try writing a long resume, then editing for content. Also use a good font and don’t make it too small.
  3. You can include unpaid work. Just because you did pro-bono work and didn’t get paid doesn’t mean it doesn’t count. People reading your resume don’t need to know that project you did last year was unpaid. It was work. Go ahead and include it.
  4. You don’t need that many resumes. The idea that you should spend time tailoring your resume for every single job is a myth. You should tailor your job title to the job you’re posting for, and update your keywords section, but you’ll drive yourself crazy trying to tailor your entire resume for every single job.
  5. Use a keywords section. The key is differentiation. Use the section at the top of your resume to differentiate yourself from the competition. Use keywords from the job posting to catch the eye of the recruiter or hiring manager. Use a branding statement or summary to differentiate yourself from the pack.
  6. Summarize your accomplishments at the beginning of your resume. In addition to keywords, simply include a list of maybe 4-5 accomplishments right up front on your resume. (You see? Your resume simply cannot be one-page!) You can pull these accomplishments from the rest of your resume. (Just make sure to follow the next tip.) Also, you don’t need to use the work “successfully” as an adverb. Let your accomplishments stand for themselves.
  7. Target your resume for the industry you want to work in. When you list your accomplishments, make sure they make sense for the industry you’re targeting. Ex: If all your accomplishments sound like they’re good for banks, but you’re trying to get into fashion, update your list so they make sense for hiring manager in fashion to understand how your accomplishments will help them. This might be how you would end up with 2 resumes, with one for banking and one for fashion.
  8. Put your name, state+ZIP, email address, phone, and LinkedIn URL in the header of your resume. Presumably, you’ll be updating LinkedIn to match your resume, so include that right in there. If you have a portfolio, probably a good idea to link to it from there, too. Are you worried about putting your email address in your resume, because you post it online? There are 2 solutions for that. 1) Don’t post your resume online. You don’t know what job you’re targeting anyway and it’s very much out of context. 2) Use an alternate email address for people to contact you. Create a pseudo-email address that you use strictly for LinkedIn or your portfolio site, so people can contact you. The advice I got from the expert is to leave it offline, then send it on request. Case in point: I’ve been contacted by headhunters who are trying to fill a job for their client before the client has fully baked their job description. Or the headhunter claims the client is looking for X, but the description is for X, Y and Z. Would you want to work for someone who doesn’t even have the time to write a basic job description? Or worse, can’t decide (or doesn’t know) what they want? This rule filters out these jobs.
  9. If you need to, modify the presentation of your job titles/workplaces so you look your best. It’s a little confusing to understand, so let me give an example. Let’s say your current job title is “Consultant” for a pharma company, but you’re trying to work in media. And you’ve been putting your workplace first, in your Experience section on your resume. What you would do here is update your “consultant” title so that it’s more descriptive of your job, and put that first and the company name second. In other words, don’t do this: HealthCareInc – Consultant, (2017-Present). Do this: Acting Head of Finance / Consultant – HealthCare Inc, (2017-Present). It will be backward, but it makes you look better.
  10. Tell a story and be specific. Humans are natural storytellers and we love listening to stories. Stories are engaging. Like the one-page tip above, don’t sell yourself short by leaving out detail. The more specific you are, the less opportunity there is for the hiring manager to imagine something that didn’t happen and makes you look less than your best. Focus on: what (the beginning), how (the middle; the problem; what wasn’t anticipated), and the result (how you recovered, who benefitted, how much). This is tip is probably more helpful for a portfolio and for interviews, but the part about being specific I think is relevant.
  11. Don’t let headhunters get you to rewrite your resume for their purposes. Don’t undo all your good work! Staffing agencies are trying to fill a very narrow set of criteria, to fill one single job. When I think about the resumes I’ve been writing lately, I think working with headhunters has influenced my writing a lot, in a bad way.
  12. Get a friend to review your resume. This is just good advice in general. Have someone else take a look and check for errors, and to give their overall opinion about how you’ve written your resume – especially according to these tips.

How have these tips helped me? Well, I’m still working on it, but I have implemented other advice related to other seminar topics. Aside from resumes, they have included cover letters, LinkedIn profiles, overall job hunting, story telling, interviews, etc. And my resume has certainly expanded! It’s possible few will read past page one(?!), but my accomplishments are on the first page so I’m OK with that.

If you’re having trouble coming with accomplishments, try using the Seven Stories method to think of ideas. (Just do a Google Search, because you’ll probably have to refer to it later anyway.)

And, finally, here’s a resource if you need some help coming up with creative verbs to describe your accomplishments, livecareer.com/quintessential/action-skills. You might want to create your own list, which is what I did, to help read this list better.


Ultimately choose the tips that work best for you and help you stand out from the crowd.