inessential by Brent Simmons

December 2018

NetNewsWire Diary #3: The Crash Reporter

The consensus choice for crash reporters is PLCrashReporter. It’s solid work.

So I went to add it to NetNewsWire, and here’s what happened:

Because of Apple’s new app notarization service, I needed to have PLCrashReporter get built along with the rest of the app — this way I could turn on the required “hardened runtime” setting. (Correct me if I’m wrong about this! Update next day: I am wrong. See postscript.)

But when I tried to build it there were a bunch of deprecation warnings (OSSpinLock, for instance) — and, since I treat all warnings as errors, it wouldn’t build. (I could turn that off, but I won’t.)

So I forked PLCrashReporter with the idea of fixing those errors myself, but then ran into territory I’m not familiar with and not confident about, so I stopped and deleted my fork.

So…

I thought some more about it, and did some research, and I learned that crash logs are still written to disk. This means I could use the crash log catcher I used to use in NetNewsWire 3 and NetNewsWire Lite 4.

The way it works: at launch time it looks for a crash log in the appropriate folder, and if the most recent crash log has not been seen before, then it prompts the user to send it it in. (A window appears with the text of the crash log, a place to add more info, and some buttons — send or don’t-send.)

This isn’t as slick as an in-process crash catcher — but this system worked for me for years. And it means one less dependency, and it means code I fully understand and control.

It’s a few dozen lines of code compared to adding an entire framework. So that’s what I’m doing.

The code

The code isn’t complete yet, but here’s the start. (And here’s the code from NetNewsWire Lite 4.)

I think this is the first time that I’ve looked back to old NetNewsWire code. I’m rewriting it in Swift, but using the same logic.

Important note: this code will not be part of the Mac App Store build. For that build, for better or worse, I’ll rely on Apple collecting and reporting crash logs. This crash reporter is just for the non-MAS build.

PS The crash catcher that appeared in earlier versions of NetNewsWire itself had a crashing bug (briefly): it would crash if there were no crash logs found! Which was self-healing — because once there was a crash log it wouldn’t crash any more. This remains my favorite bug ever. :)

PPS Shoutout to Uli Kusterer — my code was originally based on his UKCrashReporter.

PPPS The next day… I was wrong about needing to build PLCrashReporter in order to use the hardened runtime. On the Apple dev forums, Quinn writes:

The hardened runtime is an attribute of the process. It’s not something that frameworks can opt it to or out of individually.

So… I could just add a pre-built PLCrashReporter binary. But I’m going to stick with my thing anyway, again because it means one less dependency, and it means simpler, smaller code that I understand and control.

(The only remaining dependency like this is for Sparkle. I don’t see any reasonable way of removing that.)

Prison

I’ve said before that my fondest hope is that all these people go to prison, and that they come to regard Trump’s decision to run for president as the worst thing that ever happened to them.

It’s not schadenfreude — well, it’s not just that — it’s about justice.

It should be known by all, by everyone everywhere, that long-time criminals and fraudsters who feed hate, who betray their nation, will get what they deserve. They’ll get years behind bars and their liberties taken away. They’ll suffer the condemnation of history, and they’ll be known forever as dirt.

It should be known by their supporters — whose support is based on a mutual love of cruelty — that these kinds of people are buffoons who do not have their best interests at heart. The only interest they serve is their own corrupt self-interest. These kinds of people are not worth supporting.

Some are already in prison or heading there. I hope there are many more, and that this goes all the way to the top.

New Xcoders Site

The Xcoders group is for Seattle-area and Vancouver, BC folks who make apps — by writing code, testing, supporting, designing, and so on. They even let marketers like me in there. :)

I’ve been attending since 2005, but only recently started helping out more formally — I’ve been part of the effort to get our communications working a bit better.

We started a new blog at https://xcoders.org/. It’s hosted by Micro.blog, and we want to thank Manton Reece and Jean MacDonald for all their great work on the service.

We gave our blog its own domain name, xcoders.org — because that’s how you own your own content on the web. We also set it up to automatically cross-post to Twitter, to our existing @xcoders account.

We’ve still got some work to do with design (and maybe a public calendar?), but we’ve got the standard links up there for downloads, videos, Slack signup, and our code of conduct.

If you use an RSS reader, you can follow it there instead of (or in addition to) Micro.blog or Twitter:

Next meeting

As the site says, there are no talks at the next meeting — we’re going straight to the Cyclops in Belltown (which is just a few blocks from the standard meeting place). Be there!

Special note to people who don’t write code: you’re totally welcome! You’re encouraged to come, in fact, to this meeting and every meeting. It’s a great group of people and we’d like to meet you. :)

Almost all the cats and dogs alive during 9/11 are gone now. I hope we remember the comfort they brought. I remember my kitten.

On Using Stock User Interface Elements on the Mac

The genius of the Mac is its consistency. Users brand-new to any well-done Mac app are able to understand how to use it pretty quickly, in part because they see familiar buttons, popup menus, sidebars, toolbars, and so on that they see everywhere.

While it’s tempting to put your own stamp on things — as you kind of need to on iOS — on the Mac you can relax and use what Apple has provided.

Not least because Apple has already done a better job than you will. Apple’s controls support various accessibility features, and they behave the way Mac users expect. Both of those things are very easy to get wrong, and when you do it wrong the app feels wrong, and people notice.

Mac users love the Mac because of the user interface, not despite it. Remember this.

Another thing worth considering: it’s cheaper. Writing your own custom UI — and maintaining it across macOS releases — takes resources. The more you use Apple’s controls, unmodified (or minimally modified), the easier time you’ll have when the Mac gets new features and behavior updates.

I’m not saying you should avoid beauty and delight. You want your app to be gorgeous; you want your app to make its users happy. Totally! I’m saying that you should design within the constraints of building a good Mac app. And that working within those constraints makes it more likely, not less, that you’ll reach that goal.

Cheri Baker, Eight months without Facebook:

When we allow sites like Facebook to do the heavy lifting in our relationships, it seems that we turn into cardboard cutouts, even when hanging out in person. I always hated that dynamic, and now it’s over.

So Basic It’s Not Even Funny

Laura K. Curtis writes about book bloggers and lists a whole bunch you might want to subscribe to:

There are fewer book bloggers around now than when I started, but I’d like to encourage people to visit them, especially since you are more apt to find less well-known books by looking at blogs, books you might really enjoy, but might otherwise never find.

“Who has time to cruise all these sites?!” I hear you cry.

“No one,” I answer. “That’s why there are feed readers.”

What delighted me especially was this line: “It’s NetNewsWire for Mac and it’s so basic it’s not even funny.”

And I — earnestly — love this, since it describes my design and development aesthetic so perfectly. So basic it’s not even funny. I might even ask her if I can quote her on the NetNewsWire website. (Update: I did ask.)

* * *

I’ve always been a minimalist, but when I was younger I’d temper that — sometimes extremely (remember the releases of Glassboard with a wood grain background) — because I was afraid my intended audience wouldn’t like it. I was afraid I was too extreme.

I don’t know what the difference is now, but I am completely unafraid to be the designer and coder I am. Or, as a bit of advice I got early in my career put it: be the freak you are.

Maybe just because I’m older? Maybe tastes in general have shifted that way a little? Dunno. But I’m sure glad I got here.

So basic it’s not even funny!

* * *

Yes, I’m aware of the modern use of basic to mean something rather judgmental. I plainly don’t give a fig. (And I don’t think Laura meant it that way.)