This is as days pass by, by Stuart Langridge

Why I'm not using ASP.NET

Well, there are lots of reasons why I'm not using ASP.NET. The reason today, though, is that it seems to be impossible to post to an ASP.NET website using a non-browser tool such as wget or Python's urllib. There's a huge __VIEWSTATE form variable, and links seem to call a JavaScript function called __doPostBack(). Of course, it requires JavaScript to work. This is shit. Yes it is. Fortunately, __doPostBack() doesn't do anything very complicated in the page I want to manipulate. Sadly, though, I've tried POSTing what I think the output of the form will be to the URL, and I get no love from it at all. Lots of <H1>Bad Request</h1> and the like. Has anyone dealt with this problem?

Turning thirty

I am thirty years old. Over the last few years (2005 2004 2003) there's been a little guessing game for you all to play, but not this year. I am thirty. Blimey. That's all grown up, isn't it? I mean, I've got a mortgage and a daughter and whatnot, so I suppose I am grown up, and I pretty much like it. I drink red wine and everything. A whole new decade. I barely remember not being in my twenties. Here comes ten more years of doing cool things, except now there's a three at the beginning. And I'll probably be doing them in sensible shoes. Bring it on. I have to say that it's going to be a lot easier to face the trials and tribulations of middle age from inside my birthday present from Sam, which is a Mercedes-Benz C180 Kompressor sports coupe. So nice. It was a bit of a wrench to get rid of my Fiat Coupe, but, y'know, I'm thirty now, can't have fast cars any more. I have to be refined and so on. Actually, that's total lies and had nothing to do with it, I just don't want to pay a grand a year for insurance for a car that I only drive to the railway station and back. The Merc's marvellous, though. Really swishy. I like it a lot. Happy birthday to me. Hope the rest of you enjoy the day!

Four things

I got tagged in the latest meme, it seems. Four jobs I've had in my life:
  • Information Architect
  • Business Systems Engineer
  • Environmental Technician
  • Putting the tops on Neutradol
Four movies I can watch over and over: Four TV shows I love to watch: Four places I've been on vacation:
  • Caorle, Italy
  • Langenlonsheim, Germany
  • Bulgaria
  • Cromer, UK
Four of my favourite dishes:
  • Pizza
  • My spaghetti bolognaise (not anyone else's! it has steak in, not mince)
  • Double egg and chips
  • Sweet and sour chicken Cantonese style, lemon chicken, and egg fried rice
Four websites I visit daily: Four places I would rather be right now:
  • Caorle, Italy
  • Somewhere warm
  • The new house we're trying to buy
  • Anywhere but work
Four bloggers I am tagging:

Loads of stuff on the go

I've been doing a lot recently, although not much of it is coming to fruition. When that happens, writing here tends to go by the wayside a bit, and I build up a list of things in Bloglines that I want to write about. So, a deluge of posts about stuff is coming up.

Living life online

I'm increasingly living my life online. I moved from hosting my own mailserver to throwing mail at Gmail and POPping it off right through to just using the Gmail web interface. I may have to start doing more of that with documents and the like. One of the big things missing there is a presentation package which lets me create S5 presentations in a graphical way. No, s5presents is not good enough. I want a GUI, WYSIWYG presentation editor. A second thing that's missing is a word processor like LyX. I am more and more becoming convinced that the LyX WYSIWYM approach to document creation is better than the Word/OpenOffice/AbiWord WYSIWYG way of doing things. I rambled about this a little more on the LugRadio forums a while back. The main thing that's missing, though, is storage. At the moment, every online application makes you store created documents there, or on the machine you're on by downloading them. What's needed is the following:
  1. A shared storage server. It should be possible to run your own, or sign up for an account with someone else who's running it (imagine someone setting up the server at onlinedrive.org or something, and charging £10/month for accounts or similar).
  2. A JavaScript and server side library which makes it really, really, really easy to save files to a specified shared storage server. This isn't designed for users; instead, it's designed for people building Web 2.0 online apps like Writely or Num Sum or s5presents, to make it fantastically trivially easy for them to integrate sharedstorage support into their applications, so instead of saving your files on their server you can save them on your choice of onlinedrive server.
  3. Authentication to onlinedrive servers should work very much like OpenID.
This should mean, in theory, that when you go off to your choice of online office app, or anything that saves files, and you click the Save button, it says "where do you want to save it to?" I then say "kryogenix.org", exactly as I do with OpenID, and it finds my onlinedrive (which might be on kryogenix.org, or might be delegated to onlinedrive.com or online-disc-space.myisp.net or wherever, exactly as OpenID can be), and it then goes through some kind of handshake thing and saves my file to my onlinedrive. This is sort of like .Mac is, as I understand it, except it's designed to be easily integrable with other people's applications; you publish the specs and so on. Allowing people to run their own servers is critical; a lot of people won't, and there's then a business model for doing it for them, but if you have to use onlinedrives.kryogenix.org or wherever to do this then it's a power grab by the people who think it up, and people won't use it (and it won't get integrated into apps). I think this really could work. The OpenID people have done most of the hard work as regards shipping stuff around and how to specify delegation and so on, and everyone wins. Jeremy Zawodny was musing about something similar, but doesn't mention integration, which I think is the critical part. Note that if the specs are published it would be trivial to also integrate onlinedrive handling into desktop apps; you could do it in the major office apps (OpenOffice, MS Office, etc) with macros. If it's all open it'd all work. A project for someone to pick up, perhaps.

Jackfield: Apple's Dashboard for the Linux Gnome desktop

It'd be cool if Linux had Apple's Dashboard. For those of you who don't know about it, Dashboard allows Mac OS X users to build little applications using nothing more than HTML, CSS, and JavaScript. That's very neat. (Sidebar: For those of you saying "what about gdesklets!", let me just say: no. The whole reason that Dashboard is good is that it lets ordinary people who know about the web build widgets. Having to use some odd XML dialect means that it's like real programming. That's why there are more Dashboard widgets than gdesklets, even though gdesklets has been around for ages. End sidebar.) I started to have a look at how difficult it would be to implement this on Linux, using Mozilla's Gecko as the underlying web library. (I could have done it with KHTML, I suppose, and that would have been more likely to match with Apple's WebKit since WebKit is a fork. I didn't, though, because I understand Mozilla and Gtk much, much better than I understand either KHTML or Qt/KDE. I'd love to see a KHTML version.) The theory was that it should use existing Dashboard widgets, giving new users a huge library of stuff that already ran to choose from. In essence, the idea isn't too difficult to do. It requires:
  1. Making something that understands the Dashboard widget definition format, so it can parse existing widgets
  2. Building a Gtk app that embeds Gecko and displays the widgets
  3. Injecting some extra JavaScript into each widget that takes care of differences between Gecko and WebKit
The first two weren't that difficult. The third...more complex than you might think. Safari and Firefox (WebKit and Gecko) differ in a lot of ways, and (understandably, and not at all reprehensibly) Dashboard widgets don't take account of those ways because they are only built to run on WebKit. I got a reasonable proportion of the ways done, but there's still enough that there aren't many widgets that it actually runs correctly. I now, sadly, don't have time to continue to work on the project, but I'd love to see someone else take up the slack.I'm working on the project again. It's called Jackfield, for reasons that I can barely remember (I think I looked "dashboard" up in a thesaurus somewhere). A screenshot of the existing program, with the Jackfield toolbar and some widgets running: Jackfield running some widgets You can grab the Jackfield code (2.7MB tar.gz) if you're interested in looking into it or working further on it. To run, cd into the jackfield directory and run python Control.py for the command syntax. You'll need some widgets, too. Have a play around if you're interested. Update (2006-07-07): don't download the tarball. Instead, read the more up-to-date install instructions.

Gmail delete button

The old GMail Smart Delete button doesn't work any more. However, I don't mind, because the thing that's broken it seems to be the introduction of an actual GMail delete button. Hooray! There does appear to be a new GMail Smart Delete button which does stuff other than deleting, which was pretty fast, but I don't think I need it to do anything other than delete mail :)

18 ways to be a good developer

  1. If someone requests support in a channel and you're around and don't know the answer, be sure to not say anything so they can't tell the difference between you not knowing and you not being around. That way you can complain that users don't wait for answers, even if those answers are never going to come.
  2. If a user hasn't read all of your website, all the mailing list archives, the wiki, the old wiki, all the blogs of all the developers, and the text files in CVS, refuse to answer their question. They should study harder before they're entitled to ask questions.
  3. Don't bother to write stuff down. If a user asks a question which they could have worked out by spending two years studying the code, then they should have spent that two years.
  4. Remember, you understand this software. If someone wants to use it to get their work done, they should be prepared to understand all aspects of it in detail as well as you do. All users should be developers.
  5. NEVER thank people for feedback. If they have comments on the program, they should be sending in patches.
  6. It's a lot more important to finish rewriting the XML library your program uses for the third time than it is to fix a bug that makes every Fedora user crash their whole desktop. They should be using Slackware anyway.
  7. If you're an influential developer at all, your opinion matters more than the users. Follow the previous rule, as it will definitely produce a positive outcome. Be sure to relate the users in question to mentally ill people and excrement.
  8. What you think users will do is more important than what users actually do.
  9. Don’t use punctuation or bother with the spell checking. This slows down the communication between you and the user.
  10. Insult the user. This establishes control, which is important. Support should be thought of as a battle. Popular insults include “asshole,” “mother f**ker,” “dipshit,” and “newb.” Insulting their mother is another good way of establishing control.
  11. If you’re confused by the “bug report” that the user is giving you, don’t feel bad, as this isn’t your fault. This is the user’s fault. Users live in a different world. They’re besuited, annoying, stupid people who aren’t able to clearly get points across. Tell them this, as they probably don’t realize it. It is sure to ease the communication.
  12. As a developer, you know clearly what users will want to do with the software better than they do. If they say something about the software, take it with a grain of salt. They're only the people who actually try out your theories; you're the one who came up with them.
  13. Insist that all users run CVS or svn HEAD. If they're using your latest release stable version, they should be prepared to checkout CVS and compile it before commenting on it. A version release or downloadable binary distribution means nothing when there's something newer available from source control.
  14. If someone you know tells you how they would use your software, and someone who actually uses it tells you differently, trust the person you know; after all, you know them. This is doubly important if the person you know is another developer.
  15. Documentation is a pointless waste of time. If someone complains that they're finding it difficult to do anything with your program because there's nothing written anywhere on how to use it, then tell them to read the source; that's good enough.
  16. If someone files a bug which turns out to be a duplicate, be sure to let them know how stupid they were when you link the two bugs. This is particularly important if the two bugs share no words in common whatsoever and only turn out to be duplicates after a week of digging and thought by you; after all, you had to work much harder then!
  17. Anyone who switches away from your program to someone else's is clearly both stupid and an enemy of free software. You're lucky to get rid of them.
  18. Programming ability and usability engineering are the same thing. If you know how to write code, you know about usability already; you certainly don't need to waste time studying it.
(with apologies to Christian "ChipX86" Hammond, who does none of these things)

Corrected addEvent function

Most of my unobtrusive DHTML scripts use the addEvent function, which has been copied from all over the place. The Opera people have very kindly dropped me a mail to tell me that it's wrong; it uses the line
obj.addEventListener(evType, fn, true);
when instead that line should be
obj.addEventListener(evType, fn, false);
The "true" and "false" bits relate to whether the event is "capturing" or not. Firefox has a bug where it treats "capturing" and "non capturing" the same here, meaning that it doesn't matter whether you use true or false. That's wrong. The Opera people have got it right, but are understandably a bit worried that no-one will believe them, so they're mailing people to ask them to update scripts. (Hallvord has more on this.) So, I've updated all my old scripts to use the fixed addEvent. (Newer scripts use the better all-new addEvent and aren't affected.) If you use any of my older scripts, in particular NiceTitles, aqdropshadow, JSES, or aqtree3) then please take an updated version from here. Thanks to Opera for letting me know!

More comment spam techniques

The latest comment spam technique here seems to be a script which looks at previous comments, grabs a paragraph from one of them, and posts *that* as a comment, with the URL being a spam URL. Anyone got any good ideas for how I can fix that? Since the earlier comments are legitimate, it's quoting legitimate text and therefore no spamtrap in the world will catch it. I could hack WP to check previous comments for the text they're posting, but that's easily get-around-able by changing the comment spammer script to replace "o" with "0" and all the other tricks we've seen in spam emails ("C1Al15", anyone?) Suggestions?

@media 2006

Dates and the site are now up for the @media 2006 conference, which looks good. Especially since I'm a a speaker; PPK, Simon Willison, and I will be talking about DOM scripting (no big surprise there, then!) Sign up now, you know it makes sense.

The Bloglines Plumber again

Bloglines is up and down like a yo-yo at the moment, and I'm sick of it. I'm moving to hosting my own RSS reader. Has to be web-based. Anyone got any advances on Gregarius?

Welcome to 2006

Here we are in 2006. The year in which I turn thirty, hooray! Well, maybe not hooray, Mum and Dad are here today (and yesterday) for a belated Christmas; yesterday was a little bit muted because Sam and I didn't get to bed until about 4.30am New Year's Eve, but it was still good. NYE itself was excellent; the LugRadio crew piled round to Jono's to argue about things and eat Matchmakers. Once again we demonstrated that Jono is wrong about everything, which was good. Or maybe not. Really good evening, though. I got to test out my phone by sending a Happy New Year text message to pretty much everyone I know, only to have the sending repeatedly fail because the network was busy. I imagine I am not atypical in this. Nice to discover that you can send one message to multiple recipients, though; I keep discovering that the SonyEricsson phone UI is streets ahead of its Nokia or Motorola competitors in lots of little ways. I got a set of optics, on which I have now mounted four bottles of spirits. There's something rather cool about being able to pour someone a drink like you're in a pub. Don't know what it is, but it's cool nonetheless. I'm also struggling with a threading issue in Gtk for a project I'm working on, about which more news soon. Happy New Year to all of you; I hope it's a good one.

This website belongs to Stuart Langridge. Contact details are available. Don't eat yellow snow. Valid HTML5, at least in theory, except for the bits that aren't because I'm that futuristic that I'm ahead of the spec, oh yes. HTML5 help from Bruce Lawson, among others. Fonts from the superb FontSquirrel. End.