Entries for February 2005
February 14, 2005 at 11:42PM @}-|-
![]()
![]()
Being single sucks.
February 16, 2005 at 11:52PM I’m restarting Mocha
While Sage is the closest I’ve ever got to an RSS aggregator I actually liked, it’s still not right. There are just too many things about it that irk me somewhat.
I’ve tried so many of the blasted things and a few things have been confirmed for me time after time after time:
- RSS Aggregators are not email programs: RSS Bandit, FeedDemon, SharpReader, Thunderbird, &c. all suck as aggregators. Ok, so FeedDemon’s not too bad, but it still feels too much like a mail app.
- Live bookmarks suck too.
- It’s nice to be able to search old entries, but Sage doesn’t keep them.
- The Comments API is nothing but a good idea.
- Bloglines is pretty close to what I wanted Mocha to be, but it’s a webapp, so it sucks.
I’ve been dithering, as I’m wont to do, about finishing Mocha, but being a bit of an Architecture Astronaut, I have a tendancy to get lots of good ideas that don’t really go anywhere.
I started Mocha before all the desktop aggregators started coming out, but never finished it. Everybody has those projects that they start, but never get around to finishing, but this one really burns me. I know what I want, but I keep putting off actually getting it.
So, this being Lent and all, I’m going to do something about it. I’m going to flip the concept about and rather than giving something up, I’m going to take something up. Starting this weekend, I’m putting MinGW, wxWidgets and libxml2 on my laptop and I’m finishing it.
Just in case you’re wondering how long this thing’s been bouncing around in the background, then here is me complaining about doing nothing about it two years ago, and the first mention I could find of it back ing March 2002. And I know the idea was bouncing around long before that. Hmmm... reading back over some of that reminds me of how whiney I can be. ![]()
What I wanted it to be like
My vision back in the day for Mocha was quite simple:
- You have two panes.
- In the left pane, you have your feeds arranged hierarchically.
- In the right pane, you have a viewer.
- When you click on a feed, all the unread entries in that feed are displayed in the viewer.
- If you click on a folder, you get all the unread entries for the feed within that folder.
- And, of course, if you click on the root folder, you get all your unread entries.
Of course, this was it at its simplest level. There was more.
- Along the bottom is the filter toolbar.
- You can filter by date.
- From now to a time in the past, or...
- ...between a date range, or...
- ...with keywords, or...
- ...a combination of the above.
- And using this, you could browse your archives.
But wait, there’s more!
- At the bottom of the left sidebar you have a calendar. On this would be marked all the days with entries in the selected month, so you could page through your archives easily.
And that’s it. That is what I intended for Mocha. And it’s a damned sight better than any of the UIs I’ve seen for aggregators up till now.
February 19, 2005 at 1:21AM Is GMail coming out of Beta finally?
First they give a pile of invitations out to everyone with an account, and now I get an email from them asking me if I want to sign up (I registered my interest in it back in the beginning before I got an account)!
I’d say it is.
February 22, 2005 at 4:24PM Detecting broken images with JavaScript
I hit an annoying problem with a project at work. It’s not my fault, there’s nothing wrong with the code, but sometimes things will happen: people will delete images out of the backend, not upload the image they’ve given, or will be referencing an image on another server. Welcome to a plague of broken images.
So how to cope with this? Your guess is as good as mine, but for now my solution is to pretend the image isn’t there at all. Not completely mind you: it occupies a space, but it’s not shown.
But it’s not immediately obvious how you check if the images on the page have loaded ok or not. After a few minutes of hacking, here’s the most transparent method I could come up with:
function IsImageOk(img) { // During the onload event, IE correctly identifies any images that // weren't downloaded as not complete. Others should too. Gecko-based // browsers act like NS4 in that they report this incorrectly. if (!img.complete) { return false; } // However, they do have two very useful properties: naturalWidth and // naturalHeight. These give the true size of the image. If it failed // to load, either of these should be zero. if (typeof img.naturalWidth != "undefined" && img.naturalWidth == 0) { return false; } // No other way of checking: assume it's ok. return true; }
There’s half the work done. Now for the other half. When the page loads, we run over the images[] array to check them all.
AddEvent(window, "load", function() { for (var i = 0; i < document.images.length; i++) { if (!IsImageOk(document.images[i])) { document.images[i].style.visibility = "hidden"; } } });
And that should do the trick.
BTW, I’m experimenting with how I’d add syntax highlighting to my text parser. No code as yet, just messing with a few layout schemes right now. The markup feels rather nasty right now.