2016 in review

Working at the MailOnline was a great experience and it was the longest I ever been in a company based in the UK. The time there gave me the opportunity to enhance my skills in Swift, but as well in FRP, FP and MVVM. There was also room to use…

Cakes and ViewModels

A talk that I think went fairly unnoticed, by Jon Sterling, entitled "Modularity à la Taliban" stated the following: A ViewModel should only be created by another ViewModel. [1] With this idea in mind, let's see it in practise[1:1]: User tries to login via Facebook. Has…

Bias

After releasing the post ReactiveCocoa vs RxSwift, some people (which I deeply respect) were/are quite unhappy with me. More specially with the tone I used to talk about RxSwift and my bias towards ReactiveCocoa. I will try to clarify my position regarding this subject, in this post. Before that,…

Younger self

What I wish I could tell my younger self about FRP (from a RAC perspective): Before diving into FRP, start using functional aspects that Swift gives you for free. Like: map, flatMap, filter, reduce, or create your own. This will make the usage of high order functions more intuitive. Without…

Cells and ViewModels

With MVVM, each cell will have its own ViewModel from where it will get the necessary data it needs. That's pretty sweet, until you have to dequeue a cell: So, what's the identifier? The ViewModel shouldn't be aware of the View. And the reason why is: if at any point…

Why FRP?

So today I wrote this on Twitter: People still think that Reactive libs/frameworks are just an enhanced KVO. #2016— Rui Peres (@peres) January 7, 2016 Part 1 And I got some feedback from Miguel Ferreira. Since, in general, I agree with his opinions about software development, I decided…

Schedulers

When you think about ReactiveCocoa, one immediately thinks about Signals, streams of events and transformations. Although that's all there, RAC is more than meets the eye. Lately I had to do the following: Track if a user spends more than 2 seconds in a screen. I went with viewDidAppear: and…

On benchmarks

A lot of people pointed out that they didn't really understand what was the point of this. Or what does it actually mean. The main job of a lib of this nature is: send events down the pipe; eventually, or not, there will be an observer that will do something…

#3 Diary of a Secret App: JSON Parsing

Intro If you follow me on twitter you must have seen my most recent rant: Argo vs JSON Parsing "by hand" with +1M objects. Argo -> 3.05s | "by hand" -> 0.089s. This is worrisome.— Rui Peres (@RuiAAPeres) November 15, 2015 And…

#2 Diary of a Secret App: AutoLayout

I had a rough battle with AutoLayout these days[1]. The following notes are in the context of a UITableView with dynamic sizing cells. : If you want to change an UITableViewCell's layoutMargins, don't use Interface Builder. After some time tracking this down, it seems that if you set contentView's "…