As a web developer, the greater part of my job is not creating new apps, but hacking together disparate software packages into Frankensteinian amalgamations that (supposedly) work together seamlessly. This is universally a headache, as the original authors tend to write code thinking that their app is the only one that will be installed. WordPress, Vanilla, and Interspire’s Email Marketer are some of the worst offenders that I struggle with regularly.
When coding your own brilliant application, there are a few simple things you can do to avoid potential collisions and headaches later, especially if anyone else will be using your code. Here are a few areas to pay attention to. (more…)
When we redesigned hotelicopter, I had to spend a lot of time cutting up images for a bunch of buttons and boxes. I was using the now-standard Sliding Doors technique, so that we could have flexible boxes. Today, I realized that I could combine this technique with another A List Apart favorite, image sprites, so that you can have sliding doors using only one image. (more…)
So, one us pilots was trying to use Doctrine migrations to update a database on one of our servers. However, Doctrine was sternly refusing to use the correct database, as configured in the
database.yml file. As it turns out, using Symfony from the command line skips the usual route through the
/web/yourapplication.php file (e.g.
frontend.php). As a result, the environment is not properly set when reading the
database team management app.yml file, and instead the last database connection specified is used. Lame. The trick is to specify the environment from the command line, so this file (and the other config files) do what they’re supposed to:
symfony doctrine:migrate --env=staging frontend 119
where “staging” is whatever the environment is you want to use (to match the name in the
The Doctrine manual is really, really confusing in places. If you want to do something as simple as updating a record, the examples suggest that you use
Doctrine_Query::create(). This doesn’t make a lot of sense, because we only want to manipulate the model, we shouldn’t have to even look at a query. (more…)
Like a good programmer, I try to be good about unit testing More Info. And also as a good programmer, I throw errors in my PHP where appropriate. I just learned today after a bit of digging through the codebase, that SimpleTest can be told to expect an Exception (or error) to be thrown in the test. (more…)