032 RR Ruby Antipatterns

by Charles Max Wood on December 8, 2011

Panel

Discussion

Picks

7 comments
random
random

Unless else is perfectly fine really. To me unless is most useful if it is easier to think of the negative form of a condition in the beginning. If is clearly easiest to use when the positive form is easier to think of at the beginning of the condition. Really the (if not) setup while traditional can get really weird when you read it literally. Though maybe unless else would sound better as unless otherwise.

Shane Brinkman-Davis
Shane Brinkman-Davis

I wanted to followup on James' EverNote pick. I use EverNote too, but I don't care for their iOS apps. Instead, I recommend AwesomeNote. It has a polished UI worthy of an Apple product, and it syncs with EverNote. You still have all the great sharing and access features of EverNote and a great UI on iPad or iPhone.

Diego
Diego

terniary operator => ternary operator

Gordon
Gordon

Wish I had this as a blog post. Hard to follow some of the syntax ... "dot and and open bracked colon"

Trackbacks

  1. [...] am on record as believing the unless…else construct in Ruby is an abomination. I thought I’d dig into [...]

Previous post:

Next post: