Working with Ruby
Occasional blog posts about Ruby updates, tools, editor tweaks, and random snippets. You might also be interested in my newer project that docuements lesser-known features in Ruby: Idiosyncratic Ruby.

Project Euler 1-5 (Ruby) tries to get you thinking about how to solve mathematical problems by programming. Here are the first five problems, solved in Ruby, including comments.


Search the net - and do something for the environment :)

It is not that easy to find an replacement for google – often the search results are just better then those of the competitors. Except Yahoo – I like their results, but the user interface is not as good as google’s.

But now I have found a solution that works for me:



After editing some source files with different editors on different platforms, I had some troubles with automatically inserted tabs messing it all up.

This little script replaces all tabs with two spaces.


Organise your code comments with rake notes:todo!

Lots of IDEs (e.g. Netbeans) and some editors (e.g. gedit with plugins) have a nice feature: They show comments, which start with something like TODO or FIXME. Those annotations are quickly written and they make it harder to forget some things you wanted to (or have to) do.

I have just discovered that Rails has this feature already built-in!



This is my submission for the CodeRack contest:

A middleware that removes < and > from all incoming requests.


Oh, this sweet and tasty syntactic sugar!

This article is written for people with experience in programming in general, but who are new to Ruby.
A German version is published in the offline magazine #2, a magazine by some students of TU Dresden.

The intention is to demonstrate some features of Ruby and show, what is so great about Ruby:

A clean syntax combined with the possibility to adapt the language to given requirements flexibly.


A* in Brainfuck! by Thammi

Yeah! I am one of the two winners of the programming competition I talked about at Playing with Dijkstra.

Furthermore, Thammi, a friend of mine, is the winner of the category “crazy” with a brainfuck implementation!