Quantcast
Channel: iain.nl
Browsing all 133 articles
Browse latest View live
↧

Image may be NSFW.
Clik here to view.

Customizing IRB, 2010 edition

TL;DR: Check out my new .irbrc-file! Customizing my work environment is a nerdish hobby of mine. I spend far to much time tweaking my terminal. While I'll save my terminal customizations for another...

View Article


Domain Driven Design: Building Blocks in Ruby

A few weeks ago I talked about Domain Driven Design in Ruby at the local Ruby user group: Rotterdam.rb. It had a great turnup (even though the weather prevented some from coming) and there was a good...

View Article


Building Blocks of DDD: Services

As promised, here is an example of how to use the idea of services from Domain Driven Design to help you design your code better. Let's start with some theoretical stuff, before we dive into some...

View Article

Gemfile vim syntax file

I've updated my Gemfile syntax file, adding a dash of color and making sure it supports all elements of the Bundler DSL. You can get it here. You'll also need to tell vim to automatically use it when...

View Article

Your argument doesn't cut wood

About once a month I read an article on comparing Ruby to another programming language. Usually it makes the point that Ruby is dynamic and open and therefore it is less suited for reliable...

View Article


Image may be NSFW.
Clik here to view.

RSpec Array Matcher

If you're testing arrays a lot, like ActiveRecord's (named) scopes, you should know the following RSpec matcher: =~. It doesn't care about sorting and it gives you all the output you need when the spec...

View Article

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 Article

Cucumber 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 Article


Backends 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 Article


Getting 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 Article

Testing 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 Article

Sass 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 Article

alias_method argument order

If you're anything like me, you can never remember the argument order for alias_method. I always think to myself "it's the other way around than I think it is", but then end up doing it wrong anyway....

View Article

Browsing all 133 articles
Browse latest View live