Software Dev

Using Type Erasure to Build a Dependency Injecting Routing Framework in Swift

This post is just as weird and abstract as it sounds. ๐Ÿคฏ On first pass, I don’t get it. But I’m saving it here because I always like anything that promises easier dependency injection.

We’ll take an exciting look at how the treatment of methods/closures as properties can be used in this context to bypass one of the Swift Compiler’s most annoying compilation errors.

๐Ÿ‘‰ Using Type Erasure to Build a Dependency Injecting Routing Framework in Swift

Type Erasureย is the process of abstracting constrained, generic types inside anย unconstrained non-generic typeย that can be passed around freely

Via iOS Dev Weekly.

Software Dev

Clean Code is Not the Goal ๐Ÿคท๐Ÿปโ€โ™‚๏ธ

I want to thank this article for having the guts to say that basic working code is okay.

๐Ÿ‘‰ Goodbye, Clean Code

As software developers, we all aim to write amazing, beautiful code. It’s part of what motivates us. But remember, the real goal is to ship something that people can use. And writing beautiful code isn’t necessarily what makes that happen (example).

Donโ€™t be a clean code zealot. Clean code is not a goal.

This hit home for me after years working with an incredibly tedious and impractical code review process at a previous company. The reviews went way beyond sussing out bugs and tech debt and into opinions about the “right” approach for days on end. The team was unproductive and unhappy, and we still shipped plenty of bugs.

Sure, aim for great code. But there is a practical point where you need to let go and ship something that works.

Let clean code guide you. Then let it go.

As an engineer, yes, be elegant. But more than that, be practical. Voltaire put it elegantly ๐Ÿ˜† way back in the day.

Perfect is the enemy of good.

Voltaire

Via iOS Dev Weekly.

Software Dev

Duct Taped Software

I love this article on the ugliness of complicated (or not so complicated) software in the real world. A games goes open source, and developers are horrified by the code they see. ๐Ÿ˜ฑ๐Ÿ˜†

Beautiful. Disgusting.

I’m not surprised at all. Almost every successfully shipped system I’ve seen is full of really ugly code. At some point, you just have to ship that mother. ๐Ÿคท๐Ÿปโ€โ™‚๏ธ

๐Ÿ‘‰ The truth is that many games are held together by duct tape

Via iOS Dev Weekly.