All posts in 'English posts'

Creating a self containing mvc application with Sinatra

29-Jul-09

I recently presented biking.michael-simons.eu, a Sinatra based application written in Ruby. Its main purpose for me is to keep track of my milage in 2009. Although the application is completely self containing it has some nice features: Simple setup The application is simple and i didn’t want to use a “big” database like PostgreSQL or […]

Read the complete article »

Javas String.replaceAll

21-Jul-09

The following statement "foo baz".replaceAll("baz","$bar");"foo baz".replaceAll("baz","$bar"); will present you an java.lang.IllegalArgumentException: Illegal group reference exception as the replacement string can contain backreferences to the search pattern as stated in Mather#replaceAll: This method first resets this matcher. It then scans the input sequence looking for matches of the pattern. Characters that are not part of any […]

Read the complete article »

Batchconvert ascii to utf8

12-May-09

Next time i see umlauts in source, I’ll scream. Loud. In the mean time I try this: find . -iname "*.java" -exec sh -c ‘iconv -f cp1252 -t utf-8 {} > {}.utf8’ \; for i in `(find . -name "*.utf8")`; do mv $i ${i/.utf8/}; donefind . -iname "*.java" -exec sh -c ‘iconv -f cp1252 -t […]

Read the complete article »

Understanding

08-May-09

I’d love to understand what makes people create abominations such as this: if((foo ? !bar : true)) if(!somethingelse) dosomething()if((foo ? !bar : true)) if(!somethingelse) dosomething() I don’t want to judge anyone, the thing actually worked, but i really want to understand why people don’t see that this is crap. I’m really aware of the fact, […]

Read the complete article »