August 1

What’s your function?

The last few months I’ve been wanting to expand my data and skill set by learning something new.  I’ve long been a fan of content creators and have frankly been somewhat in awe of their abilities.  Content creators take an idea, be it their own idea or a concept from someone else, and turn it into something interactive and make it seem almost tangible.  To me the act of creating or producing something from your own mind is a very powerful skill.

Programming or coding as it is commonly called, is a skill which I’ve never had a really good handle on.  Sure I can do ksh/csh/bash scripting on the UNIX/Linux platform but shell scripting is very limited in scope and abilities, used primarily for automating administrative tasks on a specific server or set of servers.  I want to go beyond that and be able to build something almost universally accessible and appropriately interactive.

I asked my present employer if they might subsidize my training in this new skill but was turned down with the logic of “we aren’t programmers.”, regardless of how valuable that skill would be to my team.

Never one to take “no” for an answer, I started looking into other alternatives and found Code Academy.

For the last two weeks I’ve been going through training at Code Academy in HTML/CSS and JavaScript completely free and entirely at my own pace.  I have found the lessons to be challenging at times but very well laid out, very logical, and very well written.  I’ve already started working on building an interactive webpage at the office for my team to use as a starting point for accessing our frequently used applications.

functionThe latest lesson that I struggled with for a couple of hours was Javascript functions.  This particular code to the left confused me for a while, but I did eventually get it to work.  I’m so proud of my little accomplishment that it deserves this long-winded post.  :)

In the code at line 3, I declare a variable called sleepCheck which is a function expecting 1 parameter called numHours.  At line 4 I write the value of the parameter to the console so I can verify it’s the right number.  Line 5 starts an if/then comparison which checks the parameter to see if it is greater than or equal to 8.  If the comparison is true, line 6 returns the statement.  If the comparison is false, line 7 returns the other statement.  Finally on line 11, I call the function sleepCheck and give it a parameter of 10.  When the script runs, it will return the statement at line 6.

This has made me very happy today.  :)  I really do love to learn new things, and I want to say “Thank you!” so very much to the folks at Code Academy for making this available, easy, and free.



Tags: , ,

Copyright © 2016 Katherine Loux. All rights reserved.

Posted August 1, 2014 by Kate in category "GeekStuff", "Happy Things