Hello, I’m a web craftsman with a passion for the modern web. I build web applications and play with social services and communities.

April 25, 2011 at 1:53 am

It’s been really calm around this blog for quite a while now but this is about to change. There is a lot to catch up with so I’ll get to this asap. It will be a graduate process of blogging about all the exciting things that happened last year, followed by more recent ones as well as new things to come.

Most notably is my stay with thoughtbot, inc. last summer, which I’ll lose a few words about as well as projects I have worked on lately.

One of the reasons I didn’t post anything in the last months was from technical nature. I wasn’t happy with the article layout and syntax highlighting of the blog as well as the URL schema of my whole site. This is all fixed up now and I feel ready to post something new.

August 5, 2010 at 5:12 pm

When running rake tasks (that are related to the database) in Rails apps I ran into the following error a couple of times on different OS X Snow Leopard machines:

uninitialized constant MysqlCompat::MysqlRes

The mysql gem is installed but got compiled for a wrong architecture for some reason. I’m not 100% sure when this happens but if you run into the problem uninstall the mysql gem

$ sudo gem uninstall mysql

and reinstall it with this flag

$ sudo env ARCHFLAGS="-arch x86_64" gem install mysql

if you are using rvm you can skip the “sudo” on all commands.

July 7, 2010 at 10:39 am

On June 17 I was talking about some stories from my social community the-reality.net at Pecha Kucha Night Salzburg. Pecha Kucha Nights are happening all around the world and allow presenters to talk about any topic they like. There is only one rule for presentations: Each presentation has exactly 20 different slides and each slide is displayed for exactly 20 seconds. This means each talk is 6 minutes and 40 seconds long. So in case a presenter choose a topic you don’t like you will only have to waste 6:40min of your life listening to it!

I choose to speak about some funny and interesting stories from my social network the-reality.net to give people a little understanding of whats happening behind the walls of social networks. My talk is in German, so if you understand a little German have a look!

July 6, 2010 at 1:38 pm

Moscone West WWDC10 at night

Wow. That was a great week! It’s been roughly a month since I went to San Francisco to attend Apples Worldwide Developers Conference 2010, going down in Moscone West from June 7 to June 11.

I flew into San Francisco on Friday, June 4th and had a nice look around the city at the weekend before getting into WWDC on Monday. WWDC started off with a keynote by Steve Jobs. Doors opened on Monday morning at 7am, full 3 hours before the Keynote kicked off. So I thought getting there right at 7 would be fine. But people are actually more mad about seeing Steve Jobs than 15 years old girls for Tokio Hotel. They must have been queueing all night to get in first. At the time I got there, there was a full queue around the Moscone West building. Everyone was playing nice and queued up. The atmosphere was really welcoming and friendly. Since I was on my own I got lucky and could enter the building quite early and ended up getting a seat in the very front of the Presidio room where the keynote happened. It was a great experience to attend a Ketnote for real once. Basically you can feel how excited everyone in that room is, which is a very unique atmosphere for a press event.

After the keynote a busy week full of great sessions started. They are all covered by the developer NDA so I can’t really write much about them. But I can say that I saw and learned some really neat things about HTML5!

After WWDC I had one more day in San Francisco which I used to visit Alcatraz and the SF Bay Aquarium. Then I flew back on Sunday where I met a few another German iOS developers who where on the same flight back to Munich.

March 30, 2010 at 9:07 pm

While developing scalable web applications you will come across memcached at some point. Memcached is a free & open source, high-performance, distributed memory object caching system.

XAMPP is great for development in a local environment but does not come with a php memcached extension preinstalled. Since there are 2 good memcached php extensions in the PECL repository (memcached and memcache) it could be as easy as installing them through XAMPPs PECL installer. Unfortunately XAMPP for Mac (1.7.3) is still compiled for 32bit and the PECL installer would create a 64bit snow leopard extension. So let’s do it manually by setting some 32bit flags…

Install memcache PHP extension (2.2.5) for XAMPP (1.7.3) under Mac OS X 10.6 Snow Leopard (10.6.2)

  1. make sure Apple Developer Tools (Xcode) are installed
  2. make sure XAMPP Developer Package is installed
  3. $ cd /tmp
  4. $ pecl download memcache
  5. $ tar xzf memcache-2.2.5.tgz
  6. $ cd memcache-2.2.5
  7. $ /Applications/XAMPP/xamppfiles/bin/phpize-5.3.1
  8. This line looks just a bit complicated because it tries to deal with architecture problems between XAMPP (compiled for 32bit) and Snow Leopard (compiles everything by default to 64bit)
    $ MACOSX_DEPLOYMENT_TARGET=10.6 CFLAGS='-O3 -fno-common -arch i386 -arch x86_64' LDFLAGS='-O3 -arch i386 -arch x86_64' CXXFLAGS='-O3 -fno-common -arch i386 -arch x86_64' ./configure --with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config-5.3.1
  9. $ make
  10. $ sudo make install
  11. change XAMPPs php.ini to load the extension: (in [Dynamic Extensions])

Those steps enable you to use memcached in your PHP Code. But to actually test the application and caching in your local development environment you have to start the memcached daemon. Fortunately memcached got already installed by the Mac OS X Developer Tools (Xcode).

Just go ahead and start the memcached daemon:

$ memcached -m 8 -l -p 11211 -d

-m 8 limits memcached to use a maximum of 8MB RAM to operate

-l -p 11211 is the ip and port to listen on

-d tells it to start as a daemon

(instead of -l and -p you can also use -s to use an unix domain socket)

« Newer PostsOlder Posts »