Category Archives: Development

Development

Unit testing in PHP with SimpleTest

simpletest-logo

I recently worked on a PHP project which required me to write a suite of unit tests to verify that the code worked as expected. While I’ve done unit testing before, and I knew that it was valuable, I have to admit that I’ve only used it very rarely. I’ve only had a few jobs/projects that required it, and most other projects didn’t want to pay for the extra time. [...]

Posted in Development | Tagged , , , , , , , , , , | 2 Comments

Atlanta PHP

Tomorrow night, I will be attending the April Atlanta PHP meeting. My friend Glen Gordon will be giving a presentation titled, “I’m a PHP dev! Why should I care about Microsoft?

There are a host of technologies and tools from Microsoft that can add value to your PHP solutions, save you time, and are just plain cool. [...]

Also posted in Community, Operating Systems, Servers, Tech, WordPress | Tagged , , , , , , , , , , , | 2 Comments

Internet Explorer 8: Progress!

It seems that Microsoft has reversed their previous decision to make Internet Explorer 8 crippled by default. They will be enabling the standards compliant mode by default in IE8, and webmasters will have to use the X-UA-Compatible header to force it into IE7 mode, for sites that can’t be updated immediately. Huzzah for progress!

And on that note, I’ll mention that Internet Explorer 8 Beta 1 is available for download. [...]

Also posted in Browsers, CSS, Community, Design, Standards, Tech, Web Design | Tagged , , , , , , , , , | 6 Comments

Internet Explorer 8: This is progress?

Internet Explorer 8 passes the Acid2 test. Huzzah!

But waitaminnit… What’s this stuff about forward compatibility by adding some new X-UA-Compatible header to my pages or my server? Am I reading this right? Are you telling me that in order for IE8 to use its fully compliant rendering, we have to add something new to our pages? And that if we don’t, it will fall back to rendering pages just like IE7? Is that what this means?

That’s just dumb.

Screw their stupid “don’t break the web” motto. [...]

Also posted in Browsers, CSS, Community, Design, Standards, Tech, Web Design | Tagged , , , , , , , , , , , , | 16 Comments

14+ Awesome WordPress-powered sites

[A screenshot of welovewp.com]

WeLoveWP.com highlights great looking WordPress sites, and it’s powered by WordPress, too!

From time to time, someone will hear that I’m involved with WordPress, and ask me a few questions about it. Some people already have a WordPress-powered site (either self-hosted, or on wordpress.com), and some have never actually used it, but they’ve heard of it. [...]

Also posted in Design, Web Design, WordPress | Tagged , , , , , | 132 Comments

Perl geekery: building hashes

Say we’re writing a program in Perl, and we need to pass a lot of data back and forth between subroutines. Using global variables is bad practice, and we often use the slightly-less-bad method of passing around a big hash variable. But it’s a pain to always use the values in the hash, so a lot of our code uses individual scalar variables, and stick them into (and pull them out of) the hash as needed. But when you have a lot of values to move around, it’s a pain in the neck. You don’t want a big, ugly block of code like this:


#...assume that we declared %hash,
#   $foo, $bar, $baz, etc previously...
$hash{'foo'} = $foo;
$hash{'bar'} = $bar;
$hash{'baz'} = $baz;
# ...ad nauseum...

Surely, there’s a more elegant way to do this, right? Of course there is. [...]

Also posted in Tech | Tagged , | 4 Comments

Using the WordPress Object Cache

I’ve been planning to write up a plugin to serve as an example of using the WordPress Object Cache, but haven’t had time to finish it up. However, this topic came up on the wp-hackers mailing list recently, so I thought that I would go ahead and give a brief rundown on how to use the cache from within your own plugins.

The goal of the WordPress Object Cache is to provide a way to persistently store results from expensive queries in an external cache file. [...]

Also posted in Plugins, WordPress | Tagged , , , , | 17 Comments

A Software Development Analogy

Alice takes her car to a repair shop on Monday. She walks inside and talks to Bob, the customer service representative behind the counter. “My car seems to work pretty well, but occassionally it makes an odd noise. When can you have it fixed, and how much will it cost?”

Bob smiles and replies, “we can have your car ready by noon on Friday, and it will cost $200.” Alice says that this is acceptable, and leaves her car to be worked on.

On Wednesday afternoon, Bob talks to Charlie, the mechanic. “How are you progressing on Miss Alice’s repairs?” Charlie gives Bob a blank look.

“I gave it a quick look yesterday, but I haven’t even started working on her car. [...]

Also posted in Tech, Work | Tagged | 7 Comments