Easier MetricFu with Metrical
TL;DR: I've just released metrical. It is a tiny wrapper around metric_fu. MetricFu is awesome. It helps me keep my code clean by identifying problem spots in my code. Unfortunately, it's difficult to...
View ArticleCucumber vs. Steak
Jeff Kreeftmeijer talked about Cucumber and Steak at the last Amsterdam Ruby Meetup. He hit upon an important theme in software development: reducing complexity; in this case the extra layers of...
View ArticleBackends in Rails 3.1
If you find yourself needing a backend interface, you can either get an admin plugin of the shelf, like RailsAdmin or ActiveAdmin, or build your own. The of-the-shelf options provide a lot of...
View ArticleGetting the Most out of Bundler Groups
Did you know you can create as many groups in Bundler as you like? You can and I think you should! Let me show you some ways I use groups to clean up my Gemfile. Why groups? Speed: Requiring gems can...
View ArticleTesting ActiveRecord in isolation
Testing ActiveRecord doesn't have to be slow. With some clever loading you can require only the parts that you need and it isn't even that difficult. Another reason might be that you're using...
View ArticleSass 3.2 blocks
A lot of websites have side bars. On normal desktop browsers, this fits nicely. But on smaller screens, it will create horizontal scrollbars. And those are a bad user experience. Luckily, CSS supports...
View ArticleFancy Named Routes - Part I
I know tweakers.net has it, I liked it, and I wanted it for myself. The uris of news items are like this: http://core.tweakers.net/nieuws/50373/intel-stoot-ontwikkeling-netwerkprocessors-af.html First...
View ArticleFancy Named Routes - Part II
Here are some improvements for Fancy Named Routes - Part I. In this part we will be adding a more thorough solution for the html escaping in everywhere. I noticed this was absolutely important, when I...
View ArticleMany to Many Relationships with Extra Data, Part I
Everybody probably read about has_many :through relations. With one simple command you can do some amazing stuff. Consider the following: class User < ActiveRecord::Base has_many :subscriptions...
View ArticleRcov all the way
I installed the rails_rcov plugin to see the coverage like any good programmer ;-) But when I want to know what all the tests combined produce in coverage, it just produced the coverage reports of each...
View ArticleThe Agile Grail and the Knights Templater
I've been working on a very rapid implemented website with Rails this week. It has been an exiting week. It all started on a Monday, when I overslept, and my colleague (Arie) smiled at me and said:...
View ArticleSelenium clicking a label
I am making some acceptance tests for the LevenAls website, using plain text stories from David Chelimsky together with the Selenium runner from Kerry Buckley Story: Selenium clicking a label As a...
View ArticlePlain Text Stories and Vim
Update: Updated the syntax file, redownload it if you got it before December 19th 2007. More news about my adventures with Selenium. It's hot and juicy, so lot's of exciting new things to do. I made a...
View ArticlePluralize for GetText released
I did some research into i18n plugins for Ruby on Rails. I found Globalize not manageable enough, especially looking at substitution of values and pluralization. Click to globalize...
View ArticleThe Knights Templater part II: Priory of Haml
Of course it's no problem to upgrade from Ruby on Rails 1.2.6 to 2.0.2. Just make sure you don't fuck up your subversion when unfreezing the old and freezing the new version. I just wanted to have that...
View ArticleFirst Haml evaluation
As I promised, here is the evaluation of redoing a site from ERB to Haml. To immediately cut to the chase: Haml IS worth it! It's so definitely faster and easier to write than ERB. Your HTML output is...
View ArticleSecond Haml evaluation
After using Haml for over a month now, I can now really evaluate how Haml is to work with from day to day basis. Haml actually is a blessing. Doing minor adjustments is very easy, your code remains...
View ArticleSurrounding something with a div, conditionally.
A problem I keep running in to, especially with Haml, is how to render Ajax requests. Say you have a partial on your page which is something dynamic, like a feedback form. Here you might want to...
View ArticleBringing Objects To Views
Ruby on Rails is a fine framework. It uses Ruby which is beautiful programming language. Everything is an object in Ruby, and the block structure allows you to do marvelous stuff with it. The Rails...
View ArticleFinally! Rails goes i18n!
It has been some time, I know. It was a busy time. Since my last post I started working at Finalist IT Group, an exciting company doing exciting projects. Right now I'm doing a very demanding project...
View Article