JavaScript Mastery Is Simply A Function Of Time

This Has Been The Toughest Almost-Four-Weeks Of My Professional Life!

Seriously, I cannot believe that I am ending week four, here.  The first three weeks were abysmal.  I barely knew what was happening or why, and I was pretty sure that I was going to fail at learning to develop for a living.

If I told you how many times I cried, you’d probably not believe me, but I don’t care.  Anyone out there like me who is putting their heart and soul into learn to code…well…I don’t want you to be shocked if you get to your apprenticeship and find that you hit brick wall after brick wall.   For non-mathy folk, it’s par for the course.

That’s the truth.

If you happen to be considering coming to the program in which I am participating, you’re probably using resources like Code Academy, Khan Academy, or other online resources like Thinkful or Bloc.io.

Whatever your learning resource, you already know that code’s ability to reduce you to tears is a very real thing.

Most men I know won’t cry…but they will walk purposefully out of a room, stare at the screen pensively, or go take a smoke.

Bottom line: Coding. Is. Hard.

PERIOD.

…but it’s also fun, once you start to understand what you are looking at, why the lines are functioning the way that they are, and what it is that you want the computer to do for you.

I Am Redoing The JavaScript Section Of The Program

The first go-around (which lasted three weeks), I felt like my instructor was speaking in a foreign language, BACKWARDS, every day.  By the middle of the second week, I was just staring at him, blankly as he spoke, and, to be really transparent, I felt like the dumbest rock on the ground.

Talk about discouraging!!!

I told myself that I was a failure, and I was just about ready to make the drive home.

That felt terrible.

Words cannot describe how badly I felt…

…but I decided to repeat the first section, just to see how I would do on it.  I have found that I really enjoy front end development and manipulating the DOM with JavaScript, so I wanted to understand how this language works before moving into C# and the .net framework.

I am so glad that I did!

This Week’s Learning Has Been Like Night And Day!

We started the week at ground zero, and I wondered if I would understand anything more than I did in the prior weeks.  As soon as the instructor started teaching, I knew that I’d actually retained a lot of the information from the previous class.

What is happening is what has happened to countless students who came through the program before me, and it’s this: learning to program is largely a function of time.  The longer I stay in this environment, the more I understand and can build what is placed before me to build.

This is a simple to-do list…
To Do List - 1

 

This is an application that I originally built three weeks ago. I rebuilt it in pair programming with a classmate, today.  This image is of some of the code in the new app.  The old app broke a number of times, and I was eventually unable to get it working again.  I could not even understand what I had coded the first time!

Today, not only did I understand the work that I did with my classmate, but I “commented out” the entire JavaScript file!  Three weeks ago, I could not read it enough to understand it.  Today, I can!

Three weeks ago, no matter how long I stared at it, it made no sense…and here is why.

JAVASCRIPT IS NOT ENGLISH!

Now, before you laugh, let me explain something fundamental that didn’t hit me immediately.  You CANNOT apply the structure of the English language to JavaScript.  Much of what is written in programming is meaningless outside of the machine.  Let me show you what I mean with an example:

Before reading below this picture, try to GUESS what this code is doing.  Read it, line by line and do NOT go below this image until you are fairly certain that you get it.  THEN, after you think you get it, read under the picture to see if you got it right.

This is a very elementary block of JavaScript code…
JavaScript Mastery Is Simply A Function Of Time-2

What I used to think it meant:

  • Line 1 said “function myFunction” and I did not know why.  What’s the deal with the parentheses and curly brace?
  • Line 2 was getting something called “Hello Dolly”.
  • Line three was getting something called “How are you?”
  • There’s another curly brace.  Clearly, it ends the block of code.  I wish I knew why.

This was my PREVIOUS way of thinking.  It’s interesting to see that I wasn’t that far off of the mark.

Here is what I understand, now:

  • Line 1 defines the function.  A function is basically a verb in Javascript.  It is ACTION.  Inside of the curly braces is where all the action happens.  I also learned that this is not the best way to define a function…unless I want it (potentially) accidentally hoisted/lifted to a different section (scope) of my code.  A better way to DEFINE my function would be to assign it to a variable like this…

var myfunction = function() {….

  • Line 2 is grabbing an element inside of my HTML file.  I have to have given the element an id.  In this example, the id is for a paragraph, and my desire in this statement is to PLACE some words into an HTML document with Javascript.  The greeting I want to place is, “Hello, Dolly.”  I know that this line of code has ended because there is a semicolon.  Semicolons in JavaScript are like periods in English…sort of.
  • Line 3 is doing the same thing as line 2.  Aside:  Just so that you know, “innerHTML” is the key that lets me know I am placing text inside of my HTML file.  If I had put “value” into this instead of “innerHTML”, my element would have been an input field like a text field where someone fills in information in a form.
  • When you grab information from the HTML side of things and choose to store it into a variable, you can reuse the variable in different parts of your code if you so choose.
  • The function closes with a curly brace.

The cool thing about functions is that they are self-contained…sort of.  Variables that are declared inside of functions are called LOCAL variables.  They are not available for use outside of the function.

The only way (sort of) to get to variables inside of functions is either with a special type of function called a closure or if you declare the variable in the global scope of your program.  The global scope is simply the main part of the code – the part OUTSIDE of any function.

Any variable declared inside of a function is a LOCAL variable.

And…that is IT for all of my explaining.

The point that I wanted to make is that understanding JavaScript programming isn’t easy…but it IS a function of time.

Over time, I am understanding it more and more.  If learning to code is your desire, too…you can do it!  You simply have to put in the time!  And don’t quit on it.  It’s worth it to continue if this is what you want to do for a living.

Some things, like for loops, Ajax calls, and Angular are still confusing the heck out of me…but I know that if I continue learning, I WILL get it, in time.

I Cannot Forget To Mention That The People Here Are Incredible!!

The best part of learning to program is that I am meeting some truly amazing people.

Jaime is a statistics wonder mind, and, even though she had no significant experience in programming prior to our camp, she is a hard worker, she cares about the team, and she helps anyone who asks her for help.

Kyle and Isaiah are both married, and they both live in the western part of the US.  Isaiah’s wife is expecting their second baby.  Kyle has wanted to become a full-time programmer for a while, and his father is one, too.  They both had coding experience prior to this apprenticeship, but they did not know JavaScript or the .net framework.  They are funny, gifted, hardworking, and kind.

Aisha was previously a network engineer, and she somehow built an app for realtors that communicated with a SQL server…but she was self-taught and did not fully understand what she had done.  She came to camp to learn more.

Andre was a GIS technician and he was trying to learn to code on his own.  He came to camp to speed up his learning and to get a job as a GIS developer.  He is a genius, and he also helps anyone who comes to him for help.

Adrienne, Sarah, and I are trying to really determine if we like the front end or the back end the most.  I started out in the apprenticeship thinking that I would love JavaScript, and then JavaScript beat my booty.  I looked at C#, but I am not sure that I want to simply develop apps for the corporate world.  So, then…

…I bought Head First JavaScript Programming, and I am back to wanting to master the front end, again.  I don’t completely know what I want to do…

…and that seems normal until the end of the apprenticeship.  Being able to talk it through with others who understand is priceless.

Being around other burgeoning programmers is a breath of fresh air.  All I know for sure is that I love coding. I love, love, LOVE it!

I could go on and on about the people with whom I am learning, but the truth is that everyone is a rock star in their own right.

That written, I don’t have much more to share, today.

I promise to try and update again, soon…

Thank you for reading!

Christi Johnson

Christi Johnson is a blogger and a social media marketer.She is also a homeschooling mother and a digital advertising consultant.

She shows people how to use their blog for income and live a life that they have always wanted to live as creative people. If you want to be a content creator AND a great marketer, keep reading, here!
  • kimsyne

    I don’t understand half of what you are talking about but I feel the passion in your tone! I’m proud of you for sticking with it and you’re already a success in my book!

  • GirlWritingCode

    I don’t think I mentioned it in my other comment but I’ve been accepted to the next cohort! I’ll be in Houston on Monday (Jun 16) rooming with Jamie, Aisha, and Sarah! Can’t wait to meet you! -taryn

    • http://christijohnson.org ChristiJohnsonDotOrg

      You’ll love them!! Put your head down and study hard. You can totally do this! 🙂