This is the #29 article.
Reducers are a way to deal with state changes, and are great for dealing with asynchronous code. They come in a number of different ways, and are used in architectures like Redux, Elm, Flux and more.
See also Statements, messages and reducers.
How do I use result types? When using a Result enum for callbacks, how to access the Error?
It’s that time of the year again – if you’re like me, you’ve probably spent a lot of time in the last few weeks following everything that’s been announced at WWDC, digging into release notes, watching WWDC talks and playing with some cool new stuff. And as usually, the amount of new things to process is pretty overwhelming.
When Apple introduced stack views in iOS 9 they made it much easier to use Auto Layout by reducing the number of constraints you needed to create yourself for many common layouts. One edge case that was not well covered was the need for custom spacing between views. You could do it by nesting stack views but that always seemed an unnecessary complication. In iOS 11 you can create stack views with custom spacing between views.
Swift Playgrounds sets the stage to be an educational force, lowering the barrier to entry for software engineering. At WWDC 2017, Playgrounds was greatly expanded, and is a tool which is likely to be quickly adopted in many educational settings.
One of the most exciting additions to the Foundation library in iOS 11 that somehow flew under my radar was the new Swift syntax for key value observation. It’s long been known that the KVO API was one of the more obfuscated and confusing in Cocoa, which makes this change so exciting. Not only is it type safe, but also terse as hell:
There’s a great presentation in this year’s WWDC about NSLinguisticTagger, which discusses the new enhancements of the class. In this post, we will create a simple app that will list all the posts from my blog. When a post is selected, the app will open it in a web view, along with details at the bottom about the detected language of the post, as well as the most important words. We will accomplish this using the NSLinguisticTagger class and a simple implementation of the TF-IDF algorithm.
In this article, I’ll look at monads; what they are, why they’re fundamental in Haskell, whether flatMap is necessarily a monad and the importance in Swift of constructs that are monad-ish but not strictly monadic.
Updates: Jul 9, 2017
This week, let’s take a look at how we can set up our JSON mapping tests to make them a lot more robust and future proof, and how we can use them to perform end-to-end testing.
Agreed with the idea. I think Tentacle is doing so.
This week, let’s take a look at some techniques that can make it easier to write code that handles and reacts to state changes - to make it more robust and less error prone. I won’t go into specific frameworks or larger, app-wide architectural changes (like RxSwift, ReSwift or using an ELM inspired architecture) in this post (will save that for another week) - instead I’d like to focus on smaller tips, tricks and patterns that I’ve come to find really useful.
Today we’re joined by Rob Napier, who explains why and how to add certificate pinning to your app.
Algorithms and data structures implemented in Go, JS, TypeScript, Rust, and Swift.
Last month I attended PyTennessee and saw Kim Crayton’s talk on “Overcoming the Challenges of Mentoring”. Kim is a great speaker, I like how “real” and straightforward she is. There is something she said in her talk which really resonated with me, and which I have thought about a lot. Kim said to stop lying to new programmers because “This shit’s hard”. And I agree with her. Programming is hard and by telling everyone that it’s so easy, we make people feel stupid when they don’t find it as easy.
If your app targets iOS 9.0 and later or macOS 10.11 and later, you don’t need to unregister an observer in its deallocation method. If your app targets earlier releases, be sure to invoke removeObserver:name:object: before observer or any object specified in addObserver:selector:name:object: is deallocated.
In iOS 11, Apple redesigned. It decided to combine this recently used apps list with the control center, so that you could put as much information on-screen at once as possible. This produced an interface with teeny tiny images, and lots of user confusion overload.
Jack & Nick discuss what’s new in iOS 11 for Developers, Xcode 9, refactoring in Swift 4, being lazy about watching WWDC videos, and ARKit experimentation.
We marvel at the fortitude of new fans who listen to our whole back catalog of shows. We discuss the inability to share IAP with Family Sharing, the most recent iPhone 8 wireless charging and Touch ID rumors as well as PhotoBucket’s “ransoming” long time users of there “free” service. We dig into Password Autofill and mechanically converting Objective-C projects to Swift. Picks: Over 150 of the Best Machine Learning, NLP, and Python Tutorials I’ve Found, Laura Savino’s tip on Simulator devices, Debugging UIStackViews and iOS 11 lets you scan a router’s QR code to quickly join a network.
Have a lovely week <3