Category Archives: Development

gallery-script created

I store the images from my digital camera on a local machine at home. But retrieving images is a somewhat painfull thing for everyone else than myself (that is: especially my better half (-; ).

So after some research I didn’t find something that met my requirements

  • easy
  • reads from folders
  • runs with PHP
  • allows to select images for later batch-download
  • batch download for the selected stuff

So I created a small application to display images from existing folders without the need to import stuff manually.

To use the script you need a current Zend-Framework installed in your phps include_path.

The script can be found at Github

Barcamp Darmstadt

This weekend I will be attending my first BarCamp ever!

On the 20th and 21th of November Darmstadt hosts the second BarCamp at the Rhine-Main-Region. And I will be one of the about 300 people attending.

And to make that BarCamp more interesting to the PHP-Community, we try to coordinate a complete track on PHP-related sessions. Being a novice to the BarCamp I want to give a session and choose to introduce Zend_Form as it is one of the components of the ZendFramework that makes my life as Developer easier every day.

So let’s see what the weekend brings!

Social and Ethical Responsibilities

This morning I was attending Zeev Suraskis keynote at the International PHPConference in Mainz/Germany.

He spoke not so much about PHP or new technologies but what happens when technology fails. He gave us an insight into the things that happened around his last holiday in the south of Italy starting with a lost Internet-connection through a malfunctioning lens, a dead GPS-Display and his troubles getting mobile internet-access up to the dead fridge back home.

Besides the strange accumulation of bad luck it again showed me how much we depend on technology.
Continue reading Social and Ethical Responsibilities

Valid Syntax errors: Part 1

It took me about an hour to spot a strange behaviour in my PHP skript:

Have a look at this code:

$foo = array ( 'a', 'b', 'c' );
foreach ( $foo as $bar );
    echo $bar . "\n";
// Expected Output:
// a
// b
// c
// Actual Output: 
// c

What happened?

Would I have used phpcs it would have been obvious. I used a semicolon instead of a bracket after the foreach statement.

So instead of calling the echo command with each iteration the foreach silently iterated through $foo and assigned $bar on each iteration. That left $bar with the last value of the array that gave the strange output.

I can not actually remember whether there had been closing brackets but I did not get an Error regarding that.

phpcs would have detected the missing brackets — if that would be observed by the used sniff.

More on phpcs later.