Benefits of Caching

All around blogspace, blogrolls are down as it seems rpc.blogrolling.com isn’t responding to requests, even though the main site is still working. All I had to do was increase the $cacheminutes variable in my script to a high number and now it’s returning the cache from the last time it was up. I need to make it so it does that automatically, but that’s a task for when I have more juice left in my laptop.

Five Thousand!

Well I am proud to announce that the photolog has reached a great milestone: over 5,000 publicly viewable photos are now online. The champagne is flowing freely at the photomatt.net world headquarters. If you haven’t been in a while, I just put up two portrait series, some fun stuff, and some narratives. I’m looking forward to the H-Town Blog get-together tonight.

Menu Updates

As you have probably noticed by now, the menu looks quite different than it did before. The markup is still exactly the same, it’s just the lists have been styled with CSS to make them appear more like a navigation menu and less like, well, lists. I have also coded a new feature that when the less frequently updated sections of the site get updated or have a new item added, that menu item will be emphasized for twenty-four hours. Let me know any thoughts on the new updates.

Strange Mozilla Bugs

Well before I was delivering application/xhtml+xml to all Gecko-based browsers, but there seems to be a bizarre problem with Mozilla on this page. I had been doing my Gecko testing in Phoenix, which has no problems at all, and is now the only browser receiving the proper content-type for XHTML 1.1. Mozilla 1.0.1, 1.2, and 1.3a all seriously mess things up. First it shows the hostile XML error when it loads the page, which I brought on myself by putting it into super-strict mode, but the problem is there are no errors. I’ve triple-checked the page, and everything validates. It reports the error at a different place every reload, and it points to a random line from inside the blogroll, which is just basic XHTML. Then completely randomly it will show the page, but then stop displaying the content div after the “M” in the third paragraph from the last post, but then it shows the menu, which is after that in the code. When I change the content-type to be sent as text/html it displays every time, but still stops at the same place. Wait, as I’ve been writing this it looks like it’s working again in Mozilla, but only with the old content-type. Sigh. Hat tip: Mike Little.

Semantically Correct Blogroll

In tweaking the structure of things here in my quest for perhaps the perfect(ly structured) weblog I came to the problem of the blogroll, which is obviously a list but there is no obvious way to format it in list format (I know that’s the XHTML2 module documentation but it’s well-written and applicable). What follows is an explanation of how to create a semantically correct blogroll. I am a paid subscriber to the service, so there may be options available to me that aren’t available to everyone, or you may just need to do things a little differently to get the same result.

  1. First you can’t have anything in the first prepended or appended to updated links, because as we will see in a moment these are actually put outside the link "goodies" we’re going to play with later. So leave that blank. You can order your links however you’d like, I used to have them alphabetical but now that I’ve lost the visual indication of recently updated ones I’ve ordered them using the "Recent" option. (Should I be using an ordered list because of this? I haven’t decided yet)
  2. Set there to be no container, we’re going to have to make our own container in a minute.
  3. Originally I had thought that the opening and closing list item tags (<li>) could be put in the link "goodies" section, but it doesn’t work like expected, so for right now use the contributer only "Optional Linebreaks" option and put </li> in the field.
  4. For global targets I set it to "NOTARGET" but you may or may not need/want to depending on your personal philosophy on this issue.
  5. In the "Link Goodies" section prepend <li> to the link.
  6. You’re done! Almost. Check out what we have so far.

We’re not quite done yet, because we don’t actually have a list yet, all we have is a set of list items with no enclosure. This will work with lazy UAs, but it’s not correct. To enclose it I’m going use a modified version of the PHP method given on the site for including the blogroll, but if you don’t feel like you need the extra feature I’m going to lay out, you can just wrap the output from the stock script above in a ordered or unordered list tag.

Mike Little just dropped his blogroll in favor of his own link manager. He may be biased, but the issue he brought up of the blogrolling server provoked some thought. In terms of features, there’s no reason why I shouldn’t be using Mike’s script, but what really keeps me coming back to blogrolling is the community features, which aren’t easily duplicated without (you guessed it) a large community. So with that in mind, I began to think of ways I could cache things on my end, thereby making things easier on the blogrolling server and faster on my end. Two benefits that come to mind immediately is that it will eliminate an unnecessary request on the client-side (I’m using the javascript version currently.) and that the blogroll can be gzipped with the rest of my page for clients that support it. Here is the code I’m currently using. The code can either be embedded directly or included from another file. It caches using the unique blogroll id, so multiple blogrolls should not be a problem.

Also please don’t think that formatting your blogroll as a proper list entails having it look boring, the power of CSS allows you to customize the look of your list like never before, and though my blogroll isn’t styled (yet) the button-looking menus on your right are actually unordered lists. In fact, you will have more control over the appearance now that your blogroll is formatted as a list than if it was just a paragraph seperated by line breaks. If you have any questions about this leave a comment and I’ll be happy to help out. Of course Jason could add a list option tomorrow and make everything but the cache redundant. C’est la vie!

Comments Fixed

Thanks to Mike for pointing out a problem with the comments. While debugging it, I rediscovered what a mess the b2 comment code is, but I’ve cleaned things up quite a bit now. Why is everything done through an included file? Why can’t you show comments, pingbacks, and even trackbacks at the same time? Just adding things to my personal TODO. Comments are now part of an ordered list, though it’s styled so they look normal. When I was working on the comments it got me thinking about the whole FOAF and PGP comment integration stuff. It’s just a matter of time. Emails are never shown, no matter what.

Reset Links

Just a small request, if you have any links here on your blogroll or link list with the www. prefix, if you could change that to be just photomatt.net I would really appreciate it. I’m not sure how Google is going to handle the 301 Redirect Permanent headers so any help you can give will certainly smooth things over. Old permalinks and such, being permanent, will of course always work. Previously the “www” prefix was simply an alias that worked identically to just the hostname. I’ve come to consider this redundant; yes this page is on the “World Wide Web.” Actually in terms of user experience this change should be completely transparent, except I think I’m going to lose a lot of Google juice because of it—photomatt.net has a PageRank of 4; www.photomatt.net had a PageRank of 6 and was reindexed fairly frequently.

Switched

Right now I’m sitting on the floor, and the cat is in my chair. Is there something wrong with this situation? Sadly, no. For those of you unacquainted with my cat, she is a delightful creature who is at once an ideal companion, playmate, and friend. She came to our house through my neighbor of three doors down, Brooke. I was at their house a lot, practicing lacrosse with Brooke’s older brother and generally just hanging. They had Helsa at the time, when her name was still “Mittens” and Brooke would attempt to dress her up in doll’s clothes. She wasn’t in any way malicious, I just think she was a little too proactive owner for Mittens’ taste. The cat was chiefly outdoors, and spent a lot of time around my house for whatever reason, and my Mom took a liking to her and started putting water and such on the porch. Eventually I ended up having to carry her back to Brooke’s house, and she would squirm the whole time and vocalize her objections.

After no more than a week or two of this, Brooke’s mom, whose name escapes me, brought Helsa over to our house and said we should keep her. Everyone was ecstatic except for my sister, who is convinced Helsa has a grudge against her. The first thing we did was give her a name better suited to her personality and came up with Helsa Poppins. (You get points if you know what that means.) She seemed to be in all places at once, and befriended every member of the family, except my aforementioned sister, who coincidently had her own cat at the time, Lolli, who could safely be described as anti-social. Helsa had never been a skinny cat, and her weight grew in her new home, which I attribute to the way she would play the members of the household against each other feeding her, much the way a child might go from parent to parent until their wants were completely satisfied.

Fast-forward to 2003: Helsa has consistently ranked in my favorite females list for many years now, and our relationship has grown comfortable. She doesn’t care for saxophone practicing, I could do without the shedding, but there’s an understanding. This year especially it seems that she had grown very close to my Mother, and they had become close companions, spending the majority of every day within five feet of each other. The time I see her the most, however, is when I’m sick. Sometimes it’s even an early warning, where Helsa will begin sleeping in my bed and I’ll come down within a day. It’s one of the sweetest things I can imagine, because when I’m really ill she literally never leaves my side.

About two weeks ago, Helsa began to lose weight. This struck everyone, and after several days it became apparent that she wasn’t eating like she used to. Within the next week, she stopped eating almost entirely. Every possible combination of cat food, cat treat, baby food, fish, chicken has been tried, with at best meager results. For lack of a better term, she seems uninterested in food. She has eaten several times, but thrown up shortly afterward; liquids seem best. Now she is acting lethargic, not really moving much, but her mobility does not seem impaired in any way, just her motivation. The past three days, she has been spending almost all her time in my room. I want to be able to give her the kind of support she has given me so many times, but I just don’t know what to do.

Update: She just at an entire meal of—get this—cat food, and is starting to act normally again. Thank you all for your concerns.

Undesign?

I’ve torn everything down and started from scratch. As a result things might look a little Spartan for a few days, but is that really a bad thing? The new PhotoMatt.net will run faster, jump higher, and post your comments before you think of them.

Syndicate It

PhotoMatt.net is now available in four syndication formats. I admit to being totally new to this sort of thing, and the feeds have really only been tested in my copy of Syndirella, which is quickly becoming one of my favorite programs. They all validate but there might be other issues I’m not aware of. Enjoy! Oh and I apologize for the look of the site right now, I started working on it and then became quite distracted.

Stereo, finally!

Well I’ve finally got my MP3 head unit installed in my new (to me) car. As I write this I realize that I haven’t told my car story here, but in brief around the beginning of 2003 my mid-eighties Mercedes which served me wonderfully for about a year was replace by a ’98 Chevy Lumina, which is currently on the road to being cool. One of the biggest problems with the Lumina has been that the after-market head unit was hooked up badly and would reset everything every time the car was turned off. This had the unexpected side effect of helping me learn the beginnings of several CDs very well, but never making it to the end. One of the interesting results of this is I was able to time how long it took me to get places very well because the clock would start at 1:00 whenever I turned the car on.

Anyway this was a problem that should have been quickly resolved, since I have a nice Aiwa MP3 head unit from the Benz, but I never seemed to find a weekend when my Dad was home and we both had time during daylight hours to hook everything up. Well today was that day, and we (mostly him) got it hooked up beautifully. I seem to have lost most of my MP3 mix CDs though, so I might have to burn some new ones. I think I’m going to do an artist-based approach, so for example I can have one CD labeled “Brad Mehldau” that will have all of his CDs condensed into one. Fair use is a beautiful thing. Anyway this is the first step to really making this car “mine”. Actually the second, since while my Dad was working on the stereo I was using a razor to take off some stickers from the previous owner. So my car no longer indicates I’m an Aggie fan, say “Worldwide Panic,” “You’re a naughty girl go to my room,” “I don’t mind being stared at,” or “Texas Department of Safety.” What a combination! I left the Cat in the Hat sticker. I miss my old stickers though.

Redesign

Well all the cool kids are doing it ;). No actually, I’m starting to get back to the site in flux idea that I was attached to in the beginning. Before I had a home-brew theme system and I was committed to adding a new theme every month and making it the default for that month. As I added new features though it became cumbersome updating the different themes, and it was slowing me down when I was trying to add functionality. So I came to the decision that it was better to have one well-tweaked theme that worked perfectly with everything, rather than twenty themes that worked alright. I’m itching for a new design, plus I have some things to fix up around here, so it’s going to be a meta-day. Also to be honest I like having total control on how the site is displayed, which is why NS4 users see just text and other things, which is different then some sites that let you write your own CSS file even. There’s a lot to do, so I should probably make a list:

  • New design
    • Resizable fonts (no pixels for IE/Win)
    • External links differentiated
    • Something new with fancy cap stuff
  • RSS feedsDone
  • Finish archive system
  • Set up CVS (maybe gforge too?)
  • Install stereoI’m happy to say I think everyone in the neighborhood has heard it now
  • New intra-site link systyem
  • Improve error handling throughout
  • Install new RAID card and hard drives
  • Set up file-server
  • Try new battery in laptopThe new battery is nice, but the problem still appears to be the charging circuitry, just like I told them.

I think that’s enough for today.

Website Launch: Crystal Awards

Finally! As of about five minutes ago the AMA Crystal Awards site is now live and open to the public. Check it out and let me know what you think. This is actually the second iteration of the design, the first was entirely done in CSS and the barest XHTML and it worked quite well cross-browser but it was decided that we needed more uniformity across the print and web pieces and so this is what I came up with.

If you’re interested in seeing more of Miss Richfield 1981, he has a very informative website where you can find out all about him. I’ve heard rumors that he might be flown down for this year’s awards as well. We’ll see . . .

Scum

There has been a lot of talk about referrer spamming in blogspace, and while browsing a PHP network query tool I stumbled across this, which looks terrible. What’s even worse is there is some genuinely neat looks scripts on their site, some things that I’ve been meaning to write myself, and it looks like I’m going to have to because I couldn’t support any that sells a product like ReferBomb.

This script will get up to 1000 Google search results for the search term of your choice (we’ve provided a few suggested default search terms), then automatically fetch all of the resulting web pages. What does this do for you? Think “public web stats” or think “blogs who reciprocate referring links!”

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.