Programming Category

Attaching patches to Pull Requests

This might sound strange, but sometimes I prefer patches to pull requests. The main scenario is when I’m reviewing someone else’s code and I want to propose an alternative implementation. I could just create a new branch and pull request with my change, but then the conversation is split between two PRs, and there’s a […]

Read More

Composing operations in Swift

Continuing on From traditional to reactive, the problem I’m solving today is refactoring our image downloading system(s). If I remember it correctly, it all started a long time ago when we switched to AFNetworking, and started using its UIImageView.setImageWithURL methods. To this day I still feel that there’s something terribly wrong in a view calling […]

Read More

From traditional to reactive

Brent Simmons has a series of posts about Reactive vs “Traditional” which sound a lot like the arguments we’re having internally as a team lately. I’ve gotten into RxSwift in the past months and believe it’s a great solution to a number of problems, but it is indeed a big dependency and has a steep […]

Read More

Learn me a Haskell

Lately I’ve become interested in functional programming, and Haskell always felt like the thing I should learn, so this week I finally started reading  Learn You a Haskell. So far I’ve been through the first six chapters and they do a great job at indroducing many concepts. Pattern matching got me hooked. I had read […]

Read More

One of those days…

I wake up early, ready to start the week with a fresh mind and debug that issue that drove me crazy on Friday. I pick up from were I left in Xcode, and hit run. It slowly builds and installs the app on my iPad, then promptly shows the launch screen, then more launch screen. […]

Read More

Fuck Xcode

Two years ago, Brent Simmons introduced ded: a handy little alias to deal with Xcode quirks It has been useful, but since recently it was not enough. Sometimes, Xcode will complain about not being able to use the simulator, even if it’s not running. Or things will just fail randomly and often, leading to frustration and […]

Read More

Impossible debugging

If your first reaction on witnessing a bug or seeing a bug report is “that’s impossible,” you are plainly wrong. Don’t waste a single neuron on the train of thought that begins “but that can’t happen” because quite clearly it can, and has. From The Pragmatic Programmer I should print that and hang it on […]

Read More

Programming sucks

I ran across this question on stack overflow while (still) trying to figure out date parsing. The summary: Q: I’m trying to get an NSDate object that has 21:00 as the local time[…] The result is 0001-01-02 04:52:58 +0000 A: The problem is that railroad time wasn’t implemented until November 18, 1883. You’re neglecting to set a year so you’re […]

Read More

ISO 8601

I’m all for using standards for data representation, but this one is messed up. That same date can be written as: 2013-02-27 20130227 2013-58 201358 2013-W9-3 2013W93 And that’s before touching time zones. Source: Wikipedia and and earlier revision of the standard, since the current revision costs $150.

Read More

Duplicated error messages

A retweet wasn’t enough this time. If you work with APIs you’ll relate to this (baby is optional) Having a baby has really driven home how terrible it is when several issues result in the same error message — Andrew Traviss (@andrewtraviss) October 18, 2013

Read More