Django Girls Seattle and Reading List for Python

Yikes!  Long time, no post!  Sorry, my faithful few readers, you’re much appreciated.  Here’s some recommended reading, and a small summary of what I’ve been up to!

Python recommended reading list:

  1. Django Girls tutorial gives you a quick and dirty introduction to Python where you can actually start doing things.
  2. Coursera’s Introduction to Python is good for those without any programming experience looking to learn the basics of Python by building games.  It has good projects, though so does Udacity’s Intro to Computer Science that will use your intro skills.
  3. How to Think Like a Computer Scientist is another free online book that is a great introduction to programming and problem solving.
  4. Problem Solving with Algorithms and Data Structures in Python is a free online book that is good once you have the basics of Python down to learn more about algorithms and data structures.

On August 7th/8th, there will be a Django Girls workshop in Seattle, and I encourage others to join!  It’s intended for those with very little/no programming experience to get their feet wet making a blog with Django and Python.  Check out Django Girls Seattle for more information!  I will be coaching, and I believe they still need more coaches as well.

I’ve also been playing with the Meteor framework for JS.  It solves a lot of the frustrating issues with the MEAN stack and instead slops everything together in a beautiful, seamless package.  It’s lovely.  I’ve seen it compared to Rails for Ruby, but it’s considered more seamless because of all the JavaScript on every side, which I personally love.  I’m not going to lie – I like JavaScript.  Hell, I love JavaScript.  I know that’s not a popular opinion amongst programmers, but it’s one that’s growing!

And finally, for those who are worried about my physical well-being…

Physical therapy is still going for my lovely shoulder, which is always fun, but it’s getting stronger.  I still have my shoulder blade winging all the time, unfortunately, but that’s slowly getting better which is good.  2 months from now and it will have been a year since I was injured and a bit longer since I decided to make the career change.  It’s always interesting thinking about the events that set you on your current path.

Also I started an internship!  I’ll go more into that later,  but it’s very exciting!

Advertisement
Django Girls Seattle and Reading List for Python

Usernames: An Opportunity to Name Yourself…Poorly (until you grow old and just use your real name).

AIM – The Initial Introduction to Self-Naming

Welcome to a non-coding related blog post.  I hope you enjoy your stay.  Today’s topic?  Usernames.  I didn’t realize this when I was younger, but when I was about 10-years-old, I was granted access to this program called AOL Instant Messenger or AIM when I was at my uncle’s house and connected to the internet for the first time with my big sister.  This was probably negligent on all involved party’s sides, since I spent most of my early adolescence getting all my social needs met through technology when I wasn’t at school with my parents asking me to sneak out and go to parties like my older sisters did, but it also lead to me needing to do something I’d never even considered.  Give myself a name with which other people could call me and contact me.  A username.

AIM logo
A running yellow man. My husband would say this was indicative of my future taste in men. I would say his skin is more olive than yellow, but I do love it when he runs. ♥

DBZMeetsMoon

My first few usernames on AIM were rather classy based on the media I consumed at the time.  For example, I loved Dragon Ball Z and Sailor Moon, so my first user ID was DBZMeetsMoon.  If this had actually happened, I imagine something like this would be the consequence:

Sailor Moon chasing DBZ character for blowing up the moon.

And don’t you dare pretend for a second that you haven’t briefly hoped this would happen as a kid if you were young in the 90s.  I’m looking at you DBZ purists who are offended by the possibility.

More Refined Tastes: xXXx/zZZz

As I matured, however, to a socially awkward middle schooler, my tastes also matured.  Rather than twirling moon princesses and guys grunting as they glowed colors around them (because grunting makes you glow, clearly, that’s why they say women glow after giving birth), I moved onto giant robots.  Gundam Wing.

Consequently, my next username was TrowaBartonGirl.  Not to be confused with Trowa Barton’s Girl in a romantic connotation.  No, no, I just liked the character Trowa Barton (because who doesn’t admire a guy suffering from amnesia by operating heavy machinery?) and I was a girl, so I decided to combine those two details into a single username.  Plus, part of that admiration may have been due to thinking he had romantic inclinations towards another male character in the show.

The Xs?  Well, as anyone who ever made a username and ran into it being taken while a pre-teen knows, Xs are super cool, especially when they frame your username.  The only cooler letter is Z, which as I realized I was sleepy all the time as a lethargic teenager, I updated my username to include that instead.  Brilliance, really.

This same naming trend continued for a few other characters I liked in anime including
Kazuki Fuuchouin from Get Backers and Kurama from Yu Yu Hakusho.

Before you need to ask, yes, I liked pretty boys as a teen, and no, for some reason my husband hasn’t said anything about my love of pretty boys forming my appreciation of him.  That’s correct, my husband thinks a yellow, blob of a man is more indicative of my attraction to him than the excessive quantities of Japanese culture I consumed.  I’ve decided not to think on that too much.

A Misspelled Name of My Own or Don’t Trust Strangers on the Internet

Eventually one of the strangers who I IMed suggested I should have my very own username.  A name of my own.  Now, I’d seen my fair share of Loverboy69s, HotGurl69, BigButtsUnite69 and other things ending in 69, so I was a bit concerned about this daunting task.  Plus, how to choose a name?  I could just use the one I was born with, but then people on the internet would clearly relentlessly stalk me and murder me.

Stranger on the internet, with her superior knowledge of Japanese, I language my anime-loving self obviously enjoyed, decided to help me.  Now, what she told me was a name meaning “Dark Star” (which I didn’t particularly care for since honestly I thought it sounded silly but in Japanese it looked pretty to my Japanophile eyes), actually meant nothing.  It wasn’t a name for anyone, and none of it meant anything at all.

Still, I ended up using that username since I was about 12 until I was around 18.  That’s correct, for 6 years I was meaningless pretty sounds, much like a toddler formulating their first sounds.

At 18, I started using variants, taking the first part of the name that meant “overwork” and adding panda to it, because pandas were cute and had dark circles under their eyes, much like me when I don’t sleep.

The Food Phase

Eventually, I reached a point where I had tired of my babbling username.  I moved on to food.  Sure, I had a dog I loved and adored, and at this time I had created usernames for my parents on multiple sources where they had the formula dog_name + “Caretaker”.  Fortunately, they both had their own dogs.

But no.  I was a consumer.  I consumed food.  And at around the age 20, I had tasted my first persimmon.  And they were tasty.  So my steam log in to this day is Persimmons.  However, sometimes I would regress (or forget my persimmons password, associated email addresses, and security question answers) and also have a PersiPanda username as well.  I personally liked it a bit more due to the alliteration, and who doesn’t love alliteration?  This was essential to success, because clearly if you can’t figure out your account information you might as well just create a new one.  Hooray security!

Finally, The Name

Part of undergrad at CMU involved being forced to have an email address of the formula first_initial + last_name for everything.  My first initial and last name both started with the same letter, so telling people how to email me was very annoying.  After getting married, my husband’s last name is also too short to use this formula due to length requirements.  It’s marginally annoying, and it’s boring.

Consequently, the onset of what I consider my responsible adulthood was a mix of annoying emails involving my name, things involving my partial name, and finally an email address including my entire name since Liu is one of the most common last names a Chinese person could possibly have, but not many people with it have my very non-Chinese middle name (given middle names are usually reserved for kiddo’s Chinese names).

This naming structure seems pretty common for old people.  Not that I blame them.  Admitting you decided to name yourself “kittencuddlesforever1981” is a little awkward given people pick up your birth year and the fact you have an unnaturally love for cats rather quickly.  I do miss, though, in the 90s when this wasn’t atypical to share with someone and made my heart filled with awkward love for a very brief way to get to know a bit more about a stranger you were just meeting.

As a result, I feel the username for my twitter handle “theladyliu” was a gentle compromise with responsible adulthood where information is all facts and my rebellious youth where I self-named things I like – in this case, alliteration and period dramas!

Usernames: An Opportunity to Name Yourself…Poorly (until you grow old and just use your real name).

Coursera – Fundamentals of Computing from Rice University – A Surprising New Love for MOOCs

Let me start by saying the courses I’m reviewing are currently still open for enrollment, so head over to Fundamentals of Computing path from Rice University on Coursera if you’d like to join, and if you’re on the Eastside of the Seattle Area, come join my study group!

Background Knowledge: Where I was with MOOCs Before This Coursera Course

Prior to recently, any Coursera course I was interested in wasn’t available while I was available for it.  That has all changed.  As anyone who has read my blog before knows…

followers
You know, these guys. The guy with kids. The girl in a chair. The singing enthusiast. The smiler. The scowler. You all know who you are.

I haven’t had a great deal of love for MOOCs and other online learning modules such as Treehouse, Udacity, Udemy, Codecademy, and the likes, because I continuously felt like everything was dumbed down to make it accessible to everyone including people who may not be able to continue grasping the content once they got tougher or had to apply it to any independent project because of all the hand-holding.  That is, they intentionally avoided causing situations where people would think, failed to teach them any actual skills and instead set people up to be great typists, or were structured so bizarrely that the independent work paired with the content was inappropriate either due to providing no challenge and just regurgitating what was just learned or due to not working on content recently learned to help solidify student independence.

So between slow pacing, bad pedagogy, and redundancy, I inevitably said books were the way to go and abandoned everything else.

I’m not taking that back, by the way, I still think books are amazing and so much more efficient than certain MOOCs.  I even continued to find them better than the MIT opencourseware, but that might have been due to a number of MIT’s classes I was interested in required fancy hardware I didn’t have access to, so I had to walk away with my head hung in shame.

The Course: Fundamentals of Computing

I had asked a friend about her recommendations for basic CS books to read up on.  While she has an undergrad degree from University of Waterloo, she’s generally very supportive of my independent-study approach to my career change.  That said, she did think that basic CS such as algorithms, data structures, etc was best handled through a class of some sort and recommended the Fundamentals of Computing path from Rice University on Coursera.

It started about a month after our conversation, so I signed up and continued studying independently in the mean time.  While the certificate pathway and their recommendations is one of the courses at a time, I had enough background with JavaScript that I figured I could compensate for the Principals of Computing class and Algorithm class with googling the differences between what I knew and what I was being asked to do with Python.

Dictionaries, tuples, etc were new, but not so novel I couldn’t read briefly about them and apply them, so so far this hasn’t been an issue.  If you have a fairly solid background in another language, I encourage you to do the same.

Course Structure

I hadn’t very high hopes after my previous encounter with MOOCs, and after the first week being incredibly easy and simple (much like the first week of class in undergrad where you get a syllabus and rules handed to you), I still believed this might be the case.  Then came week two.

I had used the Coursera forums to set up a study group with a couple people in my area, and while working on the project spent some quality time in a Starbucks with my classmates.  I legitimately felt like I was back in college again.  I was thinking about problems that were challenging to me, collaborating with my classmates, and as is my favorite part of programming, celebrating resolving puzzles and testing to make sure it still functions in fringe cases and bug free.

The setup was very typical of MOOCs, but also included some elements often neglected.  All three of the classes have the same basic requirements.

  1. Weekly video lectures, around an hour in total.
  2. Homework (some basic coding questions, math questions, etc)
  3. Mini-projects (make a program!  This week, we made 2048)

The weekly video lectures are well done.  In most MOOCs like Treehouse, these are usually high quality though sometimes redundant.  From MIT’s Open Courseware, they were slow and involved a lot of the professor stumbling in the middle of a lecture hall and not the best sound quality or video quality.  Here, there is minimal wasted time (and any waste is usually entertaining, nerdy jokes), easy to view in double time, and the lectures are concise but give you the necessary information interlaced with Udacity style mini-quizzes.  The professors know what they want to tell you, and they tell you it concisely.

Homework is beneficial but not excessive.  It reviews concepts or has you review math that you likely haven’t done in over a decade if you’re the same age as most MOOC users, and helps you get in the right mindset for the mini-projects.

Mini-projects can be simplistic depending on whether or not you’re trying to program without eating lunch (whoops!), but they’re challenging enough that you feel as though you’d applying your learned skills in a unique problem that you need to solve.  I currently feel like there’s a bit too much hand-holding, but part of machine grading is that you need certain structural elements present in order to assess whether or not it meets the requirements, so to some extent this is unavoidable in some of the classes, especially when trying to accommodate so many mooching students.

And finally…

MOOCs have an important place in the accessibility of education, in my opinion, but a lot of them have a long way to go to being actually beneficial.  Fundamentals of Computing from Rice University is an example of the practice done very well without dumbing everything down.

I have to say I currently love it.  I’m not sure if it’s because the forums are so active with students collaborating or study groups make me happy, but I’m pretty certain it’s because I’m learning a lot and enjoying it.

Joooooin uuuuuuus.

Coursera – Fundamentals of Computing from Rice University – A Surprising New Love for MOOCs

Responsive grids on responsive images using JavaScript & CSS3: A Tale of Past Projects

The Problem: Why the Change?!

So back on March 13th this year, I did a blog post about a simple battleship game I made while learning with Head First’s JavaScript book.  Anyone who can recall also knows that this was quite possibly the ugliest, poorly synchronized, wreck of green I have ever seen.

On top of that, it wasn’t responsive, so when I’d pull it up on my cell phone thinking about adding AI to add some actual element of interest and challenge to it, I’d remember I couldn’t actually dink around with the 1024px background image at all in a reasonable manner on my cell.  The reasonable, time-sensitive solution would be to grab my laptop, but instead I decided to ignore time-sensitive solutions and instead update my website that no one but I use at this point.

After all, the fact that I’d link people to my questionably entertaining JavaScript game and they couldn’t get back to my homepage without editing the address bar was a bit of an issue.

board
This. Green. Black. Nothing like my homepage (not to say that’s a bad thing, since my homepage is white and gray and has the color inspiration of someone who enjoys staring at lightbulbs).

Superficial Improvements!

White and grey is apparently the color scheme I was rolling with, and there’s clearly no reason to change that.  Ever.  Grey and white has, as described above, has the artistic influence of staring at a lightbulb.  Clearly I should have it infect every portion of my website.

Consequently, I spent some quality time with photoshop to turn the green/black scheme to white/grey.  It’s simple, elegant, not green.

New layout!  Responsive and all!
This. White. Grey. Exactly like my homepage.

Coding the changes with CSS and JavaScript!

I had originally thought, “I can definitely use some magical functionality of CSS I’m unaware of to make it responsive!”  Turns out there isn’t a magical functionality, at least not that I could find, so I decided to use JavaScript and jQuery instead to query changes.  There were a few aspects of CSS that were helpful though.  For example, using the board as a background image and having it be responsive was slightly problematic, so instead I used it as a normal image and used the CSS attribute “z-index”.  This allows stacking of elements in different orders with smaller numbers being at the bottom and larger at the top.  Consequently, I stacked setting the board to have a z-index: -1 and the table’s z-index: 1.  This caused the board to act like a background image with the table placed above it.

Next, I used the width() and height() methods to query the image, setting the page to make this query whenever a resize occurs.  I then set the resulting size of the table and individual cells to be dependent on this height and width based on the proportion of the board it occupies.

One mistake I had made during this process was at one point I set the “height” CSS attribute for the image to 100% as well (rather than just “width”), which resulted in image warping and strange overlays at small sizes.  Most modern smart phones won’t get to that size, but I figured it’d be best to just avoid that all together.  Learning is fun!

Here’s a jsfiddle to see how it works and the actual code.  Feel free to resize the “results” section to see the army of ships move about.  All your guesses will be correct, sure, but it’ll take you 49 turns to defeat me!  Bwahahaha.  Ha.  …Ha.

The Results: It’s Prettier, Hooray!

It’s not hideous!  It’s responsive!  A resounding success!

Oh yeah, now I can dink around with it on my cell phone while contemplating adding features to actually make it interesting and perhaps even enjoyable to play.  Maybe even clicking guesses instead of typing them!  Perhaps a slightly stupid AI to compete with!  The possibilities.

More importantly, though, I’ve made it so my site overall flows together a lot better.  The Great Dalmuti has even been contained to the confines of the wrapper div, which is always a nice perk since it looks less ridiculous on larger screens where you have 12 tiny cards sprawled across the monitor in one and a half rows.  Don’t get me wrong, lots of UI improvements need to happen on both ends, but it does mesh in with the rest of the site better, and who doesn’t want that?!  Hooray.  Meshing!

Other Notes & Personal Progress

While I’m still continuing to work on The Great Dalmuti (you’ll notice it has taxes now and wild cards!), I’ve also started a couple courses on Coursera.  They’re the “Fundamentals of Computing” courses, though I’m doing them with a few alterations.  Rather than taking one at a time, I’ve decided to attempt stacking them all together.  I figure this won’t be too problematic since I’m adept in the ways of Google to help support gaps in knowledge, and so far that has been helpful.  My background in JavaScript has made picking up Python overall very simple, though there are some aspects of it I’m not as familiar with.

Then, naturally, I’m not paying for the certificate either since given the current attitude towards non-traditional education from businesses, I don’t think it actually has any value in a 1st world country.  Not to mention I’m just there to leech knowledge.  I won’t go into a long rant about the problems in traditional education with my former teacher hat on, but suffice it to say I think non-traditional education is a good use of resources and a good source of independent growth if you’re remotely disciplined.

I’m currently organizing a Seattle area (Eastside) study group if anyone would like to join us.

Shoulder still recovering.  Still have zero sense of body awareness.  One day, I will be body aware, just you wait!

Responsive grids on responsive images using JavaScript & CSS3: A Tale of Past Projects

JavaScript Card Game: The Great Dalmuti (or look Ma, I used JavaScript to make a card game my friends won’t play with me!)

Hi, my name is Stephanie, and I’m a recovering board and card game addict.  My addiction has manifested itself in some very concerning ways over the years including a stint of playing DnD with nerds online over IRC chat in college, but the most recent iteration is by writing myself a small JavaScript app version of The Great Dalmuti/Daihinmin/President.

When I am able to coerce my friends to play this game, we all wear different hats to indicate our position in society, because unlike public schools you are allowed to wear hats in my home, and at times it is required like a construction site.  Only, instead of building apartment complexes, we’re building camaraderie?  Clearly, my preference is to give the dudes in our group the pinkest, prettiest hats I can knowing that society typically doesn’t approve of them embracing their love of lightish red and wanting to give them an opportunity where they can excuse their pink-embrace as the whims of a game addict while their hearts palpitate in an elation they had never previously knew possible from headwear.

Consequently, when I threw together cards based on a stick person I was able to create using arial font, they all had different hats to help simulate this very important part of the Dalmuti experience.  My only regret is that the 12 and 11 needed far more different hats than I provided due to a lack of inspiration in the last 5 minutes of my 30 minute hat making adventure.  Which is why those will not be cards I show you intentionally.  Instead, have an apple merchant:

Or, you know, a red blob saleswoman.
Here we have an apple merchant. 

She has large feathers in her luxurious purple cap and has done well in an apple-deprived market. Apple pies, apple crisps, and apple cider are the mainstays in the realm, and she is rolling in apple dough so much her feathers are bigger than her arms. Life is good for the apple merchant.

Totally did not make her an apple merchant because apples are easily distinguishable at small sizes.  It was definitely a lore thing.  Definitely.  Same with this carrot guy.  Lore.

Or, the amazing orange stick salesman.
The carrot merchant. 

A man with small feathers to signify his small wealth in comparison to the other merchants, especially that darn apple merchant. There was a time in his life where he spent day in and day out trying to convince the members of the realm that orange is the new red, but after being threatened with incarceration by the Great Dalmuti himself, he resigned to his fewer boxes of unwanted carrots and accepted his lot in life. After all, he could be a peon.

Look at that well-developed story line.  It makes you want to play a card game with robots because your friends won’t play with you, doesn’t it?

On a more technical note, this was fun to practice for some of the different things I’ve learned and a nice break from my behavior tracker app I’m working on.  I added some changes from my original based on suggestions from friends and spouse (ex. delayed listing of what the script in the browser has played rather than it showing as it loads which is instantaneously from a person’s perspective).  There are still some aspects of the game I need to implement (wild cards, revolution, greater revolution, taxes after the 1st play through), I want to make a much better UI, and I need to refractor my code a bit more since in some places I’m pretty sure it’s a bit awkwardly put together.  I’m also likely going to put together a multiplayer version using me some node and socketIO, but that’s for later because if I could get friends to play with me in the first place I wouldn’t have needed to make a computer version.

In the mean time – hats.  Hats are the answer.

JavaScript Card Game: The Great Dalmuti (or look Ma, I used JavaScript to make a card game my friends won’t play with me!)

My nemesis: AngularJS docs.

Hello neglected blog!  I’ve missed you and your beautiful blue-ish pages.  I’m sorry it’s been so long since I’ve interacted with you (and my faithful 15).  I am drowning in the sea of AngularJS as I dig around the MEAN stack.

And I do mean sea.  As anyone who has attempted to read AngularJS’s docs can tell you, the experience is special in the way you describe a friend you personally love but are very aware that anyone who hasn’t spent the time getting to know them will need to invest a large amount of time disliking them to find the love.  With AngularJS docs, as you stumble upon the first page that you’re almost 100% certain any other documentation page for such a large scale project would include the information you’re looking for about the module you want to implement to make your HTML page not look like, well, this:

Yeah...learning is fun.
An uncomfortable mixture of unreadable and mid-html logic intensive that will inevitably be reused when I get back to my login page again and failing to be DRY.

When you navigate to that page in the Angular docs, it starts to answer the question, letting you step into the sea a few inches, feeling the sand between your toes, certain this is the relief your mess was looking for.  Then, as you inch in further, suddenly you realize the sea was not a sea but instead a decapitated kraken in a kiddy pool who wants nothing, as it is mindless and headless, and instead will grab you by the ankles and throw you about the bouncy edges of its plastic entrapment until you resign, regretting your trip to the sea, and crawl away onto the dried out, dying lawn.

Which then leaves me digging around blogs.  The bad thing about bloggers (such as myself), is often we don’t update for years in a row.  So while we had a solution that would have worked a few versions ago, we don’t have a great one for the moment – or even a mediocre one.  So essentially it’s like looking for the sea and finding a puddle.  Sometimes this puddle can offer a bit of relief, but more likely than not if you try to drink from it you’re going to get a disease (in my case, looking at other blogs in hopes for a bit more detail) that will result in hours wasted and no actual relief.

Then I decide the solution is to use vanilla JavaScript, but then I look back at the rest of my code and see how odd that little chunk seems in comparison to everything else.  It’s like meeting an adorable toy poodle with a very unfortunately uneven haircut that looks like missing blocks in a LEGO recreation of the Tower of Piza.  So then I hang my head in shame, crawling back to Angular, apologizing for my failures, and begging to be taken back as a negligent neophyte.

You talk to mentors, peers, anonymous strangers on the internet, but they all respond the same.  “You check Google?” because JavaScript is often perceived as the bastard child of programming languages, and so finding those dedicated to it is like trying to find a bastard child in good standing who will dedicate themselves to live on a giant wall of ice without reasonable comforts in celibacy without being forced there (i.e. Jon Snow).

Consequently, Google frequently leads to this:

xkcd reading. Wait, no. StackOverflow. I’m pretty certain DenverCoder9 moved on, tried something else, and succeeded. (Un)fortunately, I am the embodiment of perseverance (read: stubborn), so…

Unrelated, I’ve interacted with some dev bootcamps & their former students lately out of curiosity (or more realistically wondering if they had a magical instructional model that the internet and bookstores did not), and decided against pursuing it any further, at least not for the foreseeable future.  Maybe I’ll write a post about that later once I’ve finished finding some body of water of AngularJS knowledge that won’t beat me senseless in a kiddy pool, act as a massive time sink without much gain, or simply fade into nothingness.

In summary, AngularJS docs are my nemesis and why I’ve been a negligent blogger.  Google overlords, you have failed me 😥  If anyone happens to know a resource to find information on modules that isn’t painfully out of date, I would LOVE a link.  Love.  Like I would marry that link, eagerly wake up to see it every morning by my side, and grow old with it.

My nemesis: AngularJS docs.

Getting MEAN: Building My First Web App for Realsies (and also fries are the worst food gift)

You heard me, for realsies.  I even got to self-create security violations, but thankfully as the app works now it doesn’t include usernames.  Unless you’re capable of inferring.  Then, yeah, definitely an issue.

Not THE Batman.
I AM Batman.

I love you, internet, you’re a great outlet for all of my weird.

But first?  Fries.  Three nights in a row, my husband has eaten out for dinner due to working crazy hours recently (poor, handsome bastard).  Since he knows the secret to a happy marriage is food, he brought me home left over fries.  Now, I love fries.  When I was a kid and I got fries from McDonald’s, I would happily eat those hot, salty, death sticks as soon as I could get my fingers on them.

I ate them before my cheeseburger.  Not because I didn’t love the hot, cheesy, non-compostable burger as much as the death sticks, but because the death sticks would gradually develop a weird texture and consistency as they grew cold.  This is especially true with fries that will actually decompose over time such as those that you get from a sit down restaurant.  That crispy, crunchy, delicious starchy stick just turns into a cold, lumpy, limp, soft wad.  It’s like coal in your stocking on Christmas.  Complete disappointment unless you happen to live in a town running on coal power that is running low, and for Christmas you want to give everyone around you warmth again.

So I tried a few solutions.  One: microwave.  BAD idea.  Ten times as soggy.  Two: oven.  Took way too long.  Still quite soggy.  Three: Toaster oven.  Still soggy, but warm fast.  This may have been improved if I could cook directly on the toaster rack without complete and utter fear of causing a small fire.  This may have been a fear exacerbated by the quantity of “in case of fire!” signs all over my toaster oven, I admit, but also fries slide through thin cracks quite easily so it may also just be a common sense thing that I wish didn’t exist.

I tried to think of other food gifts that came home as bad as fries.  Don’t get me wrong, anything that is a starch to which you add sauce isn’t great (burgers, sandwiches, etc), but a quick run in the toaster oven can fix all of those.  Fries though, too thin to be toaster ovened without aluminum foil.  Tis truly a shame.  If anyone has a leftover fry solution, let me know, cause I have quite a bit left.

(Side note: Dear Husband, if you happen to read this, please don’t take this to mean that I do not appreciate the lumpy food gift, but rather that I am desperately seeking a way to improve my enjoyment of the lumpy food gift as google has not provided an answer that works with the cookware we currently own.  This was a pretty close answer though.)

Now onto the programming portion of our lecture.  A couple months ago I followed a django tutorial that told me I made a web app, and once I finished the site I had loaded congratulated me for my amazing endurance for all of the 5 minutes it took, but I knew the truth.  I knew I had accomplished nothing.  When I attempted to make my own web app at that point, my brain laughed at me and called me names, so I knew I had more work ahead of me.

I landed on learning the MEAN stack because it could all be done in JavaScript.  At that point, I’d finished a majority of the Headfirst Javascript book (2 chapters away from the end, I believe?), so I really wanted to learn something that I could use to help solidify what I had learned about JavaScript.

I have an idea for a program I want to make for some of my old teacher buddies to make life a bit easier, and while I have an idea of the kinds of data I need and some of the objects, I decided it’d probably be better to start with something a little simpler.  There were a good dozen plus websites going through MEAN stack tutorials creating a to-do list (the “Hello World” of web dev), and a few making chat programs.  I decided to be awkward and make a chat program where you talk to yourself and no one else.  Why?  It felt right and had the kind of functionality I knew would be a good stepping stone into the future.  It also allowed some really awkward test cycles where I posed as Batman and used the classic trilogy throat-tearing voice every time I posted a test.  It made the whole experience feel way more epic.

Using a combination of resources including the documentation for node.js, angular.js, MongoDB and express.js, multiple websites, blogs, and video lectures from strangers, it took me about a week of working on it after work to get it together.  I learned that express.js is a beautiful blackbox where I don’t know anything about what goes inside, but I should probably learn what happens in that blackbox.  Finally, the best learning tool of all was learnyounode.  The reason for this is because it is called learnyounode, which automatically makes it amazing.  Plus it just gave you problems to solve using the JavaScript you hopefully know to start creating a web server.  Pretty good times.

Here’s a link to the outcome.  More importantly, here’s a link to all my testing posts.  It gets weird in all the right ways with Batman, Joker, and Robin being the stars of my tester accounts.  This page would look a lot less awkward if I tagged the users who post, but since, again, my intent is to only see MY posts alone when I sign in, I don’t see this as an issue.

I think my next step will be to start working a bit more on the app I’d like to build for my teacher friends.  I’ll need to plan out what it needs to do and how it will work a bit more first so I can get my MVC on.

Getting MEAN: Building My First Web App for Realsies (and also fries are the worst food gift)

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.

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)