Psychonauts 2

★★★★☆

I finished playing Psychonauts 2 the other night. What a great game. Cute and funny writing, incredibly clever and varied gameplay, a solid (if heavily foreshadowed) story, and great voice acting (including Elijah Wood)!

The game has decent character diversity, featuring a disabled character, a gay couple, and characters dealing with all sorts of mental difficulties. The game focuses on the founders of The Psychonauts, who experienced a traumatic event together long ago, and has the player character, Raz, jumping into their brains to help them work through their responses to that event. Its treatment is light-hearted but not trivializing (all of the characters are treated with a lot of empathy), and the physical manifestations of these characters’ minds is absolutely stunning in their creativity. The level design is off the charts.

In spite of the game’s inclusiveness, it has some blind spots. Its use of Eastern European stereotypes throughout is uncomfortable, and the treatment of the inside of an East Asian character’s mind in one of the later levels is more than a little problematic. If you make a joke about how smelly a fish market is, you’ve made a joke about fishes; but if you make a joke about how dirty a fish market is in this context, as Phsychonauts 2 does, you’ve made a joke about the sanitariness of an East Asian culture. It reminds me a bit of the term “wet markets” and the demonization of those Chinese markets in the early stages of the pandemic. The level only has a few missteps like this, but better to have avoided them altogether.

The story was very emotionally engaging in the first 80% of the game, but unfortunately the ending fell a little bit flat for me, not living up to what I think could have been something really, really special. After the final battle, it just sort of…ended.

In spite of some cultural missteps, the rest of the game is truly wonderful. If you feel like giving it a try and you have Xbox Game Pass, it’s available there!


TLDR: Table view (and collection view) data source should be backed by a snapshot of your data store; not a real-time view of it.

I attended last week’s iOS KW meetup, which was a talk by Chris Liscio about Collection View Controllers on iOS and macOS. The talk was good, featuring a lot of interesting details of how Chris implemented the main view in his music app, Capo. But what was really interesting is what I learned in chatting with him afterwards. I’ve been doing iOS development for more than 6 years, and this finally flipped a switch in my brain about why managing updates in table views (and collection views) was always so difficult for me.

Animating updates to a UITableView’s contents is ostensibly pretty easy—you get notifications about the contents of your data store, and you tell your table view which rows were added, removed, or updated. In order to have things animate all together nicely, you do this in a transaction:

tableView.performBatchUpdates { 
	tableView.insertRows(at: [IndexPath(row: 3, section: 1)], animation: .automatic) 
	tableView.reloadRows(at: [IndexPath(row: 0, section: 0)], animation: .automatic)
}

However, there are some arcane rules about the order in which these updates are processed—not in the order in which you submit them, but all reloads first, then deletes, then insertions. In other words, reloads and deletes are processed relative to the state of the table before you begin making any updates, and insertions are processed relative to the state of the table once deletions have completed.

In the past, when I had to make updates based on a completed network request, for instance, I would call tableView.beginUpdates(), then respond to KVO notifications by calling insertRows() and its friends as the network response handler added, updated, and removed items in the data store, and then call endUpdates() when processing was complete. Since the updates to the data store could happen in any order, it was extremely difficult to try to re-order everything so that it would make sense in the order that UITableView performs its updates. Crashes occurred often. This was also a source of high coupling between classes that should have little or now knowledge of each other.

It turns out the answer is very simple. As Chris described, your data source should represent a snapshot of your data, not a real-time view of it. After changes have finished, you move your snapshot forward, compute a diff, and send the necessary insert / delete / refresh messages to the table view. This is apparently what NSFetchedResultsController does under the covers, and other technologies such as Realm allow you to either update your thread’s snapshot manually or at the beginning of a runloop.

The key is that any changes that occur in your UITableViewDataSource should only happen during a table view updates transaction. If your data source reflects the real-time state of your backing store, values might have already changed by the time you’re responding to a them, which can get you into trouble with the frameworks.

So, lesson learned, 6+ years later: `UITableViewDataSource` shouldn’t represent live data. Move your snapshots forward during your table view’s update transactions. Have fewer crashes.


The Sublime Text folks made a git client.

Today, I’d like to introduce Sublime Merge. It combines the UI engine of Sublime Text, with a from-scratch implementation of Git. The result is, to us at least, something pretty special.

Oh wow. Oh wow.

We have a custom implementation of Git for reading repositories, which drives a lot of our high performance functionality. However we defer to Git itself for operations that mutate the repository (Staging, Committing, Checking out branches, etc).

Sign me up!


Apple has differentiated its new iPhones in a super frustrating way, probably in an effort to drive up average selling prices.

  • iPhone XR: phenomenal performance to price ratio. Offers 128 GB storage. Awesome colour choices. Aluminum instead of steel. Inferior but still great screen. No 3D Touch. Only one camera.
  • iPhone XS and XS Max: awesome screen. Two cameras. Doesn’t offer 128 GB – only 64, 256, and 512.

I am currently using 78 GB of storage on my iPhone 7+. Way too low to justify 256 GB for an additional $210, but way too high to try to fit it all in a 64 GB phone. And I really want the optical zoom capability of the dual camera setup – something I use all the time on my current phone.

So either I can pay $1099 and settle for a single camera, or pay a whopping $1589 to get all the things I actually want, plus a bunch of things I don’t care about.

I’m willing to bet a lot of other people are in the same camp.

Furthermore, Apple is selling these new devices at CAD$1.40 to the US Dollar, instead of the actual current exchange rate, CAD$1.30. They usually treat us Canadians pretty fairly, but this is awful.


I received the following in response to my letter about the basic income pilot project that the Ontario government is cancelling. I know this is a form letter, but it doesn’t address the pilot project at all, and talks about the 1.5% increase in “support rates” as if this is up from 0%, not down from the previous government’s planned 3%.

None of this is surprising, just disappointing.

Thanks for getting in touch with me to share your views about our plan to reform social assistance in Ontario. I appreciate hearing from you.

Our social assistance programs are an important part of the safety net designed to assist our most vulnerable people. This is an important responsibility, and one we take seriously. Upon assuming government and reviewing the system we inherited, it quickly became apparent that the status quo was not working for people in need. Instead of helping people get their lives back on track, the old system left too many people trapped in a cycle they could not break out of.

We’ve set an accelerated 100 day deadline to develop and announce a sustainable social assistance program that focuses on helping people lift themselves out of poverty. Our goal is to do more to help people get off social assistance, find good jobs and get their lives back and track. While we are doing this work, we will be providing Ontario Works and Ontario Disability Support Program recipients with an across-the-board 1.5 per cent increase in support rates to help them with a higher cost of living. These efforts will go hand-in-hand with our previous commitments to reduce gas prices by 10 cents per litre, lower hydro rates, and provide targeted tax relief for working parents and minimum wage earners, all of which will provide focused benefits to lower income families.

Social assistance will always be about compassion for people in need, but it must also be about lifting people up and helping them get their lives back on track through more jobs, more opportunities and more hope. Tackling the serious issues facing our social assistance system isn’t an easy thing to do. But it’s the right thing to do, and we’ll get this right.

Thanks again for contacting me.

Doug Ford Premier of Ontario