Recent articles

What I've learnt at Buffer

Thirty days after sending my application to Buffer, in November of 2014, I received an email from our CTO back then, Sunil, asking me if I could have a call for the first interview. Two months later I attended my first Buffer retreat, in Sydney. From the interviews with Buffer until now, over four years later, I have the feeling that I work in a unique environment and I want to share here some lessons I’ve learnt so far.

UX and efficiency

Introduction We can visualize the knowledge about an application as an iceberg where the users will head down as they use it more and more and the UX experts should be in charge of guiding them step by step to deeper areas. This knowledge will allow them to perform actions quicker and more efficiently. On Gmail, for example, you can create a new mail by clicking on the “Compose” button or by pressing the key c.

Avoiding the law of the instrument

Many times in our careers as software developers we tend to use the same known tools to do a completely new different project with new constraints. Why do we tend to choose the same tools with small changes over and over again if we have the chance? Abraham Kaplan wrote in 1964 [1]: I call it the law of the instrument, and it may be formulated as follows: Give a small boy a hammer, and he will find that everything he encounters needs pounding.

Useful utilities in Unix for developers

After some years working as a software developer in different companies I have used many programs and utilities in *nix environments that I’d like to share. This is not an exhaustive tutorial about how to get the most of them, many options will be just ignored and I will list only how I use them on a daily basis. Text processing I use these utilities to get info from a log or to quickly change a config file on a server.

"Class methods" in Scala

In Scala you can’t declare class methods, all the methods defined in a class belong to the object.

Switch in Scala (pattern matching)

Scala has a powerful pattern matching mechanism, that we can think of a kind of “switch” if we come from another programming language, but it’s much more powerful and I’d love to explore some of its options here. A simple switch in Scala would look like this:

a match {
  case 1 => "One"
  case 2 => "Two"
  case _ => "Whatever"

SBT in Scala compile when you save a file

I’ve worked on some Scala projects recently using SBT (Scala Building Tool) and every time I had a change in a file I needed to go to SBT and type compile until I found a simple instruction to keep it compiling for me. Just execute SBT and run the following command: ~ compile Now every time you save a file it will be compiled automatically. In the official documentation you can see more details.

Set Content Type in RSpec

The last week I had a spec with a request where I needed to specify the content type and Google sensei didn’t help me.

It took me an hour until I finally found it, so let me show here briefly how to do it just in case I have to find it again.

Bruno: Localizable.strings to strings.xml (iOS - Android)

I’ve created a small gem, Bruno, to convert a Localizable.strings (iOS) file to a strings XML file (Android) and vice-versa.

Dynamic conditions for associations in Rails 3

If you are using dynamic conditions in Rails 3, like or 1.week.ago you should use a Proc for that condition.