News for hackers. Stuff that matters.

myronmarston

Re:Basho Unveils New Cloud Storage Software: Riak CS on Tuesday March 27, 2012 @10:25AM (#3761642)
At SEOmoz, we use riak for our rankings collection service, which is written using sinatra and resque. We blogged about, in case you're interested:

http://devblog.seomoz.org/2011/10/using-riak-for-ranking-col...

I know of a couple other ruby shops that use riak. Github uses it a bit. Spreedly uses it as well.

Re:I Heart SASS, But HAML, I'm Just Not That In To You on Wednesday May 04, 2011 @04:29PM (#2515179)
ERB is a useful tool to have in your toolbox. It's very flexible. It's capable of templating _any_ kind of text file, but since it's capable for all of them, it excels at none of them.

HTML imposes this very strict structure: tags must be closed properly. Sure, browsers can handle tag soup to varying degrees, but it's a very bad idea to have your app render invalid markup. Humans are terrible at ensuring all tags are closed properly. Computers are great at it.

When templating HTML, I prefer to use a tool the was specifically designed for HTML. HAML auto-closes tags for you. Erector (http://erector.rubyforge.org/index.html) is probably my favorite, as it auto-closes tags, allows you to write your views in pure ruby, brings the power of OOP to your views, and gives you a far more clean, testable view layer. Want to test your view? Simple: instantiate the view class with the necessary arguments, render it, and make assertions about the output.