Professional, Software

It’s far from a groundbreaking invention, but there’s something very satisfying about this way of finding the smallest value in a Swift array of Integers:

var minimum = someArray.reduce(Int.max, min)

 

Advertisements
Aside
Software

I’m updating my six-year-old Runestone code. Objective-C has changed, Cocos2d has effectively been replaced with SpriteKit, and my understanding of the language has improved massively. Net result? It’s embarrassing.

Once this thing is running as it should, I may rewrite from scratch just to see how bad a project has to be for rewrites to be worth it.

Aside