July, 2009

A Drupal Views "Date Trap"

Here's a oddity that caused me a bit of grief this weekend - blogged in the hope that search engine goodness will save someone else some hair pulling.

New date formats configured through the Date module aren't made available through Views immediately.

To reproduce the problem:

  1. Log onto your site as user with administration rights.
  2. Go to Administer|Site Configuration|Date and Time|Formats
  3. Add a new format type
  4. Go to Administer|Site Building|Views
  5. Edit your view of choice

Monitoring by Ear

When I was much younger, programming on my Amstrad CPC 6128, I found I was sometimes able to "debug" my programs by turning the volume up to maximum.

How to Find Stuff

At this weeks Wellington .NET user group, James asked me how I find stuff - when I need to find out how to get something done, how do I find the information I need. Here's what I told him.

Two dangerous little words

There is a common two word phrase that needs to be purged from our vocabulary.

Best Practice.

Exception Inspection

Watch $exception
Watch $exception

Here's a useful tip that I didn't know - you can use the pseudo-variable $exception in the Watch window to see the exception that's just been caught.

Performance of Dynamic

This is interesting - a side-by-side performance comparison of reflection, dynamic, and direct property access.

PhpMyAdmin and the White Screen of Death

After a recent hardware failure (*) I've been setting up a new LAMP sandbox, this time using Ubuntu 9.04 running in a virtualised environment.

Everything was going fine, but after importing a database backup into MySQL, PhpMyAdmin started misbehaving, giving a White Screen of Death after login. View source revealed an empty file.

Older Programmers

Just read an interesting article which included this comment:

There is also a belief that older programmers "lose the edge." That belief is mistaken in my opinion; older programmers may not burn as much midnight oil as younger ones, but that's not because they are old, but because they get the job done without having to stay up past midnight.
(Michi Henning, "API Design Matters", Communications of the ACM May 2009 Volume 52, Number 5)

Something to aspire to, perhaps ...

The Pragmatic Programmers have a Magazine

pragProg.png

The Pragmatic Programmer is one of the best books I've ever read - a copy of it sits on my bookshelf and it gets reread, cover to cover, every 18 months or so. Every time, I learn something new - and I'm reminded why I love my job.