One way to get started with SwiftUI

One of my most read articles is this one about React. What’s funny is that I wrote a lot of React 4–5 years ago, and almost none in the…

One way to get started with SwiftUI

One of my most read articles is this one about React. What’s funny is that I wrote a lot of React 4–5 years ago, and almost none in the past 3years.

At Tilt, we were early to React and even brought in its co-creator, (I forget his name but he was instrumental in building it at Instagram) to give us a React bootcamp. Having spent a lot of time programming I could tell then that this is how the industry would move. I wrote that article and continue to get questions about it even though I am far from the expert.

I feel like an imposter given that I have spent very little time with declarative programming. I dabbled in React and Vue but when push came to shove, I found myself using Rails + ActionCables or other Ruby centric ways of accomplishing “real-time” programming when I needed it for a side project.

React + Vue still feel way too heavy and meant for bigger teams. I might just be old and pushing back on change, but I really don’t get why teams of 1–2 people are choosing all of that real timelyness when most apps don’t need it. If you are hyper productive in it, then by all means. But if the LAMP stack helps you get to product market fit faster, do it. You will always have time, and an excuse to re-write it in React + Rust.

Recently, I have started hacking on a new side project and decided to make it an iOS app and mobile first. For the first time I am building an API without a web interface (in Ruby of course). The iOS app will consume the API and I finally feel like a “real” programmer again. To build this app, I am using SwiftUI because Apple seems to be leaning into it.

Better Apps, Less Code.

Extraordinary claims, require extraordinary evidence.

Into the deep end I plunge.

When I am learning a new programming language, I need a good book. Call me old fashioned but I read every page, I do all the “homework” and extra credit bonus questions. I type out all of the examples, no copy and pasting and so far it has helped me learn and master a fair number of languages. SwiftUI will be no different. However, finding the right book was hard.

After an exhaustive search, I settled on two resources to get started:

  1. Apple’s Official SwiftUI Tutorial
  2. Pragmatic Programmer’s SwiftUI Kickstart by Daniel H Steinberg

SwiftUI Kickstart is a bargain at $30 and they typically go on sale for Black Friday, so it’s worth a purchase. You can burn through it in 4–5 hours of focused time. It does a good job of getting you comfortable inspecting the output of your code in the debugger (in Chapter 1), which for me helps me gain an intuition about why the framework was built the way it was.

Everyone learns differently, but if you are looking to get started with SwiftUI, I would start with those two resources.

Like all side projects, I spend around 20min a day on them. So start the clock.

Today is day 1.

Nick Shim, how’s this for accountability?