inessential by Brent Simmons

November 2018

Crash Catcher for NetNewsWire?

An actual conversation:

Brent Simmons [9:40 PM]
Crash catching What are people doing for this? NetNewsWire needs something, I suppose.

Wise, Super Old Developer [9:42 PM]
Just don’t ship crashing bugs.
Duh.

Brent Simmons [9:42 PM]
Well, I don’t, but the system will enforce some amount of crashing, and I want to be able to file Radars.

* * *

Well that’s me being a total jerk. It’s also a measure of my confidence (sure, let’s call it that) in my not shipping crashing bugs.

But it’s worth remembering — here in the real world, outside of a developer’s chatroom — that there are plenty of programmers who think they don’t shipping crashing bugs, but do.

And, despite my confidence, the responsible thing is to include some kind of crash catcher.

* * *

I want something lightweight. Ideally it just opens a new message in Mail with the recipient, subject, and body set. (I could write that UI part myself, if needed.)

It has to be open source, since I’m not going to include any mysterious binaries in an open source app.

What should I do? Is PLCrashReporter the best bet? Or…?

NetNewsWire Status Report: the Last 10%

I’ve been working on this app — originally Evergreen 1.0, now NetNewsWire 5.0 — for four years, at least. And now GitHub tells me that the 5.0 alpha milestone is 91% complete.

Which means, yes, I’m down to that last 10%. Old engineering wisdom says that the last 10% takes as much time as the first 90%, which means I have another fours year to go, and it will ship in late 2022.

I’m going to try and beat that, though, and ship in the first quarter of 2019. Let me emphasize the try part of that — there’s no guarantee. But I’m resisting all other temptations and buckling down on NetNewsWire.

What remains, of course, is all the stuff I’ve put off. Like syncing, drag-and-drop in the sidebar, search, and so on. (New app icon coming too.)

Note that I did say the alpha milestone is 91% complete. Let me be clear what I mean by alpha: it will be feature complete and won’t have any known defects. The alpha period will be for testing and finding and fixing bugs.

Once it gets to beta, it will be considered a shipping candidate. If possible there will be zero code changes from beta 1 to shipping. At any rate, code changes, at that point, will be made with extreme reluctance and caution.

(Yes, this is a little different from how other people do things. It’s how I do things.)

My hope is that it will get to alpha in February, and that things will move relatively quickly from there and then it will ship in March. Maybe on my birthday? (March 26.)

Again, that’s just a hope. Anything could happen!

Is there an App Store for Saudi Arabia? I don’t personally have any apps on the App Store — but if I did I’d make them unavailable there.

It’s totally a-okay for businesses and individuals to impose our own sanctions. We should, in fact.

Rainier Diary #10: Ballard’s Tokenizer

Rainier is the app, and Ballard is the language. It’s named for the neighborhood where I live in Seattle. (Using Pacific Northwest names is what I do now.)

Ballard has a fresh GitHub repository. It’s a separate framework, since I want to use it in NetNewsWire, and because I want to make it so other people can use it in their apps if they want to.

Another goal: the code should be understandable and tinker-able. The idea is to create a language where the implementation is not mysterious, where it’s accessible to even new programmers who are willing to put in some effort.

So I’m writing in Swift, at the highest level I can, and I’m writing blog posts which explain things.

Four Pieces

The language implementation will have four main parts:

  • Tokenizer: takes a string of code and breaks it into tokens. A token is a small structure that specifies things like: this is an identifier, and its name is whatever. Or this is an if keyword. Or this is a + sign. Etc.
  • Parser: turns the tokens into a tree of nodes that can be evaluated.
  • Evaluator: runs the script — that is, it evaluates the tree of nodes created by the parser.
  • Standard library: the set of commands — we call them verbs — that are built in to the language. These are for things like operating on strings, files, dates, and so on. This also includes some constants for things like the maximum value of an integer.

Makes sense, no?

Where I’m At

On the weekend I got far enough with the tokenizer — named Tokenizer — that I could start writing tests for it.

The tokenizer is probably the least interesting part of all of this, and I don’t think I need to write much to explain it.

The gist of it is that it goes through the string by calling popNextToken() to create an array of tokens until it reaches the end of the string. It will throw an error if it encounters something it can’t handle.

Which should be super-rare, because the tokenizer does not do much in the way of syntax checking. The tokenizer should be able to handle stuff that is entirely incorrect code.

Checking syntax is the job of the parser. The tokenizer just performs that initial pass that gives the parser something besides raw text to work with.

So, next step: write more tests for the tokenizer, fix any bugs, and then move on to the parser.

The parser will be more challenging, for sure. The evaluator, too — especially since it needs to be able to handle debugging, which means being able to pause, view the variables in the stack, resume, etc.

But one thing at a time: the tokenizer comes first.

One Year of The Omni Show

It just popped in my head to check today — and, sure enough, I’ve been doing The Omni Show podcast for just over a year now.

There are a bunch of reasons why I like doing it. The main reason is that it’s fun to show the personalities of the people who work at Omni — and the personality of the company — to the outside world.

It’s also fun as a way for co-workers to get to know each other a little better. We’re showing our personality to ourselves.

I also like it as documentation. This is a special time — our industry is still so young — and so I like it in the same way I liked doing The Record with Chris Parrish. This history will all be lost unless we record it.

And recording this history means not just talking to the usual suspects, the same people you hear every week. It means talking to people who’ve never been on podcasts before, but who all have stories to tell. This is a personal challenge — it takes extra work to prepare for someone different every episode — but it’s so satisfying. I love it.

PS For the curious: last April I wrote, on The Omni Blog, How We Do the Omni Show.

After the firing of Attorney General Jeff Sessions today — not at all unexpected — we’re closer to the break-glass moment where we take to the streets.

It could happen any moment, any day. Could even be minutes from now. Could have happened by the time you read this.

Sign up here.

PS The Democrats retaking the House last night was huge. The next two years were going to be perilous and tumultuous either way — but now we have a way better chance of just outcomes.

But we may walk through fire first.

Why I’m Writing These Particular Apps

On the Rainier Slack group, I was asked why I’m writing the app. What are my goals? What’s my exit strategy?

The below is how I replied. It’s unedited Slack-writing, so forgive me for (for one thing) suggesting that at age 65 I might not be writing code anymore. (I very much hope to be.)

Here’s the deal with Rainier (and NetNewsWire too). I’ve been obsessed with writing this app for many years. I’m 50 now, and have a good day job, and I don’t need to make any extra money. This means I can afford to make the apps I’m compelled to make. They will do good for the world, and I do have political and social goals for them.

But I don’t expect NetNewsWire to be popular like Twitter, and I don’t expect Rainier to be popular like Ruby or Python or Swift. Not even close.

I’ve worked all these decades to be able to be in the position where I have the ability and freedom to write the apps I want to write. Anyone could argue that I should be putting my skills and experience toward something more likely to be earth-shaking, and that’s fair — but I believe I can do the most good by making the apps I was born to make, rather than working at something that doesn’t excite me.

Large numbers of users doesn’t excite me. High-quality, open source Mac apps excite me. Bringing the power I enjoyed with Frontier to a new generation excites me. Bringing RSS reading back excites me.

My goal is just to be able to continue working on these apps, no matter how few or many users they have. My exit strategy… well, eventually cognitive decline will come, and I’ll write less code and do more writing about the apps. And eventually I’ll end up turning them over to someone else (or some group). But hopefully that’s 15 years from now, at least.

These are the apps I need to make. This is an emotional thing, for sure — but I’m rational enough to understand my heart and to follow it rather than to fight it.

Further reading: Love, from 2015, and Why I develop for Mac OS X from 2002.

Vote for Democrats Everywhere

The president recently called himself a nationalist — and it’s no stretch at all to call him a white nationalist.

From before his campaign, to his remarks after coming down that escalator in Trump Tower, to everything he’s said and done since — including his recent drumming up of fear about refugees planning to seek asylum in the United States — he’s led the effort to ensure that America respects only white power.

This is antithetical to Western democracy, which is built on individual liberty and equal protection, which says that all adult citizens have the right to vote.

If Republicans in Congress had acted as a check on his power, if they had exercised oversight, then I could plausibly suggest voting for the best candidate in each race.

But that didn’t happen. Not even close. It’s been quite the opposite — Republican politicians have aided him at every conscience-shocking turn, and the Republican party has become the party of white nationalism.

I don’t agree with every position of the Democratic Party, and I certainly don’t agree with every position of the candidates available to me. But that’s always true.

What I know, though, is that a Democratic majority in at least one Congressional chamber would finally allow for checks on the president’s power. There would be oversight, at long last.

And we’d have the chance to preserve Western democracy in the United States, and stop this acceleration toward something dark and old and corrupt and dangerous.

Please vote. Please vote for Democrats.