Microsoft To Watch Keynote, Say "Oh, Yeah, We've Got That." at Crazy Apple Rumors (via Hyatt).
'According to Microsoft sources, highlights of the viewing will include: Ballmer saying "Oh, we've got something way cooler than that, but I can't show it to you yet." '
"Industry sources also indicate that Microsoft has told several friends that it never really liked Apple in the first place and that it was just being friends with the company because it felt sorry for it.".
Heh, heh, heh.
-----
Nintendinitis
Joy turns to nintendinitis for video kids
"A nine-year-old girl who punched a hole in the centre of her palm from vigorous video game play was just one example of injury resulting from the boom in interactive software, a specialist warned yesterday. " Jesus wept. I mean, I spent a lot of time in front of a computer. But there are limits.
The best bit is "Dr Koh said her parents had not read the product information leaflet and were unaware of the potential complications of interactive game playing." Like game consoles should have to bear a warning saying "If you play this game so much that your hands bleed it might be time to stop"? Ridiculous! Right up there with "Product may contain nuts" on a bag of airline peanuts. Everything about this story whittles away some more of my hope for sanity in the world.
"A nine-year-old girl who punched a hole in the centre of her palm from vigorous video game play was just one example of injury resulting from the boom in interactive software, a specialist warned yesterday. " Jesus wept. I mean, I spent a lot of time in front of a computer. But there are limits.
The best bit is "Dr Koh said her parents had not read the product information leaflet and were unaware of the potential complications of interactive game playing." Like game consoles should have to bear a warning saying "If you play this game so much that your hands bleed it might be time to stop"? Ridiculous! Right up there with "Product may contain nuts" on a bag of airline peanuts. Everything about this story whittles away some more of my hope for sanity in the world.
Explorer trees in JavaScript
An update to aqTree, the code to make explorer trees from unordered lists; it's lots better now.
The CAT User's Manual
The CAT Users' Manual (via my best friend).
"Do not attempt to open a CAT. There are no user serviceable parts inside."
Classic. :-)
-----
The semantic web
New essay on the semantic web in response to Paul Ford's August 2009: How Google beat Amazon and Ebay to the Semantic Web.
-----
New Donna Tartt book
A new Donna Tartt book, The Little Friend, is finally being published (via G). I'm worried. Her first (and so far only) book, The Secret History, is the best book ever. I thought that when I read it, and my feelings have not changed on re-reads; its erudite and classical prose still draws me in in a way that Brideshead Revisited singularly failed to do. So a new book by her should be a landmark event. What worries me is that I can't see how it would be anything but a letdown...
-----
Open Brackets
Gail Armstrong is "a hopelessly parenthetical freelance translator, etc. bemoaning the fact that she lives in the South of France instead of her native Canada." For all that, she's got an interesting blog at openbrackets, which is wonderfully subtitled "Lost in translation". The Wodehouse pastiche, "Junkies aren't gentlemen", is sublime comedy genius at its very best.
-----
Amazon links
Aquarion clearly explains how Amazon links work. I didn't actually know any of this at all. Useful info, that man.
-----
Starting a browser
Simon Willison writes about starting a browser from the Windows Run box: "I can hit CTRL+R, type one of those browser names, paste in a URL and hit enter to instantly load that page".
Me, I do it a more efficient way :-)
This is the code for startbrowser.vbs, a Windows Scripting Host script that gives you a menu of browsers from which to choose when you start it, as long as you've got a URL on the clipboard. (If you have no URL on the clipboard, it does nothing.) Stick a shortcut to it in your Start Menu and bind a key combination to it (view the properties of the shortcut and set a "Shortcut key" -- I use B, which means that I hit ctrl+alt+B and it starts the code) -- if you have a URL on the clipboard then it shows you the window and gives you ten seconds to press a key. Note that you must edit the "browsers" line in the script to specify your browsers and locations of same. This script probably requires VBScript 5.5 and IE 5.5 (but if you're looking to test on multiple browsers you'll almost certainly have IE).
' startBrowser.vbs
' If you have a URL on the clipboard, offers you a menu
' of browsers and then starts your choice with the one you want.
' Uses code from HTMLClipboard.vbs by G�Born (www.borncity.de)
'
Dim oIE
Set oIE = WScript.CreateObject("InternetExplorer.Application")
' Set your browsers variable:
' pipe (|) separates browsers
' a browser is exe-with-full-path,name,accesskey
browsers = "d:\mozilla\1.0\mozilla,Mozilla,m|iexplore,Internet Explorer,e"
clipboard = getClipBoardText()
' Does it look like a URL?
if left(clipboard,7) = "http://" then
html = "<html><head><title>Choose your browser to open url " & clipboard & "</title><script>document.onkeypress=kp;" & vbCrLf & _
"function kp() { switch(String.fromCharCode(window.event.keyCode)) {"
browserArray=split(browsers,"|")
for b=0 to ubound(browserArray)
brArray=split(browserArray(b),",")
html = html & "case '" & brArray(2) & "': document.getElementById('browser').value='" & brArray(1) & "'; break; " & vbCrLf
next
html=html & "} }</script></head>" & _
"<body bgcolor='silver'><h1 style='font-size: 12px'>Choose your browser to open url " & clipboard & "</h1>"
for b=0 to ubound(browserArray)
brArray=split(browserArray(b),",")
html = html & brArray(1) & " (<strong>" & brArray(2) & "</strong>)<br>"
next
html=html & "<input type='hidden' name='browser' id='browser' value=''></body></html>"
oIE.visible = 1
MakeIEDoc html
' Now poll IE to see if they've picked a browser or 10 seconds have passed
closetime=10000 ' thousandths of a second
pollinterval=500 ' thousandths of a second
count=0
do
count = count + pollinterval
if count >= closetime then exit do
browsername = oIE.Document.All.browser.Value
if browsername <> "" then exit do
wscript.sleep pollinterval
loop
if browsername <> "" then
' Find their browser and start it
for b=0 to ubound(browserArray)
brArray=split(browserArray(b),",")
if browsername = brArray(1) then
set oShell = createobject("WScript.Shell")
oShell.run(brArray(0) & " " & clipboard)
end if
next
end if
end if
oIE.Quit
wscript.quit
'###################
' Helper procedures
'###################
function getClipBoardText()
Dim txt
MakeIEDoc "<html><head><title>Clipboard Exchange Helper</title></head>" & _
"<body bgcolor='silver'>" & _
"<textarea name='exch' rows='8' cols='80'></textarea>" & _
"</body></html>"
txt = "foo"
oIE.Document.All.exch.Value = txt
oIE.Document.All.exch.select()
oIE.Document.execCommand("Paste")
getClipBoardText = oIE.Document.All.exch.Value
end function
Sub MakeIEDoc (html)
' Launch Internet Explorer & prepare a page with a text box
' define HTML code with a text area
' *** launch Internet Explorer ***
oIE.left=50 ' window position
oIE.top = 100 ' and other properties
oIE.height = 200
oIE.width = 580
oIE.menubar = 0 ' no menu
oIE.toolbar = 0
oIE.statusbar = 0
oIE.navigate "about:" & html ' Helper window
' we keep the browser window invisible! Uncomment the
' next line, if you like to view the browser window for tests
' oIE.visible = 1 ' keep visible
Do While (oIE.Busy):Loop ' Important: wait till MSIE is ready
End Sub
'* End
Web services list
XMethods (via Sarabian) have a list of web services which seems quite interesting.
Although a lot of them seem pretty arbitrary (the random Neil Finn lyric server or the magic square finder, for example), it's apparent that there's the possibility of multiple useful services being created; I can see a time when a simple web application could merely be a thin layer over the top of externally provided services, and I can certainly see how bits like a Euro currency converter and a street address verifier could be tied into an existing application. The geographical services do seem to be pretty US-centric, but that's the way it is, I suppose. It would be very neat to see the Royal Mail offer this kind of service as a layer beside their web-based postcode finder.
-----
Postmodernism generator
The Postmodernism Generator is a work of sublime genius. Generate your own postmodernist psychobabble; maybe even try submitting it somewhere as a real essay, as Dr. Alan Sokal did.
Shameless narcissism
In a bout of shameless narcissism, I was trawling my referer logs, and I came across a post on ArsTechnica from a guy I've never heard of saying that he reads kryogenix every day! Blimey. Is this fame? Anyway: hi, MalusCaelestis, nice to have you with us. :-)
-----
Greenpeace parody logo competition
Greenpeace were recently sued by Esso for a parody logo containing "E$$O", on the grounds that the double-dollar looked like the Nazi SS flash (!). Not stymied by this, they're running a parody ESSO logo competition. So, all you tree-huggers, get out your copies of Photoshop and Fight the Power.
-----
Eric Meyer on CSS
I have finally got around to ordering Eric Meyer on CSS (by which I mean that I got my firm to pay for it because I'm too much of a cheapskate to do it myself). Naturally, of course, Simon beat me to it. :-)
-----
Knowledge micro-management
I've been thinking about Paul Ford's notes on knowledge management. I don't think I agree with Paul's assertions that "individuals solve an enormous amount of knowledge management problems on their own", and that "the best KM would observe how people actually organize data on their desktops in an organization and allow them the same degree of flexibility with Organizational Memory data". This isn't knowledge management, it's knowledge micro-management.
The whole field of KM is extremely imperfectly understood, and the first guy who comes up with a decent solution, assuming that it's possible for one to exist, will be a millionaire. But I'm not at all convinced that the best way to handle KM is to enlarge individuals' ad-hoc KM techniques into an organisation-wide scheme. That's knowledge micro-management, as I say. Now, it's possible that what Paul meant was that people store their data how they like but the KM system understands everyone's storage rationale and categorises the data correctly underneath. If that's the case, then I think it's a good idea, except that I can't see how it will work. I admit that I'm not convinced of the current crop of KM tools either, since they seem to work on a principle of devising one schema for data and making everyone stick to it, with the inevitable result that everyone thinks it's wrong and no-one uses it properly. This is still clearly better than the no-KM method, which involves everyone having to understand how everyone else's personal data management rationale works and just does not happen at all, with the result that there's loads of knowledge out there that should be being used effectively and isn't. Paul's solution might be a silver bullet -- store your data how you want and the system, learns about and understands your method, extracts the data from your storage and categorises it itself. Ideally, it could then reflect that data back to everyone else, using each person's individual data storage preferences; so you perceive the system as working solely for you, when in fact it works for everyone. Great idea. But it's a pattern recognition problem, recognising what a bit of data is and where it belongs, and pattern matching is something that computers are very, very bad at. The best approach to that sort of thing that anyone's come up with so far is in things like the Insidious Big Brother Database in Emacs' mail client, where every bit of data is tied up with similar bits -- an email address can lead you to other mails from that person, or other people from that mail domain; a subject can lead you to other mails in that mail thread, or other messages sharing keywords with this one. Essentially, you present a user with all the information and then let them sort through it to find what they need, because people are very good at pattern matching. This is the approach that KM seems to be heading for; you leach all the information out of someone's head and then drop it into a massive data warehouse, and then categorise the data according to a given data schema. It may not be the right approach, but I don't think that Paul's approach, while initially more tempting, is possible given current technology -- and a poor implementation of it would be worse than no implementation, because a bad KM system gets in everyone's way and makes you jump through hoops to accommodate it. The ideal KM system would be one that users didn't even know about; it quietly grabs and categorises data and makes it available, all without you knowing that it's there. Paul's method is a step toward that ideal, but it's not a doable step.
-----
Librarians and Tigers
A link especially for Tom and Lynne, perhaps: Ftrain.com: Librarians and Tigers (via markpasc.blog). An interesting read, too, much like the rest of ftrain -- but be prepared to spend a lot of time reading and then a lot more digesting.
-----
IsapiRewrite: mod_rewrite for IIS
Hooray! ISAPI_Rewrite - URL Rewrite engine for IIS seems pretty good to me; implements Apache's mod_rewrite syntax (sort of), works fine. It's always really, really annoyed me that IIS doesn't do this by default, and since I'm stuck with IIS at work (until the OpenSA guys get SSIs working in ASP, at least, then I can have Apache/Win32!), this will make things much easier to bear. I still hate IIS, just now I hate it a little less.
Oh, did I mention: free? Hoorah. Only as-in-beer, but I don't mind that too much, because I'm on a Windows platform anyway...
Email randomness
I was forwarded a copy of possibly the greatest email exchange in the world.
Knowing about My Bloody Valentine songs may help you here.
Knowing about My Bloody Valentine songs may help you here.
I have just bought a phone from Richard. It is quite a posh one. The most exciting thing about it however is that it has a ringtone composer. All of which exposition leads to something I have dreamed about for many a year. I SHALL HAVE A PHONE WITH A MY BLOODY VALENTINE RINGTONE! P|-|34R |\/|3!
Cool. Will it go yuhuhuhuhuhuhUHUHUHUHUHUHUHuhuhuhuhuhuUHUHUHUHUHUH?
No it will go weeeooooweeeeweeeooooooooweeeeoooweeeeoooooooweeooweee. OR alternatively wooweewoowooweeoooweooooweehhoooooeeeewee. I'm thinking of the last two track on side one of Loveless.
Excellent. I can hear those sickly violins now. I was thinking of the first track on Loveless. Or perhaps track two: nnnnnuuuuuuuuuuuuuuuuuuuuurrrrrrrrrrrrrrruuurrrrrrrrrrruurrrrrrrrrrrsqueakur rrrrmumblemumblennnnnERRRRRRRRRRRRRRRRRRRRRRRRR.Some people (specifically, in this case, Tim and Andy -- wave, chaps!) have way too much time on their hands. -----
MS to charge for MSN 8.0
MS to charge for MSN 8.0 (via markpasc)
Oh well. What a tragedy.
Castalian promotion
Simon points out an opportunity for me to blow my own trumpet by adding Castalian to the list of web programming frameworks in the Python wiki. And, hell, I'm not gonna miss a chance like that for shameless self-promotion. :)
-----
RIP means no privacy, by order
BBC News: Switch on for state snooping (via Bill)
The BBC report on one of the consequences of the RIP Act, that from August 2002 all UK ISPs are obliged -- not are permitted, but are legally obliged -- to carry out automatic surveillance of their customers' web habits. I think it's time to start routinely encrypting my email, as privacy in the UK is further eroded. -----
The BBC report on one of the consequences of the RIP Act, that from August 2002 all UK ISPs are obliged -- not are permitted, but are legally obliged -- to carry out automatic surveillance of their customers' web habits. I think it's time to start routinely encrypting my email, as privacy in the UK is further eroded. -----
Double or the essential nothingness of being
Pascal's Wagering (via diveintomark, ages ago): compulsive and vital reading for all you philosophers out there.
-----
Top 10 Things Wrong With Linux, Today
Adam Wiggins has written a fascinating paper called "Top 10 Things Wrong With Linux, Today". Essential reading, although I don't agree with all of his points.
Stuff I don't agree with:
Mozilla's non-desktop-integration being a problem. I'm certainly not finding it so. And Gecko's rendering is so, so, so far ahead of everything else currently available that it should just be used to the exclusion of all else.
Filesystem scans being a problem. Well, sort of. I can see that it would be good if that stuff happened automatically; maybe have a 60 second countdown timer during which you can interrupt the automatic process and do it the hard way. However, I don't know the failure modes for having it automatically happen -- I hit "y" for all the fixes questions because I don't know any better.
Some of his comments seem to be rather Windows-influenced; he identifies a problem and then suggests a solution which is a clone of how MS Windows approaches a solution. Look at, say, his suggestion for how printer dialogs should work ('...it gives you two choices: "Set up a printer attached to my computer", and "Set up a printer from the network." ' -- that looks jolly familiar). I don't necessarily think that that's the right approach -- how about probing for a local printer instead of asking the question, huh? With an advanced "I'll tell you what to do, don't do it automatically" button? Redmond is not the source of all good usability innovations.
The "die stray processes, die!" suggestion is, um. Good. If it could be 100% guaranteed to work right, all the time, and never, ever, ever kill a process that it wasn't supposed to. I am deeply sceptical that this could happen, and the first time that my OS stamps on a process that I'm using because it thinks I don't need it any more, I'll chuck out that bit of functionality, no matter how useful it's been in the past.
He has also written a complementary essay, "Top N Things That Have Been Solved, which is a neat list of old problems that have since been killed. Kudos on an excellent essay, Adam.
-----
52 projects
52projects (via Simon Willison) is a list of random little projects to do. Things like: find a batch of old letters from an old friend and mail them back to that friend to see their response. Or: take the train to the end of the line, somewhere you've never been, and take photos. That kind of touchy-feely project; they all have this lapidary, time-worn feeling about them. It's an interesting idea.
It does slightly puzzle me that there are not fifty-two projects, but mine is not to reason why; I understand that the site has only just been created and perhaps there are more projects yet to come. But if you don't know how many there are going to be, why settle on 52? Is the plan that we should take on a new one every week for a year? Some context would be nice.
Moreover, these projects, while a touching idea, are things for which I don't really have time. At least, I feel that I don't -- I suspect that that's the point, that I could make time for these things and enrich my life (and conceivably someone else's) in ways that involve neither code nor vodka.
I've often thought about doing this kind of thing for techie projects; those little ideas that I think up from time to time but don't have time to take on. Every time I think of doing it, though, it seems like I'm merely lazily publishing my to-do list because I'm too inept to finish these things myself. In addition, it makes me one of the batch of people who start projects, publish them, and don't finish them, and I ranted about those people in my essay about open-source. I shall avoid gazing into the abyss, so that I don't have to see it gazing back.
-----
The death of maximalism
Sarabian asks whether From The Orient counts as a minimalist web site, as catalogued by the Minimalist Web Project. I would say not, but I wouldn't say that three quarters of the sites listed at the Project are either.
It seems to me that submitters of links to the MWP seem to equate "minimalism" with "clean CSS-style design", with "CSS-style" in this context meaning "lots of nice borders on everything". A pretty large propertion of sites styled with CSS do seem to share a "look"; borders on things, nice background colours, clean lines. However, this look is not minimalism, not by the MWP's definition: "the idea of beauty through 'less is more'". It's closer to a "classical" description of minimalism, that of a school that "emphasizes extreme simplification of form, as by the use of basic shapes and monochromatic palettes of primary colors, objectivity, and anonymity of style" (from AHD4). Anonymity of style covers it quite neatly, especially when we consider weblogs (since a fair few of them are modifications of the blogging system's provided templates); Orient looks pretty much like kryogenix looks pretty much like Caveat Lector looks pretty much like Simon Willison's weblog looks pretty much like Textism looks pretty much like Zeldman. Well, apart from Zeldman's overuse of orange, but each to their own.
Now, on the one hand, perhaps we're moving away from styling issues and focusing more on content. This is great, and it's what the decoupling of style and content represented by CSS is all about. On the other hand, are we losing some of the really beautiful design out there? Design, in the past, has been something of a dirty word to a lot of web developers, because it roughly equated to "pretty pictures that got in the way of my content", or occasionally "pretty pictures that only worked in Internet Explorer for Windows". Perhaps this era of relatively plain (but very pretty looking, and fairly minimalist) site designs is an interim period while we find our feet in this relatively new medium.
-----
New version of Castalian
A new version of Castalian, the emulation of the Microsoft ASP object model in Python, for embedding Python in web pages, has been released. Changes are mainly a few tidyups, although the server-side-include code has been significantly sped up.
-----
More site changes
An obvious change: the site layout, with amazing appearing icons. Note that this shows up much, much better with the ice stylesheet; if you're not using it, I advise you switch. I might deprecate the rest at some point. :)
Another change is that I've caved in and implemented Simon's (and Sarabian's) lastUpdated hack on my blogroll, and generated the HTML for said blogroll hourly, rather than just fetching the blo.gs XML blogroll hourly and parsing it on each page request. However, there is a mini CSS optimisation which shows (new!) after links that have been updated since your last visit.
Incidentally, my icons are abysmal. Donations of better ones would be vastly appreciated :-)
-----
Disconnected earth
Connected Earth (via Simon Willison) is BT's brand new site covering "how communication shaped the world". Cost a million quid, apparently. It's a shame they couldn't spend that money on actually making it work.
Got Mozilla and don't like Flash? No chance, pal; your entry page to the non-Flash site in Moz doesn't work at all.
Does it validate against their XHTML 1.0 Transitional doctype? Hell, no.
(I tried validating it as HTML 4.01 Transitional, since they obviously don't care about it being XHTML (no </meta> tags, for example) but validator.w3.org seems to be broken when you force a doctype -- it adds its own doctype string and then claims that that same string isn't valid!)
Moreover, once you've selected the non-Flash site, I can't find a way of reversing that choice and looking at the Flash one.
All in all, a big, big thumbs-down to BT, who are supposed to be extremely technologically aware and in the vanguard of leading the UK into the big wide world of connectivity.
As long as you've got IE5.5, Flash, QuickTime and Windows Media Player, presumably. Mozilla? Nope. Linux? Nope. Open standards? Nope.
-----
Private comments
It was recently pointed out to me that my old blogging software allowed for private comments (i.e., those that are just mailed to me and not displayed on the site) and this one doesn't. I looked around, and afaics MT doesn't allow them. So I've sort of hacked them into place.
The rest of this article is a techie description of how I did it which you do not have to read, but bear this one thing in mind: do not preview a comment which is going to be private, because it forgets the "private" flag. I haven't finished this yet. But I thought people might like it anyway.
There are only a couple of changes that need to be made to allow private comments; one to your comment template (to give commenters a "private" box to tick) and a couple to lib/MT/App/Comments.pm (to pay attention to said checkbox). Note that you should be fairly comfortable hacking around in your MT installation before attempting this.
In your Comment Listing template (from the MT admin interface, click Templates) add the line:
<input type="checkbox" name="privatecomment" />Private comment (email only?)<br />
after the main comment <textarea> tag. (Or, you know, add it wherever you want.) That gives your users a checkbox to tick.
Now, in lib/MT/App/Comments.pm, in your mt/ directory, change the lines:
$comment->save;
$app->rebuild_indexes( Blog => $blog )
or return $app->error("Index rebuild failed: " . $app->errstr);
$app->rebuild_entry( Entry => $entry )
or return $app->error("Rebuild failed: " . $app->errstr);
to read:
if ($q->param('privatecomment')) {
$comment->privatecomment('yes');
} else {
$comment->save;
$comment->privatecomment('no');
$app->rebuild_indexes( Blog => $blog )
or return $app->error("Index rebuild failed: " . $app->errstr);
$app->rebuild_entry( Entry => $entry )
or return $app->error("Rebuild failed: " . $app->errstr);
}
This checks the setting of the private comment flag and only saves the comment and rebuilds the site if it's turned off.
You must also make sure that "Email new comments?" in your Blog Config is turned on, otherwise private comments will
just disappear into the ether.
For an extra piece of niceness, after the lines:
Name: @{[ $comment->author ]}
Email Address: @{[ $comment->email ]}
URL: @{[ $comment->url ]}
add the line
Private comment: @{[ $comment->privatecomment ]}
This indicates, when a comment is sent to you, whether it was a private comment or not.
And that should be it.
Note that, as said above, if the comment gets previewed it will forget your "private" setting. This is because to remember it I'd have to create an MTCommentPreviewPrivate tag, and I haven't had time to do this yet. Moreover, I think I'm coming around to deciding that this whole magic-tags feature of MT's templates is broken. I mean, it's just Cold Fusion all over again, isn't it? I can understand a simple tag which is substituted with text, no problem, but doing programming stuff (if statements, loops) with tags was broken when Cold Fusion did it and is still broken now. I personally think that MT should allow you, if you know what you're doing, to embed some kind of programming language into pages; whether Perl or some kind of tiny custom scripting language, it would give so much more power to template writers. I feel some kind of essay coming on...
Feeling appreciated
I got rather a nice mail from a bloke who's been using my null Flash plugin to suppress the "download Flash" dialog box in Mozilla. It's rather heartwarming to know that stuff you've written is actually being used.
-----
Accessibility for client-side image maps
Mark's latest accessibility tip concerns client-side image maps. He says, "I was surprised to find how many high-profile weblogs use client-side image maps. " I'm surprised that there are any at all -- I thought that they'd died out a while back. He does go on to exhort people to not use server-side image maps, and I'm sure that there can't be many of those -- they date back to the early days, when some browsers didn't support client-side maps. Nonetheless, a useful tip.
-----
Don't use the source, Luke
The webdocs.org documentation repository (via Simon Willison) seems like a vaguely neat thing; a gathering of Python documentation.
I have a bit of a flaw with it, though; I wondered how it was done -- do they manually update it, are they picking up some kind of XML summaries from the author's sites, what -- so I looked at the source. And it is completely unhelpful in this regard. This is perhaps a more worrying aspect of the web services trend -- you've got no way of looking at the information you get back, because all the client-side code you get boils down to a couple of RPC requests and some processing code rather than actually containing the data itself. I suppose that that's just a consequence of the way things are going.
-----
On the radio
I got mentioned on the radio, in BBC Radio 4's Questions, Questions programme -- they read out most of the content of one of my posts to the Q, Q messageboard. Fame at last!
-----
Spacer gifs
Mark Pilgrim's latest accessibility tip concerns spacer images, specifically the need to add blank alt text so as to not confuse non-visual browsers.
Spacer gifs: just say no. Do it with CSS. I don't believe I've found any design so far which uses CSS for positioning and needs spacer images; they're a necessary evil when using tables for layout. Not that you can necessarily stop doing that, although I have.
The text browser I use, w3m, seems to display an image name even if it has blank alt text, which is annoying. I may have not set a preference right or something -- it's never important enough for me to actually try and fix it.
-----
"Jakob right all along" shocker
CodeBitch writes an excellent article about Mozilla in MacEdition. More to the point, she reiterates one of Jakob Nielsen's predictions: that we would be stuck with version 4.0 browsers until 2003. She goes on to say, "it seemed appalling at the time, but it's now only six months away." It did seem appalling. And unlikely, I thought. But CodeBitch has thought of this too: she closes with, "Even more appalling for some people -- having to admit Jakob Nielsen was right!"
Er. That would be me, then :-)
-----
Eight Fallacies of Distributed Computing
The Eight Fallacies of Distributed Computing -- read and inwardly digest, web application implementors.
-----
Bookmarklets
SquareFree have an excellent collection of bookmarklets, about half of which I have now added to my "bookmarklets" folder in the Mozilla personal toolbar.
-----
Making TrackBack happen automatically
I've got this sort of half-formed idea. It works like MT's TrackBack, but it requires less effort on the part of the user (which is where I think TrackBack falls down). Essentially, it boils down to: when you make a new post, your blog walks through your post and says to every URL mentioned in it: "I'm writing about you."
Would this work? It would require blogging systems to support a new XML-RPC command (say, pingReferences <yoururl>,<myurl>), and it would require that, given a remote URL, you can work out from that URL and only that URL where the RPC server would be. I think that the best way to do this would be to introduce a new LINK tag that points to the RPC server for that URL (clearly this tag would be the same on all pages of a given blog). Then, when you blog about some links, your blog system requests each of those links, parses each for the correct LINK tag, and for those it finds, it sends a pingReferences(url_of_your_post,url_of_my_post) command by XML-RPC to the RPC server. Pow! Automatic trackback! I think that this is much better than the current TrackBack method, where you have to actively use the bookmarklet to say "I want to make a post about post X on this page". Just go ahead and blog as you normally do, and it'll all happen automatically.
It doesn't have to happen with XML-RPC, it could just be a page request. My thinking there was that RPC makes it easy to generalise, and most blogging systems incorporate XML-RPC libraries now anyway, to support remote blogging tools.
My only real problem with this method is that a very popular link in blogland essentially gets slashdotted as everyone blogs about it. Is this likely to be a major issue? I don't think so, because anything that popular is being read by everyone anyway -- doubling the hits shouldn't matter. There's also the minor problem that this essentially doubles everyone's web counter stats, because every blogged page gets two hits (the first when the blogger reads it, and the second when the blogger's blog requests it to find where its XML-RPC server is) -- but web stats are pretty unreliable anyway except as a general trend.
-----
Idea sharing
Simon Willison and I are clearly birds of a feather. He spied my idea of having my blogroll show last updated times, which I got after he pointed me at blo.gs, and implemented it himself. This is the way the web should work. Of course, I've now had to go one better...
Actually, I was working on this before I ever saw Simon's post, so it's not just pathetic one-upmanship. :)
Anyway, the blogroll on the left now remembers when you last visited one of its links, and if that blog has been updated since the last time you clicked that link, it will say (new!). So you don't even need to remember whether you've seen the latest post or not. The big caveat here, clearly, is that there's no way my poor little bit of code can know whether you've visited that site without clicking the link, by getting there some other way. Clearly there are two possible solutions here: either make kryogenix.org the browser start page for the whole world, or live with it being inaccurate sometimes.
Well, I know which one I'm going for.
In our "Ask Dr. Code" interlude, a brief description of how it's done: it's not too hard. The links in the blogroll have onclick attributes that call the Javascript visitBlog function. That does a little bit of jiggery-pokery with cookies to store the current time (i.e., the time when you clicked the link) and the link you clicked in a cookie (the jiggery-pokery is to make sure that it doesn't overwrite settings for other URLs you've clicked from the blogroll, and does overwrite any previous settings for this URL). The code which displays the blogroll (as seen in the previous post) now reads the cookie server-side and checks whether the cookie time is older than the update time from blo.gs, and writes (new!) if it is. See? Nothing to it. Changed server-side Castalian code below -- the "visitBlog" stuff is all the new bit.
<?cas
import xml.dom.minidom,urllib,rfc822,time
# The favourites file is fetched from blo.gs once per hour by cron
fp = urllib.urlopen("http://www.kryogenix.org/days/blo.gs-favourites.xml")
dom = xml.dom.minidom.parseString(fp.read())
upd = dom.documentElement.getAttribute('updated')
updtup = rfc822.parsedate(upd)
updtime = time.mktime(updtup)
updtime = updtime + (5*60*60) # correct for blo.gs being behind
visitBlog = request.cookies("visitBlog")
visitedTimes = {}
if visitBlog:
for item in visitBlog.split("|"):
i = item.split("=")
if len(i) == 2:
visitedTimes[i[0]] = i[1]
for n in dom.documentElement.childNodes:
if n.nodeType == n.ELEMENT_NODE:
if n.tagName == 'weblog':
nam = n.getAttribute('name')
chgtme = updtime - int(n.getAttribute('when'))
tme = time.strftime('%d/%m %I.%M %p',time.gmtime(chgtme))
url = n.getAttribute('url')
updatedText = "(last updated %s)" % tme
if visitBlog:
if visitedTimes.has_key(url):
if float(visitedTimes[url]) < chgtme:
updatedText = updatedText + " (new!)"
response.write('<a onclick="visitBlog(this.href)" href="%s">%s</a> <span style="font-size:75%%">%s</span>' % (url,nam,updatedText))
?>
We (meaning "the weblogging community") need to be doing loads more stuff like this, I think; making things simple and automatic. This is why kryogenix is now running on MT rather than xlog, my custom blogging CMS -- although xlog manages the core functionality (posts, comments) fine, it's all the little stuff (pings to weblogs.com, RSS) that is making blogging really good, and I get all that for free with MT.
-----
Searching Freshmeat
New in the code section: fm, a tool like Debian's apt-cache which searches the Freshmeat repository. Some pretty brief Python code.
I was prompted to write this by a suggestion Kevin Burton made, because it sounded easy. And it is, too, given Freshmeat's XML search.
fm -- search the freshmeat repository
Usage: fm [options] command [parameters]
fm searches the Freshmeat repository, will display details
about selected packages, and can download a package for you.
Commands:
search - Searches Freshmeat for packages matching word
show - Shows full details for package pkg
get - Downloads a tar.gz for package pkg if such exists
Options:
-h - show this help text
-----
Erudition
Bloggatio Latina: the Latin derivation of the verb bloggo, -are, meaning "to blog". The phrase bloggaturi te salutamus, after a gladiator's traditional greeting to the Emperor, amused me as well. But who's our Caesar? Dave Winer? Zeldman? Craig Saila?
-----
Get your Ebola here
VillainSupply (via Ron) -- everything you need to be a world-dominating supervillain.
-----
Wrapping C for Python
Pyrex (via the daily Python-URL) is a very neat way of wrapping C modules for use with Python, and looks a lot neater than SWIG
-----
Spread the dot
In an effort to support the Internet Multicasting Service/Internet Software Consortium's bid to become the new .org TLD operator, I'm spreading the dot (see bottom of page).
Maybe you should spread the dot too, and perhaps we can stop Verisign selling domains out from under people (see ditherati and hoopla for examples of this). I'm not sure whether the VeriSignOff people are going about this the right way, but they're at least going about it a way.
-----
Fox remake Rocky Horror
Fox are making a new version of Rocky Horror (via rebecca blood). Hm. Apparently it will be "faithful to O'Brien's original lyrics but with a new concept". I have severe reservations about this.
W3C icons
Alternative W3C validation icons (via Simon Willison again). I thought a couple of these were really nice, but the variance in styles on kryogenix (owing to the style switcher) means that an image which fits one style may not fit another. I really did like this one, though:
-----
-----
Mini icons
Mini icons (via davidgagne) for use on web pages. Very neat. I may start using these.
Show and hide extended MT text
Aarondot's front page doesn't display extended text in a blog entry by default, but makes it appear on clicking by using the DOM in modern browsers. Well, this site does it too, and does it better to boot. :-)
There are two stages to this: first, you need the toggleExtended Javascript function included in your page somehow. My site uses a sort of SSI to have a consistent header on each page, so I put it in there; you could possibly add it to your MT template files to ensure that it was everywhere, or put it in an external JS file and add a
<script src="myexternaljsfile.js" type="text/javascript"></script> line to your templates or header to include it. Anyway, the function looks like this:
function toggleExtended(mtentryid,lnk) {
if (document.getElementById &&
document.getElementById('extended-'+mtentryid) &&
lnk.innerHTML) {
ext = document.getElementById('extended-'+mtentryid);
if (ext.style.display == 'none') {
ext.style.display = 'block';
lnk.innerHTML = '<<';
} else {
ext.style.display = 'none';
lnk.innerHTML = '>>';
}
} else {
location.href = lnk.href;
}
}
After that, edit your MT templates and change the MTEntryIfExtended portion to look like this:
<MTEntryIfExtended>
<span class="extended"><a href="<$MTEntryLink$>#<$MTEntryID pad="1"$>" onclick="toggleExtended('<$MTEntryID$>',this);return false;">>></a></span><br />
<div style="display: none" id="extended-<$MTEntryID$>">
<$MTEntryMore$>
</div>
</MTEntryIfExtended>
Note that this will make your "expand" link be >> and your "collapse" link be << -- to change this, alter the highlighted parts in both bits of code.
This will show/hide the text in DOM-supporting browsers, and will take users to the individual page for that comment in non-DOM-supporting or non-Javascript-supporting browsers.
-----
blo.gs
I rather like the service that blo.gs provide (via Simon Willison). You can "ping" them when you update your blog, and they register the change -- they also monitor pings to weblogs.com, who provide a similar service). Then, however, you can register yourself an account there and "subscribe" to blogs, and then grab a list of all yor subscribed blogs and when they were last updated. This is neat, and it's in action on my blogroll on the homepage.
This is the way stuff should work -- automatic updates for everything. Pretty much everything I read was already on blo.gs, mainly because most of the blogging software that's around now will automatically do pings to weblogs.com. Kudos to Aquarion for making Klind do pings, too, since he's rolled his own blogging system.
What I'd like to see now is something that works similarly for comments, because I leave comments all around the place on people's blogs and then forget where I left them, so I don't know whether they ever got a response. I can't quite work out a way of doing this, though; it needs to be automatic. More thought required. Whoever cracks this will be famous. :)
Meanwhile, all I have to do now to add another blog to my blogroll is to subscribe to it at blo.gs, which is pretty darn fabulous.
I hear you asking: good Lord, how did you do that, eh? It was easy. The power of XML. (And Castalian, naturally.)
<?cas
import xml.dom.minidom,urllib,rfc822,time
# The favourites file is fetched from blo.gs once per hour by cron
fp = urllib.urlopen("http://www.kryogenix.org/days/blo.gs-favourites.xml")
dom = xml.dom.minidom.parseString(fp.read())
upd = dom.documentElement.getAttribute('updated')
updtime = time.mktime(rfc822.parsedate(upd))
for n in dom.documentElement.childNodes:
if n.nodeType == n.ELEMENT_NODE:
if n.tagName == 'weblog':
nam = n.getAttribute('name')
tme = updtime - int(n.getAttribute('when'))
tme = time.strftime('%d/%m %I.%M %p',time.gmtime(tme))
url = n.getAttribute('url')
response.write('<a href="%s">%s</a> (%s)' % (url,nam,tme))
?>
And that's all there is to it!
-----
Beehive DHTML API
The Beehive DHTML API is very cool indeed. I've just spent about 20 minutes playing Scorched Earth.
-----
Four-oh-four
The best 404 page ever. I am in awe of its coolness.
-----
Code commenting I wish I could get away with
Dan Schmidt tells us how not to comment code.
-----
EFF abandon 2600 case
Linux Weekly News have published the EFF press release on the 2600 case, which says that they're declining to fight further, as the case is a lost cause.
You can see EFF's point here; 2600 are not having to pay any money, so it's not a total loss. But they say that they're not fighting on at least partially because "every judge that has looked at the DMCA's anti-circumvention sections has thought they're perfectly grand". Declan McCullagh goes on to say:
DMCA opponents now have four obvious choices:While true, this is not good. The message doesn't seem to be getting through, and the big conglomerates with their armies of lawyers seem to be winning, chipping away bit by bit at our rights. -----
- Wait for a better test case
- Convince Congress to amend the DMCA fat chance
- Incite violent revolution
- Get used to it
Ratio of a circle to its diameter
The uselessness of pi: outstandingly comprehensive.
OK, so I'm a sad case who laughs at maths jokes. That aside, the two best links on that page are both dead, but one can be found: a proof of the rationality of pi, which is great. The other fantastic one is "500,000 digits of the square root of 4", which is also down. Frankly, I don't need to see it, but I am still laughing about it. :)
EuroPython
mwh's advogato log, which is covering his EuroPython notes. I wanted to go! Waah!
-----
Untrustworthy computing
Some rather unimpressed comments on Microsoft's Trustworthy Computing initative (via Bruce Schneier's Crypto-Gram newsletter).
Schneier quotes from a Slashdot comment, saying: "Microsoft has therefore taken the position that their code is so bad that it must be kept secret to keep people from being killed by it. Windows -- the Pinto of the 21st century."
Is anyone ever going to wake up to this sort of thing?
In other news in there, he refers to a guy who's fooled all the major fingerprint identification systems on the market by making gelatin fingers with fingerprints taken from a latent fingerprint (on a surface), not from a live finger. They did exactly this, exactly, in Charlie's Angels, and I scoffed at the time. :-) -----
Schneier quotes from a Slashdot comment, saying: "Microsoft has therefore taken the position that their code is so bad that it must be kept secret to keep people from being killed by it. Windows -- the Pinto of the 21st century."
Is anyone ever going to wake up to this sort of thing?
In other news in there, he refers to a guy who's fooled all the major fingerprint identification systems on the market by making gelatin fingers with fingerprints taken from a latent fingerprint (on a surface), not from a live finger. They did exactly this, exactly, in Charlie's Angels, and I scoffed at the time. :-) -----