iOS Foundations : Thoughts & Conclusions

It’s taken a little under two months to complete the CodeWithChris iOS Foundations course (which includes the free ’14 Day Beginners Challenge’ course). Today, I undertook to print off all the files used by each app that we’ve created during the course.

One thing that surprised me enormously, on looking at the printouts, was just how much stuff we have covered. No wonder I felt overwhelmed at times. The sheer amount of Swift / SwiftUI code that Chris takes us through during this foundation course is, quite simply, staggering.

We’ve covered so much stuff that I’d actually forgotten some of the apps that we’ve done – that’s how far we’ve moved on. I had to dig them out from obscure folders on my computer (I never was organised), and just remembering what to look for was a challenge in itself.

There have been times that I’ve felt swamped by the code, the syntax, the convoluted way Swift expects “human readable code” to read in a barely-readable way. On top of that there have been hurdles, not least of which is when a modern update to Xcode doesn’t do what Chris is teaching us.

Even at the end, that one came back to bite. On opening the previous apps that we’ve done, Xcode insisted on throwing up warnings that hadn’t bothered it before.

Previously, this had been fine:

ForEach (0..<model.recipes.count) { index in
   …
}

But, not any more. Now Xcode throws up a ‘warning’:

Non-constant range: argument must be an integer literal

That’s about as clear as mud. There had been no such ‘warning’ before. I guess it’s something that’s changed as Xcode has updated itself over the ensuing weeks.

The app will still build, but we don’t like obscure errors, do we? The “fix” turns out to be this:

ForEach (0..<model.recipes.count, id: \.self) { index in
   …
}

Who knew?

I guess this is going to be par for the course with learning to code. As Apple change things, so errors not of our own making will creep into old code.

In some ways, this is actually reassuring. In the past, I’ve always assumed errors and broken scripts were my fault caused by lack of knowledge. But, if the last several weeks have taught me anything, it’s that “if the code fails, assume it’s Apple‘s fault for secretly changing something until you can prove otherwise”.

Conclusion

I’m still stunned that, in this course, I’ve created a half-dozen or more apps less than two months after I had no clue how to even begin writing an app. It’s definitely not an easy process, but gaining knowledge of something that previously seemed so obscure that it may as well have been magic is no small thing.

Two months ago, the code I’d read for App Development was nothing more than incomprehensible gibberish. Today, well, it may still mostly be incomprehensible but, when I look at the code, it’s no longer gibberish. I come away in the belief that I can take the code and at least have a stab at “figuring out what it does”, even if I don’t get it right.

I conclude the iOS Foundations course in the belief, and the knowledge, that I can do this. A new course awaits..!