Peter Christensen

  • Presentations
  • Contact Me

Learning iOS, Swift Part 1

August 25, 2015 by Peter Leave a Comment

I’m about a week into learning iOS and Swift 2.0 and I am pleased and impressed. For reference, I’m using this course (currently $59 on StackSocial).

This week, I went through the basic Swift language sections and lessons about creating a basic app to demonstrate controls, outlets, and actions. I am pleased at how Swift looks so natural and unsurprising – I have to admit that I looked iOS a couple years ago and a page of Objective-C was enough to make me turn around and leave.

For background, I programmed in Pascal as a kid, then C and C++ in college (which I hated), then C# for my first 5 years of work (which I loved), then Ruby/Rails/JS/web for the next 5 years (which I currently love), with Common Lisp and Clojure sprinkled over the last several years for fun. Ruby is my goto language for getting things done, but Clojure is inspiring for its clarity of design and how it guides you to do the right thing. Swift has nice, comforting C-style syntax while providing a lot of the guidance, protection, and convenience that I like about Clojure. For instance:

  • the way you have to opt into nil using Optional types
  • the way you can save some boilerplate where possible using the forcible unwrap operator
  • using guard instead of if to emphasize your main logic
  • the flexibility around parameters – binding a local variable with the param name, explicit inout params when you need to change them, variadic parameters

I tend to program defensively and I get the feeling Swift will make that very natural.

I had more fun using the Storyboard, view controllers, and control library than I’ve had in a long time. My first work as a programmer was building Windows Forms in .Net 1.1, and it was so fast and productive for such a rich app experience. I love the web, but no web programming I’ve ever done (even now in 2015) has that same rush of creating results as fast as you can click and type as I got from using Visual Studio way back when. But building a silly toy app that lets you click buttons to change background colors and show/hide controls when you toggle a switch was every bit as good. I know there’s so much more to iOS than the control library, but if the rest of the platform is a well developed and simple to code against as that, then I’m in for a real treat!

Next up are an Ad Libs app and an RGB app.

 

Filed Under: iOS, Programming

Starting to Learn iOS, Swift

August 16, 2015 by Peter Leave a Comment

I have a project idea that has been bugging me for years, and I finally feel like it’s time to work on it. It’s an app, with a server-side back end. In the past I had been focused on startups and making a business, but I realized that at this point in my life and career, I’d rather stretch and expand my technical skills. Admitting that lets me focus on it as a cool technology project, and demands that I learn new things, as opposed to starting a company, which would require me to use what I could be most productive with right away.

I’ve been a Clojure fan for years but was never had more than intermediate mastery of it, and never used any of the amazing cutting edge libraries from that community. But the combination of ClojureScript, various React wrappers (Om, Reagent, etc), React Native wrappers, and Datomic is such a compelling stack that it has kicked me into action. This talk from David Nolen is a great summary of the state of advanced Clojure:

As much as I would love to lean on the Clojure stuff, I have been burned in the past when I didn’t know the stack underlying a cool library. So over the next few months, I’m going to learn Swift and iOS, and then React. For Swift, I’m using this course on iOS 9 and Swift Mastery. Several iOS developers recommended the Stanford iOS course from iTunes U, but I wanted a course that covered the newest version of Swift, because of the big recent changes.

I plan on writing up my experience learning Swift, and downloading Xcode 7 (3.6 GB) gave me plenty of time to write this!

Filed Under: iOS, Programming

Categories

  • Blog
  • Book Review
  • Business
  • Clojure
  • Education
  • Emacs
  • Fun
  • iOS
  • Lisp
  • Personal Sprints
  • Pictures
  • Polyphasic
  • Presentations
  • Programming
  • Rails
  • Startups
  • Uncategorized

Copyright © 2025 · Minimum Pro Theme on Genesis Framework · WordPress · Log in