About this site
This is the personal website of Dutch webdeveloper Harmen Janssen. You can read all about me on the About page. Browse the archive for articles on webdevelopment.
Latest articles
Move current selection to new folder with Applescript
posted on 27 May 2009 (12:33 AM)
I often want to instantly move a selection of files into a newly created folder. The scenario is this: I select a bunch of files in Finder, click a button and *bam*: a new folder is created in the current location containing my selection.
This cannot be done natively, but I wrote an Applescript that does this for me.
Quick PHP Tip: passing by reference creates array keys
posted on 29 April 2009 (06:35 PM)
Another little PHP tip that could save you a couple of debugging hours.
Quick PHP Tip: close your connection between stream_get_contents calls
posted on 22 April 2009 (10:07 PM)
Here's a quick solution to a problem I encountered which might save you some headaches.
Book review: The Pragmatic Programmer
posted on 21 March 2009 (01:41 AM)
David, my fellow nerd at Grrr, whom I highly respect as a programmer, recommended The Pragmatic Programmer as a bible for developers.
So what could I do but pick it up and give it a read?
Eliminate articles when ordering in MySQL
posted on 08 March 2009 (10:06 PM)
When generating alphabetically ordered resultsets from your tables, it may be useful to eliminate articles (the and a in the English language).
The following is a simple method of doing this.
Hello Amsterdam!
posted on 30 November 2008 (12:21 PM)
After a year of working for Dutch Internet Works, I've decided to leave Baarn and join Grrr Medialab in Amsterdam.
Guessing font availability with Javascript
posted on 13 November 2008 (09:28 PM)
Recently I wanted to use an uncommon font in a website, but the site was too image-rich to use sIFR, (loading time made for an uneasy user experience).
I decided to add the font anyway in my stylesheet, and provide a “lo-fi” experience, for people who didn’t have the font handy.
The lo-fi version however, should mimic the style of the uncommon font as good as possible.
Sometimes, though, that’s easier said than done.
Making the most of Javascript namespacing
posted on 29 October 2008 (05:33 PM)
Today's article by Robert Nyman about Javascript namespacing remembered me about my own approach, which I've been using for quite a few projects now.
If you have no clue about Javascript namespacing, go and read Robert's article. I'll wait.
Generate unique slugs in CakePHP
posted on 23 October 2008 (10:41 AM)
I believe it was Wordpress who came up with the term "slug". It has been adopted by many other systems though, and it basically means the following: a unique identifier which can be used in a URL to create a permalink to a page.
At least, that's my interpretation of it. In this article I will show you how you can generate a unique slug easily when working with the CakePHP Framework.
Focus onload but keep Backspace intact
posted on 12 September 2008 (05:26 PM)
A lot of websites try to help you by auto-focusing on an input field on pageload, so you can start typing right away.
Well, thanks so much, you guys couldn't be more helpful.
Except of course that I always use the Backspace key to move back in my history. By focusing on a form field you're essentially disabling some fundamental browser functionality.