100 Days of Swift

Learning Apple’s new programming language

Since Apple announced Swift as the new modern language for their products, I’ve been wanting to learn it. Even though my background isn’t programming, I decided to give it a shot. A little more than a month ago, I finished my 100 Days of Swift Project.

Checkout all my Swift projects — samvlu.com

Project 01 - Tap Counter

How much programming experience did you have before learning Swift?

Short answer: Not a lot.

Long answer: My background is Motion Graphics and I’m a self-taught Web Developer. I know HTML, CSS, Sass, Javascript, jQuery, some Ruby and Python, but haven’t built an app before. Although I’m well versed in HTML and CSS, a programmer friend convinced me that those languages are scripting languages. They are used to describe and style content. Programming isn’t like that. Even though HTML and CSS aren’t programming languages, I have to say it helped me get used to looking at code and debugging errors.

Project 10 - Pull To Refresh

Was Swift easy to learn?

Yes, Swift’s syntax was easy to learn. Apple did an incredibly good job designing the language and launching a detailed book at the same time. But Swift is only 1 piece of the puzzle—before I could build my first app, I had to learn:

Swift Xcode Programming Concepts iOS Frameworks

Project 18 — Dynamic Data

What are some good resources to learn Swift?

I studied and read everything I could find on Swift. I also read plenty of material on programming concepts like Object-Oriented Programming and MVC Architecture. I think it’s more important to learn programming than it is to learn Swift syntax. I’ll speak more about that in the next section. In no particular order, here are some good places to start learning Swift:

The Swift Programming Language by Apple: This book covers the Swift syntax. It’s also available online for people who prefer using their Web Browser. (Free) Developing iOS 9 Apps with Swift by Stanford: This is an iTunes U course taught by Paul Hegarty, he worked at NeXT with Steve Jobs. He teaches you how to build a few apps with Swift. (Free) Ray Wenderlich: This site has a huge team of talented people who make tutorials for a range of programmer levels. The free tutorials are more than enough to get started with. There’s also books and subscription only tutorials. (Free / Paid / Subscription) Design+Code by Meng To: He packs a considerable amount of material in his book. Meng teaches how to build an app from scratch using Xcode, Sketch, Swift, Spring Animation Library and more. He regularly updates the book with new material without charging previous purchasers. (Paid) Swift By Example by Brett Bukowski: This site helps you learn Swift Syntax by providing explanations for code in a simple side by side view. (Free)

Update New Resource:

100 Days of Swift: The Tutorials After finishing this project, I went back and created video tutorials based on my journey. You’ll follow the same path I took and learn Swift by building cool projects. I’ll show you the essentials of how I use Xcode, Code Snippet Library and iOS Simulator. You’ll also gain a solid foundation in Swift, Programming Concepts, and iOS Development. (Paid)

Project 35 - Recreating Google’s iOS App Mic Animation with Core Animation

You mentioned that learning programming is more important than learning Swift syntax?

Yes, because learning programming lets you start building things.

Learning about “for” loops is not learning to program, any more than learning about pencils is learning to draw. — Bret Victor, former Apple Designer

I spent plenty of time trying to build things and asking questions—wondering how things worked. I wouldn’t say I learned programming because I’m still learning. But I remember the moment when it clicked in my head—when I finally had an understanding of how things worked. This actually has nothing to do with Swift, but the moment programming clicked in my head was when I used a prototyping tool called Framer. It’s built on the idea of immediate interactive code visualization, an idea Bret Victor introduces in his talk “Inventing on Principle”. Using Framer gave me a general understanding of code structure. It gave me answers to questions like:

Why write a function? What can I make with a for loop? What’s the use case of an if statement? And many more.

Framer answers all these questions in a visual way. I could make small changes to the code an instantly see it’s effects. This instilled me with a fundamental understanding of how to use code to build things. Which proved to be vital when learning to build things with Swift. I’m not saying if you learn Framer, you’ll be able to build iOS apps. I’m saying that Framer taught me a new way of thinking that made it easier for me to learn how to build iOS apps. Apple has their own interactive coding tool called Playgrounds—it’s built right into Xcode. They’re both great tools.

Project 38 — Interactive Transitions (Artwork by Zesty Does Things)

Final thoughts

Phew! What a ride. When I started this project, I thought I’d have 100 projects to show at the end, but I only have 40. This is because I was learning and building at the same time. Most projects took a few days to complete. I’m glad I was able to do this. It’s given me a new way of thinking. A new way to problem solve. I have a whole new appreciation for software developers.

Before doing this project, I’d often launch apps and wonder how they work. Now I launch apps and think, “hmm why’d they built it that way”.

Checkout all my Swift projects — samvlu.com