Software Dev

Apple Thread Utils

Apple has a really nice utility straightforwardly called the Main Thread Checker. It detect uses of APIs on a background thread that really should be on the main thread.

Updating UI on a thread other than the main thread is a common mistake that can result in missed UI updates, visual defects, data corruptions, and crashes.

And someone has put together a page documenting how to configure the Main Thread Checker for your own specific needs. It’s straightforwardly called Configuring the Main Thread Checker.

πŸ‘‰ Configuring the Main Thread Checker

Enjoy getting rid of some flakey code in your app! Via iOS Dev Weekly.

P.S. There’s another utility from Apple called Thread Sanitizer, to “Audit threading issues in your code”. πŸ€·πŸ»β€β™‚οΈ

The Scheme Editor's Arguments Tab
Software Dev

App Rewrite: Faster, Smaller, and Simpler

I’m a bit of a Facebook skeptic, but it’s really amazing that they had the guts to actually completely rewrite their Messenger app for iOS. That is such a gigantic effort that it basically doesn’t ever happen with popular apps at big companies. So kudos to Facebook for actually making that happen. πŸ‘‰ Yay, Facebook! πŸ€·πŸ»β€β™‚οΈ

πŸ‘‰ Project LightSpeed: Rewriting the Messenger codebase for a faster, smaller, and simpler messaging app

This post explains some of the design and architecture decisions they made. It’s interesting that Facebook, the company that invented the cross-platform React Native framework, went full native when rewriting their own app. In fact, one of their key principals in the rewrite was “Use the OS”.

While UI frameworks can be powerful and increase developer productivity, they require constant upkeep and maintenance to keep up with the ever-changing mobile OS landscape. Rather than reinventing the wheel, we used the UI framework available on the device’s native OS to support a wider variety of application feature needs.

They also use SQLite to create a sort of table-driven local business logic layer a custom platform “to orchestrate all access to the database, including queued changes, deferred or retriable tasks, and for data sync support.”

This is an example that all of us mobile engineers can take to our managers and demand a rewrite now! (Kidding / not kidding πŸ€“)

Via iOS Dev Weekly.

Software Dev

Algorithms Interview Rant πŸ™Œ

It’s great to hear another dev just flat-out rant about the stupidity of “the algorithm interview”. Or as I call it, the “Computer Science 101” interview.

This podcast is basically saying that an effective interview should focus on things that you actually do on the job. In what crazy world are we interviewing for one skill and hiring for another?

I’ve been through a few “algorithm” interviews. They’re not that hard. They’re just annoying and misguided.

We are not in college any more. We are solving real-world problems.

The hardest technical interview I ever had as an iOS developer focused on things like the trade offs between different approaches to concurrency, effective testing at different levels, dependency management, and optimizing table views. These are much more interesting problems than a binary search.

If you do a computer science 101 interview, I guess you get to hire a bunch of computer science students. πŸ€·πŸ»β€β™‚οΈ

Software Dev

MVC: Many View Controllers

Another counterpoint in the iOS architecture wars, saying basically that MVC is actually pretty sound as long as you use it wisely.

This post breaks controllers down into a few types: Containers, Generic controllers, View controllers, Flow controllers to help reframe things.

One of my favorite points here is that not everything has to be a model, a view, or a controller. You can — and should — create other kinds of code! No wonder your controllers are messy if you limit yourself like that. πŸ€·πŸ»β€β™‚οΈ

This issue happens when the developer thinks they must fit everything into either M, V or C, forgetting that they are allowed to create other types of constructs.

πŸ‘‰ MVC: Many View Controllers

2

Via iOS Dev Weekly.