blog.hal.codes

“It’s not for you!”

The Mac Pro is a computer for nobody

Mac Pro

A brief history lesson

I’ve been waiting a long time for a desktop Mac. Six years have passed since Apple announced the 2013 Mac Pro. When they debuted that computer, I was still in college. I was disappointed by how expensive it was. I couldn’t afford it; fair enough, it wasn’t a computer for college students. Beyond the price, though, I was disappointed in the computer itself.

The Mac Pro (2013) launched as an ostensibly GPU-forward compute platform with two (count ’em!) FirePro GPUs. Apple was proud of it. “Can’t innovate anymore my ass!”. The problem was that these GPUs were already two years old when the Mac Pro started shipping. The FirePro GPUs were rebranded 7000-series Radeon GPUs (Tahiti architecture), announced in 2011 and shipped in January 2012.

Continue reading →
A smarter way to storyboard

Pure protocol factory for Interface Builder-based views

I’ll admit: I love laying out views in Interface Builder. It’s a bit of a controversial topic but for me, there’s no faster way to build screens for an app. It’s indispensable to be able to see exactly how my views look in IB without recompiling my whole app.

Interface Builder has downsides, no doubt. One of the biggest: multiple developers working on a single Storyboard file can easily cause merge conflicts that are hard or impossible to reconcile. The solution, for me, is to create per-screen Storyboards (really, one for every UIViewController) and handle transitions entirely in code. This approach means that Storyboard views need to be instantiated pretty often in code, which can be a bit ugly:

class MyViewController: UIViewController {
    /// ...
}

let storyboard = UIStoryboard(name: "MyViewController",
                              bundle: Bundle(for: MyViewController.self))
guard let controller = storyboard.instantiateInitialViewController() as? MyViewController else {
    return
}
Continue reading →
👋

Hello world

I made a blog. You’re reading it. I think it’s pretty neat.

This’ll be loosely focused on software development, and in particular iOS development. I’ve been writing software professionally for a few years; I’m still learning, and this blog will help me share that process.

Look for some fresh content soon. I’m hoping to actually be diligent about posting here. There’s an RSS feed if that’s your thing.

Continue reading →