Simple JavaScript Image Slideshow: Refactoring = Progress!

Now, I know the posts about me programming are a bit dull since I’m still very much a beginner, but since I didn’t have any activities scheduled this weekend and no work stuff to take care of, I felt like I was finally able to make some significant growth in my programming powers.  Admittedly, compared to anyone who is even remotely competent, I’m still a babbling baby, but still, it’s pretty cool to go back to something I made about a month ago from going along with a webmonkey post to going through and making it my own AND more easy to read, change, and follow along with.  I think the combination of those two things are something I really love about coding.  You can look up just about anything online (at least for the kinds of problems my beginner butt is running into), and then you can recreate bits of what you find with other knowledge you have to make them more simplistic or elegant.

CS vocabulary has been a bit new to me.  There are a lot of words I know in completely different contexts that have a very different definition in CS.  I’ve been trying to track new words I learn as I read about them and trying to see if I can understand them without my brain hurting while looking it up.  Sometimes I’m completely able to get it, and other times I sort of brain fart and feel like a toddler again.  So, for example, I read an article about a person who was working as a recruiter for a company.  This company was concerned about gender/racial bias interfering with its interview process, so together with the recruiter decided to do the programming portion of the interview with the candidates completely anonymously online.  Aside from written language (which one might argue could give some of this information away), he never saw or spoke with the candidates.  He gave them a refactoring challenge where they were to identify code smells.  When I read through the rest of the article, I was completely and utterly confused about exactly what it was he was having them do, but from what I could guess at the time he was having them look for hints of something being inefficient or problematic in the code then restructuring it.  Thanks to some quality time with my overlord Google, this turned out to mostly seem accurate.

Refactoring is when you alter the internal structure of the code without changing its external behavior.  When I wrote the first draft of my slideshow code I hadn’t any experience with objects or events, so when the site I followed along with pointed out different events, I just sort of rolled with it without really fully understanding what was going on beyond that when something was clicked, I told it to execute a function.  I also used global variables quite liberally, because that was the only way I really knew how to get some of the work done that I needed.  Even after I switched out all my functions to be methods instead, this hasn’t really changed too terribly much if I’m honest, but the beginning value of the variables is all easily accessible at the beginning of the method object.

Now, with the original script I had made a slight change to it.  I had added a while loop to create the imageArray[] since typing them in individual was not on my future desires list.  At the time I felt slightly successful being able to make that change, but ultimately I had mostly ended up with code very similar to the article as I wrote it after reading what needed to be done, and then I compared to what they had with functionality.  Not a great strategy, but again, the event handlers were a bit over my head at the time.

When I went through it to refactor, I renamed some variables to names that made more sense to me.  I added comments.  I restructured it to have the functions sorted as methods in objects and all the variables within objects as well.  None of what I did was really ground breaking, and a lot of it was work I honestly will probably change again as I continue learning in the next few weeks, but it helped me practice the skills I have learned and apply them, which is always helpful for retaining information and being able to use those skills creatively in the future.

You can go to my GitHub account to check out the code and the revision in a Gist.

One thing I need to revisit when I’m less sleepy is the event handlers.  I left them in HTML like I had before since I was running into strange errors when I tried placing them in the JavaScript instead.  I believe this was caused by setting the onclick handler and trying to pass it an argument, which I don’t believe is supposed to happen.  Without the argument, the rest of the code was no longer interested in functioning.  I checked some JavaScript documentation, but I wasn’t able to come up with an alternative that would work any better than just leaving the event handlers on the HTML page.  I will likely need to review options when I’m less sleepy, and with any luck, I’ll keep thinking about it while I dream and wake up with an answer!  I love code dreams.  So productive.

Next: to improve the Battleship game.

Advertisements
Simple JavaScript Image Slideshow: Refactoring = Progress!

I Earned A Badge For Walking! (OR it turns out gamification DOES work on me and Fitbit made me walk in the rain OR benefits of interviewing)

So as I’m sure anyone who reads on a regular basis is aware, I’ve often complained about the fact gamification doesn’t work on me.  For those lucky enough to be out of the know, gamification is the habit of sites to give you badges, points, and other silly, meaningless measures of artificial success for meeting mild milestones.  Think of it as participation trophies on steroids and then delivered with high enough frequency that anyone with a gambling addition would be lost in the abyss.  It’s employed by Treehouse, Khan Academy (for anyone who works with kiddos or IS a kiddo), Codecademy, and was popular on a number other sites as well.  In the academic arena, I was never really motivated by them because typically my drive to learn surpassed that.  So when Treehouse used to send me daily goals, I had already blown them out of the water by doing 10xs as much as what was asked of me.

This wasn’t quite the case with exercise sites.  Now, I exercise a lot typically.  In the summer, I’m outdoor constantly swimming, paddleboarding, running, hiking, and doing yard work at my parents’ house.  Before my shoulder got busted, I used to spend my winters rock climbing indoors since I’m a coward who is super anti-injury.  After my shoulder got busted, however, I’d been experiencing a few issues.  1) I was told to not go rock climbing (boo!) even if it was indoors for obvious reasons.  2) I still didn’t want to go outside in the rain.

I set a goal about a week before I had my interview with Ada Developers Academy to go exercise outside even if it was rainy in the form of walks since the indoor gym and treadmill made me not want to move anymore.  That same week, however, the weather was absolutely gorgeous, so I had no problem meeting my goal. During the interview, one of the questions was about what was something you felt you should be doing or were already doing and wanted to continue doing, and how you would plan to do so.  I felt a lot of the questions were aimed at asking if I was responsible repeatedly and trying to clarify, just in case, am I responsible?  I am!  I really, and truly am!  Even if I did unintentionally insinuated that all East coasters are blunt/rude – but that was just an example of 17-year-old me being super unfamiliar with someone saying anything playfully derogatory that wasn’t sarcasm!  27-year-old me is totally cool with that, married an Easter, and has a best friend who is pretty oblivious to sarcasm.

My “continue doing” example was to learn programming, which I have been doing.  I’m automatically reinforced for studying it, because I absolutely love it, so it’s not particularly challenging for me to continue doing.  It’s like telling me to eat dinner.  No arguments from me there!  My “should be doing” example was of going outside to exercise even in the winter.  I know I should be doing it, and when weather permits, I love it, but even when it’s a bit gross outside I need to get my mercurial butt outside and embrace the drizzle.  My plan was to put it on my calendar (done), and then obey my calendar (always do).  While I could get myself out for 30 minute walks during lunch, I still struggled to motivate myself to do much beyond that, though I’m sure if I put it on my calendar to do more I would.  It’d probably help if I got waterproof shoes that aren’t winter hiking boots.

But you know what’s better than waterproof shoes?  Electronics!  The best kind of technology.  My friend had a Fitbit that wasn’t tracking her stairs properly, and when she was sent a new one they told her to dispose of the old at the “nearest electronics recycling center”.  That would be me!

Now, gamification for other exercise sites has never really worked for me.  Here’s why: it wasn’t attached to my wrist.  A Fitbit for me is essentially an adult version of the tomogatchi pets I had as a kid because my mom told me that two dogs, lizards, 2 hermit crabs, 4 birds, and a koi pond with a fish unfortunately named Jelly Boy (he was squishy!) was enough pets, especially after the bull frogs ate our entire goldfish pond.  It satisfies all my same button pressing, staring at progress urges, with the added bonus that there’s no fake poo to clean up or the risk of fake pets dying by the use of the fitbit (that I’m aware of).  So competing with my friend, earning badges, it’s all amazing.  And I can track my sleep patterns! Mind?  Blown. Did I mention I also have access to a bunch of graphs with all this data that I can export into an excel or csv file?  All my geeky data collection urges are satisfied too.

In conclusion, I can no longer convince myself I’m above addictive psychology tricks like gamification, but I already knew I could succumb to them based on Steam Summer Sales alone.  Despite not having waterproof shoes, I walked 4.5 miles today, over 10,000 steps, and multiple flights of stairs.  All because when I checked my phone it told me I hadn’t completed those things successfully yet, and glancing at the time on my Fitbit when I walked to the restroom confirmed this as well.  If all those websites trying to get me to exercise years ago were connected to my wrist, I would have been in such better shape. Now to track my sleeping for another night and wonder if there’s a correlation between “restless sleep”, and the fact I read books about coding before bed.  Me thinks perhaps.

I Earned A Badge For Walking! (OR it turns out gamification DOES work on me and Fitbit made me walk in the rain OR benefits of interviewing)

You Sank My Battleship! (Learning JavaScript Continued)

So I’ve been learning JavaScript using Head First’s book, as I’ve mentioned about 12 times when frustrated with the pacing of other sources.  Around the 8th chapter, you’re given the goal of developing a JavaScript web app for battleship.  They go through it step by step how to make it, but typically when given a project, I’ll read the next step and create it on my own.  I still don’t feel I have a great conceptualization of how those steps are reached – I’m working on it – but this is a good start.  Afterward, I tested, and then I’d compare my code to the book’s.  Obviously, I learned through the book, so in some areas what I produced as incredibly similar to what the book suggested, and sometimes what I did was less efficient, and others I believed it was more efficient.  As far as event handlers, though, I had to look up information on that mostly and definitely need to learn more before going further.

Battleship Link!

My next steps for it are to include a way for the player to place ships for the computer to guess in order to compete and add sound.  I think this will help with my issue with feeling a lack of experience going from start to finish with a project.  Also, my goal is to change what I have to make it response as well, since currently on my phone, while I can zoom in and play, I feel like I should play anywhere!

The game itself isn’t very fun since it’s like playing Battleship with a wall, but I still think it’s a pretty good project for learning.  Plus, it’s just nice to look lovingly at something you made and feel all productive about it.

What I’ve learned so far with this project: testing after each implementation of a code block is essential.  Objects make me feel warm and fuzzy, and it’s lovely to be able to make information more easily structured using them, and I haven’t really used them until now.

That’s all the post for today, folks.  Back to work I go!  Happy Digital Learning Day!  Practice safe computing!

You Sank My Battleship! (Learning JavaScript Continued)

Change: IT’S COMING FOR YOU! (AKA puberty, husbands, and JavaScript)

I’m going to make a bold statement that you should just accept as fact: I handle massive change quite well.  Now, hear me out, I legitimately handle it really well.  For you naysayers, what I don’t handle well is the uncertainty of knowing whether or not massive change will happen.  (As a warning, the next few paragraphs go into moderate detail about my realization that puberty was a thing and a thing I would be experiencing eventually.  Please feel free to skip this if your stomach isn’t up for armpit hair.  I won’t judge you.  Actually, I won’t even know about it, which is even better!  Thank you anonymity of the internet which I’ve violated by using my real name on my blog and linking to it from my personal website.)

For example, when I was in 3rd grade and I had the misfortune of being exposed to my first sex ed video about your body changing in strange and mysterious ways thanks to being in a multi-age classroom where no one else in the building was exposed to it until 5th grade.  I was distraught.  Fat balls bouncing around on my chest until the end of time that would inflate and shrink based on weight, age, and baby-making status?  That sounded horrible.  And why more hair?  I kept seeing all these razor commercials, and so I was pretty sure growing more hair was really just a ploy to make them more money and there had to be a way to stop it.  My armpits were completely comfortable without anything stinky coming out of them, and no, I don’t want to rub something inside them every day to keep from offending other people’s nostrils, but thank you for the soap.

The kicker?  I was going to bleed for about a week once a month until sometime in my 50s or 60s?  Why?  No, seriously, why?  That seemed more like a ploy to slowly kill me than an inevitable fact, and I immediately complained to my teacher about these potential changes.  She told me it was something all young women go through, it was miraculous, so on and so forth, to which I was horrified.  I needed to know when.  If I knew when these horrendous things would happen to my body, warping it into a grotesque vessel for this torment supposedly known as “womanhood” topped off with this thing called cramps that until then I had only heard of as a reason to not go swimming after eating (false, by the way), then I knew I could prepare for it.

I took the only reasonable action.  I demanded my teacher tell me exactly when this horror would be unleashed upon my body, to which she responded, “Everyone has it happen eventually, it’s just whenever is the right time for you, dear!”  Dear?!  Ms. C, I was going to bleed most of my life and experience something that kills you when you go swimming with hair all over the place and strange, awful smells dripping off my body, and I was now “dear”?  Absolutely not.  Completely inaccurate!

I immediately set to waiting, uncertain when to prepare for the change, but knowing it would come.  I prematurely started doing things my older sisters were doing, knowing it would inevitably be my fate.  I shaved my nearly hairless legs and armpits.  I wore a sports bra.  I waited with the madness once encompassed by Waiting for Godot, and this was in the days before smart phones, so waiting didn’t involve reading the internet for entertainment either.  It was silent patience embodied by pre-adolescent madness.  I had encountered limbo.  Waiting for Armpit Hair.

That’s the kind of change I don’t handle the best – the kind that is maybe going to happen but hasn’t happened yet and you have no real way of knowing when so sort of make plans for it but also sort of don’t because you need to continue existing as you are now or else you’ll be a useless lump of lady meat.  So I’ve made an effort to address that, since after all the root source of my issues with the unknown is anxiety about when it will be unleashed upon me, which is simply silly.  After all, the most miraculous thing about life is that it happens while you’re making plans, and most iterations of those plans become wasted.  Fortunately, being the nerd that I am, I create multiple iterations of most plans, so while the vast majority are wasted, there’s always one lucky guy that gets to be executed, and he prances forth before all my wasted energy that’s discarded to the side as irrelevant, bragging and boasting about his momentary utilitarianism.

Now, for you naysayers, let me give you some examples of change I handled quite well.  I, a former commitment-phobic lady who hadn’t really dated anyone for more than 3 dates aside from one abnormal instance prior that was still within a month’s span, very easily accepted when I met my husband I would be an idiot not to spend the rest of my life with him, so married his handsome self.  Once I realized I was going to most likely marry him, the when of it all caused some stress, but thanks to constant exposure to that uncertainty (including my husband moving up the wedding date so we had 3 weeks to throw it together in the middle of the school year, which was amazing though very tiring), I got over it, which has been pretty helpful for rolling along with a fairly impulsive man.

I transitioned into an independent adult pretty well too.  Talking to a lot of my friends in undergrad and some recent graduates at the time, a number of people apparently had absolutely no money sense when they were first independent, and though credit cards were free money.  I, fortunately, never had that mindset, so I never built a substantial amount of debt I’d need to claw my way out of.  There’s definitely some weird stuff about being an independent adult, such as retirement and insurance, but researching it hasn’t been too rough, and I feel I’ve generally made fairly good decisions in those areas.  I’m pretty grateful to my mom for my money sense, since when I was a teenager I thought it was weird she talked to me about money, but I was later grateful she did.  There were some lessons that I’d rather hear from her than learn elsewhere, including the infamous, “Your father wants to buy a tractor and we live on a 3000 sqft lot”.

Finally, the decision to program.  I won’t go into too much detail about what prompted the decision, but I have set solidly that this is what I want to do.  Programming and I have been 10 steps apart most of my life as I have previously mentioned, and now that I’ve accepted the fact that I love it, I feel like kicking myself for not jumping in head first sooner.  This isn’t to say I have any regrets about decisions I’ve made in the past as far as my education and career go, and I certainly think every experience I’ve had has helped shape who I am today.  I’ve learned so much patience, empathy, compassion, working with little resources, and how to positively influence someone’s life to help them make more proactive and productive decisions.  There are leadership skills you learn in teaching that if you can apply in other areas of your life lead to a great deal of positive change for those around you in general.  I know how to have tough conversations with people about anything from substance abuse, body odor, or the injury their decisions are causing their relationships with others and themselves.  I know how to tell someone they’re wrong, but do so in a way that they know I still care about them, and that their wrongness doesn’t impact their goodness.  Teaching has genuinely made me a better human being.

Coding takes a lot of aspects that I love about teaching but applies them in a very different way.  To name a few, you constantly learn new information to better implement practices (though for me currently this may be extremely more so since I’m such a novice).  You also get to solve problems and puzzles, which I absolutely love.  It’s great tackling a puzzle without clearly knowing the solution then reaching that, “Aha!” moment later.  Then there’s the collaboration.  Talking to someone else about code and reading their code helps solidify my understanding of concepts, just like watching someone else interact with a student with challenging behavior in the classroom to learn their approach.  I also love that once you learn something new that can make your code more elegant or efficient, being able to go back and revise it, test it immediately, and see the results.  Testing it and trying to break it is great, since it’s like finding holes in your logic constantly then attempting to improve it.

Alright, new goal, make less posts where I inevitably start talking about how much I like coding and learning.

I’m currently learning JavaScript, and after jumping through many sources of information trying to find what works well for me, I have set on Head First’s JavaScript book.  I’m really enjoying it.  I’m on day 3 using it, and already I’ve covered more and more in depth than through months of using other modules to learn.  Part of why it’s working for me is the fact you can quickly read sections you’ve got down, but also because of how many different ways it shows different vocabulary and concepts.  Retaining it all is so much easier than having someone pass over a term briefly but never revisit it.  I really wish they had a recent book on Python too.

My current project is a game of Battleship.  I’m not too far on at at the moment, mostly working on data structures, but I’m pretty excited to get it all working.  In fact, I better hit the books and keep learning so I can get it down.

On shoulder related news, I had a doctor’s visit today.  I’m on the same restrictions for 6 more weeks, but he gave me a steroid injection in my joint, and I have got to tell you, so much less pain afterward.  It was amazing.  The reason for it is so we can push it in PT a bit harder since currently he believes pain is inhibiting my progress.  More pushing is amazing news.  I feel like it has been forever at this point, likely because it has been, but I’m truly grateful for the progress I’ve made.  Each day I feel like I’m getting a bit more of my strength back, and each day the pain decreases a bit more.

Change: IT’S COMING FOR YOU! (AKA puberty, husbands, and JavaScript)

MOOCs (Treehouse, Udacity, Udemy, Codecademy, etc): A source of slooooow frustration to learn coding. Long live books!

I’ve recently learned after another week of blog neglect that I had a visitor from Canada, Jamaica, and Germany.  Welcome, non-Americans!  Hello to all the American readers as well.  My faithful 15 who see this show up in their news feed then click away in hopes of something more interesting.  You’re appreciated.  Adored even.  Adored so much that I drew an MS paint picture of all of you to show my adoration!

followers

Sorry for the pile of you stacked together.  I ran out of room for standing people, and then my hand got tired.  I did, however, include that one guy’s two kids.  Yeah, you know who you are, that one guy, and thanks to personal information you divulged on the internet I know you have children.  Don’t worry, you know about my little dog too, so we’re pretty even on the creepy factor.

If you’re the person who is singing, smiling, or permanently in a chair refusing to move while everyone else is standing, you’re awesome.  You’re not like the other followers who just pile up on the floor when the room gets crowded or awkwardly stand on other people’s heads.  You know what’s up.

Alright, odd monologue about nothing aside, let’s get back to the point, shall we?

I previously wrote a post about where to learn web coding where I compared Udacity, Udemy, and Codecademy as either very cheap or free learning methods.  I ultimately decided Udacity was for me, then had to go back and redact the monkeys out of that statement when I realized Udacity was for me situationally but progressively got less for me and more for no one as they stopped describing the “why” and got into just straight up “how”, which put me back to inferring the why a lot, which I’m fully capable of doing, but for very basic things was just so inefficient and rather than watching video lectures I could get my Google search on much faster (which is to say still rather slowly in comparison to having a skilled teacher instruct me).  I then thought, hmm, well, I keep getting spammed by CodeSchool and Treehouse ads on youtube, why not succumb to my Google overlords?

I went with Treehouse because my husband kept telling me how great it was, and I’m super easily influenced by incredibly handsome men who are easily excitable.  Plus, upon researching it, everyone seemed to support it for beginners and CodeSchool was more for intermediate people.  After Codecademy and some Udacity, I didn’t feel very intermediate.  So I signed up, and after the first course on “how to make a website”, I was grateful how much faster I gained the information compared to Udacity and how complete it was.  I happily petered over to my website and put some fancy looking things on it that changed size and disappeared as the screen resolution shrunk.  Then I did the next part, which was “CSS basics”.  Which was hours of the same information.  I was not pleased!  But I figured I grew in depth slightly, so maybe it was worthwhile.  Or so I tried to convince myself.

Then I got to JavaScript basics.  Also, no bad.  It was a bit slow, very a bit slow, and I was introduced to a concept and would start completing the programs they were going to use as an example before the example happened.  I figured it was good practice, so why not carry on?  Then…then I got to HTML forms.  I heard the advice to practice with CSS on your own since how you format an HTML form behaves in strange ways compared to usual HTML and that we couldn’t actually do anything with the form without a server side language either.  This made me want to bang my head on the wall.  I mean, what’s the point in wasting the time to say that if you aren’t going to go over why it behaves strange in comparison and what some of that behavior looks like?  But again, I used my inferential skills, and all was well.  The second part was incredibly frustrating, though.  I’ve been trying to apply whatever I learn as soon as I learn it so I can retain it, however having just learned a skill I couldn’t do more with than make a form that went to nowhere wasn’t particularly useful for practicing.  Motivating myself to get through that section involved a lot of tooth pulling.

I’ve moved on to more JavaScript, but it still feels like it’s moving slow.  I’ve invested over 25 hours into this program so far based on their in program timer for how long it should take to complete (and I’m not sure how much their track changes have adjusted this), but I feel like my retention is pretty poor.  Since doing my photo gallery slide show side project and learning far more from that, I had continued doing Treehouse, but I realized my issue with it.

Treehouse is intended for everyone starting at next to no computer experience, which is made pretty clear from their first course in the Front End Web Developer track.  Massively Open Online Courses are like general education in public school.  It’s meant to serve everybody and assumes everyone knows nothing, even though that’s not necessarily the case.  This isn’t a bad thing, it’s just if you can infer, and if you need some redundancy for retention but the redundancy you respond to isn’t someone telling you the same thing repeatedly, then it’s probably not a great resource for you.  This is unfortunate since I respond really well to hearing information then discussing it with others, and MOOCs provide auditory input.  Consequently, I think a bootcamp such as ADA would be a good match for my learning style, but whether or not I will be able to participate is undetermined yet (since, uh, applicants hear back around mid-March for interviews and end of March for actual acceptance?).  Whether or not ADA is in my future, I still want to learn, so I’ve moved on to another resource.

A book!  I know, I know, learning from books is a super novel idea that no one until this very moment has thought of.  My husband had used the Head First C# book, but he eventually found one part too hard and gave up.  I was never particularly interested in C#, so I never checked it out, but I checked out a couple of their other books while loitering in book stores and then checking the kindle sample version.  The strategies employed are simply good teaching (and entertaining!), and on top of that when I looked at the Java book, the first chapter nearly caught me up with everything I’d learned in roughly 10 hours+ on Treehouse.  So…yeah, I went with this book for the time being.  It’s super interesting to read and engaging, which helps with some of the motivational deficits I’ve experienced with watching MOOC videos.  They had an older Javascript book that was apparently pretty not great, but the internet tells me this is a good resource.  Then again, the internet also told me that Udacity, Treehouse, Udemy, and Codecademy were good resources, which to a point they were, but had a lot of room to grow.

I haven’t decided if I’ll keep dabbling on Treehouse for a bit or not.  After multiple lessons that I couldn’t put into practice, the slow pacing, and the seemingly limited breadth, I may have outgrown it.  The biggest reason for people to go to MOOCs instead of scouring the internet is because they want to save the time spent identifying resources to learn, what to learn, and sometimes the more personable approach to learning with a video lecturer.  A lot of MOOCs still seem to structure their content illogically (ex. HTML forms without any back-end knowledge to make it actually work placed in the middle of JavaScript lessons when no JavaScript is actually needed in order to use HTML forms), which is a good area to improve, and some focus more on having their students regurgitate information than practicing to mastery.  Udacity’s end of unit assignments, practice problems, and optional homework were great for independent practice, but often the quality of teaching dipped.  Treehouse also started having some independent practice exercises as I progressed, but the slow pacing caused me to treat everything like an independent practice exercise, which left me with a new content deficit.  Determining sequential, engaging curriculum is an area any education needs to firmly establish to help educate its students, let alone retain them.  Pacing, however, is usually more an indicator of who you’re trying to teach.

Hopefully my books + Google strategy will go well.  Otherwise CodeSchool has nearly all of the MEAN stack taught on their site, and that might be an appealing alternative.  So far, though, I’m a big fan of the book strategy.  …Don’t read near the end of my last blog post discussing coding resources where I said the same thing then shortly after changed my mind.

MOOCs (Treehouse, Udacity, Udemy, Codecademy, etc): A source of slooooow frustration to learn coding. Long live books!

Another New Year! (sort of) and Other Sources of Reflection

Happy Year of the Goat!  For the first time, I was part of hosting the Chinese New Year celebration rather than mooching food and butchering my knowledge of Mandarin to say thank you.  Much food happened, we made the best spring rolls of all time, then we ate them all with friends and family.  Everyone was happy.

This allowed me an experience I typically have twice a year.  Once during New Years Eve and again on my birthday in August, I typically have this moment where I reflect on where I was this time last year and realize what an idiot I was.  Without fail, I think about myself a year ago and always know that I’ve grown a lot and that if I met myself in the past and had a conversation, I would stand in disbelief staring at myself and my actions, regarding myself as ignorant, naive, and childish in comparison to the present iteration.  This is one of the many reasons I’m incredibly against any attempts at time travel and time travel movies just make me uncomfortable while I suffer through their infinite plot holes.

If I had to meet my past self, we’d inevitably get into a fight.  My present self would be frustrated that my past self didn’t know what my present self does even though they’re technically the same person, and my past self would feel my present self was awfully sure of herself and borderline arrogant.  This most likely would stem from the fact not enough time had passed that I feel like there should be a significant difference in our awareness, and given that it is essentially me who isn’t living up to my standards, I’d get irritated, where as with anyone else who doesn’t live up to my standards I’m generally pretty supportive and encouraging to help them improve.

If, however, I was able to meet up with a past self that was a significant amount younger, say a decade or so, I imagine we’d get along quite well and spend the time figuring out what age I actually was when something happened rather than assuming I was 8.  My present self would admire how dorky and awkward my past self was, feeling accomplished that as an adult I had managed to cover it enough that when I announce it to people who know me at a professional level they don’t believe it is true, but as soon as that boundary crosses into friendship they can’t help but be awestruck at how long I managed to cover and compensate for my social flaws thanks to a large amount of confidence making it appear as though everything I did was normal.  My past self would look up to my present self, proud of the fact I had a dog and finally started studying coding rather than hesitantly colliding with it before running away over and over again.  They’d be a bit perplexed about how the husband happened, but probably accept it if they happened to meet present husband as well.

So, yeah, time travel should never be a thing.

On Chinese New Year, I briefly thought back to where I was last year, and I, as always, just ended up feeling sort of weird about myself.  This time last year my husband and I had been engaged for a couple months and felt sort of weird about it (as a former commitment-phobic who didn’t like spending more than a week with someone), had a sinus infection thanks to one of my dear students snotting all over me in the most epic sneeze in the history of mankind during a math lesson, and I couldn’t imagine doing anything in my career that wasn’t teaching.  This year, I’m married to my dear husband and feel amazing about it, have a shoulder injury I spend hours each week at PT to resolve due to a very angry student, and really want to become a programmer.

Those are all some pretty big changes.  I’m especially grateful that my husband has been as supportive as he is about my desire to change careers, though I know the news has been very shocking to a few of my colleagues since I am very good at my job.  The reasons for it are pretty strong too.  With my injury, I’ve no longer been able to look away from the severe problems in the education system that when you’re working with students on a day to day basis you come across and bump heads with trying to get resources or assistance needed to work with severely impacted students with emotional and behavioral disorders from district administrators who do not respond to phone calls or emails.  I was pretty much shoved directly into it, both figuratively and literally, staring at it and observing it for hours on end every day with no way to ignore it, and those issues are ultimately what lead to the injury in the first place when I received no response.  I could write a novel about these challenges and their implications for the safety of children and teachers let alone the education of students, but I’ll save that for another time.

Since I was eventually placed on actual light work duty, the work I was asked to do was mostly paperwork and on the lucky days helping teachers improve their paperwork to make a positive impact for students.  This meant I was doing a job I no longer took home with me, and the hours extra beyond the typical day were nearly nonexistent aside from attempting to compensate for hours missed due to physical therapy.  I had a lot of time to think about and explore interests, particularly ones I could do without intense use of the right side of my body.  I tried something I had spent most of my life avoiding fully exploring: programming.

I was hesitant at first when I realized I loved it as I gained very basic knowledge of C++ and made silly little programs that did very basic things such as a calculator that no one but me would ever use.  I knew myself well enough to know what when I learned anything new my instant gut reaction was blind love and adoration but that this was caused largely by the novelty of the knowledge and when you first start learning something you see great improvement without much effort.  As I kept going though, even tuckered through scripting in HTML and CSS which were very less mentally stimulating, I still found I enjoyed applying what I learned to actual projects I could improve, make more efficient, and see the changes almost immediately.  Don’t get me wrong – I’m all for delayed gratification.  I love teaching where I wouldn’t see a student’s behavioral growth for at least a month after the initial intervention had been implemented, but that month was hard and often involved multiple instances of unsafe behavior in the mean time.  But the quick way of being able to test and  compile your code, find test cases that would potentially break it and making sure you’ve worked around it, it’s almost like the whole game-ification movement in educational websites.  You get little rewards for your success, but rather than being entirely superficial like the badges on those sites, your reward is simple, functional code.

I love it.  I love everything you can do with programming, the possibilities that can be unlocked, the way computers can do so much that as a human being would take me exponentially longer to process and compute.  I love thinking about a problem then making a simple solution and writing a program to implement that solution then addressing cases that break it.  I love the constant improvement, and adore talking to other people about solutions to problems to learn from what they have to share and how they explain their approach.  My poor mentors have no shortage of me staring at them with love and adoration as I show them my horrible scraps of code and searching the internet for other ways people have solved similar problems with their explanations to the approach.  The constant learning and problem solving is something I loved about teaching, and I similarly love it about programming.

Ultimately, one of the aspects I love most about coding is the fact you get to have that “New Years” feeling of looking back and thinking, “I KNEW NOTHING!  I WAS SO FOOLISH!” on nearly a daily basis – sometimes even multiple times an hour.  In a world without time travel, who doesn’t love a feeling of constant growth every time they figure out a problem they were stuck on?

Some very good news: my physical therapist last estimated that we were just a few more weeks away from me never needing to see her again.  I like the lady, but I really would love not seeing her more than I see most of my friends and family.  On my last progress report day, I scored a “4 to 4-” on a 5 point scale, with 5 points being normal and no need for any interventions.  When I first went in back in December I was at a 2, meaning I had limited range of motion and couldn’t move my arm against gravity very well.  A 4 to 4- means I have most of my range of motion back and can handle some resistance, but still not quite the normal range.

Also the application for ADA closes tomorrow at 5PM.  It’s a web development bootcamp for ladies that would start up in May.  Their programs used to be 6 months in class and 6 months at an internship, but now it’s 7 months in class and 5 months at an internship through one of their sponsoring companies.  I think the extended class time in comparison to other boot camps would be beneficial since typically short term cramming doesn’t lead to long term retention for anyone.  On top of that, I like the fact they have an internship tied directly to it in order to get some experience in a work environment where it’s pretty well accepted that you’re there to work but also very much to learn.  After all, that’s why programs like University of Waterloo’s are so effective.  They place their students in internships constantly so they can apply what they know to real-world scenarios, or in my case work with legacy code.

I submitted my application last week after accepting that talking to a web cam was not my strong point and something I gradually grew worse at doing the more I practiced.  This was disconcertingly similar to my attempts of learning how to dance in middle school prior to our first school dance.  I hope ADA will find it in their heart of hearts to find out I’m actually marginally articulate in person.  If not, I’ll resign myself to continuing to explore other options.

Complete self-study is supposedly a reasonable option, but I would rather have more experience coding with people instead of in isolation since that’s more what the work environment is like in my experience, and I know you learn more from others than you will ever learn alone.  Other boot camps are on the table as well, but the Seattle-local ones typically advertise that in the same time frame it would have been to attend ADA’s classroom only portion but without support or colleagues for half of that time, you will be work ready.  In the mean time, I intend to continue independently studying as I have been in my free time after work and hope I will be contacted for an interview.

There isn’t a doubt in my mind that I will become a programmer; it’s really just a matter of how I’m going to get there rather than if I will.

Another New Year! (sort of) and Other Sources of Reflection

Chinese New Year (Goat version) & JavaScript Slide Shows

This past Saturday was Valentine’s Day, and I have to tell you, mine was quite wonderful.  I went on multiple walks by the beach since it was sunny and dry in the greater Seattle area, wore purple PJ pants with polar bears (there’s that alliteration again!) while working on my website so the “Father’s Photos” section would actually lead somewhere, and played some League of Legends with the husband where we died repeatedly in the most epic fashion possible until his little brother joined us to end our losing streak.

All in all, a very productive day, topped off by trying to figure out what exactly I’m supposed to cook for our Chinese New Year party after deciding my dear husband and I needed to establish a new tradition.  So far I’m at jiaozi (potstickers or gyoza for my Japanese-culinary related friends) for prosperity, oranges because it sounds like the word gold and tangerines for the word luck, long noodles for longevity, pomelo because it sounds similar to the words prosperity and status, spring rolls for wealth, tea eggs for fertility since I know a couple just had a bun in the oven, and a whole fish for prosperity again I believe.  I briefly thought about making jai, but it’s such a complicated recipe with ingredients I’m not familiar with that I’m a bit hesitant to try making it for the first time with a bunch of people coming over since it’s not very kind to feed guests mush!  Even if it looks amazing and would appease my vegetarian friends.  We’ve also made jokes that since it’s the year of the goat we should play the screaming goats videos in the background the entire time to set the mood.

On a nerdier note, following dedicating 4 days to completing my application to ADA (and accepting the fact that I was just getting progressively worse at talking to a webcam rather than improving so deciding to submit it), I had been struggling more than I anticipated at resuming learning JavaScript on Treehouse as part of their front-end web development track.  I think my biggest issue was that it’s enough repeat from what I’ve learned of Python that I felt like I could probably figure it out with some internet time instead of video time, but enough new material that I worried the end result would be slower.  Instead of avoiding it any further, I decided to see whether or not I was correct.  I had 2 sections on my website I hadn’t added yet – Father’s Photos which was intended to be a gallery of the pictures my dad has taken since he’s gotten his new camera for Christmas, and then another section which was either going to be a wedding photo gallery or notes from friends and family that fill me with warm fuzzy feels.  Currently it just has a place holder image while I decide what I want to do.  My issue with the track on Treehouse was that it wasn’t directly tied to what I wanted to do, and it didn’t look like I’d be learning the skills necessary to do it any time soon, and in the mean time it was a lot of repeat of basic programming knowledge I’d already gained elsewhere, so motivating myself was significantly harder.

So I plunked down, googled how to make a slide show or gallery, and came up with a bunch of options that were way over my head or were just downloading a script that used jquery rather than doing it myself.  Where’s the fun in that?  Finally, I found something that was a good starting point at Webmonkey.com.  This possessed a few issues, though.  One, while I understood the code while I went through it, I really didn’t want to type this line 32 times:

imageArray[imageNum++] = new imageItem(imageDir + "01.jpg")

Also, I knew about loops.  Beautiful, simplistic, time-saving loops.  I didn’t know how to do them in JavaScript, so I guessed at first and found out it worked without needing to look up syntax.  So while I mostly used the code described there, I made a few changes.  1) I used a while loop to make my image location array.  2) Instead of putting the script inside the HTML, I changed it slightly so it would locate the folder for the image files through the root directory and I could put my little JavaScript in a JS folder.  3) I wanted responsive image sizes instead of a set width and height, so I kept it set to 100% of its containing element.  After I finished, I stylized the CSS a bit so the options below the image for pause, play, previous and next where were I wanted them, rounded the corners on the photos, and called it good.  It didn’t take too terribly long, and I could definitely improve it with some buttons for the pause/play/previous/next buttons, but I sort of like how simplistic the text looks since it doesn’t distract from the photos.  I enjoyed this project since I learned a lot about how the script interacts with the HTML, and that was something that until doing this I didn’t quite understand – how to integrate purposeful scripts across html/css/js.

By the way, does anyone know if when you use Google as a verb if it’s supposed to be lowercase?  I feel like the answer is yes, but if you make a verb out of a proper noun, it feels like it may be appropriate to capitalize it.  Oh, linguistics and colloquialisms, I love you so.

Now, off to figure out what I want the last section of my website to be so I have another goal to independently study as I continue to improve the gallery section.  After finishing, I found the motivation to continue with Treehouse since I don’t feel like I’m avoiding working on something productive while I go through it.

Chinese New Year (Goat version) & JavaScript Slide Shows