“I want to build an iOS application with zero programming experience”

Côme Chevallier
6 min readJun 12, 2017

--

Great, so did I a few weeks ago. Let’s learn together.

What you are about to enter.

First things first: make sure you have a Mac.

Then, do not pay attention to all the BS posts/articles you can find around telling you that learning iOS development in Swift should take X weeks/months. You never “finish” learning and you cannot know how long it’s going to take you to do Y or Z ex-ante.

Instead, I suggest we try to build robust parts of iOS applications from scratch with zero previous programming experience using a military discipline. Then, sooner or later when it is time for you, you’ll be able to tie them up altogether to produce useful working apps according to your needs. So keep your app idea at the back of your head and always try to see how you can apply the stuff from here towards building it.

Read the following lines carefully, and do not worry too much if some things don’t make sense yet. You will often have this feeling, but you’ll always figure things out. Everyone was once a complete noob and (hopefully) everyone is learning every day.

Introduction

I want to learn how to program, and I have chosen to start with mobile development on iOS using Swift (Apple’s primary language for its platforms).

Actually, it is pretty much — and should be — the opposite: I want to build iOS applications, so I am learning how to program them. I believe if you want to efficiently learn how to program, you should first find what to program. How can you not lose focus without a purpose?

You’ve almost definitely googled: “Best programming language to start” or something alike. I did it. Pretty sure everyone did it at some point. I think ‘programming” is a shared basis of concepts and axioms, i.e. thoughts, that are expressed differently by different languages (C, Haskell, Javascript, etc.). As for human languages, some can express some things more clearly than others, some are more concise and widely spoken, some trade off expressibility for ease of use, some have dialects and autochthonous concepts, some live and some die.

In the end, I think it doesn’t matter which one you pick first. What matters is what you want to do, which will give you the drive to learn, and thus which language best fits your needs. For a brand new iOS app today, this is Swift. You will learn a lot about underlying common programming concepts and patterns anyway which will make learning other languages a lot easier.

The Spirit

A few guiding principles we will live by along the way.

Honesty and humility

When you don’t know, you don’t know. Don’t BS yourself, research it. In the end, programming is just giving instructions to a machine. It is the dumbest executor: it will execute the instructions you give it, period. In most popular Swift or Apple frameworks, bugs are extremely rare. In 99.999% of cases, the “bug” is on you because you thought something did something when it didn’t. Chill and figure out why your code isn’t working as intended.

Don’t re-run your app 15 times to see if something changes even though you didn’t touch the code — this is the very definition of insanity.

Question everything you do, see, think. Do not trust anyone blindly, even yourself, and me above all.

Zero technical debt

It’s ok to do a bit of “quick-and-dirty” coding to try something on-the-fly but whatever goes into your code should never, ever, be that. “I’ll refactor this later”, “80% of the time it works 100% of the time”, etc. All it does is create some technical debt to repay to your future self and others who might work with you; just like financial debt, you can drown in it at some point.

Refactor now.

Nothing is forever

No dogma, no religion, no mantra, no guru. Be prepared to delete hours/days of work and start things from scratch if necessary.

The Letter

Before we jump right into it, there are a few things you need to understand about what you will, may and won’t find here and why.

This is a living journal

I will be trying to update as much as I can as often as I can. You can consider every piece as work-in-progress.

You will:

  • always be presented with what has been working for me at a particular moment in time. If I found a better way, I will update the how. If you found a better way, I will update the how.
  • get straight-to-the-point and crystal-clear explanations about everything discussed in every piece. Do not hesitate to let me know when something isn’t this way.

You may:

  • realize that some content has disappeared / changed since the last time you saw it, or that a piece has tripled in size. Again, everything is and will be in constant evolution (even this manifesto).

You won’t:

  • find opinionated content without justification. I do not care about coding styles, unnecessary code, and copy-pastes nor do I blindly follow “canonical” ways-to-do-stuff without understanding and questioning them. I you find me doing so, please point it out.

I do not hold a Computer Science degree of any kind

I am just trying to learn a bit more about programming in general every day as I build stuff on iOS, trying my best to do so with extreme rigor.

You will:

  • embark with me on a journey to acquire real-world, concrete programming skills beyond academic edge cases
  • need some basic logic and mathematics foundation. You can already do a lot with high-school basics

You may:

  • use Google to research anything further and be skeptic about whatever comes up.
  • find errors of many kinds. Please correct me if you do.
  • not become a software engineer per se. This will be entirely up to you and the dedication you put into your learning expedition. You cannot call yourself that if you know only one language / platform and that’s what it’s all about here with Swift / iOS. I hope we’ll be able to call ourselves 1/2 iOS developers at some point, though (no Objective-C here).

You won’t:

  • find deep-dives on complex theoretical / technical CS concepts. If we ever need to use them, we will do so in a practical and contextualized way. If we need to get a better grasp, I will try to simplify them. If I misunderstood them, correct me.
  • find exhaustive reviews of working solutions for a particular problem. I will expose the way I made things work, and may briefly touch upon other methods.

I started out with the Swift 3 language on iOS 10 using 100% code

In June 2014, Apple introduced a new programming language called Swift for development on its platforms (macOS, tvOS, iOS, watchOS, somefuturecoolOS, …). Swift is the way forward.

Before Swift, there was Objective-C. It still exists today, and still will for a long time. A lot of legacy code, from apps written long before 2014, is working well and written in Objective-C.

At first, Swift was clunky and weird but it is now a stable, robust and powerful language that everyone starting now from a blank sheet on iOS I think should be using.

What I mean by “100% code” is 100% code for UI (user interface). Xcode has a “native” way to design UI with storyboards/XIB/NIBs, which are a graphical way of doing so, but I do not use any of them.

You will:

  • get experience with the latest tools, frameworks, and patterns for iOS development. I have zero legacy code, close-to-zero programming experience and less than zero will to learn Objective-C so I am not tied to anything in particular — just looking for what I think is best.

You may:

  • come across Objective-C concepts like Key-Value Observing, method swizzling, etc. This is because Swift uses the Objective-C runtime (execution model, i.e. when and how things are executed by a program) which allows for deferring logic to when the program is running (at runtime) as opposed to when the source code is built into an executable program (at buildtime).

You won’t:

  • find any code written by me in Objective-C, ever.
  • design UI with storyboards/XIBs/NIBs, ever.
  • develop applications and features targeted at iOS below 10 as a rule. But almost everything should work down to iOS 8 or 9.
  • become an expert on a particular framework / library. This will be up to you to deep-dive if you want it.

Let’s go.

--

--