Better HN
topnewbestaskshowjobs
Log inSign up

myronmarston

6 karma · joined Apr 6, 2011 (15y ago) · 3 submissions

Submissions

1.

In Defense of 100% Test Coverage(myronmars.to ↗)

1 points · by myronmarston · 14y ago · discuss

comment 14y ago · link · parent

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.

comment 15y ago · link · parent

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.