While working on a project, I came to the conclusion that I needed to have an array of all colleges and universities within the United States. I searched around and came across this website which contained only an unordered list of universities in an HTML page. I extracted all of the information and generated an array with the university's domain name as the key.

Of course after I completed this, I realized I didn't need it. D'oh!

I was tasked with maintaining a Drupal website that had 44 views. The template.php file for the theme was unwieldy. I spun off all the views template code into another file for ease of maintenance, but it was still 1333 lines1 weighing in at 36.5kb! [1] Just four more lines and it could have been elite!

The quantity of views certainly wasn't pretty, and when I had to add in another view, I decided that enough was enough. It was time to clean it up and develop a system to help keep the views under control.

Recently, I had to make mass changes to nodes while adding a new feature to a live website.

In one case, I wanted to add a date field to a content type with hundreds of existing nodes. For the sake of simplicity, best date that could be used for this field was the created date of the node. With that information, I was able to write the following script to replace any empty date fields with the created date.