Embrace Your Geekness

Somebody has deemed today Embrace Your Geekness Day. So what better way to celebrate than post to my blog.

I searched around for information about the origins of this holiday, but found nothing other than lists of other obscure days (July 15th is Respect Canada Day!). How does one get a day proclaimed anyway? There are some openings left; one calendar I looked at had the 29th and 31st of this month still open. How about a Wear Flip-Flops to Work Day? (Googling for that came up with a single hit.)

Belated Happy Birthday

The July 4th New Yorker cover was classic:

New Yorker   July 4 2005  Small

Scrumptions Muffins

From a cookbook by the Ladies Auxillary of some hospital in Rhode Island:

Scrumptions Muffins

1 cup softened vanilla ice cream 1 cup sifted self-rising flour

Mix well. Pour into a muffin tin lined with paper cups, about 3/4 full. Bake at 350 F for 20 min.

You know you want to make them. I know I will.

Update: Made them. I had to improvise a bit, as I didn’t have self-rising flour. I added about 1/2 tsp. of baking powder instead. They were pretty bad. Very dense. Must have been the flour.

Always check your logs

Brad’s #1 rule of debugging web apps: always check your log files. All of them.

A friend of mine just ran into a problem where a php file upload script that had been working fine for months suddenly started barfing on large files. He was getting a “partial upload” error. I told him to check his web server error logs and his system message log. He did the former, and after hours of pounding his head against the wall, I finally went in and poked around myself. I actually found the problem before looking in the log files, but there it was in /var/log/messages:

Jul 7 15:27:42 xxxx /kernel: pid 46891 (httpd), uid 80 on /var: file system full
Jul 7 15:30:02 xxxx /kernel: pid 46875 (httpd), uid 80 on /var: file system full
Jul 7 15:49:07 xxxx /kernel: pid 46872 (httpd), uid 80 on /var: file system full

The temp directory that php was using for file uploads was /var/tmp, and /var only had 216K left. This is why small file uploads were working, but larger ones weren’t. (As an aside, be careful of what you’re storing in /var. On some systems, log files are kept in /var/log, and /var is often set up as a separate partition, and often relatively small at that. In his case, the whole partition was only 252M, and /var/log was eating up 195M of that…and growing. We moved /var/log to /usr/var/log and created a symlink.)