Dynamic Actor Isolation Can Help During the Transitional Phase

Matt Massicotte:

Making just one type @MainActor can result in cascade of errors at all usage sites where the compiler now cannot provide that MainActor guarantee. This virality can make it really hard to incrementally adopt concurrency with targeted changes. Perhaps that’s not too big a deal for smaller code bases/teams, but I bet this is a killer for big projects. So what do you do?

You make use of dynamic isolation to contain the spread!

Instead of throwing (static) type annotations around, you can ease into the adoption of actor isolation with (dynamic) preconditions and running blocks of structured and unscructured concurrent code.

Niki Tonsky: Hardest Problem in Computer Science: Centering Things

Niki Tonski with a very well-illustrated post on centering text, icons, and UI elements.

The problem is explored in great detail. Every big company fails at this. Type (font) design and UI design and icon design are all part of the problem.

After the build-up, this part killed me:

What can be done: icons fonts

STOP.

USING.

FONTS.

FOR.

ICONS.

I recommend looking at the pictures to spot all the annoying alignment problems and have a good time with this.

Always Be Changing Existing Code

Why change perfectly servicable code today when there are problems to solve? “I’d be changing it again next week. So where’s the value? Might as well keep it as-is.” When you are inclined to change code without defects, this could indicate a new understanding that needs expressing. Changing existing code to reflect a new understanding is all we have. This is how we pay off debt in our design.

Continue reading …

Enable SwiftUI Button Click-Through for Inactive Windows on macOS

On macOS, there’s 1 active window that receives your key input. Then there’s all the other windows, which are potentially invisible or obstructed by other windows. These inactive windows can be brought to the front and made active with a click. Then you can interact with these windows like normal. With inactive but visible windows, you cannot select items from lists, for example. The UI reflects this with a greyed-out or dimmed representation. You need to click once to activate the window (on the surface of the window, so to speak), then another time to interact with the control.

Continue reading …

“Soulslike”

Programming is a Soulslike. Dark Souls is notoriously difficult. You need to memorize enemy movements and patterns to get good at the game. You cannot beat it casually. The “Git Gud” meme traces back to this whole ordeal: You need to become a better player, learn the movements and patterns, in order to beat the game.

Continue reading …

Masterclass of Decoupling: Diablo II Resurrected

Decoupling is hard work, especially when taken to extremes – as the team of Diablo II did when they decoupled the whole rendering stack of the original game from the rest of the engine to reuse both independently. Today I learned that Diablo II Resurrected is a true remaster: new 3D graphics, but the engine hasn’t changed. In an interview with Eurogamer, Rob Gallerani pointed out that

Continue reading …