<commit_before><commit_msg>initial draft without links<commit_after>---
layout: post
title:  "How to learn Swift in 8 days"
date:   2015-10-09
---


####I don't recommend this approach
My final project at <a href="http://www.devbootcamp.com">Dev Bootcamp</a> was an iOS app called <a href ="https://github.com/Salt7900/breadcrumbs">breadCrumbs</a>. We had just spent about 15 weeks on Ruby and Javascript. No one in my group of three knew a thing about Swift, other than that it replaced Objective-C, and it was what you had to use if you wanted to make an iOS app.

You will probably have more than 8 days to teach yourself Swift. I am still teaching myself Swift, and if you look at the breadCrumbs repo, you'll see that while the Swift we wrote worked, it wasn't great, but it got the job done.

###Where to start

So say you do want to learn Swift? Where should you start? Here's why I did:

First, I checked the app store to see if there were apps I could use to learn a bit of Swift on my commute on the subway. I found a great little app called swifty. It teaches you the very basics, and was well worth in the in-app purchase to get all the lessons.

Next, I downloaded Apple's free iBook on Swift. To be honest, I didn't read past the introductory chapter. Not because it was interesting (it was), but because I didn't have time. I've picked it up again, and it is a great resource.

Youtube, youtube, youtube: There are a TON of videos on youtube about developing apps for iOS. Swift is only a couple of years old, so check the date on your videos: older videos will be about objective-C, not Swift. The thing about developing in iOS is that you don't just need to learn Swift, you need to learn the IDE (integrated development environment) that is used to build iOS apps, and that's Apple's XCode. You know what turns out to be harder than learning Swift? Learning Xcode. Xcode is a phenomenal tool, but the interface is overwhelming and takes awhile to get used to. This is where youtube comes in: you'll learn a bit of Swift on the videos, but you'll also watch someone navigate Xcode. Often the people navigating Xcode are faceless and I think might be 13 yearold boys, but that's ok, they know more than you. I recommend the whole series from Coding with Chris.

Treehouse: Not gonna lie, I love Treehouse. They gamify learning by giving you points, their videos are excellent, and their projects are challenging (please just don't pass off one of their projects as a project of your own). The downside of Treehouse is that it isn't free; upside is first month is free, and you can suspend and reactivate your membership whenever you want. I found the Treehouse videos and exercise on Swift and iOS development to be as high quality as the rest of yourself.

Playgrounds: Finally, Xcode has this cool thing called playgrounds. If you use Ruby, think of it as a slower version of IRB. Open up Xcode, open a playground, and play around with Swift. Swift looks a lot like Javascript without the semicolons, so if you know a tiny bit of Javascript and a tiny bit of Swift, you should be able to write a tiny bit of Swift and see what happens in the playground.

Good luck! If you have any resources for learning Swift, let me know in the comments.

{'fraction_non_alphanumeric': 0.04633323105247008, 'fraction_numerical': 0.005523166615526235, 'mean_word_length': 4.077881619937695, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1782513', 'n_tokens_mistral': 882, 'n_tokens_neox': 799, 'n_words': 576}