inessential by Brent Simmons

June 2019

The fact that DisposeBag is not a name in Apple’s Combine framework sparks joy. I was never, ever going to write code where that was a thing I had to read.

Thing you should know: Mark Boszko — my friend, co-worker, and producer of the The Omni Show — did a podcast called The Optical that dives into movie special effects, and it has some amazing guests such as Douglas Trumbull.

If you like movies, you should listen to these.

Seattle Xcoders Tonight: WWDC Topics

The Xcoders meeting tonight should be pretty great — we’ve got a bunch of lightning talks on new stuff from WWDC.

It’s the Woodstock of today. In later years, more people will claim to have been at this meeting than could have fit in the room. :)

In the Sweet Setup’s review of iOS RSS readers from last May, there’s this sentence that I love: “It’s perhaps ironic that Google Reader helped popularize RSS, considering the sheer horror of its interface design.”

NetNewsWire CI, New Technote

We now have continuous integration set up for NetNewsWire. I didn’t need it for a long time, when it was just me — but now that we have multiple contributors, it’s important.

We’re doing the app and the separate frameworks (RSCore, RSParser, etc.) the app uses.

Thanks to circleci for the service and to Joe Heck for setting it all up!

* * *

Most of my work, between now and shipping, is writing. Here’s a new technote: Why Reruns Happen.

* * *

We have had not one single crash report since 5.0a3 shipped. :)

(Yes, the app does have a crash catcher: no, we’re not relying on people finding the crash logs on disk and sending them in.)

NetNewsWire Contributing, Code of Conduct

I finally got around to two things NetNewsWire needed: 1) a page describing how to contribute, and 2) a code of conduct.

They’re both on the same CONTRIBUTING.md page.

If you’d like to contribute, the process is pretty straightforward. File a ticket, talk it over, write the code, do a pull request.

I don’t like too much process. This seems just right. That said, I’m still learning about how to manage an open source project, and any feedback on this (and anything else) is definitely welcome.

NetNewsWire Status

We just released NetNewsWire 5.0a3.

Almost all the current remaining work in the Beta milestone is writing — some tech notes and, most importantly, the Help book.

What will probably happen is that we’ll run out of coding to do while I’m still writing. Which is fine — it just means Maurice can go see how much we can use of SwiftUI in the iOS app. We want to go as all-in as possible (while still making a great app).

We’ll use SF Symbol too, of course. Probably Combine. All the things!

(Yes, we’ll be requiring iOS 13 for the iOS app.)

At any rate — the Mac app (minus documentation) is damn close to what’s going to ship. It’s just a matter of finding and fixing the last few bugs.

Maybe shipping in July? Fingers crossed. :)

Catalina compatibility tip: don’t use NSFont as a key in a Swift dictionary. I’m getting crashes from 10.15 users that include this message:

Fatal error: Duplicate keys of type ‘NSFont’ were found in a Dictionary. This usually means either that the type violates Hashable’s requirements, or that members of such a dictionary were mutated after insertion.

It’s quite possible this was always a bad idea, of course, and it’s just that in 10.15 it crashes. I don’t know.

NetNewsWire 5.1 Planning

My job with NetNewsWire, more and more, is product manager. Which I don’t mind. :)

Anyway: I just combed through the issues list and picked out features for 5.1. I had a general idea of what I wanted going in, but it’s good to look at everything.

Here’s the list for 5.1:

  • Feedly syncing
  • Theme-able article view
  • Localization — probably just French
  • Text size settings for timeline and sidebar
  • Catch up command (an easy way to mark-read before a chosen cutoff date)

Feedback is welcome, of course. Your ideas of what to do next might be different from mine.

Best place for feedback is on the Slack group, but Micro.blog, Twitter, and email are good too.

Short Stuff

You may remember the early days of Blogger. Posts didn’t have titles, and they were often quite short — sometimes just a sentence and maybe a link. And these posts appeared on a person’s own blog, which could be hosted anywhere.

It was well-understood that blogging is provisional, is thinking-out-loud. It was the flow of life-on-the-web. Not everything was an essay.

When Twitter came along we collectively decided that this kind of thing was Twitter’s jurisdiction — that these are just tweets.

But why should we agree that Twitter, or any company, owns an entire form of writing for the web?

That’s why my short stuff appears here (and on my microblog) and then gets copied to Twitter. It belongs on the open web first.

Twitter is just another form of syndication. It’s not the home of my writing.

My Blogging Setup These Days

A friend of mine asked me about my blogging setup. I figured I’d blog about it. Definitely skip this post if it’s not the kind of thing you’re interested in.

inessential.com

This blog, inessential.com, lives on an inexpensive shared host. It’s all static files, generated by wildcat. The posts are stored in a Git repository.

Posts from inessential.com are also picked up by my Micro.blog account, where they appear to people who follow me there. Micro.blog also forwards my inessential.com posts to Twitter, to my @brentsimmons account.

Micro.blog

I have four additional blogs hosted on Micro.blog: micro.inessential.com, nnw.ranchero.com, xcoders.org, and microblog.omnigroup.com.

The Xcoders blog is owned by the Xcoders group; the Omni microblog is owned by Omni.

micro.inessential.com posts get forwarded to Twitter @brentsimmons. The NetNewsWire blog posts get forwarded to Twitter @netnewswire. The Xcoders blog posts get forwarded to Twitter @xcoders. The Omni microblog posts do not get forwarded.

Writing tools

I use MarsEdit for almost all of my blog writing. I use BBEdit + Marked for blog writing from time to time. (At work I also use iA Writer sometimes.)

I do all of my writing on a Mac. This is because I’m in front of a Mac when I’m working, whether it’s my day job or working on side projects.

(This is not a general comment on the suitability of iPad for work. It’s not there for me personally yet, but that’s fine. It’s making progress all the time, and I’m certainly encouraged by the news from WWDC on this front.)

How I decide what goes where

It’s pretty obvious, usually. Cat pictures go to the Omni microblog. :) Xcoders announcements go on the Xcoders blog; NetNewsWire announcements go on the NetNewsWire blog.

The one slightly tricky thing for my personal writing is deciding between my main blog and my microblog. Long things always go on my main blog. Very short things are also totally okay for my main blog — but they’re okay for my microblog too.

So, for short things, I just make a snap decision, go by feel, and try not to spend more than a second on the decision. Since I’m writing in MarsEdit, picking the destination blog is just a matter of selecting it from a pulldown menu in the compose window. (I can choose a destination, write the post, then change my mind about the destination before posting. Easy.)

I rarely just tweet something, unless it’s truly ephemeral (or a reply, obviously). I prefer to blog first and let Twitter get a copy. This is part of owning my own content.

Reading tools

I use NetNewsWire with Feedbin syncing. I use the Micro.blog Mac app and Icro on my iPhone. (The Micro.blog Mac app supports multiple accounts, which is very useful to me.)

For Twitter I use Twitterrific on my Mac — with five windows open at all times for my various accounts — and Tweetbot on iOS.

NetNewsWire 5.0a2 is up!

Putting My World Back Together

I have not watched WWDC videos so avidly, and with so much glee, in a decade. The last time was probably with the iPhone SDK.

And now I’m putting my world back together in my head, a little bit at a time. It’s going to take a while.

One thing you should not miss: the SwiftUI DSL is not some Apple-only magic. We can define our own DSLs in Swift 5.1. Imagine what more Apple can do with this, and imagine what you can do with this.

See the What’s New in Swift video. Also pay close attention to property wrappers.

One thing I keep wondering about — because my apps tend to be about databases — is the SwiftUI of Core Data. In my app I use value types for most things stored in the database, which Core Data doesn’t support. So this means a whole bunch of custom code.

I would love to have defined my model using a Swift DSL and used an engine that (like Core Data) stores my data in SQLite.

The NeXT Era Ends, the Swift Era Begins

I’m surely not the only person to think, all week long, that this WWDC marks the end of Apple’s NeXT era and the beginning of the Swift era.

The NeXT era began, of course, when Apple acquired NeXT, with its Unix-based operating system, amazing developer tools and frameworks, and its CEO, Steve Jobs.

Cocoa was so much better for writing Mac apps than the Mac Toolbox was. The Mac Toolbox had been a revolution — but this was more than just incrementally better. (Cocoa is NeXT’s application frameworks that had been adapted and evolved for the Mac.)

A common refrain of Mac developers at the time was that Objective-C wasn’t nice at all to look at — but it was a wonderful language for the ways its underpinnings allowed for these powerful and easy-to-use frameworks.

It was mind-blowing. Don’t underestimate how much so.

And then, years later, Apple created UIKit, which was a modernized version of Cocoa for iPhone, with its small screen and touch interface. It was Cocoa for devices you carry around with you.

Also completely mind-blowing.

Fast-forward to now, and note that millions of apps have been written using this technology which was born at NeXT, then brought to Apple and pushed so very far forward.

Even if you’ve been writing mostly in Swift the last few years, you’re still writing in a NeXT context. Your apps still live in that world, whether you know it or not. Your apps are still Objective-C apps in a very real sense.

Then this week happened

Before WWDC there was plenty of talk about Catalyst (which we had been calling Marzipan) which is a way of bringing UIKit (iOS) apps to the Mac. And this was indeed part of the news of the week.

But the future was never about UIKit being a better version of what we already had for Macs. In some respects UIKit is better, in other ways not. It’s just that there are so many more iOS apps than Mac apps.

Though I don’t discount Catalyst’s usefulness — we will get lots of apps new to the Mac — the real news this week was about SwiftUI and the Combine framework. This, finally, is a new way of writing apps, and it’s based on Swift and not on Objective-C. It’s very much not from NeXT.

It’s early. It has bugs. It’s not nearly complete. Sure. But it’s also how we’re going to write apps in the future.

And it’s mind-blowing. Apple’s marketing for this year’s WWDC had it right.

It may be a while before you’re running apps that use SwiftUI and Combine (and who knows what else still to come). We’re in a transition, and transitions take years. But we’ve all just had a glimpse of the next 20 years.

WWDC 2019 First Words, Which I May End Up Eating Later, but Hopefully Not

SwiftUI is the future of app-making for our community.

UIKit for Mac (Catalyst) is a lateral move. I’m sure this will be super useful for a lot of developers, though not for me personally (since I don’t have an iOS app to move to the Mac).

But AppKit and UIKit both look like old news compared to SwiftUI and the Combine framework.

* * *

I’m not going to start using SwiftUI right away in NetNewsWire for Mac — NetNewsWire 5.0 is too close to shipping. We’re fixing bugs, and that’s it.

But we do plan to use it in NetNewsWire for iOS, since it’s not as far along as the Mac version. Obviously I’ll have more to say about SwiftUI as we learn more about it.

Could we eventually get to that place where the Mac and iOS version share UI code via SwiftUI? It looks promising! I would love that.

* * *

The future of app-making looks more and more like web development. Declarative. Semantic. Dynamic — adapting to context (interaction styles, accessibility settings, screen size, etc.). Runtime-editable.

SwiftUI and Combine can also be seen as an answer to Electron and React Native. The right answer for Apple, I think.

* * *

I’m way behind on videos. I’ve seen just a little bit so far. So much to learn! This was a big WWDC.

Maurice Parker writes Proposed NetNewsWire Branching Strategy. Discussion on the Slack group.