Older blog entries for apenwarr (starting at number 28)

19 May 2004 (updated 25 May 2004 at 01:09 UTC) »

This weekend I was going somewhere Southwest of my apartment, so when I left my apartment, I started by going East.

Well, I wasn't in that big of a hurry.

I only went one block East, then I turned South, walked down that way, and went West to get to my destination.

The thing that interested me about this was when I realized I had never travelled that route before - the street one block East of my apartment is pretty nice, but I never use it. Everywhere I want to go is always to the West. I've tried pretty much all the routes that involve travelling "strictly non-East", but this time I got to see a lot of different, interesting things, just by allowing my path to stray a little bit.

I do have the tendency to overoptimize my travelling. I suppose most people do. This is why we need NonDirectionalFridays at work - although we often neglect them. That's dangerous, because it limits our perspective.

5 May 2004 (updated 25 May 2004 at 00:50 UTC) »
Que Sera, Sera

I've had the song Que Sera, Sera stuck in my head for days now. It's a nice, relaxing, relatively happy song, but it's actually terribly misleading. Whatever will be, will be? That's so depressing, and it's a self-fulfilling prophecy if you believe it. Who says it will be? jnc might blame Tao, but I'm not so sure.

Full Disclosure

I figured out the moral dilemma presented by my last post: what, specifically, makes People Hacking seem so icky?

The answer is that I didn't actually lie about anything (the only exception being that I didn't really find the contrast very interesting, but that's pretty minor) - but I didn't exactly tell the whole truth either. I let someone believe what they wanted, even though I could have told them the real truth instead. That's really akin to lying, and it's Generally Not Okay, particularly if you're good at it.

The right way to deal with people is to tell them not just the truth, but the whole truth, so they can make informed decisions of their own. Although nobody can ever present things in a truly objective way, it's pretty bad not to make your best effort at it. (There appears to be an exception to this rule, however, with questions of the form, "Does xxx make me look fat?")

So, in the interests of full disclosure, I should say something important about one of my previous entries. Several people have corrected me: it seems that Germans did not, in fact, invent tanks. They invented good tanks, which is not the same thing.

3 May 2004 (updated 21 Mar 2007 at 17:47 UTC) »
People Hacking

This weekend, me and a few friends went to see a short film. It was a pretty good film, but that's not the point of this story. After the (free) film screening, there was free wine and sushi for all comers, because it turned out that this was the first ever showing of the first ever film by this particular director, who was also the main actress in the film. Neat.

I stood around for a while among the wine-drinking sushi-eating people, which included my friends, and eavesdropped on some conversations. The director, meanwhile, was drifting between groups, asking people what they thought about the film. I noticed that she replied to almost every compliment by complaining about the contrast - it wasn't how it looked in the pre-screening; she couldn't decide if it was her own fault or if it was something fixable on the projector. I, of course, hadn't noticed anything about the contrast, which seemed fine to me, insofar as whites were mostly distinguishable from blacks.

Me and my friends also discussed some other things we noticed in the film, such as the colour, the use of different imagery, and so on. The film meant different things to different people, which is normal in an artsy film like this. I memorized some of those things.

Eventually, I gathered up the courage to greet her myself. I started: "Hi, nice to meet you. I thought your film was really good - but I found the contrast particularly interesting. Did you do it that way on purpose?" Well, that certainly got her attention. I then tried out some of the post-analysis I had gathered from my friends, and I could tell she was pretty impressed. I knew this because she asked, "Are you studying film?" "No, I'm a computer engineer." "Wow, well, you're certainly observant. Most of the people here just give me empty compliments and tell me how nice it was, but you really have an eye for detail."

I'm not, of course, particularly observant, and I still don't know anything about contrast. The point of this story is that I don't have to. I do know about other things, and I learn more every day - and against my will, the sum of this knowledge gives me the ability to lead, mislead, encourage, discourage, all by putting the right words and actions in the right places. I used to avoid people and play with computers because they were so predictable, while people were incomprehensible. I'm always disillusioned to find out that people can be understood and controlled just as easily. And it's much easier than programming, actually. Perhaps that's the saddest thing of all.

While you weren't looking, Javascript became a real programming language

Prototype-based object-orientation, component interfaces, first-class regexes and iterators, anonymous functions, a built-in HTML parser and streaming multi-connection, asynchronous HTTP retriever, an event-based programming model, and a built-in standards-compliant UI library (ie. the web browser). Not to mention a worldwide repository of open-source sample programs.

If you're like me, everything you think you know about Javascript is wrong. Last week I spent a few days actually reading through the latest relevant standards (HTML4, CSS2, DOM2, Javascript 1.5) and writing some test programs ("html pages") to try them out. I discovered two amazing things:

- IE 5.5, Mozilla 1.5, and Konqueror 3.1 all mostly comply with all three standards. There is a common useful subset of those standards supported just fine, without random variations, by all three browsers. (Give up on Netscape 4 support. It's stupid. Nobody uses it anymore. If they do, just send the losers home.) By the way, Javascript is implemented just fine in all browsers. All real-life problems are mistakes in implementing CSS2 or DOM2, not Javascript itself.

- You can write useful programs using Javascript and DOM2, and those programs aren't even ugly anymore. Really! I mean, you can say things like "document.forms.myform.mybutton.background = 'blue'", and you can pass buttons, forms, tables, rows, columns, or anchors into functions or objects that do things to them. How much more sensible can you be?

In the process of my testing, I wrote a function that easily sorts any HTML table by any column you click on, another function that automatically applies alternating CSS styles to alternating rows in all tables in your document, and another one that retrieves an HTML file, parses all URLs from its content, and dumps those into a listbox. It took a bit of work to "discover" the subset of DOM2/CSS2 that is supported by all browsers, but in the end I didn't need *any* weird browser-specific conditionals to make it work. You hear me? None!

Kudos to Microsoft

Congratulations to Microsoft, by the way, for getting more than 80% of the people in the world to use IE 5.5 and higher, and thereby nearly eliminating the need to support any non-DOM2/CSS2 browser. Microsoft may or may not have gotten their browser share by being evil - but they got people to *upgrade* their browsers by being amazingly good. IE 6.0 isn't noticeably slower than IE 4, it runs on Win98 and later (and I think IE 5.5 works in Win95, even), and upgrades are free. Those things put together mean that we can have what Mozilla promised but never delivered - a world in which everyone of interest is running a standards-compliant web browser.

CSS is designed by idiots

While Javascript and DOM2 are works of genius, I have nothing at all good to say about CSS. Without going into too much detail, I'll say that the following is an extension, added in CSS3 (yes, version 3.0 of CSS, which nobody supports yet) to allow odd-numbered rows to have a different style than even-numbered rows:

tr:nth-child(odd) { /* stuff */ }
tr:nth-child(even) { /* other stuff */ }

That's right. CSS is so bad at representing what it wants to represent that it needs a *special extension* just to be able to identify even/odd rows. Javascript is simple, easy, scriptable, and because of the lousy tag-matching model, more browser CPU time is spend rendering CSS2 than running Javascript that does the same thing. Somebody deserves to be shot.

Holistic Management

As I learn again every day, the art of management is not really about telling people what to do. It's about making people think the way you want, so that they automatically do the right thing without even consulting you about it. A little nudge here, a little nudge there. Politics, I guess, is even more subtle.

And then one day, you notice that big parts of the world are doing exactly what you want without you nudging them first, and it starts to seem a little suspicious. Who, exactly, is the one being managed?

Taiwanese Buddhist Monk Karaoke Singalong Dance Party

...and don't even ask me about the Chinese accordion guy.

Last week it was Iraqi Hip-Hop Bubble Tea, and now this. My life is definitely too weird.

Get a Better Job... before it's too late!

In my continuing attempts to make software testing at NITI sound as cool as it is, I've revised the job descriptions again. Perhaps you should apply as an Evil Death Ray, an Evil Minion, or an Evil Visionary. Jobs available in our Toronto and/or Montreal offices.

Oh, yeah, and we're still looking for coders too.

Capitalism in Action

After reading a few semi-depressing books and articles about the way standard-economics-as-taught-in-school doesn't actually work (because almost all markets are inherently imperfect), and mostly agreeing with them, I realized that right now in Montreal I'm surrounded by examples of perfect free-market capitalism: restaurants.

Some background: some major reasons capitalist markets fail are incomparable goods and high cost of entry. For example, I can buy cotton from just about anybody with cotton, but CorelDraw just isn't the same as Adobe Illustrator. They're similar, but I can't only compare them on price; I have to decide which one I want more. Furthermore, some guy off the street can't just walk in, make a better graphics package, and sell it to you: he has to spend a lot of money (the "cost of entry") first. One big reason Microsoft can maintain their monopoly is that the cost of just getting started competing with them can (and does, regularly) put just about anyone out of business.

So basically, the software market is depressing, because I only took Economics 101 and it can't be explained by that. In my continuing attempts to simplify my model of the universe, however, I moved to Montreal, which brings me to my point: restaurants. Useless trivia: Montreal is second only to New York City in North America for "number of restaurants per capita", ie. the number of steps you have to walk down the street before stumbling into some food.

There are all imaginable prices of restaurant (and at varying quality, of course), and lots of each type, so they have to compete on price. You can buy as large or small a quantity of food as you want. You can start a cheap restaurant and quickly move up in the world, so the cost of entry is relatively low. And the market, in action, is amazing: just watch the consumers get sucked dry! No matter how much money you have, you can spend every last penny, no more, no less, on food, and still feel good about yourself, as this example shows. If you normally buy groceries, then eating out is a treat. If you normally eat at Burger King, then eating out anywhere else is a treat. If you normally eat at cheap diners, then eating at a nicer cafe/bistro is a treat. If you normally eat at nice bistros, then eating at a fancy restaurant is a treat. And if you always eat at fancy restaurants, well, Canada has a lovely progressive income tax system.

20 Mar 2004 (updated 30 Mar 2004 at 04:06 UTC) »
Popularity Contest Popular

Yay, after all these years, my popularity-contest has made it to slashdot. Of course, most people seem to have assumed the code is totally dumb; they missed the fact that it only votes for packages that you actually *use*, not just the ones you install, so it's not inherently wrong. There are also lots of silly comments about how you shouldn't choose your packages based on popularity... well, maybe that's not how you should decide what to install (and maybe it is), but it makes perfect sense for the most popular packages to be on the first (and maybe only) disc!

I have to say, the people who took over popcon from me (since I'm lazy) do seem to have put a fair amount of good work into it. At least, they have cute graphs of the results.

Update 2004/03/29: Italicized "inherently." It just needed it.

Conferencing in Germany

I'm in Germany right now at Chemnitzer Linux-tag. Chemnitz is a town, and Linux-tag means "Linux day," which is slightly wrong because it's actually two days. The going theory for the misname is that the correct, pluralized name would be "Linux-tage", but we stupid anglophones would probably mispronounce "tage" much worse than we mispronounce "tag", so they leave it the way it is. Plus it might have been only one day, once upon a time.

Speaking of stupid anglophones, there are only two of us here (me and dcoombs, who is doing a talk on WvStreams), in a conference that some estimate has about 1800 German-speaking attendants. This is strange. In fact, I was getting really worried at first about the fact that we spent a lot of money to fly us here and neither of us understands, well, any of the talks. However, pphaneuf was totally right: the point of a technical conference isn't the presentations at all. It's the conversations you have with people outside of the presentations. And I've learned a lot by talking to people:

IPv6, Itanium, Dylan, Subversion, Non-sucky X Compression!

It turns out that IPv6 sucks much less than I thought, and Intel's Itanium sucks much more. Both of these revelations came to me from Matthias of symlink.ch, who showed me seamless, painless, easy IPv6-over-IPv4 and told me about his actual experiences programming efficient Itanium assembly language. So in both cases, he ought to know.

I also had an interesting discussion about the Dylan programming language. Tim Pritlove, a big proponent of the language, told me why it was theoretically so great, and I bounced him some tough theoretical criticisms (thanks, slajoie and pphaneuf, for providing me with most of these) that he mostly answered satisfactorily. Of course, nothing proves a language like actual real-world use, and, well... it doesn't have any. Still, very educational. I might try it out and see if the only reason it's not popular is that people like me don't try it out.

Other bits of wisdom: Subversion seems really good, except your whole repository is in one big, probably corrupted bdb database. Nomachine has now GPLed the important parts of their very excellent (I tried it months ago) NX X/VNC/RDP/etc protocol compressor. If you've tried other X protocol compressors before (eg. the worse-than-useless LBX), forget them; this is the real deal. And now you can get away without paying for it!

But most importantly of all:

German Bathroom Construction

German bathrooms are totally awesome. And I mean that not in the, "Yo, d00d, that awesome stuff totally r0x!" kind of way, but rather that when you experience one of these bathrooms, you are actually in awe. It's the kind of awe that makes you think, "You know, if me and this bathroom got in a fight, the bathroom would definitely win, big time."

In Canada, bathroom stalls simply don't lock properly. Don't get me wrong - they all have locks - but the locks, when they aren't actually broken, almost never line up with their sockets. This can't be just shoddy construction - it's shoddy construction combined with some kind of fundamental misdesign.

All German bathrooms, on the other hand (and let's be frank: I've tried a lot of them now, so I oughta know) are built like tanks. Not coincidentally, the Germans also invented tanks. The doors are super-solid, always line up perfectly, and have double locks. "No, I don't think that's locked enough, let's turn it one more time so it's extra locked!" And you're just not going to get out until you unlock - twice. I know, because I'm locked in my hotel bathroom as I write this.

In fact, all German construction seems to be this solid. You get the distinct feeling that anything built by a German is simply not ever going to fall down. And then you realize that we - yes, we, the people with the vastly inferior bathrooms - were actually at war with these people, twice, and somehow they lost. It's hard to believe.

19 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!