Trip to Wonderland: Falling down coding rabbit holes

For my final project, I am making a “Very Simple Sign-in Sheet Application” (or V triple-S A for short) for my dance coach’s studio. I’ve broken the project down into 3 week long sprints with the last week for any spillover user stories and debugging moving towards the final presentation date on August 31st so last Friday marked the end of my first sprint. Conclusion? Fairly successful so far. The goal for my first sprint was to create working API endpoints for authentication and sign-in sheet functionality as well as scaffolding  a MongoDB using Mongoose and all of these benchmarks were met with the commit last week. Through a process I like to call “consume and assimilate” I have managed to stitch together a fully functional API from three separate Treehouse tutorials, a Scotch.IO guide and several of my old projects. In the mean time, Sean also showed us a great program called Balsamiq for creating mock-ups for your front end user interfaces and I was able to show my coach, the “product owner,” some designs so that I knew what I should be building this week.

So what does that have to do with Alice in Wonderland?

My classmate Fabian “FABproject” Martinez coined the phrase in our cohort “falling down rabbit holes” to refer to focusing so hard on a highly specific problem that you get lost in the Stack Overflow, WC3Schools, Youtube tutorial Wonderland of mostly irrelevant information, and that’s pretty much what happened to me today. Also, my particular rabbit hole has to do with time so, I guess it’s fitting that I followed the white rabbit. You see, in order to create an instance of a sign-in or lesson object, I wanted to create a date object in the local time so that I could later filter the lessons returned using the local time, but no matter what I did MongoDB would save the date object as “Coordinated Universal Time” or UTC for short. I spent hours looking at time related stack overflow posts, documentations and plugins before Sean slapped some sense into me and told me that this “problem” that I had would not even impact my end user. It was only after I stopped focusing on the time problem that I realized that while MongoDB stores all incoming date objects in UTC format, it also automatically converts filter times passed into it from local time into UTC and returns results based on that filter. My end user literally would not be affected at all. *sad trumpet noise*  Anyways, I figured why let my research go to waste. The following is a list of some sites and plugins with useful date functions:

  • AngularJS Date Filters

    I ended up using these to change the incoming UTC time from my database into the local time format for display for my view layer. Very easy to use, and very powerful as it will use the local time of whatever machine is calling the view.

  • Moment.js

    Awesome plugin that extends the functionality of the traditional DateTime data type allowing users to not only format time in ways not possible with just Angular Date Filters, but also to perform basic arithmetic like adding or subtracting days and hours.

  • StackOverflow on ISOString DateTime

    Fabian linked me some code from this posting that helped him get his Javascript Datetime element to line up with SQL’s DateTime data type. The second highest posting  contains a helpful code snippet for creating a DateTime object in Javascript that is usable in SQL.

  • MongoDB Date() Documentation

    In case you were wondering about how MongoDB stores DateTimes, the documentation is chock full of exactly how much everything is displayed as UTC time all day every day. So there’s that.

It’s really easy to get caught up looking for answers for a problem that seems completely game-breaking at the time, but are actually relatively trivial. When you’ve spent a few hours on the same problem, it doesn’t matter how important you think it is to your overall project, it is time to step back, take stock of the whole situation, and maybe you’ll find that the solution is simpler than you thought. Sometimes those who wander really are lost, so thanks again Sean for pulling me out of the rabbit hole.


Tony Stark was able to build this in a cave… With a box of SCRAPS!

If you haven’t yet seen Marvel’s Iron Man, the 2008 adaptation of Elon Musk’s life as a mechanized superhero, this scene features the incomparable Jeff Bridges as tech CEO Obadiah Stane approaching a flustered engineer, who struggles to explain to him that the technology required to build what he has asked for does not exist yet. Bridges calmly attempts to assure the engineer of its feasibility citing the fact that a working prototype exists in front of their very eyes, but upon further protests that the project is impossible, Bridges erupts in the above phrase. The engineer can only apologize for not being genius, billionaire, playboy, philanthropist Tony Stark, the titular “Iron Man.”

When I first started this class, I felt like that engineer. Every project that was assigned came with a list of ridiculous requirements, and my initial reaction would always be something along the lines of, “well this is clearly impossible.” I said that to myself every time, even though I knew that our instructors,Cameron and Sean probably made the mock up version in approximately 5 minutes (presumably in a cave with a box of scraps… or Bootstrap). Obviously, the technology exists, there’s proof of it right there in the example, but there was always that initial thought of “what if they’re training us wrong as a joke and the mock up’s just a photoshopped picture!” Even after I completed each project, proving that Jeff Bridges was absolutely right, I still didn’t feel like Tony Stark. My code seemed like crude workarounds and I was always left wondering what elegant solution Cameron “Tony Stark” Wilby or Sean “Iron Man” Cahall would have used.

Fast forward, to week 9 and, dare I say it, I think I’m finally starting to feel less like the Jeff Bridges’ punching bag engineer (fun fact: same actor as Ralphie in “A Christmas Story”) and more like Tony Stark. Not so much snarky genius Robert Downey Jr. playing himself Tony Stark (I wish…), but the Tony Stark that was inside the cave, building his first suit out of a box of scraps surrounded by terrorists and with shrapnel in his chest. When faced with an insanely difficult situation, Tony doesn’t resign himself to an ignominious death in the desert, he buckles down and gets to work. He literally creates impossible technology, and while his first version of the Iron Man armor isn’t the sleek, refined technology that headlined the latest Avengers films, it was functional and ended up saving his life. That’s why the movie is called “Marvel’s Iron Man”, not “Marvel’s Chief Stark Industries Engineer William Ginter Riva.”

This week I decided that my final project would work better with the increasingly popular MEAN stack instead of the ASP.NET Entity Framework and SQL server, which would be all well and good if I didn’t have to learn three of the four frameworks/tools in that stack. Certainly a challenging task, but I am now confident that I have the tools and knowledge to figure this out. My last two days have been spent like my first two days: copying code from the internet to see what works, racking up points on Team Treehouse and trying to keep my mindset optimistic and fun, but this time I have a different perspective: You can think about how impossible something is, or you can instead use that time to work the problem instead. It doesn’t matter how ugly and crude your solution is, if it works, it works. And finally, even without a mock up or example project as proof that your project is even possible, you have to just shut up and get to work until you build your Iron Man suit and blast your way out of the terrorist compound!

5 Tips for Incoming Cohorts or: What I wished I had known on my first day of class

With my group project completed and presented and the new cohort starting today, I thought I would take some time to welcome the new class and share some survival tips!

  1. The “Parking structure that’s down the street” in the FAQ is Horton Plaza’s Fruits and Vegetable parking structure

    If you are planning on paying for monthly parking enter in through the G street entrance on either 2nd or 3rd street, grab a ticket and after class head to the parking office by entering the garage from 4th street where the cars come in and turning left or by navigating to the 3rd floor of the vegetable side of the garage. They will waive that day’s fee when you sign up. Monthly parking card holders must enter through the 2nd or 3rd street entrances from G street by scanning their card as they enter before they reach the ticket dispenser. Don’t keep taking tickets after you get the card and then go ask them about what you should do with all of the tickets you took over the course of a week. They don’t like that.

  2. Never take G street out of downtown at rush hour 

    I made the mistake of leaving at 5 PM exactly a few times. Never again. G street might as well be a parking lot between the hours of 4:45 and 5:45 PM. If you are trying to reach any of the freeways, there is a shortcut out through the monthly parking entrance through the 3rd floor of the vegetable side that is sometimes available that will put you out on 1st street that you can take all the way to Broadway. From there you can go down Broadway until 11th street for the 163-N and 5-N or 17th street for the 5-S. If you must leave through the G street exits, go straight instead of turning onto G street and turn onto Market from which you can reach the aforementioned cross streets.

  3. Required prework is required 

    I joined the summer cohort really late so I had about 5 days to get at least 1,000 points on Treehouse. It was a pain to get through, but  15 hours of videos over the weekend were absolutely vital to surviving the first weeks of class. The required prework is very much required, and if this particular course wasn’t emphasized, I am going to highly recommend that everyone take the HTML/CSS course on Treehouse”How to build a Website – with Nick Pettit”. This particular class is a good introduction to HTML and CSS, the two languages that will form the basic skeleton of all of your projects. Also, if you complete all of the Workspaces exactly as Nick does it, you can pull them up from the video and copy different things that you would like to add to your first assignments. Treehouse is invaluable for working examples of code snippets that you can use with video walkthroughs on what each part of the code actually does so I would really make the most out of the subscription.

  4. Class is not like Treehouse…at all… Google is your friend

    I think that one of the reasons that Origin requires Treehouse prework is that the classes themselves are nothing like them. If you come into class expecting live versions of Treehouse videos with an instructor in the room, you are going to have a bad time. If you come into class without having done the requisite prework, you are going to have a VERY bad time. Projects will come at you hard and fast and while there are code demos, there will be no full walkthroughs. Thankfully, everything you are about to do has already been done by people with more experience and you can access that information through the power of Google! Type in the name of the technology you are working with (i.e. HTML, Javascript, C# etc.) and what it is you are trying to do or the name of the error message you received and hopefully you will find some tutorials, or stack overflow postings of people who did the exact thing you wanted to do or encountered the same bug. You will leave this class a Grandmaster in Google-Fu.

  5. Everything is “Fun”

    This course is hard. And why wouldn’t it be? In 3 months we will be joining the ranks of an intensely technical field that people go to college and get 4-year degrees to enter. It’s easy to get caught up in the swirling maelstrom of deadlines and projects and forget that this is a class, and learning is supposed to be fun. You’re not building something that has to go live tomorrow with millions of users. You don’t have 8 different bosses breathing down your neck. Take that pressure off of yourself, and play with the code. Break it, see how it breaks, put it back together and see what amazing things you can build. You’re here to learn, so try to approach each new problem and bug as a challenge to be overcome with a smile, rather than a task that must be grudgingly completed .

It was great meeting the few of you that came to our group project presentation on Friday! If you guys need any help or have any questions, we are just around the corner. Good luck, and have fun!

Never too late to start: 8 Weeks at Origin Code Academy

Greetings and salutations! Today marks the end of the 8th week here at Origin Code Academy’s 2016 Summer cohort (Go Fighting Ducklings!). On my very first day, Origin CEO Jeff Winkler walked into the classroom and in between many great tips, recommended that everyone start a blog to document our experiences. Like most great pieces of advice I get, I filed that away under “things that would be cool to do, but I clearly don’t have the time for right now.” That’s not to say I have all of the time in the world right now. Quite the contrary in fact, as heading into the final project, all of the training wheels coming off. It’s a little too late to document my entire journey through Origin, but I figure now is as good a time as any to start reflecting on my time here so far.

First things first, a little background. I am currently a certified Ballroom and Latin dance instructor teaching group and private lessons after I leave the academy most nights and some weekends. My girlfriend actually saw Jeff on TV (on … MSNBC? CNBC? one of the BC’s) being interviewed about his crazy notion to start a code school to get people jobs in San Diego, and when she told me about it, the idea got filed away in the same place Jeff’s blog advice would later go. It wasn’t until a couple of weeks later, about 2 weeks before the summer cohort was due to start, that I decided that I might as well see if I can get in. By some stroke of luck, I made it through the admissions process and had a few days to complete as much prework as I possibly could.

When I first started the class, I had taken exactly one C++ coding class approximately 9 years ago in college, and that, combined with the 1,000 points on Team Treehouse that I managed to accumulate the weekend before the first day encompassed my entire coding education. Yesterday, my classmates and I put together a full-stack web application that does pretty much what we intended it to do… minus a few things that we had to drop to make the deadline. If you had told me 3 months ago that I would be doing this right now, I would have laughed in your face. My time here so far has been an exciting string of new challenges every day, and while there have been many frustrating, hairpullingly difficult tasks, I can’t wait to solve the next seemingly impossible problem. It’s been a grueling 8 weeks here at Origin Code Academy, and all I can say right now is “Bring it on!”