Pages

Monday, January 02, 2012

2012 New Year's Resolutions

Time FliesIt is that time of the year again where I make up stuff to ignore for the following twelve months. Last year I didn't do it, but this year I will give it another try.
I has been pointed out that these kind of resolutions doesn't really fit into the agile way of making decisions that I do subscribe to in my professional life. I will again try to make follow up posts to check how I am doing during the year and possibly adjust the goals.

So here we go.

No Screen Day -- don't spend any time in front of a screen or phone for one day a week. This can't be avoided for work, but everything else is forbidden. I am going to start with a low use day, like Tuesdays and then increase it to a day with more free time like Fridays or possibly two weekdays.

Sort out Fedora -- I am behind with my work on Fedora packages. This has to do with a lack of time, but also with the direction Fedora is taking, which has killed my motivation a bit. First I will catch up with all the work and then decide if I give up on maintaining the packages and switch to CentOS and let other people do the work. If I give up on Fedora there are other open source project where I could invest more time.

Cook new stuff -- I love cooking, but often I just rehash old recipes or do one of these "whatever is in the fridge" meals. So plan for this year: pick a new recipe every week and cook it on the weekend.

Now you are probably wondering where the usual stuff is. You know, the bits about weight and sports. I see those as a given anyway. I will continue to do more mountain biking and running and eat well enough to not end on the very lardy side.
I will hopefully also progress on my career without having to do major changes.

As these are pretty easy goals I might add harder ones or follow Cutts example in his quest to do a new thing every month and stay with it if it turns out to be nice.

btw: I shouldn't have told you this

Thursday, September 01, 2011

Calm

Before:
#include <stdio.h>

int main(void)
{
  printf("Hello world\n");
  return 0;
}
After:
<>;;.""(()){}\#
0
acddddeeefhiiiiiillllmnnnnnnooooprrrrsttttuuvw
H

Friday, July 22, 2011

Test Ride Triumph Tiger 800 XC

New for 2011 Triumph Tiger 800XC
I had my test ride of a 800XC today. I took it on my usual routes through Barcelona and Collserola.

I must say it is a very nice bike. Compared to my current more agricultural Yamaha XV 1600 (picture of my bike fully packed) the motor feels like an electric drive and it handles like my mountain bike.
The motor is quite boring in a good way, but missing the kick of my current one. While the handling is really appreciated, the Yamaha really doesn't like corners. Ideally you drive up to a corner and find someone to lift it and turn it around. It also loves to follow any lines on the road and kills your behind with any bump, while the XC ignores all of this very nicely.

The main reason why I am looking at a new bike at all is that mine is quite old, falling apart and longer trips usually result in a lot of pain and fights about luggage with my girlfriend. So far have always looked at the usual BMW options, but I never liked the brand or their prices.

I am just not quite sure if the bike is really me, my first bike was a Honda CMX 450 Rebel which lasted 10 years and the Yamaha is only my second bike. Changing to one of these fancy adventure bikes is a bit radical.

I have to decide quick though, if I want to take it for my September holiday and have the first service before that. I would have to decide until Tuesday.

The other thing is that they will charge me list price for bike, accessories and first service and would give me just 4000 Euro for the old one. For that amount I might just keep it.

Well, just wanted to vent :-)

Thursday, July 07, 2011

International PHP Conference 2011 Spring Edition impressions


I planned to post this a lot earlier, but I wanted to do the presentation at Softonic first and I am also very lazy.

My employer was so nice to send a colleague and me to the International PHP Conference 2011 Spring Edition in Berlin this year. It was a three day conference. There also was one day of workshops, which we skipped. We also skipped most of the keynotes, because most of them were in German and didn’t seem very useful.

I concentrated on the topics that interest me most: agile, unit testing, continuous integration, continuous deployment and Symfony/Doctrine. So here goes a quick summary of the stuff I think was good.

DevOps fuer PHP by Johann-Peter Hartmann slides

A very good introduction on DevOps, mostly introducing lots of tools and how they are used at Mayflower GmbH. I found especially the bits about self service virtual machines and clouds for developers interesting. They are using a combination of puppet, vagrant, fog and eucalytus for this. He also emphasized how important the culture in a company is to make this possible. All of this enables faster development and deployment. I plan to have a separate post about this soonish.

3*PHPUnit by Sebastian Bergmann

This could have easily fitted into one talk. And if you have seen any of his talks before you could have skipped most of this too. I liked the quote about removing the release cycle and making it much more fluent, reference to the etsy blog (which is brilliant) and latent code patterns. None of this is new stuff though.

MySQL, PHP - The current State by Johannes Schlueter

Oracle man. Improvements in MySQL 5.5 and 5.6. memcached interface, which is currently in labs. Some examples of the asynchronous mysqli interface, which sounds really interesting for some use cases. Also information about mysqlnd plugins, especially the mysqlnd_uh one which allows writing these in PHP. All of this is not so useful if you like your ORMs though.

Large-Scale Data Processing with Hadoop and PHP by David Zülke slides


Highly recommended if you can see this at any conference. Very good presentation, starting with the use cases of sites which are producing lots of data and need to use map reduce to mine it. It continued with a live demo on a laptop, first tuning it until the speed increased by using map reduce and later connecting two laptops to show how well it scales.

Next Generation API Documentation by Arne Blankerts

I didn’t expect much of this last talk, but it turned out to be pretty good. As PHPDocumentor seems to be pretty dead, there is a need for a new system. CI systems usually also generate the API documentation, so it is important that this is also fast. phpdox seems to solve this, but it is still in an alpha stage so we have to wait and see.

Miscellaneous

I also saw a lot of other talks, but most of them were either introductions to things like node.js, nginx, JavaScript QA, Doctrine NoSQL and Symfony CMF. None of these contained any new information for me. Sometimes I wonder I should stop reading blogs and twitter two months before a conference, just to make them morei nteresting.

You can find more summaries and links to the slides if available here: http://joind.in/event/view/681

Sunday, February 13, 2011

sphinx search config scripts

I just finished converting the bikesoup search to use the sphinx search engine instead of a simple doctrine fulltext search with filters.
One thing I found helpful are sphinx config scripts. Instead of hard-coding the configuration you can use any scripting language to produce the sphinx configuration. The just have to start with '#!' and sphinx will execute them and use the output as the configuration.
This is the simplified version of my main config file /etc/sphinx/sphinx.conf :
#!/bin/bash 
for i in /etc/sphinx.d/*.conf; do
 cat $i
done
for i in /etc/sphinx.d/*.conf.sh; do 
 $i
done
Then I have a /etc/sphinx.d/searchd.conf which just contains the "searchd {}" section.
And various symlinks like /etc/sphinx.d/bikesoup_dev.conf.sh into the project directories of the site.
Those scripts then create the correct configuration, they figure out the index names from the local configuration and start symfony tasks to create the xmlpipe2 output.
Nice and simple.

Sunday, February 06, 2011

Symfony RPM for Fedora and RHEL

I am a big fan of Fedora and the PHP Symfony framework. Quite early I decided that it would be nice to have Symfony packaged as a Fedora package. What I didn't realize was how long it would take me.

I submitted my Package Review Request on the 12.8.2009. One of the first comments pointed to me to an older request, which was abandoned because the packager run into some difficulties with the Fedora guidelines. But

I am not a person who gives up easily, so I continued fixing the package until it got finally approved on the 19.1.2011. By now the packages for Fedora 14 and EPEL 6 are in the official repositories and you can install Symfony by installing the package php-symfony-symfony.

Why did it so long? The problem are the different philosophies between Fedora and Symfony. While Fedora has a strict no bundled libraries policy, Symfony comes with a number of bundled libraries to make it easy to install. Symfony also recommends to use a separate copy for each install, which also explains the bundling of the libraries.

I agree with both opinions, but I still wanted an RPM for Symfony. I think it can be useful for a few cases:
  • if you want to create a quick project without having another copy of Symfony around
  • if you have multiple websites on a machine which all run the same Symfony version and you want to save memory and manage Symfony by RPM
  • if you want to build your own RPM, which includes your own Symfony application and you need some place to start.
  • you start with the RPM version for a fast set-up and later convert it to a bundled symfony, which is rather easy
So, what libraries does Symfony bundle? These are in the vendor directories: doctrine, phing, propel, propel-generator, lime, swiftmailer. And then there is also sfYAML. I decided to do without propel support, because I didn't want to update the rather ancient propel RPM that already was available. I created new packages for doctrine and swiftmailer, while Remi already had sfYAML packaged for use with phpunit. So even if nobody likes having Symfony packaged, the doctrine and swiftmailer packages will be useful.

At the end of the review another problem was pointed out to me. There are too many versions of Symfony floating around. You got the one you get through the symfony pear channel (which I am using), the one from the website and the sandbox. The last ones as tgz and zip files. There are no checksums for any of these, which makes it impossible to find out if I provide the correct version or if someone replaced them on the site.

So, what can one learn from all of this?
  • don't bundle libraries. The Symfony guys are very careful to make their classes well encapsulated and independent (even more so in Symfony2), the same holds through for library dependencies
  • even if you don't manage to achieve you initial goal, other good things will come out of it
  • whatever happens, you learn new things. By now I package a number of packages for Fedora.
  • do not give up
Will I try to package Symfony2 ? Unlikely. Unless Symfony makes it easier to install the core and bundles separate and stops bundling libraries it will be another two year to package it. Though they seem to be on the right track with the Symfony components and the bundle system.

Sunday, December 19, 2010

Tumi Alpha International Wheeled Office Review

International Wheeled Office with
cable pouch
To go with my new Lenovo T510 I now also bought a carry-on with space for the laptop. As it goes with purchases like this I spend a lot of time researching them on the net, it just seems to be the German or nerd to do. Also quite typical for a German is to choose something which is of better quality than you need, but also not the most expensive one out there. Other bags I considered where by Rimowa, Victorinox, Samsonite and Briggs & Riley.
The reason why I am writing about this at all is that the Tumi website doesn't include the information I needed and there seems to be a lack of information about this bag on the, so this is more about the facts as an actual review.

Size: height: 54.6 cm, width: 37.5 cm, depth: 25 cm ( compressed ), 28 cm ( normal ), 32 cm ( expanded )
Weight: 5kg ( including cable pouch, lock and bits and pieces )

The size and weight might be a problem if you want to use it as a carry-on, because some airlines are annoyingly strict with there size and weight restrictions.  Some have a 20cm depth limit or a 8kg weight limit. Easyjet and BA are probably OK, Germanwings and Ryanair maybe not so (but you shouldn't use Ryanair anyway).  

The protected laptop compartment fits the T510, but the laptop is a bit wide which makes it a tight fit. Using the 9 cell battery is not a problem. A 15" Macbook Pro should fit without problems.   

If you decide to buy it, try to get it from the US as the prices are tumi.com: $695 (528€) , tumi.de: 725€, uk.tumi.com: £695 (818€).

Review: it is quite nice

If you need any other details or measurements, give me a shout with a comment.