Wednesday, February 04, 2004

Rainbow Detour

I took a detour through the park on the way home last night. There was a brilliant full-arch rainbow so bright the tips were yellow, with a faint double about each end. A flight of geese was flying in formation over the pond below.

It is important to pause and appreciate the rare moment of natural beauty when one lives in a place as butt-ugly as Southern California.

Tuesday, February 03, 2004

Thanks Dad!

A proper Devine christmas extends into February. So even though my dad sent me the gift certificate on christmas eve, I dutifully lost it and have only now had it re-sent. Here is my second little post-groundhog pre-taxes christmas:

JavaScript: The Definitive Guide
Old edition we're using at work was for 4.0 browsers, this 4th edition covers the current generation.
Stratego
Never been one for strategy games any more complex than checkers, but they used to play this one at Flying Moose and I've always been fascinated so when Cybil said she's played it, on the list it went.
The Annotated Chronicles
Because my old copy's pretty ratty. Yes, I read trashy fantasy novels as well as romance novels. Growing up I read books instead of watching TV, but that didn't mean I read "good" books.
Maximum Accessibility: Making Your Web Site More Usable for Everyone
There aren't that many books written about my field (front end development), so might as well read them all. It's the details that matter in my job, so I look for books like this to pick up more tidbits.
Web Design on a Shoestring
I'm cheap. Super cheap. Some might call me frugal, but they're just being polite.

Monday, February 02, 2004

Lower tech? -or- Assumptions

Something we struggle with all the time at work is creating simpler solutions. We are often thinking about production release 4.5 when we should be prototyping version 0.1 beta. If a problem can be solved using a lower tech solution do it. If more complexity becomes necessary it will evolve, don't push it.

As Jfred will tell you after his ever so productive day at work, it is important to periodically test one's working assumptions while solving a problem. One of my assumptions was that my blogger archives should be monthly. Given the set of data (going into my 4th year of posts) this seems like the appropriate frequency, but that is discounting the fact that monthly archives are fucking useless. You can never find anything in them. I always end up using google's "search this site," and so...

The final solution to my collapsing of recent posts problem will be, I hope, to simply collapse the posts and leave the anchor events alone. The links will take you to the archive of that post. My reason against this had previously been that a monthly archive is a very large page to load. I will solve that be changing the archives to Weekly or even Daily. The main archive page will then be obscenely long, but that doesn't matter because it's useless anyway. I will put one of those google "search this site" forms at the top and hope people figure it out. I will still have to alter the JavaScript to not collapse the archive pages, and that should do it.

Dreamhost

On a slightly related note (getting at the reason I'm doing this fenageling on the front end) I'm considering switching from pair to dreamhost. Actually I've been thinking of switching for like 4 years, but now dreamhost has a plan with PHP for $10, which is only $4 more than my current plan.

Now that Blogger has Atom, an XML syndication feed, I could use Blogger as a publishing tool while completely re-working the way it is displayed.

Broken Back, Button That Is

With the collapsing of recent entries on the front end there are a few bugs. Once expanded, a post's permanent link continues to return false in Firebird. Faulty editing of the onclick event, don't have a fix yet. If you open up IE and succeed in following one of those links you'll see that the archives are collapsed as well, leaving you at the bottom of the page with no idea which post you were trying to look at.

Now Jon points out another problem I've introduced. Open up a recent entry and follow an external link. When you use the browser's back button to return to the page you'll find that the entry you were reading has collapsed. It is effectively failing to "save state" by collapsing entries every time the page loads.

There are two options that I'm considering. One is to have the expand links anchor you down to themselves, effectively passing the post to be opened through the URL like this: divineblog.html#0123456789. This would require some JavaScript scrolling to avoid disorientation after the page loads, collapses, and the entry clicked expands, but will likely be necessary to solve the archives bug mentioned above.

The other option that I'm looking at is not to trigger the collapsing on body.onload(), but instead to put the function at the bottom of the page, above the </body>. That way the page would remain in whatever state you left it in the browser's history and not re-collapse when you go back to it. This is in theory of course, time to test it out.

Thought regarding archives problem: don't collapse the archives.

Update: failure. JavaScript in the page executes every time page loads. Duh.

A more clever idea just in from Mr. Plummer. Check the window.history to see if you are coming back to the page, having already been to history.next. My Definitative Guide is blathering on about UniversalBrowserRead, but it was written for 4.0 browsers. We shall see.

Definitive Guide blathers true. Looks like it's about time to get JavaScript: The Definitive Guide 4th Edition. The 3rd edition was for 4.0 browsers, the 4th covers IE and NS 6, and Mozilla. Might have to take a look at it in the store to see if it thinks in terms of DOM scripting.