Changing the order of letters in words

Did you ever come across the finding that even if the order of letters in words is changed just slightly you will most likely be able to read the text without much problems? I think that this is so interesting that I invested a considerable amount of time writing a software that reads a text, changes the words and outputs the result. Easier said than done, this post tries to explain what I’ve been working on.

Continue reading →

Profiling with CPU-Sampler

Apple’s Xcode comes with a neat profiling tool called CPU Sampler. It helps you identifying time consuming code blocks in your software and is really handy if you need to optimize for optimal performance.

Just recently I tried rewriting OpenGL’s routines that handle matrix calculations as part of a lecture at the university. Pretty soon I came to the conclusion, that I had to optimize my code if I wanted to compete with the implementation provided by OpenGL.

This post presents at quick look at CPU Sampler which helped me making well-founded decisions resulting in a faster implementation.

Continue reading →

Building your own Fetch as Googlebot

Just recently Google announced a great feature as part of the Webmaster Tools: you can fetch your site with the Googlebot. At first I thought they would reveal what content gets extracted from the site and how they might proceed from there but they just seem to crawl your site, showing you the HTTP header fields and the site’s content.

In this post I’d like to present some Java code using the latest and greatest version of HttpClient that allows you to crawl any site, have a look at the HTTP header fields, the site’s content and measure how long it took to download the site. It’s almost the same what Google’s feature does.

The Eclipse project with the code for this post can be downloaded as tar.gz or zip. You can browse the code online here.

Continue reading →

WordPress: is_child function

Every once in a while I would like to test whether the current page is a descendant of another page. This is particularly useful if you want to display certain content on a subset of your pages only. Although the Codex suggests a similar is_tree function I would like to present an extended version here.

I’ve packaged the functionality inside a WordPress plugin called is_child that you can download here. Unzip it, upload it to wp-content/plugins and activate the plugin.

Continue reading →