From Zero to Swift in 30 Days
I started learning Swift exactly 30 days ago. Three days ago, my first app got approved by Apple for beta review. The beta review process is supposed to be no big deal compared to the real thing, but for me this was a major accomplishment.
I don’t have a CS degree or professional experience as a developer, but I’ve worked on software development teams as a product manager for the last 5 years and have made a few Ruby on Rails apps for fun. I’ve always wanted to feel a more direct connection to the things I work on, so I decided to start coding.
Why Choose iOS and Swift?
- Mobile is huge; Mobile is personal. I want to make software that people actually use and I love the intimacy people have with their mobile phones. Our phones know us very well — when we wake up and go to bed, where we are and how we got there, our schedules, our conversations with friends and family, and more. That’s the future that I’m interested in, and I’m a long-time Apple user so it felt natural to start with iOS. I tried my hand awhile ago with Objective-C and where I found it to be intimidating, Swift has been welcoming.
- Constraints are good. Developing apps within the boundaries of Apple’s platform and on a screen that fits in your pocket provide healthy constraints. These constraints keep me focused on what to learn (versus the never-ending rabbit hole of web development) and push my creativity around the user experience.
- Swift is a rapidly evolving language. I like to get in on the ground floor, watch things grow and evolve, and be part of a small community — it’s why I like working at startups. There’s something empowering about grinding it out with a less mature language and being part of smaller group trying figure things out together. I’m also excited about the possibility of personally contributing to the language and community.
Resources for a Beginner
When I began my journey on July 1, I had idea for a really simple first app. Keeping this top of mind was helpful in terms of motivation as well as contextualizing the things I was learning.
I spent a long time scouring the Internet for the best resources, tutorials, and courses on Swift. There’s a lot of good stuff out there for beginners, but most assume you’ve never even seen a line of code and start off very slowly, i.e. this is a variable, see variable jump. On the other end of the spectrum are technical articles and reference material (including Apple’s documentation) that seem only decipherable if you have significant experience or are making the move from Objective-C to Swift.
Eventually I found a sweet spot of material for my level of beginner-ness, and here’s what I found most useful:
- Paul Hegarty’s Stanford course Developing iOS8 Apps with Swift. Available for free on iTunes U. I started here and made it through the first five lectures and the second homework assignment in just over a week. The course gets challenging quickly, so after getting my feet wet, I paused my progress in order to tackle the more practical tutorials below. But it’s an excellent course and Professor Hegarty knows his stuff, so I’m planning to pick it back up. If you get stuck on an assignment (which you don’t get solutions for in iTunesU) this helpful website explains each problem set and solution.
- The Swift Programming Language by Apple. Compared to Apple’s iOS SDK documentation, this book about the Swift language is easy to read if you have any prior programming experience. It’s clear, concise and skimmable so that you know where you can reference a concept when you’re working on a problem later. Big Nerd Ranch has a pre-reading assignment for their Swift bootcamp that covers similar concepts, but geared more towards beginners with practical examples you can implement.
- www.raywenderlich.com. This sounds like some dude’s personal website, but don’t let that fool you. This site is the best resource that I’ve come across. If you’ve never created an iOS app, start here by signing up for the newsletter and getting the “epic-length tutorial” — which feels pretty epic in the moment but you can definitely power through it in one day if you wanted. The tutorial was my first dive into the oddities of iOS development and demystified many things that could easily discourage a beginner. I found myself referencing this tutorial when creating my own app and wanted to jog my memory of certain features or functions in Xcode. After you finish this first tutorial there are a ton of additional free tutorials on the site, which I cherry picked to learn concepts that I needed for my app idea. There is so much more great content here that I can’t wait to come back for more.
My (Rough) Timeline
- Week 1: Immersion. I jumped right into lectures and assignments from the Stanford course, read through a good chunk of the Swift Language book, and completed the “epic-length tutorial” from raywenderlich.com. After this point, I felt ready to start my app.
- Weeks 2 to 3: Grinding it out. On the exact day I started coding my app, I also happened to start a 12-day stint of living on a sailboat in Maine. Over coffee and on the quiet water, I spent a couple hours each morning in the zone. A lack of Internet access gave me a singular focus in Xcode without whipping back and forth between 40 browser tabs. It forced me to stop and think about what was I trying to do and why. Throughout the days I found myself thinking about my code, coming up new approaches, eager to try them the next morning.
- Week 4: I’m actually doing this. There was a steep learning curve, but it felt amazing when I started being more productive in a single day than the previous week before it. I spent a final day cleaning up my code and working through weird edge cases, which was surprisingly satisfying. As a product manager, I would fret about these scenarios and assign dozens of small tasks to engineers to address them. Having the power to knock these off on my own was great. Finally, I created a basic app icon in Sketch and followed all the steps to upload a build to iTunes Connect and submit to Apple for beta review. The review took less than 24 hours.
For month of July (recorded via RescueTime), I spent 25 hrs in Xcode, 2 hrs 52 min in iOS simulator, 4 hrs 23 min Preview (reading tutorials), and 51 min on Stack Overflow. I also read a lot of materials on my phone.
The Swift Community
Here are other things I did to immerse myself into the Swift community:
- Subscribe to We ❤ Swift newsletter
- Subscribe to Dave Verwer’s iOS Dev weekly
- Follow the “Swift” tag on Medium
- Listen to the raywenderlich.com podcast
- Find a local meetup (I joined Brooklyn Swift Developers* and iOSoho)
- Join a Slack group: (1) helpMeCodeSwift is a small group I stumbled into. There are only a couple active folks right now, but they are super friendly and don’t seem bothered at all by noob questions. (2) swift-lang slack is a larger group that gave me instant access but doesn’t seem to have many beginners and I’ve been a little intimidated to jump into the conversation. I should probably just ask about creating a channel for beginners.
These are the things that I’ve found helpful. If you have other great resources to suggest, please add a comment with what you’ve liked and why it’s good.
*The first meetup I attended was a talk by Dave Grandinetti called “Learning Swift the Euler Way”. Dave made a tool that I’m excited to check out called EulerKit which includes some helper methods to assist you in solving Project Euler problems. I’ve done the first two, but it gets way hard after that.
And Finally, My First App — RoundTrip
The name of my app is RoundTrip and it’s for New Yorkers to optimize their MetroCard fare. It’s a very simple utility app.
- Calculate how much to add to your MetroCard so that you aren’t left with unused change. The MTA gives you 11% bonus for any amount you add over $5.50 and only lets you add in increments of 5 cents. These two things combined make it hard for a human to do the math on the fly.
- Estimate your monthly rides to see if you would save money with a 30-day unlimited card. You can also log your trips and see stats on how often you ride.
If you want to join as a beta tester for this and future apps please sign up here.
I’m looking for a job or internship as an iOS developer! Please get in touch email@example.com if you know of an opportunity.
Published in Startups, Wanderlust, and Life Hacking