Dusting off the blog

I know. Life (and Covid) got in the way and SwiftUI happened in a big way, and I was busy doing various things, and somehow, this poor blog got abandoned.
But I’m back, and I want to start again from scratch with SwiftUI, which is a very different way of programming than Appkit.

Of course, the ‘Cocoa’ in the name has become a little redundant. So much for feeling really smug that I had avoided ‘ObjectiveC’ in my blogname.

Cocoa was the collective term for FoundationKit (still valid, but rarely accessed directly), AppKit (still underpinning SwiftUI) and CoreData (currently being phased out in favour of SwiftData). Ah well.

My coding goals haven’t changed. I’m still working on MacOS (with very occasional delves into iOS, but that’s maybe 1% of what I’m doing). It’s not just the screen size. My apps typically don’t make network calls to bring in outside data; instead, they rely heavily on user-created data in multi-document apps, with many different ways of using the same data.

My current setup is MacOS 14.5 (Sonoma) running Xcode 16b (because WWDC had some thingsI wanted to try); I will wait with updating my OS until it’s stable and released.

Initially I did not get on with SwiftUI, but past experience told me to persevere. I can see the writing on the wall. Once you could have pure SwiftUI apps without reliance on dodgy hosting controllers, and better window management, things improved, and to my surprise I found that knocking out smaller applications was faster and easier than it had been using AppKit/Storyboards.
SwiftUI is an experimental platform: you can mess about easily, swap views in and out, try them out in isolation, save them, and drop them into new projects with only a minimum of setup. It is very interface/experience-driven form of coding, and some of the principles that have been drummed into us (like ‘avoid global state’) are being thrown out of the window in favour of a streamlined experience.

Narrative Coding

In the past couple of years I have developed a programming workflow that is much closer to my experience with Filemaker development than the frustrations of ObjectiveC or even the middle ground of earlier Swift. It involves writing down what I want to do, what I am trying, how it’s working out, with code snippets and easy-to-follow instructions, much like I had done on this blog, rathe rthan bashing out code, finding it doesn’t work, and chipping away at it until I can make it run.

I want to shift some of that work back onto the blog so others can benefit from it, too. For the time being, I want to lay foundations; go through a coding course or two and see what I can pick up, catch up with things like SwiftData, cocurrency and Macros, and, of course, Swift 6. I have, at this point, no interest in AI, Machine Learning, or Augmented Reality.