Bye Storyboards

Storyboards are awesome and if I was doing Objective-c, I would probably still be using them. But the thing with Swift and Storyboards, is that it shows that there is still some friction between the language and Cocoa. Image you have this: class MyAwesomeVC: UIViewController { let bar : Bar } As you…

Monads

Note: This is an exploratory post, where I will write about some ideas that are still fresh in my mind and need consolidation. Any mistake, lack of objectivity/rigor, that you find, please let me know. I also tried to balance between being practical and respecting the nomenclature. I started…

McFlurryâ„¢

While working with RAC 3.0, I find myself in this situation a lot[1]: aSignal.flatMapLatest { v in transformation(v) } Which can be simplified into: aSignal.flatMapLatest(transformation) The problem is when our transformation, doesn't really fit what we need. func fileCreationDate(fullPath: String) -> SignalProducer<NSDate,…

Map and Flatmap

This week, I explained to my colleagues what's the difference between a map and a flatMap[1]. The trick was: focus on the types and leave the burritos for lunch time. Monads and cheese pic.twitter.com/nT3DJ51qXt— R. Peres (@RuiAAPeres) July 24, 2015 Map [a] -> (a…

On Swift adoption

I mostly agree with Benjamin on Objective-C in a Swift World . In particular: Learning bleeding edge technology is like investing in a startup: you take on insane risk for potentially massive rewards.…

Two keys, one hole with Argo

Imagine you have this struct: struct Image { let url : NSURL let description : String? let size : CGSize } And the JSON coming from the server: { url: "http://myimage.jpg", height: 115, description: "What an awesome image", width: 154 } In this particular case we want to build our CGSize…

Github cool trick

The guys from SwiftyJSON, have been taking a bit longer to merge pull requests. So, as it stands, you can't use it with Swift 2.0 and Carthage, but since a pull request exists to fix that, you can: Fork the project. Go to the pull request's owner repo and…