Subsets and Acronyms

July 14th, 2005

I just noticed: XHTML is a subset of both HTML and XML, but {H, T, M, L} and {X, M, L} are subsets of {X, H, T, M, L}. In fact, because of the way adjectives work, that’s always true. Add an adjective to something, and you get a subset of it (pizza, cheese pizza), but if you take their acronyms, it works the other way around. Neat.

Sandboxing javascript for user comments

July 10th, 2005

It would be nice to be able to sandbox user comments so that they could include more than just plain markup. For styles this is trivial: provide a [this-comment] selector, and cut out any selector that doesn’t start with it (would fail IFF a future version of css introduced a parent selector, but even then could be easily fixed). For scripts, I’d assume it’s quite a bit less trivial. It would be really nice for us web geeks, though.

I even wish I could offer a bounty on this. It would really be worth it, I think, if it were done correctly. Unfortunately I’m too young for most things financial—credit card, paypal, etc. Oh well. Hopefully someone will find it an interesting challenge.

Pagerank for feeds

July 7th, 2005

Someone should make a feedreader (plugin) that implements a pagerank equivelant in the little world made up of the feeds I read. So if someone links to a post on a blog I don’t have the feed for, or if someone whose blog I don’t read links to a post, those mean nothing, but if someone whose blog I do read links to a post by someone else whose blog I read, my reader recognizes that and tells me (non-intrusively, of course).

Just one of those pseudo-AI things that fits into “computers are supposed to make our lives easier”. I thought it might help this guy (via Anne).

Disclaimer: I don’t even use a feedreader, so perhaps I haven’t been talking. But I think it’s a valid idea, and I haven’t heard of it being implemented yet…

Bug 300002

July 7th, 2005

Bah, I missed bug 300000 by a few seconds :-( I wish I’d had two real bugs to file instead of just one, then I could have gotten it. Anyway, I filed Bug 300002 on my Idea for UI allowing HTTP authentication logout.

The right take on politics…

July 1st, 2005

I have to say, The Onion has exactly the right take on things:

“Man, if the Democrats are going to block every terrible idea Bush has, nothing’s ever going to get done in Washington.”

Extraneous backslashes

July 1st, 2005

Okay, this putting-a-backslash-in-front-of-every-apostrophe in the comments has gone too far. It has now messed up someone’s <code>...</code> snippets, and so it is time to fix the problem once and for all.

Wish me (with my complete and utter lack of PHP knowledge) luck.

Closed World vs. Open World: the First Semantic Web Battle

June 30th, 2005

Via Anne: a very good read. I feel like I kind of knew it all along, way down in my subconscious, but reading it is very good. And I have no idea which I prefer.

Clean Source vs. Clean DOM

June 30th, 2005

You know what bugs me? When people talk about keeping the source clean and then go and do something like this. (No offense to the author, as it was just the first example I found and because obviously a clean source is important.)

The point is, it’s not about the source, it’s about the DOM. When I point my obscure-yet-relevant-standards-conformant tool at your page—be it lynx (bad example, so make that lynx-made-perfect), a screenreader, or even just my Firefox-with-a-userContent.css-file—it should work. And to do that you need a clean DOM the whole way through: start with a clean DOM (clean source), and then when you do your styling and your scripting, keep it clean.

Weblog UI and slugs

June 29th, 2005

In my Perfect Weblog System (which has a great resemblance to Anne’s), the slug would be automatically generated from the title using (client-side) javascript. If the slug was changed on its own, whatever handler was causing the updating would be removed. If the slug field was cleared completely, the handler would be replaced, and it would go back to being based on the title.

Why? Because I don’t like having to think about slugs. And normally the title or something auto-generated on it is good enough, it’s just for those posts with really long or punctuation-intensive titles that that breaks down. But that’s often enough that I have to think about it every time (or, sometimes, not). So this is one of those little gradual enhancements using javascript you keep hearing about.

Actually, perhaps this isn’t part of the Perfect Weblog System, but rather the Perfect Weblog System’s UI. Anyway.

Edit: Via choan in the comments, it exists! Thank you! But shouldn’t you be using UTF-8? ;)

Processing Units of the Future

June 29th, 2005

I’m sure I’m not the first to think about this, but with multi-core/cell processors, will graphics cards eventually become obsolete? After all, why not put one normal core and one graphics core in? And then, for the people who need specialist stuff, one raytracing core, one physics core, one whatever else.

And with people finding that some non-graphics things go faster on graphics cards, perhaps this will lead to things not being written for a specific CPU/GPU/whatever, but instead being told somewhere along the line to go wherever they’ll run fastest.

On the other hand, this would make it impossible for people to upgrade just their graphics card… bah, what do I know? I’m just a web geek.

Getting rid of img alt=”

June 28th, 2005

Interesting. So Firefox (1.0) displays <img src='...'>text</img> when sent as application/xhtml+xml as just an image, as you would expect. There’s no yellow screen of death, because it’s valid XML, if not valid XHTML. Unfortunately it doesn’t work quite perfectly, because if the image is not available nothing is displayed. It would be interesting to see how Opera and Safari/KHTML render this.

The validator, though, is a different story. It gives these error messages:

  1. Line 1, column 280: required attribute "alt" not specified

    ...google.com/images/firefox/google.gif'>text</img></div></body></html>

  2. Line 1, column 281: end tag for "img" omitted, but OMITTAG NO was specified

    ...oogle.com/images/firefox/google.gif'>text</img></div></body></html>

  3. Line 1, column 222: start tag was here

    ...'text/css'></style></head><body><div><img src='http://www.google.com/images/f

  4. Line 1, column 290: end tag for element "img" which is not open

    .../images/firefox/google.gif'>text</img></div></body></html>

Wouldn’t a simple “This element cannot contain content” suffice for three out of the four?

RebootMyLife.org

June 22nd, 2005

Grey needs a little help. If you’re planning on buying something off Amazon.com soon, or getting web hosting, or just have a little money to spare, head on over to RebootMyLife.org.

Yay Fitt’s Law!

June 15th, 2005

Yay Fitt’s Law!

I don’t know why I didn’t do this before, but I just moved the new terminal window button (easily my most used little launcher thingy) into the very corner of the screen. It’s so much nicer to hit now, even if Gnome is stupid and doesn’t count clicks on the edge 1px (though it does on the bottom 1px). For some reason, I’m even finding the Applications menu (which was in the corner, and I rarely ever use) easier to hit, too (I’ve had to click it a few times to get the screenshot, launch gFTP, etc.).

Coolness.

Not accidentally filed in markup.

Javascript Things

June 11th, 2005

I now have a new part of my site devoted to the things I make with Javascript. At the moment, this includes one thing—the thing I needed help on in my last javascript post. (Thanks again, Anne!). Hopefully, as I learn more and get ideas for new things to do, it will grow.

The easiest way to get to it is from my homepage, it should be two clicks away.

Reminder: If it’s summer, and it’s hot, drink a lot of water

June 10th, 2005

In a span of about 10 minutes, I’ve just drank 6 cups of water. Not small glasses, but actual cup measurements. That comes out to over 2/3 of a 2-liter bottle. For each cup, I drank it all at once, not stopping for breath. And I would drink more, I think, except my stomach isn’t that big.

I hadn’t realized how thirsty I was—in fact, I hadn’t even realized I was thirsty at all—but it’s quite easy to be deceived by that. Please, if it’s summer where you are, and it’s hot, don’t let yourself get dehydrated. Get something to drink, drink it as you work/play/whatever, and when you finish, get another. You don’t need to be constantly thinking about it, but you’ll be suprised at how much you drink.

This has been a public service announcement from dolphinling.net.

P.S.: Hey, google even says it can improve your skin, reduce your risk of cancer, and help you lose weight. It’s like a miracle drug or something, but free.

Learning JavaScript

June 6th, 2005

Right now, I have a very limited knowledge of JavaScript. More to the point, I know a lot about what you shouldn’t do, but I don’t know enough about what you should do to actually get anything done. So today when I had an idea for something to do, my approach was “try stuff and see if it works”.

It didn’t. In fact, it nearly did, but I kept getting the one same error message over and over again. After a few hours I (think I) figured out the problem, but not how to fix it, and at that point I decided I should actually learn starting from the beginning, and maybe then I’d have a solid enough foundation to figure out my error.

So here is what I’m getting to: Why are there no good javascript tutorials anywhere on the web? I looked around and I can find nothing that seems to have been written by someone knowledgeable about Web Standards and the Right Way to do Things. My criteria? If a tutorial tells me to put the script element in the body, it gets closed immediately. If it starts me off with a “Hello World” using document.write, I get very skeptical, and close it in a few pages if it doesn’t redeem itself.

And no tutorial so far has passed even those two tests. There are a few sites out there that I can tell are good—like the unobtrusive javascript page I linked to before, but those aren’t basic enough for me. I’ve tried taking things off those sites and adapting them to my needs, but failed. They’re just a bit to advanced for me.

So where are the good tutorials, that explain for a beginner the right way to do things?

P.S.: If you’re interested in helping me do this one thing, all it is is that I have a div with an original background-color of black, and I want to make it transparent when it’s hovered over with the mouse—and do it in a way that separates content, style, and behavior. And no, I can’t use :hover, because I want to do other things to it later.

Gnome 2.10

June 6th, 2005

Looks like Gentoo finally got Gnome 2.10 in the stable branch:

dolphinlingx root # emerge -Dtau world
These are the packages that I would merge, in reverse order:
Calculating world dependencies ...done!
[ebuild     U ] app-admin/sudo-1.6.7_p5-r4 [1.6.7_p5-r2]
[ebuild  N    ] sys-apps/busybox-1.00-r4
[nomerge      ] gnome-base/gnome-2.8.3-r1
[ebuild  N    ]  app-admin/gnome-system-tools-1.2.0-r1
[ebuild     U ]  x11-terms/gnome-terminal-2.10.0 [2.8.2]
[ebuild     U ]  www-client/epiphany-1.6.0-r3 [1.4.8]
[ebuild     U ]  net-analyzer/gnome-netstatus-2.10.0 [2.8.0]
[ebuild     U ]  app-text/gpdf-2.10.0 [2.8.3]
[ebuild     U ]  gnome-extra/gnome-utils-2.10.0 [2.8.1]
[ebuild     U ]  gnome-extra/bug-buddy-2.10.0 [2.8.0]
[ebuild  N    ]   app-text/gnome-doc-utils-0.1.3
[ebuild     U ]  gnome-extra/evolution-webcal-2.2.0 [2.0.1]
[ebuild     U ]  gnome-extra/gnome-games-2.10.0 [2.8.3]
[ebuild     U ]  gnome-extra/gcalctool-5.5.41 [4.4.22]
[ebuild     U ]  gnome-extra/gnome-media-2.10.0 [2.8.0]
[ebuild  N    ]   media-plugins/gst-plugins-cdparanoia-0.8.8
[ebuild     U ]   gnome-extra/nautilus-cd-burner-2.10.0 [2.8.7]
[ebuild     U ]  net-misc/vino-2.10.0 [2.8.1]
[ebuild     U ]  app-arch/file-roller-2.10.0-r1 [2.8.4]
[ebuild     U ]  gnome-extra/gconf-editor-2.10.0 [2.8.2]
[ebuild     U ]  gnome-extra/zenity-2.10.0 [2.8.2]
[ebuild     U ]  gnome-extra/gnome-system-monitor-2.10.0 [2.8.3]
[ebuild     U ]  gnome-base/gdm-2.6.0.9-r2 [2.6.0.7]
[ebuild     U ]  mail-client/evolution-2.2.1.1 [2.0.4]
[ebuild  NS   ]   gnome-extra/libgtkhtml-3.6.1
[ebuild  NS   ]   gnome-extra/gal-2.4.1
[ebuild     U ]  gnome-base/gnome-session-2.10.0 [2.8.1]
[ebuild     U ]  gnome-base/gnome-applets-2.10.0 [2.8.2]
[ebuild  N    ]   app-admin/system-tools-backends-1.2.0
[ebuild     U ]   gnome-base/libgtop-2.10.0 [2.8.3]
[ebuild     U ]   gnome-base/gnome-panel-2.10.0 [2.8.3]
[ebuild     U ]    gnome-extra/evolution-data-server-1.2.1 [1.0.4]
[ebuild     U ]   x11-libs/libwnck-2.10.0 [2.8.1-r1]
[ebuild     U ]  gnome-base/control-center-2.10.0 [2.8.2]
[ebuild     U ]   x11-libs/libxklavier-2.0 [1.04-r1]
[ebuild     U ]   gnome-base/nautilus-2.10.0 [2.8.2-r1]
[ebuild     U ]    gnome-base/librsvg-2.9.5 [2.8.1-r1]
[ebuild     U ]   x11-wm/metacity-2.10.0 [2.8.13]
[nomerge      ] media-plugins/gst-plugins-alsa-0.8.8
[ebuild     U ]   media-libs/gst-plugins-0.8.8-r2 [0.8.8]
[ebuild     U ]  app-editors/gedit-2.10.0 [2.8.3]
[ebuild     U ]   x11-libs/gtksourceview-1.2.0 [1.1.1]
[ebuild     U ]   gnome-base/libgnomeprintui-2.10.0.1 [2.8.2]
[ebuild     U ]    gnome-base/libgnomeprint-2.10.0 [2.8.2]
[ebuild     U ]     net-print/libgnomecups-0.2.0 [0.1.14]
[ebuild     U ]   gnome-base/eel-2.10.0 [2.8.2]
[ebuild     U ]    gnome-base/gnome-desktop-2.10.0 [2.8.3]
[nomerge      ]     app-text/scrollkeeper-0.3.14
[ebuild     U ]      app-text/docbook-sgml-utils-0.6.14 [0.6.12]
[ebuild  N    ]    gnome-base/gnome-menus-2.10.0
[nomerge      ] media-sound/digitaldj-0.7.3-r1
[nomerge      ]  media-sound/grip-3.3.0
[ebuild     U ]   x11-libs/vte-0.11.12 [0.11.11-r2]
[ebuild  N    ] x11-themes/gnome-themes-2.10.0
[ebuild     U ]  x11-themes/gtk-engines-2.6.3 [2.2.0]
[ebuild     U ] x11-themes/gnome-icon-theme-2.10.0 [2.8.0]
[nomerge      ] x11-misc/xscreensaver-4.20
[nomerge      ]  gnome-extra/yelp-2.6.5
[ebuild     U ]   gnome-base/libgnomeui-2.10.0 [2.8.1-r1]
[ebuild     U ]    gnome-base/gnome-keyring-0.4.2 [0.4.1]
[nomerge      ]    gnome-base/libbonoboui-2.8.1
[ebuild     U ]     gnome-base/libgnomecanvas-2.10.0 [2.8.0]
[ebuild     U ]   gnome-base/libgnome-2.10.0 [2.8.1]
[ebuild     U ]    gnome-base/gnome-vfs-2.10.0-r2 [2.8.4-r1]
[ebuild     U ]     gnome-base/gconf-2.10.0 [2.8.1-r1]
[ebuild     U ]  gnome-base/libglade-2.5.0 [2.4.2]
[nomerge      ] x11-terms/xterm-200-r1
[nomerge      ]  sys-apps/utempter-0.5.5.5-r1
[nomerge      ]   x11-base/xorg-x11-6.8.2-r1
[nomerge      ]    sys-apps/util-linux-2.12i-r1
[nomerge      ]     sys-apps/pam-login-3.14
[nomerge      ]      sys-libs/glibc-2.3.4.20041102-r1
[nomerge      ]       sys-devel/gcc-3.3.5.20050130-r1
[ebuild     U ]        sys-devel/gcc-config-1.3.11 [1.3.10-r2]
Do you want me to merge these packages? [Yes/No] yes

(Note to self: started at 20:48, check to see how long it took.)

Making generic XML work

May 31st, 2005

So I just read Anne’s Why generic XML on the web is a bad idea, and got an idea. Suppose there were a way, probably using RDF or something, map certain elements in it to well-accepted elements in another namespace?

It would work as follows

  1. I have a document, which, for whatever reason, can’t be appropriately expressed in any well-accepted XML language (XHTML, MathML, ChemML, OpenDocument, whatever).
  2. I give this document appropriate semantics and create a namespace for those semantics, and a description of them at that namespace.
  3. Somewhere in the namespace’s URI I include a bit of information (again, probably using RDF or something else I don’t understand) that says, for example, <angry> is a subset of <xhtml:em> where xhtml is in the standard XHTML namespace.
  4. A search engine comes along and sees your document. While it can’t fully understand your document, and there may even be parts of it it can’t understand at all, it can still understand bits and pieces of it, and can do whatever it does appropriately.

Whadya think?

Need help on a markup problem

May 31st, 2005

On one of my pages there is an image. I need help deciding how it should be marked up—or rather, where it should be in the source. <img> isn’t valid in the body directly, so I have a few choices:

  • Contain it in the previous paragraph (how it is currently)
  • Leave it outside the paragraph, which is invalid, but more semantically correct (I think?)
  • Put a <div>, which would be valid and semantically correct but redundant (or would it be? does having the div there mean the existance of something that shouldn’t be there?)
  • Use <object> instead, which would be semantically correct and valid, but I’d have to look up the syntax for

So which should I chose?

Edit: Eep, forgot to close my <a> tag… actually, forgot to even give it content. Fixed now.

Why I love the web developer toolbar

May 31st, 2005

I absolutely love the Web Developer Toolbar. One reason, that I ran into today, is that if I need to find out if a particular piece of (x)html is valid I only need to type data:text/html,<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><head><title></title></head><body><p>sometext</p><img src='http://www.google.com/intl/en/images/logo.gif'/><p>moretext</p></body></html> and with two clicks of the mouse I can send it to the w3c validator. (The validator doesn’t have a form upload, so otherwise I’d have to write it, save it, and go through the upload steps on the site.) And since I have said data: url template bookmarked, it’s a total of 3 clicks and writing a minimal testcase for what I want to know–much easier than reading through the specs.

Note that the w3c validator does have bugs, so this shouldn’t be used for anything complicated or esoteric. Just the basics.