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…

Juggling

Junior Engineer: Creates complex solutions to simple problems Engineer: Creates simple solutions to simple problems. Senior Engineer - Creates simple solutions to complex problems. Rockstar Engineer - Makes complex problems disappear. (taken from here) Lately I have been faced with a complex problem. Its solution is quite easy - honestly,…

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,…

POP, Signals and Dispatchers (part 2)

After a discussion about the Flux Architecture. I still wonder if it works in iOS, or just Web.— R. Peres (@RuiAAPeres) July 14, 2015 Well, it doesn't, at least for me. The thing is, with the use of Singletons, you won't be able to test a damn thing, so…

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…

POP, Signals and Dispatchers (part 1)

I have been looking at Flux for a while now and I have reach a dilemma. If you are familiar with this architecture, one of its central pieces is the Dispatcher: The dispatcher is the central hub that manages all data flow in a Flux application. It is essentially 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…