Posts

Maven: The Definitive Guide

I have been looking for you for ages. I wanted to know all of your secrets, not just guess them from the POM reference or from the maven official documentation, which is very poor in same cases. Where have you been? Finally I found you, Maven Definitive Guide !

Corsair memory upgrade for ReadyNas NV+

Image
I just got my Corsair Value Select  1GB DDR1 400Mhz PC3200 (VS1GSDS400/EU) memory module and installed on my ReadyNas NV+. I've run the memory test twice and it works like a charm. Unfortunately my SqueezeCenter is not much faster..., but this is an other story :-(

What a mistake: case-sensitive HFS on my mac book

I got a new macbook (alu) and since I once happened to overwrite a file because the default file system for OS X is case-insensitive, I thought I would be smart in reformatting the hard-disk before installing anything and changing the partition to case-sensitive (use DiskUtility to do so just after booting from the Leopard cd). Unfortunately, it proved to be a bad choice since many applications are not written for a case-sensitive filesystem (see Adobe Photoshop Elements, f.i.). That pissed me off! Probably an ordinary Mac user will have an happy life with a case-insensitive fs but since I have a linux background it seems very unnatural to me. Nevermind, I tried to find a way to convert my fs to case-insensitive without having to reinstall everything. I first tried restoring with a TimeMachine backup, after having reformatted the disk case-insensitive but the backup restored the whole partition as case-sensitive. The solution seemed to be to fully reinstall OS-X from scratch and when i...

IE6 does not cache my filtered pngs

When using png images as background, you need to apply a trick to make Internet Explorer 6 to display the background as transparent: [source:css] filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://robcos.com/img.png', sizingMethod='crop'); [/source] I realized though that if Internet Explorer caching setting is set to Every visit to the page , the png file is dowloaded multiple times if you have the same picture more than once in the same page and, in some cases, even ofter if you are doing some DOM manipulation. The solution is to add the Cache-Control header to the http response serving the png. In apache, you can for instance do it using the following directive: [source:xml] <FilesMatch "\.(jpg|jpeg|png|gif|swf)$"> Header set Cache-Control: "private, max-age=21600" </FilesMatch> [/source] after having loaded the module "headers". See this nice post on how to do htaccess Caching

Welcome to the list: 120th place

The Swedish company ÅF has been looking for consultants. To gain some visibility they built a flash based website on which you could solve some programming exercises. Besides getting a wider spread of candidates, they surely succeeded making the "job application" more interesting. They said they were going to offer a job to the first 100 in the list and give out some prices. I was not looking for a job but I could not resist the temptation and I had to spend a few hours solving the problems. At the end I got to the 120th place (too bad...they will not offer my a job which I could have refused :-) For those who are curious, at the end, to get into the list, it was not a matter of being able to solve the problems but to solve them fast. Surely the guy who got into the first place succeeded in automating the procedure somehow. You can see the list on www.welcometothelist.com

Hemnet & Eniro launched!

After working last year at Eniro maps to introduce the "utsikt" images (images taken from an airplane at a 45° angle), we have today successfully launched the integration of Eniro maps on Hemnet, Sweden largest site for real-estate. During the project I acted as a javascript programmer and as a scrum master together with Torsten Ek as projekt leader and the cordination of Johan Ljung. I also introduced a lot of javascript unit testing, it was pretty cool!

Encoding of included JSON files

Lately I had a problem with a page which was including two JSON scripts, one encoded in UTF-8 and the other encoded in ISO-8859-1. In some circumstances (and in some browsers) the strings where not showed correctly. Hunting down the problem required a good dose of my favourite tool wget -S where the -S option causes the http response headers to be printed on stderr. My conclusions are that: if a page uses a certain encoding (as specified by the charset on the page and/or the Content-Type http header) the included javascript will be handled with the same type of encoding if nothing else is specified In Firefox, if the http response of the javascript contains the "Content-Type" header with a charset value, the file will be treated as using this encoding In Internet Explorer 6 (and 7?) the http headers are ignored and you must explicitly use the charsets attribute of the script tag to force the correct encoding In other words, to make a script inclusion cross-brows...