Archive for the 'code' Category

Debugging PHP on Mac OS X

December 26th, 2008 by Alexander Kirk | Comments Comments Off

I have been using Mac OS X as my primary operating system for a few years now, and only today I have found a very neat way to debug PHP code, like it is common for application code (i.e. stepping through code for debugging purposes). The solution is a combination of Xdebug and MacGDBp. I [...]

Website Optimization, a book by Andrew B. King

August 21st, 2008 by Alexander Kirk | Comments 1 Comment »

Upgrade WordPress Script

July 15th, 2008 by Alexander Kirk | Comments Comments Off

Whenever a new version of WordPress comes out (as just WordPress 2.6 did), it is somewhat of a pain to upgrade it. But not for me anymore, because I have created a small (and simple) script some versions ago which I would like to share with you. $ cat upgrade_wordpress.sh wget http://www.wordpress.org/latest.tar.gz mv www wordpress [...]

bash completion for the pear command

May 21st, 2008 by Alexander Kirk | Comments Comments Off

I am only scratching my own itch here, but maybe someone can use it or expand from it. I just always found annoying that pear run-tests tab gives all files instead of just *.phpt. This is what this snippet actually does. Paste this into the file /opt/local/etc/bash_completion on OSX (for me it is just before [...]

High Performance Web Sites, a book by Steve Souders

September 26th, 2007 by Alexander Kirk | Comments 6 Comments »

I'd like to introduce you to this great book by Steve Souders. There already have been several reports on the Internet about it, for example on the Yahoo Developers Blog. There is also a video of Steve Souders talking about the book. The book is structured into 14 rules, which, when applied properly, can vastly [...]

Subversion: The Magic of Merging

October 12th, 2006 by Alexander Kirk | Comments Comments Off

Use svn merge -rhead:{date} to go back in time with a file

JavaScript Tricks And Good Programming Style

August 9th, 2006 by Alexander Kirk | Comments 42 Comments »

Note that this is an updated version. Original version can be found here. Thanks to the commenters I have updated this post with some better tricks. In a loose series I'd like to point out a few of them. As I am currently mostly programming in JavaScript, I will write most of my samples in [...]

JavaScript Tricks And Good Programming Style -- Original Version

August 8th, 2006 by Alexander Kirk | Comments Comments Off

Note that there is an updated version I have been programming for about 10 years now, and I am always longing for improving my code. Throughout time I added a few habbits that I consider to be good practices and increase the quality of my code. In a loose series I'd like to point out [...]

Firefox 1.5, XmlHttpRequest, req.responseXML and document.domain

July 27th, 2006 by Alexander Kirk | Comments 3 Comments »

Recently I have been working on a web application, extending it with an iframe on another subdomain. When you set up communication with an iframe on another subdomain, it works by setting document.domain in both pages. Pretty nice and straight forward. But it can mess up the rest of your page. As soon as you [...]

Misuse of the Array Object in JavaScript

May 18th, 2006 by Alexander Kirk | Comments 4 Comments »

There is a very good post about Associative Arrays considered harmful by Andrew Dupont. The title is a bit misleading but correct. When coming accross a piece of JavaScript like this foo["test"] = 1; there is nothing wrong about it. It's the basic usage scheme of assoziative arrays. Or should i rather say objects? While [...]

Welcome naked!

April 5th, 2006 by Alexander Kirk | Comments Comments Off

Today is CSS Naked Day. Take this chance to visit my site in person (= with your browser). Looking quite okay naked, too ;) css naked day, css

A better understanding of JavaScript

March 2nd, 2006 by Alexander Kirk | Comments 3 Comments »

I've been working with JavaScript for years. It was my replacement for a server side language when I couldn't afford to buy web space in the mid-90's. Still, as the language becomes popular again, I recognized that I did understand the basics but there was much more to the language. digg it, add to delicious [...]