After I wrote this entry, I knew I had forgotten one "gotcha" from my little Remote Scripting experience. I remembered it today. It involves PHP and the annoying aspect of having to declare within a function when you want to use a global variable:

$gSomeVariable = 5;
function somefunc() {
   printf("%d", gSomeVariable);
}

The above will not produce "5". Without explicitly telling PHP that gSomeVariable is a global variable, it will assume it is a local variable and currently undefined.

Do you know how many time this has tripped me up? The correct PHP code is:

$gSomeVariable = 5;
function somefunc() {
   global $gSomeVariable;
   printf("%d", gSomeVariable);
}

For all the times I made this mistake: AAAAAARRRRRGGGGHHHH!!!!!!!

§86 · April 23, 2005 · PHP, Software, Technology, Tips, Web · Comments Off on PHP Gotcha ·


This is just a quick entry for me to jot down some caveats that I encountered while making a simple instant messaging application for the browser using Asynchronous JavaScript, XML and PHP. Read the rest of this entry ...

§80 · April 21, 2005 · Ajax, JavaScript, PHP, Software, Technology, Tips, Web, XML · Comments Off on Ajax Gotchas ·


I thought I'd jot down some notes on what I do when designing new classes in C++ to be copyable. I'd be curious to get some feedback as I'm not sure what the C++ community at large does... Read the rest of this entry ...

§72 · March 23, 2005 · C++, Software, Technology, Tips · Comments Off on Writing Copyable C++ Classes ·


I wrote about rolling your own server logs awhile back, but it only occurred to me while at the GDC that by updating the .htaccess file I can redirect 404 errors to my own PHP document that will display the 404 error and also log when misdirections occur at my site (since the requested document is in the GET request). Read the rest of this entry ...

§67 · March 14, 2005 · PHP, Software, Technology, Tips, Web · Comments Off on Rolling Your Own Server Logs (Part Two) ·


I used to have a lot of respect for Adobe. Back in the mid-to-late 90s, Adobe FrameMaker was seriously considered a leading desktop publishing tool, Adobe Photoshop was the premiere choice for image editing, and Adobe's Acrobat Reader was a great little piece of free software (at a time when not much professional-quality software was downloadable for free). However, time has not been kind to the Acrobat Reader. Read the rest of this entry ...

§56 · March 2, 2005 · Software, Technology, Tips · Comments Off on Improving Adobe Reader ·