dW

May 29th 2011

Ch-ch-ch-changes

It’s been over two years since I’ve done any significant code changes to this website, and I thought it was about time to implement some of the things that I’ve had in my head for some time. I’ve considered doing a redesign, but brainstorming a design — especially for yourself — takes an enormous amount of time. Thinking up things to program doesn’t take nearly as much time, so I thought I’d just work on some of them for the time being.

The last time I wrote about programming changes to this weblog it was about the CSS, and this time there’s additional changes to my venerable stylesheet. Then I had several stylesheets which were loaded based upon media attributes. That works, but ideally there should be one stylesheet for everything; that’s what I have now. Media queries are used extensively throughout to feed styles to different media types and different criteria. About a month ago I wrote some styles for Opera 11’s new Speed Dial enhancements. Using media queries and the view-mode media feature it’s possible to feed styles designed specifically for the thumbnail-like form factor of the Speed Dial items. I’ve got it working to my liking on all pages of this weblog instead of just the ones that contained articles as before. In addition I’m feeding styles designed for small-screened, yet capable devices. TV’s and projectors are also helped along with styles which make things easier to read from a distance. Lastly there’s print styles, and the entire site should be well-optimized for printing where only the articles and logo are printed; everything else is deemed unnecessary when printing. Also when printed, anchors and abbreviations are expanded — showing the URL and meaning in parentheses and brackets respectively. Unfortunately, all this fancy stuff causes Internet Explorer 8 and below to implode. I’m hoping to get it working better than it does presently in Internet Explorer 8 at the very least, but I’m not going to let it hold off making my changes live especially when Internet Explorer 9 has been released. The website is perfectly usable regardless. This weblog is nothing if experimental, anyway.

Visually, the biggest changes appear at the bottom of the page. I’ve replaced every use I had of Flickr on all of my personal pages because Flickr’s become a hostile environment where the maintainers of the website have become increasingly unprofessional; they don’t even bother testing new features in multiple browsers to check for bugs and then become irate when users describe the problems they experience. I was paying for the service, mostly out of support for what the place stood for and not because I necessarily required the additional features the “pro” account provided. Today it’s a mere shadow of what it once was — just like everything Yahoo! has. I began my transition away from Flickr by removing all hyperlinks from my personal pages to there, and I completed that a few months ago. This batch of changes removes my use of their API to display my latest images here. I’ve replaced it with Dribbble, an invite-only community for designers where crops of their current work are shown to fellow designers for perusal and commenting. I’ve been a member for nearly a year now, and it’s a website I visit on a daily basis. It’s actually more appropriate for me to have it displayed here as I’ve never been much of a photographer.

In addition to my Dribbble shots’ being displayed in the footer I’ve fixed my playlist. It should now display the most recent albums I’ve been listening to automatically. It accomplishes this through use of a custom AppleScript I wrote to grab recent unique albums’ metadata which returns JSON that is picked up by another script that sends it off to the server using XML-RPC. I wrote the AppleScript ages ago, but my method of getting it to the server was horribly bad. I didn’t feel like fiddling with it for so long because I really hate AppleScript. My beef with AppleScript is for another article, though.

This brings me to my API. I’ve only mentioned how I manage this weblog once, and it was rather vague — just commenting that I used TextMate for it. I manage my website remotely by a custom bundle for TextMate which sends commands via XML-RPC using a brilliant PHP library my friend Jeff King wrote to an API I created. It’s very similar to what many would be familiar with when using the MetaWeblog API and others like it except the commands for mine are proprietary to my weblog. I’m able to practically administer this weblog remotely from TextMate. Most of the work spent this time around was on improving this API.

I get asked quite often why I go through this trouble when I could just use a ready-made free CMS. I could, but I wouldn’t learn anything from just using someone else’s code. Besides, I find most of them to be quite inefficient. They’re overly bloated so that they could support multitudes of uses. Instead of being a small, useful Swiss Army knife they become a bunch of tools that are all individually inadequate to do what they’re supposed to do. It reminds me of something Montgomery Scott so eloquently stated in Star Trek III:

The more they overthink the plumbing, the easier it is to stop up the drain.

I also get told I’m just reinventing the wheel. I sure am, but the only way you can learn to make a wheel is to actually make one. I write this entire weblog in an effort to learn, and every time I modify this weblog’s code I’m learning something new. That’s what’s wrong with Web designers these days; they ignorantly grab a slew of ready-made libraries and slap them together to make visually acute, yet mind-numbingly sluggish websites. I’m not like that, and I don’t want to be like that. I want to know what I’m doing, and I want to assemble something that is as optimal as I can muster for the task at hand. In short, I’ll probably quit programming this website from the ground up when I quit learning from the experience.

There’s likely to be some bugs that remain from this round of changes. I found a few trying to attempt to submit this to my API for publication, in fact. I’ll work on them as soon as I discover them myself and as diligently as time allots me.