Java Jabba Doooooo!

"No," Imad said.

I think my tagline is great. He's just jealous he didn't come up with it.
*Disclaimer: I understand that Java is not JavaScript. But "JavaScript jabba doo!" does not have the same sound or flair/Flinstones-quality I seek. 

This week was my first foray into a programming language. I was intimidated for the longest time as I had thought I needed to know HTML and CSS before coding a computer programming language. I bought a course on web development on Udemy at the end of 2016. It was great but also extensive and at the time, I had other priorities and did not finish the first assignment so I never moved on from the first unit.

That's e-learning!

A gamer told me about Codecademy when I was in first year. I don't play games but I've come into groups of seriously competitive gamers a couple times in my time at university. It took four years of stewing for me to make use of the resource (the well-developed free online curriculum).

I tend to write notes by hand unless I'm in a lecture and I want to save as much of the verbal lesson as possible.

Microfiber cloth to protect the sanctity of my notebook on public surfaces. Cat pencil case to show everyone that I like cats and they better not say anything negative about them.




I did good this week. Monday was Starbucks Canada inclusivity training; Tuesday, I finished the first unit of Introduction to Javascript on Codecademy; Wednesday I had my teeth cleaned and almost finished unit 2; Thursday, I bought 3 Rayon blouses at Uniqlo at Toronto Eaton Centre for my new workplace starting Monday, then studied JavaScript with some residual gum soreness.

Chapter 5 of the third unit stumped me. Below is a photo of my completion of chapter 4, it was a lesson on how to write a basic function with parameters. The scenario was ordering pizza. It all made sense up until in chapter 5, they asked to add a variable that would count the number of orders. The answer should be three as the takeOrder function was called three times. I did not know how to include it.



The solution was an increment operator. Codecademy's solution was orderCount++. I could not understand how just by saying

let orderCount = 0

then include orderCount++ in the function that it would yield the correct number of times the function was called because how does the program know that orderCount is referring to takeOrder? Where was the relationship established?

Only now have I realized that orderCount merely counts itself as orderCount++ is orderCount = orderCount + 1 so it was counting the amount of times that itself appeared. It was not referring directly to takeOrder.

Am I correctly concluding?

I spent an hour trying to understand the solution. The epiphany hits me now, three days later. I did not progress as I do not like to skip over confusion for the sake of speed. Also, assuming that future lessons build upon the previous, it would be better to understand the code in the early stage. 

Just like how I started my learning on JavaScript, I end this post with my holy cry:

JAVA JABBA DOOOOOoOO!!!




Progress: Twenty per cent into Introduction to JavaScript.

Comments

Popular posts from this blog

Quick Maths

The End of Tradition