Rescue from MultiJson::DecodeError in Ruby on Rails

If you are developing an API with Rails you need to rescue from the errors produced by a bad formatted JSON. In order to do that I use a middleware file placed in app/middleware named ParamsParserRescue.rb. ...

January 17, 2013

Programming Challenges

I’d like to share some sites with programming challenges, also known as programming puzzles. I find them very useful to learn a new language, much more than reading a lot of books. Actually, I usually read one book for beginners of the language and after that I go to one of the following sites and start to code. My favourite is /r/dailyprogrammer. /r/DailyProgrammer. Subreddit with three challenges every week or so (easy, intermediate and hard)....

January 8, 2013

Creating a Great RESTful API

REST is a style of software architecture, often used in web. The design of Rails, for instance, is based a lot on REST. The idea behind this architecture is to have very similar interfaces to access all the resources in your system. Recently I had to create 2 APIs in 3 months so I had to learn all I could in a very short time. I’d like to share some conclusions but giving the fact that to develop an API people usually say you need 10 years of experience take them with caution. ...

December 26, 2012

Subversion and Files With @

If you have worked with Subversion and iOS you are probably aware of this problem. Whenever you are going to do something with a file that has an at sign in its name you can’t. For instance imagine you’ve just added a file for retina and try to add it to the repository (XCode can do this too): $ svn add [email protected] The message from Subversion will be: Skipped [email protected] That’s because Subversion uses the @ for other purposes....

December 7, 2012. jose

Learning Vim - Introduction

I’ve started the great journal of learning Vim. I’ve heard a lot of good things about this editor and I’d like to learn how to use it effectively and share here all the things I’ll learn and my thoughts about every step of the way. As a novice I’ll make a lot of mistakes but I’ll try to search all the commands and tips to make sure they will be accurate enough to be shared....

November 20, 2012