When you have to deal with Swift global functions in your unit tests.
Let's tackle Security.framework's SecTrustEvaluateWithError
https://t.co/igxET3Zxiv
Check out this cool tip to improve your Swift code! 😀
Unfortunately, it's not possible for a `lazy` property to also be a `let` constant 😢
But that's when the keyword `private(set)` comes to the rescue, to at least make the setter of the property inaccessible 😌
A while ago I wrote an article about our packages based architecture for the @Medium iOS app, and i'm happy to report that our features package keep growing! Every new thing we write is self contained and this is so good. Time to write a follow up to https://t.co/ty17dYMbgf
@DunsinWebDev At repository level, i make 100% test coverage a mandatory for all pull requests. Devs magically submit clean code, or at minimum code guarded by tests
@DunsinWebDev Hire good devs who writes clean code… i make this a mandatory assessment at the interviews. Good devs take care of the code before merging them in.
My 2022 hirings: iOS engineer decided to join after reading about me. Intern does the same. Offshore contractor threatens to resign unless he is reassigned to the same project as me. Am honoured.
Code that expresses its intent does not require comments.
Code is not a perfectly expressive medium, so some comments will be necessary. However minimizing comments, by working hard to make the code more expressive, is a worthy goal.
```
struct User {
@Versioned var name: String = ""
}
user.$name.history // array of all previous values!
```
Have you ever tried to use Property Wrappers like debugging tools? It's got some potential! 😎
Watch the full video 👉 https://t.co/VRfc9GVO3V