0x32

Back to the old Google?

May 10, 2010
While you are able to use Google in its new layout, you still prefer the keep-it-simple-plain old way? These are some of your options:
0x31

A catch22 ahead: Free high quality web …

May 05, 2010
Finally someone gives us free, legal, high quality web fonts in large numbers. Good bye MS Arial! Good bye MS Trebuchet!
0x30

Your web site is illegal, or: German la…

Apr 27, 2010
In recent weeks online news sections across Germany discussed privacy implementations in social networks, mainly targeting the US-based social network facebook.com. Triggered by a somewhat questionable (in my eyes at least) privacy assessment done by the usually well-established German consumer rating organization Stiftung Warentest, the story even hit mainstream politics, when German consumer protection minister Ilse Aigner urged Facebook "to revise the privacy policy without delay." While one can hardly ignore the free promotion for struggling German social network site studivz.net and the somewhat antiamerican smell in the ongoing discussion, lets just have a deeper look at some of the problems with German privacy laws.
0x2f

the fastest "is a power of 2" test I co…

Apr 01, 2010
Can you beat this?
0x2e

Transformation rules

Jan 04, 2010
Finally I wrote together some ideas about how rendering could be organized in a better way. I might give a talk on that script on this thursday's rug-b meeting.
0x2d

Thank you, 2009!

Dec 26, 2009
2009 had been an exciting year! I discovered tons of new projects to help me improve productivity. The following is just a (incomplete) list. If you feel left out: just drop a comment below.
0x2c

Web site localization the easy way

Nov 24, 2009
There are many ways to add multiple languages to your web site. You will certainly know how you do it. But still... I came up with a new alternative, which I see as a light weight alternative, suitable especially for small web sites.
0x2b

(I) don't use Google assets

Nov 14, 2009
Recently people are moving to google hosted Javascript APIs. Which sounds good, at the first sight, because
0x2a

Smoothly installing the "charguess" gem

Nov 14, 2009
One of the solutions to guessing a text's encoding in rails is the charguess gem. Sadly, though, this isn't well prepared to a "gem install charguess" session. The following commands will gladly download, compile and install the charguess gem on your machine:
0x29

nginx: Adding expiration headers

Nov 13, 2009
Today I was confronted with the tas of setting a proper expiration header to asset files. As a reminder: this is the aim:
0x28

Rails thread threats, and run_later

Oct 18, 2009
We all know that rails has a rocky history regarding threads. Sadly, that seems also include the Rails port of one of my favourite Merb features: run_later.
0x27

[BUG] cross-thread violation of rb_gc()…

Sep 06, 2009
If you are running accross this error
0x26

Where 100% C0 code coverage is just not…

Aug 28, 2009
I guess you are using rcov too to check that all your code was active in your tests at least once. Well, then, here are some bad news:
0x25

Add support for greylisted users to you…

Aug 26, 2009
In the ever ongoing fight against spam there is one really wonderful weapon: greylisting. For those that don't know how it works: whenever an email server sends an email for the first time, the receiving mail server rejects the email with a temporary error. The idea being that a legimitate server resends the email after a certain period of time, and then the email gets through, but a spam sender is likely not to resend the mail again.
0x24

mongrel_rails restart: It might not wor…

Aug 10, 2009
Just found out that mongrel_rails restart does NOT work, when the original mongrel was started with the -c option. Yuk!
0x23

Study: ruby coders are more attractive …

Jul 22, 2009
Well, that is of course total bullshit. With that title I will conduct a small experiment.
0x22

Your daily class variables and constant…

Jul 20, 2009
It is not chrismas, hence no quiz, but this was strangely surprising:
0x21

Array#to_proc

Jul 17, 2009
gives you
0x20

Sphinx/ThinkingSphinx vs Xapian/ActsAsX…

Jul 10, 2009
This benchmark compares thinking_sphinx with acts_as_xapian. We need a search engine that gives us the IDs of matching documents from a fulltext index, basic text search only.

CouchDB is here to stay!

Jul 08, 2009
While some of my 5 readers on average (per day) might already know, for everyone else: CouchDB will be part of the next Ubuntu release. And that one comes with long time support.

F# - not on german keyboards

Jun 07, 2009
Whoever designed F# did certainly not have a german programmer in mind. Or how would you explain this
0x1f

There are no nested functions in ruby!

May 31, 2009
Long time no read, I know. Well, I have been away.
0x1e

Components, revisited

Apr 23, 2009
Lately I started looking into components again. What appealed me is that they could provide a uniform interface to parts of an application, rendering and all included. And the way they are were built into Rails they even spoke HTTP right out of the box.

hot, hot, hot!

Apr 16, 2009
While it is rapidly becoming summer these days we are working on a really really fabtastic idea. Having said that: it is not the idea we are working on, the idea is already 90% feature complete. It is the prototype which is slowly growing.
0x1d

Bummer! git-svn is not named so

Apr 05, 2009
For all of you that are trying to install git-svn on your machine: Quite a while ago the git folks reorganized the command line interface, and what used to be called "git-" is now called "git " . Note the subtle difference here? So if you are looking for the git-svn binary on your machine: there is none.

Skype? A nazi company?

Apr 03, 2009
Or how would you explain the skinhead with a pitbull doing a nazi salute, when entering

Server problems

Mar 31, 2009
0x1c

Bummer! Rails dynamic streaming doesn't…

Mar 31, 2009
Rails dynamic streaming doesn't work. At least sometimes. While the Rails documentation, and all the euphoric comments in the community feature code examples along the lines of
0x1b

This is how Erlang makes sense, pt. 3

Mar 29, 2009
This is the third and final part of a series about Erlang.

Bummer

Mar 18, 2009
0x1a

This is how Erlang makes sense, pt. 2

Mar 15, 2009
This is part 2 of a series about Erlang. The final part 3 will be published next week here.
0x19

This is how Erlang makes sense, pt 1

Mar 08, 2009
This is part 1 of a series about Erlang. Parts 2 and 3 will be published in the next weeks here.
0x18

More magic symbols

Mar 01, 2009
With just that small addition:
0x17

Atomic science, revisited

Feb 22, 2009
I lamented earlier about the absence of a racecondition-free find_or_create implementation and somewhat promised to check back with a working implementation. YES, WE CAN: NOW is the time, folks!
0x16

It's a Bird…It's a Plane…It's Ruby!

Feb 10, 2009
Ever done Erlang? Now I wondered how flexible ruby would be and if an erlang style pattern matcher can be done in ruby. As it turns out, I came pretty close:
0x15

public privacy protection: ruby privacy…

Feb 08, 2009
...or: There is a difference between methodname(args) and self.methodname(args)!
0x14

Riding to Erlang

Jan 18, 2009
Hi guys, I just want to tell you that I am off that blog, for now. The reason is this cute sidekick. And this being a somewhat non-Railsy project there is not much of a point in writing about it here. In the meantime this blog might get somewhat quiet, but I expect to be back in Railsland in two weeks or so. Stay tuned.
0x13

Happy birthday, Rails 2.3

Jan 13, 2009
It is a bit early, but still. Rails is going to turn 4! Candles, Fireworks, and everything!
0x12

Wissenswertes über Erlangen

Jan 04, 2009
Now what does a Berlin based ruby coder does between Christmas and New Years? You might bet on a short trip to "Nothing to Hide (25C3)", but this time you are dead wrong.
0x11

...and a Happy New Year

Dec 28, 2008
for all of you. Before you enter the New Years Day frenzy, here are the results of last week's puzzler. (Haven't been a big secret anyways: every one with a Ruby interpreter could know in the meantime. Yes, that means you!)
0x10

Merry Christmas and Happy Contemplating…

Dec 21, 2008
...some piece of ruby code that might not behave as you think (depending on your thinking, of course.). Do you know the results?
0x0f

url_for speed "issues"

Dec 14, 2008
Everyone seems to know that building an URL from a hash has some speed issues. The reason for that is quite clear: it looks up the shortest route using routes.rb, no wonder that this would take some time.
0x0e

You will know me by the trail of the de…

Dec 07, 2008
Say you are running a bookstore. (Didn't you know that Rails is all about selling books?). Like everybody else you moved over to an IT infrastructure for managing sales during the last years, and now you have 5000 customers in the database and know about all the books these guys bought at your store - on average a swooping 15 books per person.
0x0d

10+1 things I hate about rails

Nov 30, 2008
These are somewhat random rants, proceed with utmost care!
0x0c

These shoes are made for walking

Nov 23, 2008
Wanna go for a stroll? It is getting winter again, at least in this part of the world, so strolling outside might be a bit, err, cold. Instead I suggest you just walk some ruby objects this time instead?
0x0b

Saving is a virtue, avarice is a vice

Nov 16, 2008
In functional tests a controller instance should not be reused: usually controller instances hold some state, that gets discarded in the normal Rails life cycle, and our tests must reflect that. Otherwise, tests can fail even if they shouldn't, but even worse tests could succeed when they shouldn't.
0x0a

Some optimization hacks...

Nov 09, 2008
We are working on a somewhat larger Rails application, and one of the actions renders a table with up to 9.000 table elements. Now, somewhere when rendering that table we use a line like
0x09

Atoms and their packages

Nov 02, 2008
Every now and then I come across someone that doesn't really know about Ruby symbols. That comes as no surprise, because most programming languages don't have something like that as a built-in type. And Rails' HashWithIndifferentAccess (this is the class of the params hash that you deal with during actions) certainly doesn't improve the situation: novices might think that whether or not to use a symbol is a random decision.

Interlude

Oct 27, 2008
One thing about having a blog hosted at wordpress.com (or on any other 3rd party website, for that matter) is that you shouldn't have to deal with updates and the likes.
0x08

10, 9, 8, ... zero in on <what> ?

Oct 26, 2008
Rails - or to be more precise - ActiveRecord scopes can be a huge time saver. That is, unless you have a number of multiple conditions that stack onto each other. But if you are in need of an "advanced search" feature you will likely end up with something like the following:
0x07

More bodywork

Oct 19, 2008
Now, last monday I promised to rework the bodywork code into a plugin, "tested and all". Some clashes with git later I finally managed to push it to github, you'll find it at github. It even comes with a nice and cute README file, so head over and check it out.
0x06

Body works

Oct 12, 2008
One cool Rails feature - however undervalued - are after-filters. You might ask: What is the point of doing things after I am already done doing all things? Well, to prevent micromanagement: Sometimes you just want to do things all the time, or regardless of the specific request: say, embedding some SQL stats on the bottom of all of your pages. This is just one example where you could should look into after_filters first thing in the morning.
0x05

SQL instruments

Oct 05, 2008
There are times, when you build a really complicated web page. Take a page like http://www.sportme.de: this page has more than eight parts that are to be taken straight from the database (assuming you are not logged in and get the front page of that website). You see blocks showing professional members, newest members, random members, a news ticker, a "who is online list", etc. Each entry in these boxes usually pulls more than one row from one table from the database; the most obvious case when showing user teasers, where the user's image itself would not come from the table holding the users, but from "somewhere else".
0x04

Atomic science

Sep 28, 2008
The usually recommended way to create an item if it doesn't exist already is by using find_or_create_by... This, however, comes with a race condition built in. Which doesn't always race, so think twice when and how you use it.
0x03

Advisory Locking

Sep 21, 2008
Strangely RoR doesn't come with support for Advisory Locking. However, a typical rails application usually not only needs to synchronize access to the data in the database but needs to synchronize external data as well. Given that a typical rails application has more than one parallel thread of execution, a programmer might need some tools to synchronize access to shared resources.
0x02

Don't go Hamlet on me!

Sep 14, 2008
When something's rotten in the State of Denmark - I prefer to know! If you feel the same, and you have some C/C++-background: chances are that you know about assertions.
0x01

The times they are achanging...

Sep 07, 2008
...well, sometimes you just have to know how much time your application spends in a certain area.
0x00

Hello world!

Aug 29, 2008
Hey, welcome at 1rad!