Brian Ganninger

There’s no guarantee what thread (via a queued dispatch most likely) your -dealloc implementation will be called on. Never do anything in it that could touch UI. #ProgrammingTips

#PresenterTip Notifications are your mortal enemy. Hold Option and click on the menu bar icon to turn on Do No Disturb. If you’ve got an Apple Watch use Theatre Mode to not only enable DND but also keep your wrist motions from flashing the time.

Short-lived objects shouldn’t use KVO at all as they are highly susceptible to unexpected performance penalties. Scope your KVO usage as narrowly as possible and mind the lifecycles. #ProgrammingTips

Building an iOS app without any xibs or storyboards? Make sure you add the base set of launch images or your app will default to the smallest iPhone size possible (480x320). This results in some massive letterboxing depending on Simulator settings. #ProgrammingTips

Where did the speed go?

Lately we had performance complaints from Sourcetree users even after a series of optimizations took care of the obvious issues we could find. While we could see spin logs for various paths that were still heavy, there was nothing jumping out anymore. At this point I needed more data to help spread …

Constants (define HOUR 60*60) are great for clarity/intent but don’t waste compute cycles and energy: use 360 or whatever the constant should be. #ProgrammingTips

Find the regression

When High Sierra came out we got reports of a regression in [Sourcetree](www’s dark theme. Building that was an adventure of its own so I was a bit concerned about what might have broken. After sitting down with the Xcode debugger I stepped through and verified all theming code …

A subtle crash

Recently we had a high volume crash in Sourcetree with a limited user count. Roughly 4 crashes a week per user in an onscreen notifications helper. The posting object was alive along with all parameters. The code hadn’t changed in years. What could be the culprit? After much staring and noodling (no …