Bizarre Content-Type Problems

I’ve been having some really weird problems with my mime types lately, which has put a hamper on some of the RSS and standards compliance stuff I want to do here. Every document generated by PHP was being sent with a Content-Type: text/html; encoding: iso-8859-1; regardless of whatever was being specified with header in the code. I’m still not entirely clear on what fixed it, but I believe it had something to do with no default content type being specified in the php.ini file, but a default encoding specified. This confused things somewhere and it’s all resolved now. There is the default content type of text/html which works for 99% of stuff, and the overrides now work for the rest. Now I can rest easy.

H-Town Blogs New Site

I’m happy to see we have a beautiful new site designed by the wonderful Christine with the header picture by Elaine. Elaine takes great photos and you should check out the ones on her site, also the last time I was at Kaveh Kanes they had a couple of hers on display.

I just had a kinda-cool idea for the site: what if the top image rotated with different pictures that the author felt characterized Houston. For a perfect example of what I mean see Typographica, which has different headers rotate that link to the font and the designer of the header image. It occurred to me when I was looking at the site and thinking “What a nice picture of downtown” and then I noticed the street and the lamps and I started thinking of where Elaine was when she took that picture. My mind wandered to the cool pictures Christine posted the other day and how it was a totally different view of downtown. My mind continued to wander (it does that a lot) to how when people think of Houston, they tend to think of either the Rodeo or the postcard view of downtown, when in fact there is so much more than that. Anyway, just an idea.

War

In his address to Congress in 1951, Douglas MacArthur said: “I know war as few other men now living know it, and nothing to me is more revolting. I have long advocated its complete abolition, as its very destructiveness on both friend and foe has rendered it useless as a method of settling international disputes.” I’d recommend everyone read the entire thing. Hat tip: Mom.

Updated autop

Most of the scripts I offer on this site are things I’ve written myself, for myself. As part of this living site they are constantly updated and tweaked, yet sometimes I don’t update the scripts section with what’s running live here, usually because I tell myself that the code is so ugly that no one would ever want to use it. Well . . . it works. I’ve decided to put the updated autop code up for all to use. Impetus for the change came almost two months ago from Phil Ringnalda, though my implementation is pretty different from the one he suggested in his post.

Basically what the update does is make the paragraph code ‘smarter’ to deal with lines that end with block-level tags, therefore not creating extra spaces and invalidating your HTML. Try it out! I’ve left the simpler version there for people (like me in some applications) that don’t need the extra code at all.

Just Wait For The XP Version

Bill Gates is hanging out with the chairman of General Motors:

“If automotive technology had kept pace with computer technology over the past few decades,” boasts Gates, “you would now be driving a V-32 instead of a V-8, and it would have a top speed of 10,000 miles per hour. Or, you could have an economy car that weighs 30 pounds and gets a thousand miles to a gallon of gas. In either case, the sticker price of a new car would be less than $50.”

“Sure,” says the GM chairman. “But would you really want to drive a car that crashes four times a day?”

Books?!

This is crazy: I swear just minutes ago I had my books, my three Ethics books and Arabian Nights for Human Situation. Yet when I just opened my backpack they aren’t there, even while my laptop, palm, camera, and various other electronics are. I may have left the Ethics books in my car, but I had Arabian Nights for class this morning, and I haven’t been that many places since then.

Consortium Magazine

If you see an art magazine called “Consortium” pick up a copy because I wrote a short review for this first issue. I haven’t seen it yet myself, but the launch party is tonight so hopefully I’ll get a good look at it then. I’m very excited!

Final On Words

Final answer: most common starting words are “I”, “Well”, “The”, “It”, “This”, “There”, “Okay”, and “Just”. Most common first letters were I, T, W, A, O, S, M, and then J and H tied. I feel like I’m in a episode of Sesame Street. I’ve decided to add all this neatness to the Zeitgeist so you can check out the full list, updated live with the latest content, there.

More On First Letters

Well I ran some regexes through all the posts in database hoping to clean them up a bit, and got rid of all the instances where I was starting with an unnecesary paragraph tag, now that it’s all taken care of automatically. I also took out some things so my RSS feed should be cleaner now, or at least if I ever offer the old stuff up for syndication. I think I’ve reached the limit of what I can do with pure SQL, so I think I’m going to patch something together in PHP one of these nights. I basically just need to do the same thing except maybe strip_tags first. Then I can modify that to find if there’s any pattern to the words I start out with. How exciting!!! Hold on to your seats:

+--------+-------+
| letter | count |
+--------+-------+
| I | 116 |
| < | 65 |
| T | 49 |
| W | 42 |
| A | 17 |
| O | 14 |
| S | 13 |
| J | 10 |
| Y | 9 |
| M | 9 |
| H | 9 |
| F | 7 |
| D | 6 |
| C | 4 |
| G | 4 |
| E | 4 |
| L | 4 |
| B | 3 |
| P | 3 |
| N | 3 |
| V | 2 |
| . | 1 |
| U | 1 |
| " | 1 |
| 9 | 1 |
+--------+-------+
25 rows in set (0.00 sec)

(Of course I don’t really think that’s exciting.)

Sometimes

Sometimes when reading what should be a very dry article you see an unintentional typo or some similar snafu that makes you spurt Dr. Pepper. Sometimes I wish my keyboard had the equivalent of a sneeze guard. From Tuning MySQL Server 4.0 Query Cache:

You may increase or degrease query_cache_size to find the value, which provides best performance for you.

So am I going to need one of these if I want my database to be tweaked to perfection? All joking aside, the query cache in the 4.0x series is, for practical web applications, one of the best improvements thus far. Though it annoyed me back in the 4.02 days when they changed the syntax for the configuration options. Why? No good reason. They’re on 4.09 now and things couldn’t be smoother though. I know of several major sites that run MySQL 4 as their main backend.

First Letters

I’ve been noticing now with the fancy caps watermark that most of my posts begin with the letter I, and so I wondered how many of my posts were like this, so I put together a little query like so:

mysql> SELECT DISTINCT LEFT(post_content, 1) AS letter, COUNT(*) as count FROM b2posts GROUP BY letter ORDER BY count DESC;
+--------+-------+
| letter | count |
+--------+-------+
| < | 373 |
| I | 10 |
| T | 2 |
| A | 2 |
| W | 2 |
| C | 1 |
| S | 1 |
| M | 1 |
| O | 1 |
| Y | 1 |
+--------+-------+
10 rows in set (0.00 sec)

What does this tell me? Pretty much nothing except that before I came up with the autop function I started each post with a tag instead of text. Maybe it’s time to go back and clean up some old content.

The Blogging Software Dilemma

This site is beginning to grow and grow, and forward compatibility has lately been in my mind more. Several days ago this site passed twenty thousand unique visitors, and more than seventy thousand hits, since late August. I recently converted everything (except the photolog) to XHTML 1.1, which was nice, but it’s not the markup I’m worried about. My logging software hasn’t been updated for months, and the main developer has disappeared, and I can only hope that he’s okay.

What to do? Well, Textpattern looks like everything I could ever want, but it doesn’t look like it’s going to be licensed under something politically I could agree with. Fortunately, b2/cafelog is GPL, which means that I could use the existing codebase to create a fork, integrating all the cool stuff that Michel would be working on right now if only he was around. The work would never be lost, as if I fell of the face of the planet a year from now, whatever code I made would be free to the world, and if someone else wanted to pick it up they could. I’ve decided that this the course of action I’d like to go in, now all I need is a name. What should it do? Well, it would be nice to have the flexibility of MovableType, the parsing of TextPattern, the hackability of b2, and the ease of setup of Blogger. Someday, right?

Update, 2003-12-26: This became WordPress.

Nuns vs. Fans

There were these three guys at a football game and it just so happened that they were sitting behind three nuns. They couldn’t see really well over their habits, so one of the guys says, “Man, I wish I lived in Ohio, there are only 25 Catholics there.” One of the other guys says, “Well, I wish I lived in Idaho because there are only 20 Catholics there.” Then the last guy says, “Well, I wish I lived in Oregon there are only 15 Catholics there.” Then one of the nuns turns around and says, “Why don’t you go to hell — there are no Catholics there!”

If you’re offended get over it ;). It’s “Funny Friday” on PhotoMatt, so stay tuned. Hat tip: Mom.

Sad News: Dough Boy

Please join us in remembering a great icon of the entertainment community. The Pillsbury Doughboy died yesterday of a yeast infection and complications from repeated pokes in the belly. He was 71. Doughboy was buried in a lightly greased coffin. Dozens of celebrities turned out to pay their respects, including Mrs. Butterworth, Hungry Jack, the California Raisins, Betty Crocker, the Hostess Twinkies, and Cap’n Crunch. The gravesite was piled high with flours. Aunt Jemima delivered the eulogy and lovingly described Doughboy as a man who never knew how much he was kneaded. Doughboy rose quickly in show business, but his later life was filled with turnovers. He was not considered a very ‘smart’ cookie, wasting much of his dough on half-baked schemes. Despite being a little flaky in his youth and a crusty old man, he was considered a roll model for millions. Doughboy is survived by his wife, Play Dough; two children, John Dough and Jane Dough; plus the bun they had in the oven. He is also survived by his elderly father, Pop Tart. The funeral was held at 3:50 for about 20 minutes.

That is the funniest thing I have read in my life. Hat tip: Mike.