... and their answer to everything

Archive for Michael Zoech

Improve Samsung Galaxy S performance with Voodoo

posted on 2011-01-23, author: Michael Zoech

The Samsung Galaxy S is still one of the best phones out there for Android. Lightweight, great colors, no judders like other phones in the same price range. But there is still one problem with the stock Samsung firmware. Laggy applications when compared to other phones. The problem is known, the filesystem access is really slow compared to e.g. a Nexus One. I first noticed this while developing an application and writing some debug information to the filesystem on each app start. While the startup time on a Nexus One or a Galaxy Tab was somewhere between 2 to 4 seconds, it took around 8-10 seconds for the SGS to get up and running.

But not any longer, Open Source to the rescue. The people behind Project Voodoo have a fix by converting the proprietary RFS filesystem found on stock SGS to Ext4. To compare the performance of stock and voodo i have used a free app called Quadrant Standard Edition.

Stock 2.2 BenchmarkVoodoo Benchmark

On the left side you see the performance of the stock firmware, while on the right side the voodoo lagfix has been applied. While the benchmark not only tests filesystem performance, the result jumped from 970 to 1510 points. An increase by 55 percent simply by converting the filesystem. The result is noticeable, laggy apps now appear much faster. The best example would be the new Android Market app. The UI feels snappy and no noticeable lags that happened with the stock firmware.

tag: android

DirectX 10 and CUDA in C#

posted on 2009-04-27, author: Michael Zoech

I’m currently evaluating the possibilities to use DirectX 10 and CUDA from C# for a realtime visualization project. The official CUDA sdk contains many samples written in Cpp, but i couldn’t find one sample in the whole web written in C#. So i ported one of the CUDA sdk samples using SlimDX for DirectX 10 and CUDA.NET to access the CUDA functionality. Grab the source here.

More Eclipse Shortcuts You Should Know

posted on 2008-09-17, author: Michael Zoech

There is an excellent post about Eclipse navigation shortcuts at 10 Eclipse Navigation Shortcuts Every Java Programmer Should Know. Since this post only looks at navigation shortcuts, i thought i post some of my favourite Eclipse shortcuts i use every time in Eclipse to boost my productivity.

Look at next/previous error in current file

Use Ctrl + . or Ctrl + , to cycle through the errors in the current file. This marks the next or previous error. Hitting F2 shows the error description and the quick-fix menu. This is much faster than using the mouse to locate the error, float over and wait for the description to pop up. Note, this works for warnings too.

Error Description and Quickfix

Quick-Fix menu

The quick-fix menu provides you with the appropriate refactoring options for the current cursor position. This lets you add imports (see picture above), add unimplemented methods, extract marked expressions to local variables, … . Hit Ctrl + 1 to get it.

Show quickfix for unimplemented methods

Show quickfix extract to ...

Run jUnit tests of current file

Hitting Shift + Alt X T runs the jUnit tests found in the current file. Use Shift + Alt D T if you want to debug-run the tests.

Rerun jUnit Test

I often find myself in the need to run the same jUnit tests again and again. The jUnit plugin provides the ReRun Test button, i think i have hit a million times now.

ReRun JUnit Test Button

Luckily you can create a shortcut binding for this. Go to Window -> Preferences -> General -> Editors -> Keys and setup an appropriate binding. I have bound this command to Ctrl + Alt R R. This makes it really easy to write tests, jump back and forth to the production code and rerun the same test files over and over again.

Surrounding code parts with try-catch, if, for, …

Surrounding already existing code with something like a try-catch block or a for loop is often tedious and error-prone. Not any longer. Mark the code you want to move inside the block or loop, hit Shift + Alt Z and select the type of surrounding block.


Selected expression Integer.parseInt(input);


Expression surrounded by try-catch block

Rename variable, method, class, …

Hitting Shift + Alt + R lets you rename a variable, method or class name at the current cursor position. The renaming happens not only in the current file, but takes care of all references to the variable, method or class in other files of the project.

Renaming a method

Note that the renaming fixes the reference in the other method.

The Content Assist Menu

Hitting Ctrl + Space shows the Content Assist menu for the current cursor position. E.g. writing ‘‘for’’ and hitting Ctrl + Space shows the following:

Content Assist Menu

Selecting the first template (for - iterate over array) replaces the ‘‘for’’ with this:

Content Assist for

There are many predefined templates. Go to Window -> Preferences -> Java -> Editor -> Content Assist -> Templates to find out about templates and to create your own templates. My favourite one is ‘‘Test’’ for creating an empty jUnit test method.

Show all shortcuts

Shift + Ctrl + L shows a list of all shortcuts. Although i do not use this on a daily basis you may find even more interesting shortcuts there.

Show Key Asist