Swiftly Create a Mobile App

It all started when Crystal Martin, the diversity director of the Strangeloop conference, said something about getting more accessibly talks and workshops at Strangeloop.  I wanted to do a conference talk of some sort this year, and I decided to apply for a workshop while another friend applied for a talk at Strangeloop.  I wasn’t really sure what I was good at, but I knew that I wanted to do Swift development, and this would force me to learn Swift and advocate to move to a Swift team.  Somehow, that all totally worked.

After Mark made a game, I decided that I wanted to make my tutorial about making a simple game that you could play on your phone.  After playing around a bit to figure out something simple enough, I decided to do a tutorial to make a simple Boggle game.  You would make something that would randomly generate letters and display it on the screen.  It would show off MVC as well as get people a little bit of experience using Storyboards (Apple’s drag and drop for UI elements).  I went back and forth on using Storyboards for teaching iOS development: we don’t generally use them at work but they’re quick and easy for teaching a short class.

I created the class first by making the app myself.  Then, I rewrote the app in small segments, and I made a commit at each point so that people could see my thought process while making the app.  I made a couple of slides to highlight some weirdness in Swift as well as go over delegation and MVC in general.  I wanted the class to actually be hands on and coding so I live coded the whole thing.  This wasn’t the first time that I live coded a class, but I wanted to be 100% sure that I didn’t embarrass myself so I printed the three classes that I was planning on writing just in case.

The workshop for Strangeloop was set to be two hours long.  Crystal also runs the local CoderGirl meet up in St. Louis, so I held a practice run there the week before.  Everyone was told to bring a Mac because you can’t do iOS development on a PC.  Both classes were told this, but unfortunately both classes had people who showed up without a Mac.  🙁

The CoderGirl practice run went terribly in my opinion.  As I said before, many people showed up without a Mac, and I spent the first ten minutes of class telling people to either pair up or just watch because there wasn’t a way to do the class if you didn’t have the right computer.  The projected screen was kind of tiny so I had to gesticulate wildly to show people where my mouse was and what I wanted them to do (which was a negative for Storyboard since they’re all drag and drop).  I got a laser pointer for when I taught the class at Strangeloop.  Xcode had just come out with a new Beta and unfortunately, it was broken in a lot of ways that were fundamental for the class sadly.  That knocked out a couple of people in the CoderGirl workshop, but I specified the version for people in the Strangeloop workshop. I also had a couple of folks who had very little programming knowledge, and the class was too fast-paced for them.  I unsuccessfully tried to explain things to them, and I ended up frustrating many of the other people in the class because the class started to be too slow for them. It was definitely a hard place to be where a fourth of the class thought the class was too fast and another large proportion thought the class was too slow.  In my mind, the entire thing was a disaster.  I didn’t get through much of the class at all.  I strayed far, far away from what I wanted to teach, and I didn’t have a tangle product at the end.  On the bright side, two people immediately after the class thanked me because they felt like Xcode and iOS development weren’t that scary after all.  I met someone a couple months later who said that she appreciated the class because she wanted to know what professional iOS developers did as opposed to people who learned from tutorials online.

I took all of that feedback and changed things up for my Strangeloop workshop.  I changed the order in which I did things a little.  I started with just one letter changing instead of all 16 letters for Boggle, and I worked my way up from there.  I focused on getting people to press a reset button which called the view controller which then called the model for a new letter and then it went back to update the view.  The Strangeloop workshop went way better than the CoderGirl workshop.  I actually got 95% of what I wanted to accomplish.  I was panicking the night before because I didn’t have any helpers like I did at CoderGirl, but I asked on the women at Strangeloop channel on Slack and someone immediately replied and offered to help me out.  She was awesome!  The pace of this class went a lot smoother, and generally people had an easier time overall.  People were really excited that they could plug in their phones and have their app on their phone to show off to other people!  No one at the class noticed, but I was totally rocking a dress with birds on it that looked similar to the Swift logo.

It’s nice having a repo that I can now teach 2-hour workshops on for intro to swift development.  I’m excited to expand on it for teaching a 10-12 week class internally at Asynchrony for iOS development.

Code repositories:
CoderGirl repo: https://github.com/teamneem/intro-to-swift
Strangeloop repo: https://github.com/teamneem/strangeloop-intro-to-swift

Leave a Reply