Swiftly learning Swift

It’s a new year, time for something new! To be fair, I did start this new project in the last few days of 2014, but the beginning of the year seems like a good time to fully commit by sharing my Swift learning plans with you. Since the programming community is so international, I decided to write these Swift updates in English. Hope you don’t mind – and please don’t let it keep you from reading on! Even (or especially) if you don’t have any programming experience. Who knows, maybe I’ll be able to talk you into learning Swift with me.

Why?

There are many reasons to start learning a (new) programming language. I spend a lot of time, both at home and at work, consuming: dealing with things other people have made. I read books and research proposals, I watch movies and tv series, I sing and play other people’s music. I do write, but mostly detailing other people’s experiences and curating other people’s things.

Lately I’ve been wanting to produce things, to make something original. I have so many ideas for apps I’d love to build. Hopefully I’ll be able to show some of them in due time.

Also, even though I fully acknowledge that not all geeks are programming geeks, and computer science is not the same as software engineering, I have been feeling a bit uneasy about my lack of programming experience as a geek with a PhD in computer science. Sure, I did some Java, Haskell, Prolog, and 2APL/3APL, but never really beyond the mandatory homework assignments. Most of my recent ‘coding’ involves minor fiddling around with HTML and CSS in WordPress. I’ve been wanting to dive deeply into a programming language for a while now, and Swift seems like a good idea.

What?

Swift is Apple’s brand new programming language for making iOS and Mac apps. If you want to get into programming, there are of course many options. I’ve chosen Swift because I like (mobile) apps and Swift seems a friendly language. I’ve heard many positive things about it since its release last summer. The fact that it’s so new, does mean that some iOS/Mac development resources are more tailored towards Objective-C (the ‘old way’ to make apps), but the community does seem to be abuzz with Swift resources and meetups and writeups and everything. Exciting!

(Intermezzo: how cool is it that the main photo on Apple’s official Dutch Swift page is of a young girl? Yay for women who code!)

Also, it helps that everyone I know who is working on iOS development really seems to love what they are doing – that’s very inspiring!

How?

I searched and asked around for some good learning material that is suited to my needs. Many Swift tutorials are written for programmers who already have experience with Objective-C, which makes sense, but is not the right thing for me. Even though I have some programming experience, I really do need to refresh my memory on many programming concepts, so I decided to aim for some beginners’ guides.

I’ve found Apple’s iBook The Swift Programming Language to be quite good. The first chapter, A Swift Tour, is available as an Xcode Playground, meaning you can open it in Xcode and play around with the code examples. After walking through the Playground chapter for a few hours, I decided to just start with my first app idea. More about that later.

With whom?

In my experience, learning is something you do better with other people. If something doesn’t work, they can help you – and when it works, you can celebrate together! I am lucky enough to have an actual software developer as a boyfriend. Even though he doesn’t work with Swift, he is more than happy to share his programming knowledge and experience with me.

Some more things I plan to do in order to connect with other people:

  • I’ll be going to some iOS/app development Meetups in or around Amsterdam.
  • I created a stackoverflow account for any questions I might have.
  • I remembered that I have a Github account from my last (very brief) foray into JavaScript.
  • Speaking of which, the fact that I’m writing (and publishing!) this blog post is to avoid what happened then: I was never fully committed to learning JavaScript and the project didn’t really take off. This time, I plan to blog about my experiences weekly.

First steps

Programming requires having a fairly good idea of your end product, having a general idea of the components, and of course writing the actual code. It’s like writing a novel: you need to have an idea of the plot, an idea of which chapters and characters your book needs, and then you need to write down the actual sentences. Taking my first steps into Swift programming, I feel a bit like I’ve written some short stories before, but now I’m writing a book, and it’s in a different language than anything I’ve written before.

In some aspects, I feel that my previous programming experience helps a bit. I’ve noticed that that general idea – what kind of classes and functions and methods I need, or which types of objects I can use – comes quite easy. But then there’s of course the question of how you write things down in a specific language, and in that respect, I’m an absolute n00b.

As I said, I just decided to start working on my very first, very simple app, with much help from the aforementioned boyfriend and many internet resources. More often than not, when I figure out what I want to write, I have to search online or in Apple’s Swift handbook for the right way to write it down. One thing I have accomplished this morning is writing my first class without having to look up anything. It’s the tiniest of victories, but a victory nonetheless!

Core Data, on the other hand, is proving to be a tough cookie. Two steps forward, one step back.

9 gedachten over “Swiftly learning Swift

  1. Naast Cocoaheads is er ook Appsterdam, die bijvoorbeeld elke woensdag avond een (social) meetup hebben.

    Speaking of Core Data: in the long run, try to wrap your head around the NSFetchedResultsController. It’s a beast, but a very powerful one.

  2. Core Data is uiteindelijk zeker nuttige kennis, maar wil je je daar wel in je eerste app op storten? Probeer of je in eerste instantie weg kunt komen zonder lokale database of simpele caching.

  3. Pingback: Second steps in Swift | Lady Geek

Laat een reactie achter bij NielsReactie annuleren