Showing posts from 2009

On Font Rendering

If you have ever wondered (as I have years ago) why the text rendering on Linux usually looks inferior to both Mac OS X and Windows text, no matter how much you try and tweak the settings, there is a great and very in-depth article at It is quite long, but it contains excellent background information, theoretical and practical discussions of the concepts behind text rendering in general, what Windows and Mac OS do right/wrong and how to improve the situation in general.This is a must read for anyone remotely interested in font rendering.

Star Wars Review – Hilarious

I just came about this Star Wars – The Phantom Menace Review on Daring Fireball. Yes, the movie has been out for years, so why a review? Well, go see for yourself (it is 7x10 minutes long!). Be aware that if you loved it (who would?) you might be offended by the heresy against George Lucas’ creation, but I for one mostly agree with it.You might have to get used to the guy’s voice, but the contents and the insight are definitely worth hanging on.Technorati Tags: ,,

51 Weeks since my book writing adventure began

In one week, on December 24th, it will be exactly one year since I was first contacted by Packt Publishing. After reading several posts from this blog they asked me if I’d be interested in writing a MySQL administration cookbook with hands-on recipes for those among us who have to make sure the MySQL servers are kept running and in good shape.Funny thing, I almost deleted their email, because initially I thought GMail’s spam filter had not caught some sort of bulk or phishing email, because I had never heard of Packt Publishing before and at first only saw an unfamiliar sounding sender’s name. As I was one of very few people in the office on that day I decided to read it anyways. Turned out to be not so spammy after all…What followed were several weeks of sending mails back and forth, convincing a colleague to co-author and together set up a chapter outline. Finally, around February we started writing actual contents. Boy did I underestimate the amount of work this was. This being my …

Google Navigation

You just gotta love this tech world...

Fluid app for

For the last couple of weeks I have found myself regularly having a Safari or Firefox window open, showing the Bitgravity stream from, Leo Laporte’s netcast site. Time and again however, I accidentally closed the video when I routinely quit the browser when I had finished using it for other web related stuff.Today I got sufficiently annoyed by myself to resolve this situation once and for all. So I created a Fluid app, took a TWiT logo from their homepage and now have a standalone application on my dock.This is the setup in Fluid:On first start I had to add to the ClickToFlash white list again – the white   list from the regular Safari settings was not taken into account by this standalone browser – and then resize the Window to precisely match the video size. This is remembered for any subsequent launches. I went for the popped out player available from the regular page (see the URL in the Fluid setup screenshot above), because I usually do no…

Setting up iPod Touch for Google Sync

Google offers an Exchange/ActiveSync based option to keep your mails, contacts and calendars lined up nicely on your iPhone and iPod Touch. I succeeded in setting this up on my iPod Touch 2G as per their instructions, but when I tried to configure which of my calendars were to be synced by going to with the Mobile Safari browser, it told me that “Google Sync is not supported on your device” (well, actually in German, but never mind).
I suspect there is some user-agent filtering going on and that for some reason – even though from what I understand the iPod should be fine – it likes an iPhone better.
Mac OS X 10.6 Automator to the rescue:

Both options are from the Internet section of the Library on the left (not shown). Save this as an Application or just run it from Automator and you will get this:

This allowed me to set up the calendar on the iPod to sync more than just one Google calendar.
EDIT: Much simpler, it just did not like the German language. Switchin…

Another note on code readability

Some time back I posted a piece of code I found that was trying hard to obscure its meaning (see this post from September 2008). Today I came across this:long now = CalendarUtil.theCalendarUtil().getCalendar(new Date()).getTimeInMillis(); long milis = now - creationDate; milis = (milis < 0 ? milis * (-1) : milis); return (milis > 2 * 60 * 1000);Now, do you immediately see what’s going on here?Right – of course, you do. The method is called isInstanceTooOld(), the idea being that it should return true, if the current object was created less than two minutes ago. The constructor records the creationDate field to track that.This nicely shows that convoluted code – even intended to provide a simple function like this one – is prone to errors: This one returns true, too, if the current object is two minutes newer than the current time. The correct function looks like this:static final long MAX_AGE_THRESHOLD_MILLIS = 2L * 60 * 1000; long now = System.currentTimeMillis(); long age …

John Lloyd on Invisibility

The following video I came across by chance – listening to some podcast I was reminded about  TED, browsed through the site and found this. I really find it a great little talk (10min), so here it is:The original can be found on the TED Site (direct link).Technorati Tags: ,,,

iMac hangs at gray boot screen – solution

Today my Intel iMac (mid-2008) suffered a heavy software crash, effectively leaving me no choice but to turn it off, as the shutdown process would hang forever. I held down the power button several seconds, until it went off.Unfortunately getting it back up was not that easy. I would hear the startup chime, but after that the screen would just hang, completely gray. I could hear the CD in the drive spin up and down again after a few moments. Keeping the mouse button pressed, the option key down etc. – all sorts of tips you get on the Internet – did not work.First I suspected the stuck CD was the problem. The Intel iMacs do not have an emergency eject hole for the slot in drive, though. Looking for a solution to my problem, I searched for all sorts of keywords I could come up with related to an emergency eject, but to no avail. All the tips and hints you get – including those on Apple’s site – relate to older models that still had such a hole for a paper clip.After a while I remembered…

Reducing Mac screen brightness even further

While I generally love my iMac, one thing I always hated from the first day was the insufficient range within which you can regulate the screen brightness. Especially at night when the surroundings are dark, even the lowest setting is still too bright and both illuminates the whole room and also hurts the eyes after a while. Today I found a simple tool with the even simpler name Brightness Control that allows you to tune down the screen backlight brightness in a much wider range than the built-in Mac OS brightness control. Unfortunately you cannot have it disappear completely - its icon will stay in the dock while running - but this a small price for the added comfort.

Eclipse: ClassFile cannot be cast to ICompilationUnit

Today, checking out from the repository, I got this error message from Eclipse:org.eclipse.jdt.internal.core.ClassFile cannot be cast to org.eclipse.jdt.core.ICompilationUnit To save anybody getting the same message from wondering and poking around what it means, here is the simple reason. A colleague had accidentally checked in a .class file in a source folder, causing my Eclipse to try and process (compile) this presumed Java source file. Deleting it from disk made the problem go away. Thinking about installing a pre-commit hook on the repository server to prevent this from happening again.

myTexts with Keymote – a nice combo

Some time ago I wrote about Using Pages ‘09 in “WriteRoom” Mode, but since then I found myTexts from MOApp Software and bought it. I like the idea of having a document storage inside the application without having to worry about file handling – which is one of those things I do not want to think about while writing.However, the (intentionally) spartan design of pure writing applications like this has a slight drawback: In order to activate certain functions you either have to take your hands away from the keyboard to grab a mouse, or learn the keyboard shortcuts. Usually I am a very keyboard centric person, but just yesterday I found Keymote, a universal Mac remote for the iPhone/iPod Touch from icedcocoa which made my life even easier.It has got itsfairshare of (most favorable) coverage already, but I think this little program is still worth another positive mention. For me, this is what an iPhone application should be like. It offers clearly defined and useful functionality while at…

Bud Spencer Gedächtnislache

Just stumbled across an old Bud Spender movie snippet and got here per related links:This is the German dubbing voice of Bud Spencer (and a few others as well: John Rhys-Davies, Charles Bronson, Oliver Reed, etc.) and I just *love* the laughing right at the beginning...Just GREAT!

iPod Touch 2G requires charger adapter

I know this has been blogged before, but I feel so strongly about it, I need to post my own rant as well.Apple for some obscure reason decided to change the layout of the dock connectors charging pins between the iPod Touch and its 2G successor. The same fate also hits iPhone 3G and 3GS. The older models used the FireWire portion of the dock connector to charge the devices battery. Many accessories, including Apple’s own hifi adapter kit and most car-connectors are now useless in terms of battery recharge, because the new models only access “USB electrons”. I guess we can call us fortunate that we don’t need a Linux kernel module in our cars to keep charging while driving.  This is really annoying, because before the new device I would just plug the iPod in when I got into the car, listened to podcasts while commuting and could leave with a fully recharged device when I arrived. Now they seriously ask me to pay €25 ($35) for an adapter that will a) provide a cross-over of the power pi…

Modularizing Software with Ant/Ivy and Eclipse

This is one of the rare times when you get the chance to some technical cleanup and rewrite time from management, so we are trying to get some new things going that were pushed time and again in the past. In the architecture meetings we have been telling ourselves that we’d have to modularize better, so more unit tests could be written and overall quality be improved. Instead for lack of time we had to add new features to an already overloaded codebase and cross our fingers that nothing would go truly wrong in production. So far we have been very lucky.Having some time now for cleanup and refactoring we quickly came to think about the build process – currently a large pile of Ant scripts, resembling a full blown software project in its own right regarding the complexity. I asked around on StackOverflow for experiences and best practices. I got some interesting answers, including recommendations for using OSGi and maven. I have some experience with OSGi from a previous project, and I t…

Domain Hassles - Part 2

I am almost done with the domain changes to this blog. It is currently reachable via which is what you should already be seeing in the address bar right now. The domain is working partially, I guess some DNS updates have not propagated to everywhere yet. It should redirect to the .com immediately, however currently it still seems to have the CNAME to Blogger in place. This should only be a matter of hours now. Mail is configured for both domains and seems to work just fine. During the whole change process I had to contact DomainFactory's support for some tips on which contract types would give me the features I wanted at the minimum possible cost, and even though it was on Sunday I got a (sensible human-written) response within 5 hours. Pretty impressive. Their web interface is clean and understandable, very nice as well. And the pricing is really affordable: I now have 2 domains in the MyMail package which is 6.60€/year per domain + the …

Using Pages ‘09 in “WriteRoom” Mode

As I am currently in the process of writing a book, I am always on the look for a better way to write stuff down. While the publisher wants to have OpenOffice or Microsoft Word files, I am not perfectly happy with writing in either OpenOffice or NeoOffice. They both seem to bloated and full of stuff, all the time taking my attention away from just pure writing.When looking for a simple note taking tool for OS X I came across a recommendation for WriteRoom, even though it is not a note taking tool per se. Turns out this is the most useful – and also simple – piece of software I have seen in a long time when it comes to getting the one task it was designed for done right: Write and don’t let anything distract you. This is how it’s done in WriteRoom; a fixed font display in a retro-looking green on an all-black background in fullscreen mode:
While at first I was a little skeptical I have come to love it. My iMac screen is not set to a very high brightness by default - but even when I …


I just whipped through the ordering process for with DomainFactory. From ordering to having the domain online and reachable (at least for me) it took less than 30 minutes, including automated SMS message for activation, setting up mailboxes and configuring the CNAME to point to the blog.I am impressed. Now I will try and test this a little more, before maybe migrating the rest of my domains to them as well…

1&1 Domain Hassles

Earlier this week I (again) thought about changing my Blogger settings to use my own domain - in the end what is it good for to pay every year for my custom domain only to have it forwarded to the one-of-many subdomains.So - having pushed this for in fact several months now - I finally went to the Dashboard and looked up the instructions on how to configure my own domain name - turns out you need to set up a CNAME and point it to a Blogger subdomain.Unfortunately my (then) current 1&1 contract did not allow DNS customization - I could just set up an HTTP redirect which I had been using all along. This is when the fun began...First I tried to find a way to somehow upgrade my contract from within their "control-center" to no avail. I did find - via their homepage - the homepage hosting offerings, however there did not seem to be a way of telling them I already had the domain in a running contract.So I contacted their support team and was to…

Added Twitter Widget because of Windows 7

I just added a slightly customized Twitter widget to the blog. The title might be a little misleading, as of course Windows 7 does not have anything to do with this directly. Actually I am waiting for the release candidate to finish downloading, so in the meantime I am browsing the web for some stuff - partly in research for the book, but partly for fun as well.This is when I came across the blogger widget and found the default one a little to ... well ... default.The Windows download did not work in Safari 4.0.1 - I had to switch to Firefox as there is no IE available on the Mac. Somehow Safari would not go past the Live login and show a green progress indicator. Firefox 3.5 is now happily downloading the image using a download manager Java applet. Somewhat strange considering it's from Microsoft.Once the download is complete I will try and set up a virtual machine with Windows 7 (is this going to be the final product name? I certainly like it more than "Vista"). Hopefu…

Twittering @dschneller

For quite some time I have successfully ignored Twitter and regarded it as just another form of celebrities promoting themselves (probably through the same PR companies also writing their blogs for them) and random people yelling the state of their digestion into the world.However when I heard the good folks of the BitsUndSo podcast talk about it all the time, I decided to get an account (@dschneller) and have a closer look - and I have to say, I was wrong!Of course, there are the types I mentioned above, but I quickly learned there are lots of interesting bits of information flying around. I just started by following the JavaPosse, the BitsUndSo members, Scott Hanselman and a few others and very soon got interesting (and of course irrelevant as well) tweets to read.Since then I tried out several Twitter clients, but so far I stuck with TweetDeck, because I like the display very much - this and the fact that there is an iPhone version as well. Yes, sometimes that latter one still cras…

iPod with OS 3.0

Being a good Apple customer I of course updated my 1st generation iPod Touch to the latest version of the OS (3.0) made available a few days ago. So far I like the changes very much and will not go into detail about what changed - there are lots of other sites covering things like that.Nevertheless I wanted to comment on two things in particular, both part of the music player component.The first one is the multi-speed scrubber. The iPod was my first Apple product and I was eager to find out if the often praised UI designers were really as good as people claimed. I almost immediately got very disappointed with the support for long contents like audiobooks or even some podcasts, because the scrubber control to skip ahead or go back to a specific point in time in the program was unusable for anything longer then maybe 5 minutes. In an audiobook the precision would sometimes only be enough to jump in 30 minute hops - unusable.When I got a feedback form some time later I complained about t…

Trying a new Blog Editor - Ecto

I am fairly busy at the moment, apart from my day job I have taken on writing a book in February; this is why it's gotten somewhat silent here lately.Nevertheless I just stumbled across "Ecto", a blog editor for Mac OS X that people claim has the potential of replacing Windows Live Writer which have up to now used with VMware Fusion as the tool of choice.
Booting up the virtual Vista however is something I'd like to avoid, so from time to time I have a look around what's new. MarsEdit did not work for me and the Blogger web-based editor is for emergencies only.I just downloaded the Ecto 21 day trial and will attempt to blog some things in this time to make up my mind. I have not even looked at the price yet to keep this from influencing my decision.

User Interface (Fun)

Just found this. This is absolutely hilarious (and so true...):Even without knowing a single word of Japanese you can tell the annoyance :)

CVS Performance: I/O Bottleneck because of locks

Today we found the reason for our sometimes abysmal CVS performance, even though the repository is located on a fast SAN: Locks were written to the local disks rather than the SAN. For years we have been using CVS as our internal version control system. The repository has grown to about 20GB and covers 6 years of code and resources in several hundred thousand files and their history revisions. Some time ago we migrated the repository data from an internal disk subsystem to a SAN based on 15k hard drives. The server is a Dual Xeon HP box with 4GB of RAM serving about 50 users.Even though we thought we had a decently fast setup here, sometimes – especially when more than 10 or 15 people started to checkout or synchronize their Eclipse workspaces – performance would start to really degrade. In some cases working on branches only was possible after increasing the client timeouts to 3 minutes!Our datacenter administrators provided us with I/O statistics in which we recently realized (don’t…

Folder Action: Strip Subversion .svn metadata

I regularly need to send a zipped copy of a folder that is a local Subversion working copy. Every time I create the archive I end up with a file that’s larger than needed, because it contains the hidden Subversion metadata “.svn” subfolders.Here is quickly hacked together AppleScript than delegates the actual work to the Unix “find” command, but can be attached as a Folder Action. I now have folder on my Desktop called “Strip SVN Metadata” and I just Option-Drag anything from a Subversion working copy there (making a copy, not moving) and a few seconds later I can just zip it from there without the .svn folders.on adding folder items to this_folder after receiving added_items tell application "Finder" set fold_name to the name of this_folder try repeat with i from 1 to number of items in added_items set new_item to item i of added_items set the item_path to the quoted form of the POSIX path of new_item …

Solved problem: Access Mac OS X SMB Shares from Vista – no more System Error 1326

Today I tried to map a network drive to a folder shared via SMB from Mac OS X. I enabled sharing in System Preferences and set up the user account appropriately. But whenever trying to connect from Vista, I ended up with “Systemfehler 1326” (“System error 1326 has occurred. Logon failure: unknown user name or bad password”) complaining about invalid username or password.First I suspected a problem with my longish password that contains special characters, but that was not it. Turns out it is a compatibility problem/feature between the Samba configuration in OS X (the component responsible for sharing folders via the SMB protocol) and Vista’s default security settings.First a solution for the impatient:On Vista launch regedit.exe and navigate to “HKLM/SYSTEM/CurrentControlSet/Control/Lsa”. Check the value of “LmCompatibilityLevel” and set it to 1 – it defaults to 3.For a list of settings for this key, see Microsoft Knowledge Base Entry 239869On my system I did not have to reboot, I cou…

Funny error with Java’s extended for-loop

Java 5 introduced the enhanced for-loop – or for-each loop – which simplifies iterating over many types of collections. Have a look at this simple piece of code and tell me what’s wrong:package; import java.util.HashSet; import java.util.Set; public class Demo { public static void main(String[] args) { Set set = new HashSet(); set.add("Value 1"); set.add("Value 2"); set.add("Value 3"); set.add("Value 4"); set.add("Value 5"); synchronized (set) { for (String tEntry : set) { if (tEntry.endsWith("3")) { System.out.println("3 has to go"); set.remove(tEntry); } else { System.out.println(tEntry + " may stay"); } } } } }When I wrote this I naively expected something like this to be written out(the order of the iteration is undefined for a HashSet, but bear with me:Value 5 may stay
Value 2 may stay
3 has to go
Value 4…

Disable drop shadow on OS X screen shots

Recently I found myself doing numerous screenshots on OS X. While the drop-shadow effect that gets included in the resulting PNG files looks nice on screen, it tends to come out rather bad on black and white printouts. As there is no GUI setting for this one has to use the "defaults" command on a terminal:defaults write disable-shadow -bool true killall SystemUIServerInstead of killing the SystemUIServer process you could also log out and back in. To restore the shadow, just delete this property again:defaults delete disable-shadow killall SystemUIServerOh, and just in case you did not know: These are the keyboard shortcuts to take screen shots in the first place:Fullscreen: Shift-Cmd-3 Rahmen: Shift-Cmd-4 Fenster: Shift-Cmd-4, Space Technorati Tags: ,

eRCP/eSWT: Windows CE and Win32 (XP): Different Keyboard Event Handling

When developing GUIs with Swing in Java I often swear about event handling, because it sometimes slightly differs from what the underlying platform would do. However when using SWT/eSWT and getting the native behaviors there are also gotchas waiting...In our Eclipse Embedded Rich Client Platform (eRCP) based mobile application we want to allow keyboard as well as touch-screen access. In order to do so we attach a KeyListener to the buttons that handle the assigned shortcut bindings in addition to a SelectionListener to respond to clicks.Another feature request called for the possibility to trigger a button by moving the focus to it with the keyboard and then hitting enter.During development we usually work with the eSWT implementation for Win32. Because by default pressing enter does not do anything on a button, we add another KeyListener to respond to the return key. This usually works flawlessly. However on the mobile device we had trouble with button actions being triggered twice, …

Prefer plain-text message display in Apple Mail

If a received mail contains a plain-text part I prefer Mail to display that instead of the often more “stylish” HTML or Rich-Text parts. While this cannot be configured via the GUI, it can be from the command line.This is a reminder post for myself and anyone who might be interested.Turn on:defaults write PreferPlainText -bool TRUETurn off:defaults delete should be closed while you do this.Technorati Tags: ,,,,

Windows CE 5 Batch File Caveats

If you find yourself in the unlucky position to have to write some batch files for the Windows CE5 version of cmd.exe (called Pocket CMD v 5.0) you might be interested in these peculiarities I stumbled across today:IF EXIST foldername GOTO labelThis will not tell you for real if a folder called "foldername" exists and jump to "label" if it does. Instead, this will always fail and never jump to the designated target label. You can try this yourself withIF NOT EXIST \WINDOWS ECHO "I have no OS"If this output were true, I'd wonder where the Pocket CMD that had issued the command came from.You need to check for a file contained in that folder with IF EXISTS, which will work fine. If you do not know a file name to check for - for example if you want to check if a removable storage card is inserted, you can check for the "nul" file which will always exist on a FAT formatted drive, according to Microsoft Knowledge Base Entry #65994IF ERRORLEVEL 10 …

Launch Mac application / AppleScript by keyboard

In the comments to my recent post about full keyboard access to Mac OS X GUI controls “christian” asks about a way to open a new Finder window regardless of the front application. I understand his need, on Windows you just hit Windows+E anywhere and get a new Explorer window.So far I have worked around this when I needed a Finder window by first hitting F19 which I bound to Exposé’s Show Desktop option and then clicking on the desktop. This enabled the finder and allows the Cmd-N hotkey to work.However being able to just bring up a new Finder window from anywhere would of course be preferable. I first tried through the keyboard system preferences, however even though you can bind new keyboard shortcuts to any menu item by name. Because the application you target usually needs to focused this would not be of much help. There is a “Any application” setting, but this seems to work for a few people if any. I have not managed to get it right.In Apple’s AppleScript documentation there is an…

Migrate VM from VirtualBox to VMware Fusion

For some time I have been using VirtualBox to run the few Windows applications I still need. While being generally very usable there were still some issues with networking, sharing folders and sometimes the VM would crash when shutting down the guest OS.Yesterday I decided to give VMware Fusion a chance. I downloaded and installed the trial version. Because I did not want to reinstall Vista and go through the whole update story again I looked for a way to reuse the existing VirtualBox VM. Unfortunately VMware cannot open the VDI files directly.There are some How-To’s on the web which usually include some trickery with Linux or at least involve several steps, but all those seemed a little too much hassle for me and I kept looking for an easier way.Turns out, VMware themselves offer the solution for free: Fusion’s main menu bar includes a “Migrate your PC…” option that will just open browser and take you to you can first ha…

Mac OS X – Full Keyboard Control

As a long time Windows user I still have some trouble finding my way around Mac OS X Leopard without resorting to the mouse all the time. I am a “keyboard person” and like to keep my hands right before me instead of constantly reaching for the mouse.When I started to use Mac OS I believed it would simply be a matter of practice and learning some new key combinations until I could work as mouselessly as before.Since August I have gotten much more fluent with the keyboard alone, but something that bothered me ever since was that not every button, tab, slider etc. could be focused with the TAB key or activated using some mnemonic – as is normal in virtually every Windows application, especially Microsoft’s own ones.On the Mac the focus would only jump between various text controls and not to buttons and the like. I started to believe that the Apple idea of “keep things simple and define a default that’s good for 90% of the people” without a chance for the remaining 10% to have things the…