Articles

Off Topic, FiveRuns is Hiring

Live near Austin, TX? Want to work at a small, Rails-focused company? Not completely put off by the idea of having to work with me on a day-to-day basis? Really, think about that last one…

We’re gearing up to hire several Rails developers with varying levels of experience from the local area. If you’re sincerely passionate about Rails, Ruby, the community that’s grown up around it, and fit the bill, drop me a line (bruce at fiveruns).

HTML::Tag class in scrapi

While working with scrapi, I found there is no external documentation for HTML::Tag class. This article is to ensure no one says this again.

PuneRuby August Meet

Around 20+ rubyists got together on a rainy evening of Saturday to take part in PuneRuby's August Meet
.
The evening started with quick round of introductions. There were college students, fairly new rubyists and some expert Railers.

Prototype demo of COEP college website using Hobo

Domain Forwarding or URL Redirection

also known as URL Forwarding or Domain Redirection. Its a technique of making webpage available through many URLs.

Checkout
wikipedia article on URL redirection
for uses of redirection.

QScraper : hpricot interface to scrapi

QScraper is a wrapper over scrapi to provide Hpricot like interface.

Motivation: Hpricot interface is simple and easy to use while scrapi is more powerful because of bundle scraping and anonymous classes. I was using hpricot for quick testing and checking but scrapi for project implementation. To avoid working with two html scrapers, I wrote this wrapper over scrapi.

Testing the Right Stuff

I’m going to take a slightly different tack here, and review some of the unit tests in rails itself. They show up two common anti patterns, spurious assertions and coupling your tests to the implementation.

Upgrading to Capistrano2

From capify,
"Capistrano 2.0 is the first significant update to Capistrano in a year. It represents a major refactoring of the tool's internals, as well as a complete reworking of the deployment recipes."

All you need to do for upgrading your existing Rails app using cap1.x is to,

a. Capify your Rails app,
capify .

An epiphany about Functional Programming and Lazy Evaluation

(Update: be sure to read the comments, as the language used in my article was not entirely exact, in functional programming legalese ;-) Many readers helped to clarify things a bit.)

I had a mini-epiphany recently. Altough I haven’t had the chance yet to program with a functional programming language, it’s a subject I’ve had my eye on for a while. My ear perks up when I hear about Erlang, Haskell, F# or Scala, 4 functional programming languages.

Paginator 1.1.0

I just released an update of the paginator gem; the full range of Enumerable methods are now available on Paginator and Page instances. This was a long overdue feature – like many releases, this one was for largely selfish reasons … not having inject available was really getting on my nerves.

Forward and Delegate, A Simple Pattern

Here’s a simple example showing how to:

  1. Forward all missing method invocations on to some object

  2. Dynamically add delegation of that method to that object for future invocation.

    def methodmissing(meth, args, &block) #:nodoc: returning @object.send(meth,args, &block) do self.class.classeval %{delegate :#{meth}, :to => :@object} end end

Note this example uses two bits from ActiveSupport:

Java | Rails Fire

Java

How Santiago Pastorino Went From Ruby Newbie to Rails Core in 2 Years

Just a month ago, David Heinemeier Hansson welcomed Rails' newest core team member, Santiago Pastorino.

JRuby 1.5.0 Released: The Best Alternative Ruby Implementation Gets Even Better

Following on five months after the release of the popular JRuby 1.4, the JRuby team have delivered JRuby 1.5!

Michael Fogus talks to RubyLearning’s Clojure Course Participants

On the eve of the first free, online “Clojure 101” course, Michael Kohl of RubyLearning caught up with Michael Fogus, author of the forthcoming book – The Joy of Clojure. In this interview, Michael Fogus talks to the Clojure 101 course participants on Clojure.

Clojure 101: A New Course

In-depth JRuby Q&A: What Makes JRuby Tick in 2010?

JRuby is undoubtedly the most mature of the alternative Ruby implementations. Supporting Ruby 1.8.7 and 1.9.1 (mostly!) and JIT compilation, JRuby is already in use in mission critical Ruby apps and runs scarily fast on the JVM. In this interview with JRuby core member, Charles Nutter, we dig deep into what makes JRuby tick.

Code Massage

This article started out as a mental experiment and led to a surprising result. I post this mostly for the fun of it. But of course you can take something away from it. With that I do mean not only technical solutions. I believe firmly that a certain level of playfulness actually helps finding better solutions. The other ingredient you need is a certain eagerness for improvement which means to not be be content too early. OK, let’s start.

Rake and Ant Together: A Pick It n’ Stick It Approach

Recently, I landed a new library for JRuby that will be part of JRuby 1.5. Before I start I want to conjure the image you see below this text: that’s Right!  Mr. Potato Head: a role model for us all. Something that delights us for hours (or at least, probably did, at one point in our lives), is flexible, and is not only a toy, but also a starchy food product.

AbstractQueryFactoryFactories and alias_method_chain: The Ruby Way

In the past week, I read a couple of posts that made me really want to respond with a coherent explanation of how I build modular Ruby code.

11 New Ruby Delights (For If/When You’re Tired of Rails 3.0)

no-rails-allowed.gifSick of Rails 3.0 yet or still enjoying your Sinatra, Rango, Ramaze,

The Building Blocks of Ruby

When showing off cool features of Ruby to the uninitiated (or to a language sparring partner), the excited Rubyist often shows off Ruby’s “powerful block syntax”. Unfortunately, the Rubyist uses “powerful block syntax” as shorthand for a number of features that the Pythonista or Javaist simply has no context for.

To start, we usually point at Rake, Rspec or Sinatra as examples of awesome usage of block syntax:

Syndicate content