This is the #18 article. I started to contribute the awesome tool called Marathon. It’s a command line tool that manages scripts in Swift. If you don’t know it, check it out:)
Thanks @JohnSundell!



Article

Swift enums with associated values defaults

In Swift enums are much more powerful than we got used to in other languages. One of the features that makes them more interesting to use is associated values - values that each instance of enum case can carry along with it. We can not have stored properties in the enum, so associated values is basically the only way to store additional data with enum value. Creating an enum value with associated value has a similar semantics as a method call. The difference is - we can not define defaults for parameters which represent associated values.


Swift: Why You Shouldn’t Use Default Implementations in Protocols

I think adding default implementations to protocols should be considered very very carefully. The default needs to be something that is consistent and is the default for most cases, so if someone forgets to implement it (because the compiler won’t complain), it’s most likely not a big deal.


On Comments

My perspective on comments comes from two facts: 1) Comments don’t compile. 2) Comments are usually a subdued color in your syntax highlighter. Because they don’t compile and because they fade away from sight, it’s very easy to ignore them as you make changes to the code. If you make changes and don’t update the comments, you end up with a comment that doesn’t accurately reflect the content of code.


Swift: When to use guard vs if

One thing I’ve noticed recently in my code-base is that I tend to default to guard vs if. In fact, whenever I write an if statement, I facepalm myself and change it to a guard without thinking much.


Variable Height Table View Header

Making a table view header that automatically adjusts its height to allow its contents to fit should not be so hard. Unfortunately it is a problem that has been with us for a number of years which means much of the advice on how to do it is out of date. This is what works for me for both iOS 9 and iOS 10.



Slide

Mixins over Inheritance — AppDevCon’17 by AliSoftware

In this talk you’ll discover what Mixins & Traits are, and how they can help you solve some interesting problems and make your architecture more flexible. Using some concrete examples, we’ll see also how these can be used in everyday challenges.


My Open Source Journey by Juanito Fatas

at OedoRubyKaigi 06

Talk at Ruby conference, but it looks useful for Swift developer!



Github

onevcat/FengNiao

A command line tool for cleaning unused resources in Xcode.


uraimo/SwiftyGPIO

A Swift library to interact with GPIO/SPI/PWM on Linux/ARM boards (RaspberryPi, BeagleBone, CHIP, etc…)


dbukowski/DBDebugToolkit

Set of easy to use debugging tools for iOS developers & QA engineers.



Random

There are 5 Points on the Scale of Remote Working. Here’s Where We Fall at Buffer.

I’ve recently found myself reflecting a lot on being a distributed team and the nature of a company where the team works from remote locations to accomplish our work.


Tell Me When It Closes

Get 1 email when an issue or PR closes (instead of getting a million emails by subscribing)



Podcast

#72: Selling Apps

Building apps with acquisition in mind, calculating your app’s valuation, and what to expect in a sale.


03: Source Stability (What is a Source Breaking Change?)

Every Swift developer who has migrated code bases from Swift 1.x to 2.x, or even the more tedious 2.x to 3.x knows the pain of migrating to new Swift versions.



I found the filter function in Xcode console.

Console Filter

If you have any questions and feedbacks about a kind of new Swifty week, feel free to ask me :+1: You can catch me on Twitter and Github.

Have a lovely week <3