121 reputation
4
bio website arnau-sanchez.com/en
location Barcelona, Spain
age
visits member for 4 years
seen Jul 4 at 10:23

Freelance developer

I am a freelance developer (I do mainly Ruby on Rails websites for a living) with a special interest in free-software, GNU/Linux and programming languages (Python, Ruby, Javascript, Haskell, Erlang, Scala...). Check my website if you want to hire me:

http://www.arnau-sanchez.com/en

My free software projects

Some of the projects and scripts I've developed over the years:

http://code.google.com/p/tokland/wiki/Projects

Favorite programming quotes

This is the Unix philosophy: Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface.

Data dominates. If you've chosen the right data structures and organized things well, the algorithms will almost always be self-evident. Data structures, not algorithms, are central to programming. Let the data guide the programming.

Functional programming is like describing your problem to a mathematician. Imperative programming is like giving instructions to an idiot.

Controlling complexity is the essence of computer programming.


Sep
24
awarded  Autobiographer
Nov
5
comment Is it bad style to redundantly check a condition?
@mcwise: yes, in Python they are not needed and add zero information (but note that they are ok in a multi-line condition).
Nov
5
comment Is it bad style to redundantly check a condition?
+1 for pointing out that the (unnecessary) imperative implementation of clear_lines is really a bad idea. In Python you would probably use generators to avoid loading the complete file in memory.
Nov
5
comment Is it bad style to redundantly check a condition?
did you mean elif (line.startsWith("b"))? by the way, you may safely remove those surrouding parenthesis on the conditions, they are not idiomatic in Python.
Nov
2
awarded  Teacher
Oct
20
comment Is it okay to define a [] method in ruby's NilClass?
@Jamon: of course, but the difference is you're being explicit by using "maybe". When you know the hash has those keys, you would simply write h[k1][k2][k3], if you patch NilClass you get always the "promiscous" behavior, you have zero choice.
Oct
19
comment Is it okay to define a [] method in ruby's NilClass?
@JamonHolmgren: Well, yeah, it's a matter of taste, h.maybe[k1].maybe[k2] vs h && h[k1] && h[k1][k2]. The first looks more declarative to me. On the downsides, yeah, the one you mention is probably the more important, a library may depending on a NoMethod exception being raised in that situation. IMO it would also lead to buggy code, it may shadow problems (i.e. I miswrite a key but no exception is raised).
Oct
19
revised Is it okay to define a [] method in ruby's NilClass?
added 90 characters in body
Oct
19
awarded  Editor
Oct
19
revised Is it okay to define a [] method in ruby's NilClass?
added 90 characters in body
Oct
19
answered Is it okay to define a [] method in ruby's NilClass?
Aug
1
comment Why can't the IT industry deliver large, faultless projects quickly as in other industries?
+1 Thanks for the insight. "to design if you know know how things work" -> " to design if you don't know how things work" ?
Aug
1
comment Why can't the IT industry deliver large, faultless projects quickly as in other industries?
@pkh: well seen, Reeves proposed that "code as design" idea 24 years ago!
Dec
20
comment Is using ELSE bad programming?
as a side note: if you have an if construct in your pure functional language, then you really need to have an else. Every expression has to return something!
Dec
14
awarded  Supporter