Monthly Archives: March 2008

S5 – A Browser-based Slideshow System

You can not consider yourself a geek if you do presentations with PowerPoint! Here is a very nice alternative: S5 from Eric Meyer.

Build slideshows in XHTML and CSS and then just simply double-click on index.html in your favorite browser to start it. It includes all basic features you need to present your stuff (basic effects and navigation).

Screen S5

All your questions get answered at Eric’s site. Definitely check it out and never touch PowerPoint again:

Webcheck a Python Website Checker

Webcheck is a nice tool written in Python 2.4. Given a URL to a website it crawls the whole site and generates a nice HTML report.

I use it to…

  • … get the structure of a site.
  • … check if a site would index well with search engines.
  • … track down broken links.
  • … list links pointing to external sites.

You can download webcheck from Arthur de Jong’s website.

I started it this way from the commandline:

cd /var/_test/webcheck;
./ -f -o /var/_test/webcheck/report;

You can get help and find out about further options by typing:

./ --help

Profiling your App with XDebug and KCacheGrind

If profiling of applications is something you already heard of but never played with, here is what I learned from starting to dig into this topic:

(1) Install XDebug (if dou do not already have it on your Dev-System). If not, please refert to the XDebug-Docs. The procedure is very well documented there. I used the pecl installer.

(2) I added this content to my php.ini files (for Apache2 and CLI). In the “Switch profiling”- and “Switch tracing”-sections you can comment the lines “xdebug.profiler_enable = 1/0″ and “xdebug.auto_trace = 1/0″ in or out. If you leave profiling and/or tracing on, it will significantly slow down all PHP execution on your server and generate many large cachegrind-files. It is not wise to leave it on if you do not need to profile or trace!

If I decide to do profiling, I switch it on, do my script executions to be profiled, which produces the required cachegrind-files and then I switch it off again. Remember you have to restart Apache2 after each change to your php.ini in order to take effect.

Set the path to your directory where you like to get the cachegrind-files written to. I set it to ‘/var/www/__profiling_data’.

(3) Now you need a viewer. I started under Windows with the free Tool WinCacheGrind. But to be honest, I did expect something cooler… As I tried KCacheGrind, which is a free Tool for Linux I was pleased to see informative screens like the following:

KCacheGrind Screen 1 KCacheGrind Screen 2

For those of you who do not know how to use Linux Apps… On Debian do “apt-get install kcachegrind” and once it is installed, type “kcachegrind &” on a console after logging in in the GUI-interface of Linux.

I was surprised at which points my scripts spent their time. Check the XDebug-Docs for more information on what you acually can read from the profiledata.

Happy profiling!

Relax, watch amazing images

When you do a lot of concentrated work (if you are privileged to be in an environment where this is possible), it is good to do something completely different at times. I discovered that when I switch my mindset to someting else more relaxing like leafing through impesssing images, some of the previously unanswered questions get solved automatically in my brain and what is more – it has a relaxing effect on me too.

This phenomenon led me to discover ‘Photoblogs’. Here is a source:

Some Links (just click the previous-buttons on those pages):

Useful Linux Commands 03/2008

grep -R "<rec_lang>de</rec_lang>" /var/repository/000/023/*
Show all files that contain a the string <rec_lang>de</rec_lang>

find . -name '*.php' | xargs perl -pi -e 's/this->type/this->beanType/g'
Find the string ‘this->type’ and replace it with ‘this->beanType’ in all *.php-files in and under the current working directory. Thanks to Darren and Reto!

Getting Real – Lessons in WebApplication Development

“37signals used the unconventional Getting Real process to launch five successful web-based applications (Basecamp, Campfire, Backpack, Writeboard, Ta-da List), and Ruby on Rails, an open-source web application framework, in just two years with no funding, no debt, and only 7 people.”

From the book you learn how they are working. Make also sure to check out their great web-applications.

Getting Real Book