Swift 3.1 is out, and it should be source-compatible for a change 😈. Some highlighted features and improvements are failable numeric conversions, additions to the `Sequence` protocol, improvements to extensions and support for nested generics. The easiest way to take advantage of Swift 3.1 is to get the new Xcode 8.3 and pray no new Xcode bugs have been introduced 😏.

How to run SwiftLint autocorrect on each Git commit

SwiftLint was developed by the nice folks @realm. It's a great open-source tool for establishing and enforcing a formal coding style in Swift. It runs on the command-line, but it can be hooked into Xcode directly too. It also boasts an "autocorrect" feature, which sweeps through your code and automatically fixes the most trivial violations (e.g., colon positioning, double white spaces, etc.). I created a Git commit hook which does exactly this, every time a team member makes changes.

I spent a considerable amount of time with the `NSCalendar` and `NSDate` APIs this week (building a custom calendar component), which is why the headlining article struck a chord with me. Date and calendar calculus are always painful, but I've learned to lighten the load by letting `NSCalendar` bear the brunt. Also, never, ever, divide by 24, 31, 365, or the like 😉.

Abolish Retain Cycles in Swift with a Single Unit Test

Can't believe we're still dealing with this in 2017? Well, that makes two of us. While retain cycles are easy to fix, they're also hard to spot while eyeballing a codebase. Recently, I've found that a single unit test can provide solace. With just a few lines of code, it runs continuously as you make changes, all the while verifying you haven't introduced any new memory leaks.