Sat
21
Feb '09
Pair Programming killed the Uber-coder…
by Frank Spychalski filed under Computer

I stumbled over a great essay on pair-programming (via James Shore).

Rod Hilton explains it much better than I could ever do, why you should Pair-Program. But I haven’t heard about the “ping-pong pairing”:

When doing Test-Driven Development, one of the things we do is called “ping-pong pairing”. So the other developer will write a test, then make it compile but fail. Then he passes the keyboard to me. I implement the feature just enough to make the test pass, then I write another failing test and pass it back.

I have to try this on Monday…


Sat
31
Jan '09
Drop all tables from a mysql database
by schlumpf filed under Computer, Work, all

Sometimes you want to reset a database to its virgin state, without actually deleting and re-creating the whole database (perhaps because your user doesn’t have the right to create a database). There are a lot of links out there that give you a quick answer on how to drop all tables from a database in a single-line shell script. Some examples:

However this does not work if there are foreign key constraints between the tables (because the tables constraining others need to be deleted first). Here’s the advanced version that solves this problem:

#!/bin/bash
USERNAME=myUser
PASSWORD=myPassword
HOSTNAME=dbHost
DATABASE=mydb
while (true) ; do
    TABLES=`mysql -h $HOSTNAME -u $USERNAME -D $DATABASE --password=$PASSWORD 
                  --batch -e "show tables" | grep -v Tables_in`
    if [ -z $TABLES ] ; then break; fi
    for i in $TABLES ; do
        mysql -h $HOSTNAME -u $USERNAME -D $DATABASE --password=$PASSWORD  -e "drop table $i"
    done
done

I agree this is not nice because it’s a brute force approach – but hey, it works! And resetting a database is most probably not a performance-critical task anyway.


Thu
11
Dec '08
Euruko 2009 – Barcelona 9-10 May 2009
by Frank Spychalski filed under all

The date for Euruoko 2009 was announced. The location was announced a few months ago but the planned date was Q1 2009. This year’s Euruko in Prague was great and I will try hard to come to Barcelona, too.


Today I wanted to implement something that would prevent me from accidentally closing the browser window while I was doing stuff in my webapp. I’m no javascript expert, so I checked some newsgroups and found more and more complex solutions the longer the threads were. Read the rest of this entry »


Fri
10
Oct '08
Where was CamelCase invented?
by Frank Spychalski filed under Fun

Useless and probably false trivia of the day:

Where was CamelCase invented?: In Scottland


Mon
29
Sep '08
Hamster across america
by Frank Spychalski filed under Fun

If you ever wondered how fast a hamster runs or what Google engineers do when they are bored (or drunk?) have a look hamsteracrossamerica.com/.

They attached a sensor to the wheel of a hamster and plot the distance using Google Maps to see if it is possible that a hamster runs all across America in his lifetime.


Tue
16
Sep '08
Bye bye abebooks
by Frank Spychalski filed under all

I was a satisfied customer for a few years. I ordered perhaps a book or two every year and was happy to get these out of print books without a hassle for a decent prize. What changed? Read the rest of this entry »


Wed
2
Jul '08
Filter unicode ranges in Yahoo Pipes
by Frank Spychalski filed under all

I stopped working on my RSS filter because I have to admit that Yahoo Pipes is damn good, way better than anything I could do on my own.

One of my filters removed remove links with non-ascii titles from delicious/popular (no offense, but I cannot read Japanese/Chinese/Russian). This is a broad generalization, but it worked pretty good. I had to search a little bit until I found some good documentation on unicode and RegEx which works with Pipes:

Perl and PCRE do not support the uFFFF syntax. They use x{FFFF} instead. You can omit leading zeros in the hexadecimal number between the curly braces. Since x by itself is not a valid regex token, x{1234} can never be confused to match x 1234 times. It always matches the Unicode code point U+1234. x{1234}{5678} will try to match code point U+1234 exactly 5678 times.


Mon
2
Jun '08
Chumby goes i18n – soon available outside US?
by Frank Spychalski filed under Computer, Fun


I just stumbled over a this ad for someone to do the internationalization for (probably) chumby.com. I hope this means that they will start selling the chumby outside the US soon :-)

Title: Ruby On Rails I18N Developer
Skills: I18N, Ruby on Rails, mySQL

Job description:

Chumby Industries is looking for a Ruby On Rails/I18N Contractor to deliver results for the internationalization (I18N) effort on the server.
This candidate would be responsible for externalizing all the text strings (both static and dynamically generated) that the website uses so that Chumby could later change the language of the site based on location.

Skills required:
Previous I18N efforts on browser-based platforms
Strong web-based development experience
Ruby on Rails experience
mySQL database experience
Familiarity of layout issues involved with I18N


Fri
16
May '08
Chumbytime
by Frank Spychalski filed under Computer, Fun

mikelutz chumby pic from flickrTwo days I got my chumby. Chumby Industries tries really hard to keep foreigners from buying one of their nice toys: they only accept US credit cards and shipping only to a US address. But I’m lucky, one of my colleagues from Mountain View ordered one for me.

My experience so far was great.

Step one: configure WiFi
It detected my local network without a problem. I had to enter the password and was ready to go.

Step two: activate chumby
Create an account at chumby.com and click on “activate chumby”. It shows a 4×4 matrix of dots you have to copy to your chumby to connect you account with your device. This is a nice idea. It’s very simple, easy to use but effective. And surprisingly that’s it.

Step three: add widgets
Just one click. Sometimes the widgets need a some configuration but everything is explained right there.

Minor annoyances

  • only two brightness settings: high & low
  • you have to press pretty hard on the touchscreen

Plans:
Find a German power supply (should be easy) and start coding a widget :-)


Bad Behavior has blocked 260 access attempts in the last 7 days.