20050717

Cloud now running x.org

I just upgraded my main workstation, Cloud (named after the famed FF VII character with the big-ass sword) to use X.org.

Was a mostly painless upgrade. Didn't even follow existing instructions on the upgrade; I just noticed that a dist-upgrade grabbed a lot of xorg packages, so decided to take a look at xserver-xorg.

Initial problems: couldn't get OpenGL to work right. That didn't take too long to fix, though I'm not sure whether it's the refresh of the configuration I did or today's dist-upgrade that fixed it.

Second problem: it didn't really want to upgrade my XF86Config-4 file. Solution: nuke it, reconfiguration the package, and let debconf do the work.

There were a few other annoyances (mostly related to the dga and xv extensions that are never installed by debconf, for odd reasons), but it's been extremely painless. The main remaining annoyance is packages that still insist on linking on the original version of the OpenGL libs (such as xscreensaver-gl or doomlegacy); those won't install. But such is life on the unstable tree.

A lot of people reported better performance, but I haven't noticed anything. However, the radeon driver has always been very good even in XFree86, so that may explain it.

The main positive is that I'll finally be able to counter taunts from the Arch Linux fan at work. :-)

Enabled comments

OK, I decided to enable comments, mostly so I get an idea if anyone except Code Ronin reads this, or if I'm "pissing in a violin" as one of my French friends likes to put it.

Note, however, that you'll need to create a blogger user to be able to add a comment. This is in an effort to prevent too much spam. Maybe I'll move to a moderation-based system at some point in the future, but that would require migrating all of the blog. Right now, despite previous complaints, blogger is free, simple, and publishes to an FTP site, so I'll keep using this.

20050630

Darn blogger...

Wish they'd tell me when they add options that break layout like "enable float alignement" that default to what it used NOT to be without telling me... Was wondering where the <div style="clear:both;"> was coming from...

Holy Wordpress, Batman!

Glad to see The Code Ronin gave his site an uplift. Awesome work; congrats on your new baby! :-)

20050629

On the Canadian gay marriage legislation

Far be it from me to unilaterally praise the current federal government's policies (a lot of them are just so much improvisation, and, much as I like many things in the NDP program, I'd rather see that money administered by the provincial government, thanks very much), but I'm rather happy they finally got around to voting for legislation of gay marriages. Even though it's very much an abstract concept as far as it comes to my own life, I think it makes sense, and for once, we can be proud to be at the forefront of social liberalism. We're usually proud to be at the forefront of liberalism in North America... which isn't saying much in general; USians are a bit stodgy when it comes to such things.

But this is not about the law itself. Rather, it's about the people they find in news roundtables such as Le Point to claim that it's a bad thing.

The argument goes something like this: marriage is meant to protect families. In Quebec (and in the rest of Canada as well), we would be in a huge demographic deficit if it weren't for immigration. By trivializing marriage, we are removing special protections to families and making them general. Therefore, we'll worsen the demographic deficit, making our situation worse.

This strikes me as an extremely convoluted argument. Furthermore, I think it's completely bogus.

One of the so-called "key" arguments given against gay marriages is that they can't have children by definition. Well, it's not that clear, nor is having children or not a criteria for marriage, even in ancient times. Consider:

  • Couples where one or both spouses are sterile are allowed to marry last time I checked, even in the Catholic church. Otherwise, you'd have to pass a fertility test before marriage, which I would find somewhat offensive. What business is it for any institution to only allow one to love those they can have children with?
  • Couples where there are no children, for a variety of reasons (some more frivolous than others), are allowed to remain married. Practically, those people cannot have children, although they theoretically could. Shall we force divorce on those people? Keep in mind they may have very unselfish reasons not to have children (say, fear that they won't be able to provide for them, or fear that they wouldn't be good parents--maybe there should attempts to diminish such fears, but I don't think we can condemn people who believe this).
  • Couples sometimes adopt unwanted children of other families. Why not gay couples? I concede that this is a whole 'nother can of worms; there are fears over the lack of a role model of each sex, for instance. However, studies have been made on this, and they have found no significant differences between children raised by gay couples and those raised by heterosexual couples1. From that point of view, gay couples can, theoretically, raise children. The way they'd do it wouldn't help demography much, but it may make the life of those children much more bearable. Instead of being thrown between foster homes, they'd get a stable family, albeit a still unconventional one. But I suppose those against such practices are also against getting the government to intervene when children are mistreated, so there wouldn't be as many adopted children. I guess.
  • Some will say that although it's not allowed to force people to have or renounce children (and the latter is debatable, because it seems acceptable to many), it doesn't mean that we should allow people who can't have children to have them. In that view, fertility assitance should be disallowed as well. This would definitely have a worse impact on demography than any gay marriage; fertility rates are dropping alarmingly on the planet, to the point that fertility assistance may become necessary in many cases.
  • And as for gay couples adopting disallowing childless heterosexual couples from doing same, when we run out of children to adopt, we can deal with that. It doesn't seem to be a problem right now.
  • If someone's gay, you can write them off the demographic curve anyhow; even though they are physically able to reproduce, they will probably choose not to. Why force them to do so as a façade, then? Should we force nuns and priests to renounce their vows for demography's sake? Yeah, yeah, it's not the same. Whatever...
  • In any case, what difference does it make that gays can marry? Who does it hurt, except some sensibilities? Keep in mind that once upon a time, black people sitting in the front of a bus was hurting some sensibilities as well. Also, keep in mind that nor the law nor the Supreme Court mention an obligation for religious marriages to be celebrated. So, if you're a catholic, you can simply dismiss it as a civil marriage, having no value before God, and sleep extremely well at night knowing that all is right with the world. Maybe it's just a folly of our lay society. Just ignore it and let the non-believers live the way they want.

For the record, I'm officially a Catholic. However, I don't agree with the precepts much, knowing that they take such... ah... conservative (*cough*backwards*cough*) stances on abortion, gay rights, and especially contraception. And one better not go to much about how such practices are banned by the Bible, because I'll dig out that passage about Sarah practically throwing a handmaid (little more than a slave, really) in the hands of her husband Abraham because she was sterile (Genesis 16:1-6; also see "The Handmaid's Tale" by Margaret Atwood for an interesting twist with this whole mess). Do you think that's acceptable? Is that different from adultery? Because she was a slave? Is slavery acceptable? And if it was in those times and not anymore, why is it different with contraception?

And don't get me started on Harper's comment that the vote's legitimacy is tainted because Quebec separatist Bloc MPs made the difference. Well, if he's right, I'll consider any vote that passes because of Conservative MPs is null and void because it was done by a bunch of rednecks who are chronically stupid due to spending most of their times looking at their navels and congratulating themselves for being keepers of decency, while their standards on decency are at least 40 years out of date. But he's wrong, so I won't do that. Again for the record, I have no great love for the Bloc, but dammit, they were elected, and whether I agree with them or not, they are legitimate MPs and have the right to vote for a bill. If Conservatives are frustrated that they don't have the balance of power in the minority government because they can't get any votes in Quebec, they have only themselves to blame. I would've voted for Joe Clark at the previous election, but no way I'd vote for Stephen Harper and his gang of merry Alliancists. I feel they'd do as lousy a job representing me and my values as the Bloc would representing the values of a guy from Toronto.

Rant mode off.

OK, short summary: Gay marriage legislation passes. Me happy that I don't live in backwater country like another I won't name. Next step is to legalize marijuana, just to completely piss off our neighbors down south <g>


1 I heard a testimony of a scientist about this at the Quebec National Assembly in 2002. I don't think anyone disputed the claims at the time; the methodology is likely valid. Ironically, when I was looking for information on this, I found this nugget, which mentions that Quebec adopted adoption gay right laws after Alberta. Amusing.

20050620

Sometimes, you just can't win

Man, I've been really unlucky on the transportation front recently...

Saturday, it's Housewarming Party time at one of my friends' house. The directions on the invitation suggest that there's plenty of free parking in the area, even though it's in Old Montreal (and on weekends, it's true that free parking is usually available). So, I think, instead of taking one hour of public transportation and worry all night that I'll miss the last bus, I get my car and drive down there. After all, my car has to be good for something; I certainly don't use it much right now.

So, down the 25 I go; take the Souligny thing, drive down Notre Dame (avoiding potholes all the way and cursing the 60 kph speed limit, which I respect but apparently nobody around me was willing to take into account). It's going well, and I expect to be only 15 minutes late.

Then I see police lights in the middle of the road. Uh oh. Looks like Notre Dame is no go; detour through Ste-Catherine street. OK, up Pie-IX I go. Down Ste-Catherine. It's really slow going, and I wonder whether it wouldn't have been faster to bike all the way.

Traffic gets even worse. I can't figure out how the one-way streets are laid out in that area, ever, but I manage to go down St-Denis, hoping to reach De La Commune. Damn, Notre Dame is closed there as well. I drive west, until McGill, on René Lévesque (which is really crazy at the first interesection, because eastbound cars hit the barrier and turn left, right in our way, not letting anyone pass. Bastards). Go down McGill, which, thankfully, is open. Find De La Commune. No parking.

Huh? Well, half of De La Commune is closed. Figures. Mess around for 30 minutes trying to find a parking, until I find one somewhat far (Duke and Wellington--ten minutes walk, which feels really silly if you have a car...). Finally reach the party, one whole hour late, with a knee ache because I'm not used to driving for such extended periods anymore. Woe is me.

Sunday was OK, mostly because I brought my dad to a movie for father's day. The movie was La Marche de l'Empereur, which I highly recomment. Nature has some really screwed up setups for some species; we should be grateful we're mostly wired to kill other species rather than to keep eggs warm until we barely have enough strength to walk. I ended that day with a bike ride to the IGA on Langelier and Jean-Talon. A really easy ride, since Langelier is an underpass. Easy, that is, if I don't take the idiot who almost exited to the service road on me... I mean, I was pretty visible, and the guy only needed to slow down a tiny bit (I was pedaling like crazy), but instead, he speeds up, trying to beat me to the exit. Moron.

Today, everything started out smoothly. I had less trouble climbing the Galeries d'Anjou overpass than on previous days, so I know I'm starting to get in better shape.

Then, disaster; the whole metro is paralyzed by smoke, as some circuit breaker or another caught fire somewhere on the orange line. I'm stuck at Frontenac. Good thing it wasn't +30 Centigrade outside, but the sun was strong and the sky completely cloudless. I waited for the 125 Ontario for 20 minutes, until I figured out that it wasn't going to show up, and that even if it did, I wouldn't have any room in the bus. Why is it that the STM have no emergency buses ready within mere minutes in those situations?

So, I walk to Berri-UQAM, thinking of taking the orange line (I though it was only the green line that was affected in this case). Get there, hit a locked door. I asked some STM employee, who told me that the whole metro was shut down, and to take the 15 if it ever managed to show up. Waited for the 15 a little bit (maybe 10 minutes), then got fed up and walked to the office.

  • Total mileage: 4.7 kilometers.
  • Total UV exposure: probably 30 minutes in full sun.
  • Total minutes late to the office: 45 minutes.
  • Total cups of water consumed upon arrival: 10 in two hours. I had picked that day to forget my water bottle.

Needless to say, I'm quite tired now, I'll probably hurt like hell tomorrow, I'll be surprised if I didn't get sunburnt (hadn't expected such a long stay under the sun), and the ride back from the metro was much harder, tired as I was. Plus, I had to leave early to attend the condo association's meeting, so I'll have to stay late tomorrow.

Woe is me.

On the plus side, I'll have tighs of steel for my beach vacation in a few weeks. Maybe I'll get a few interested looks. I better, because it was a lot of work, dammit, and not even all of it voluntary!

In any case, it got me more quality time with Kajiura-san's Madlax soundtrack. I got a lot of respect for the "Saints" track (great marching song) and "Flame". Also, I'm getting a bit obsessed with the "Madlax" song itself. Such obsessions usually last a couple of months, so I'm not to worried yet, just thankful I have earphones so nobody else has to suffer from said obsession.

20050611

Weather complaints again

Remember me complaining about how it was friggin' cold a while back? Well, now, it's friggin' hot (28 C, NO WIND and humidity at 61%, which, at 28 C, is really, really humid and sticky and disgusting). Only in Montreal, I tell you... No wonder people always mention the weather when explaining why they won't move to Canada. I used to think they were wusses, but now, as I melt in my chair, I'm thinking maybe I was a bit hasty in judging them...

I do have A/C, but I don't really feel like using it, it was cold for too long and I intend to suffer for complaining about it.

(The real reason is that I'm trying to save on my power bill and that I dislike "canned air". I'll probably turn it on if I'm unable to sleep at some point)

And I actually went to the grocery store on my bike this morning. A nice lady wished me "bon courage" as I pedaled out. I thanked her, though I didn't think I'd need any. I wouldn't have if my stupid chain hadn't unhooked itself from the gears while I was going back on Jean Talon. I guess I was a bit too hard with the dérailleur.

Took about 10 minutes, once back home, to get all the grease off my hands. My shorts, unfortunately, were a bit more attached to it; thankfully, it's just the front of the pocket that suffered when I got my keys out.

In other news: I finished Star Ocean 3, which was a pretty good game overall (although the plot twist towards the end sucked--enough so that I felt like never playing the game again in retaliation). It's a beautiful game, mostly because they bothered to animate eye movements and convey the characters' moods through them. I'll probably play it again eventually.

Also got the Mad Lax OST through not-quite-legal means (it seems like it'll be available on Amazon on July 5th, I'll order the legitimate copy then). My respect for Yuki Kajiura grows every time I get some new stuff from her. The OST left me with no particular impression when I first listened to it, but on second listening, I realized how strong some tracks were. It's probably not her best, but it's still extremely impressive. It's strange how her music either surprises me completely or grows on me after I initially disliked it. Definitely an amazing composer.

20050605

I must be crazy

I must've clocked 24 klicks on my bike today. Not even close to the 40 klicks the "Tour de l'Île" people do, but that's the point--I'm not ready to do the tour-de-l'Île, and I want to be ready for next year. Whether I'll be able to maintain my shape during winter is another story, I guess...

I should've picked a less busy street than Viau to go down to the Maisonneuve park, though. I think I breathed in a lot of hydrocarbons. Down with cars! Hurray for bicycles! (except in winter, of course)

It was a good workout for myself, but also for the bike. I had ridden to the metro so far, but never farther than that. There are a few problems with the derailer that I'll need to look into, but besides that, it's a sturdy, reliable workhorse so far.

Anyhow, I'm sure I'll sleep extremely well tonight. And hurt all over tomorrow...

20050503

Why Free Software matters

No, I haven't turned into Richard M. Stallman.

I'm not in the habit of linking to trade press articles; most are trite. This one, however, summarizes my whole take on proprietary vs. free. Proprietary licenses give rise to abuses of power more often than not. That is why, as a general principle and if possible, they should be avoided. I don't care how much of the economy rests on them; a lot of the economy used to rest on strip mines, and those are still seen as harmful and as needing very strong regulation.

Now, in the bitkeeper case, it's a bit more complex, because one could argue that there was no good substitute at the time. And I can understand Linus' position of wanting to use the best tool. However, what I find unfortunate is how Linus and Larry reassured everyone that exactly what happened would not happen. Whose fault it is, doesn't matter. The fact remains: a proprietary program gives all the power to the author, and none to the customer. If you're going to use a proprietary program, make damn sure you freeze the license at least for the version you're using, so that conditions don't get changed retroactively. Better yet, if you have a free software alternative that fits the bill with minimum customization, just bite the bullet or hire someone to do it for you. It may cost more up front, but in the long run, it may actually be a safer proposition.

I know it's cliché, but would you buy a car with the hood welded shut?

(Interestingly enough, while there is a move for software to become more transparent, cars are actually becoming more opaque, but that's a whole 'nother can of worms...)

This said, take the time to read RMS's writings, instead of just putting him in the "communist" box. What he says is very similar to this. Some claim his arguments are "moral" rather than "practical" (and some discuss the morality of what he says). I contend that there is no difference; what is morality for, if it's not meant to help figure out praticalities?

20050501

On the limitation of ORM systems

Lately, I've been wondering why so many ORM systems tend me to throw up my hands in disgust and hope I'd just written straight SQL.

There's the Object-Relational impedance mismatch, of course. That alone is a big killer. The fact that relational systems support declarative rather than object-oriented data is a big problem. Another is that relational systems discourage encapsulation; you should know, when designing a database, exactly what you're going to store, because it dictates relationships. In OOP, refactoring objects to move state data around is no big deal. After all, what's one more pointer dereference? Especially when it's as likely that the refactor causes one less pointer dereference.

In relational systems, where the data is is one of the most important decisions. It dictates index structure, how many joins you need to make, how easily you can access the data from different parts of the system, etc.

Whatever ORM system you want to use, it must truly address this concern. Lazy-loading is not an answer. Neither is select n+1. You need something that can anticipate object queries (maybe from hints as to what objects are related when you pull an object graph) and collapse large joins into a normalized object graph.

But that's not the only problem. Another is the "garbage generation" problem.

This is a problem, mind you, that is mostly specific to garbage-collected languages where objects are very heavyweight (i.e., Java, C#; Python objects are heavyweight, but so are primitives, so I don't count Python in there). Even if you collapse large joins, each query will generate a lot of temporary objects. This is fine if you're actually going to do something with them. But what if you're only trying to display them to the user?

For such situations, a simple query with queries on column names may work better; especially since you can use limit/offset to tabulate the data. However, it's extremely annoying to lose the ability to query a typed object; working with string column names is annoying, it makes it hard to refactor, you don't get code completion, etc. Admittedly, all those things are crutches and aren't especially necessary to programming, but it'd be nice if you could have them.

But if you try to generate objects from a large query, you generate a lot of garbage. All that for a simple table display! A table display that is, in most business applications, very likely to be much more frequent than table updates...

The ideal interface, to me, would be to get an iterator that returns a single table row object graph at the time. Unfortunately, very few ORMs offer that.

The last problem is that many ORMs really, really want to provide your database schema. They'll work with custom schemas, but it's always a big problem. It's, to be fair, a really hard problem.

That said, I think Hibernate really handles many of those things well. So does iBATIS SQL Maps, although it does different things well. I'd like to have a combination of both, that is, the power of Hibernate with the ability to write custom queries. Or I'd settle for an iBATIS extension that makes it easier to handle multiple database dialects, and a way to have it iterate over result sets rather than populate lists. Or maybe iBATIS already does this; if anyone knows how, please drop me a line.

UPDATE: iBATIS has queryWithRowHandler(), which probably works the way I'd like it to. It's probably better than an iterator, because people forget to close result sets. Should have checked before starting to write this. All that's really missing is the custom database support. And, according to the todo file, they have no support for BLOBs yet (I know a few applications where this can be a problem). Still, overall, it looks like an interesting solution when you have to recycle an existing schema.