Archive for February, 2007

28
Feb
07

A short rant against party politics

This is irritating on a number of levels:

First, we have one of the most spectacularly imbecilic features of Canadian politics: tight party control over individual MPs’ votes. This control spits in the face of the electorate — really, why bother electing someone from your own riding when all s/h/it’s going to do is vote at the party leader’s beck and call? That’s the beauty of Canadian federal politics — you and your riding can get it right in the shitter when the party whip compels your MP (the one you elected to represent your community in Ottawa) to vote against your best interests.

Next, we have Wappel’s disgusting groupthink:

Indeed, Wappel said he’s stunned that he was the only Liberal to vote Tuesday with the government given previous Liberal support for the security measures.

“Given that it was Liberal legislation, given that our own Liberal ministers told us that there was nothing that they could suggest to us to fix in the act, I’m flabbergasted that I now find myself the only person supporting the Liberal legislation that the Liberal ministers supported,” Wappel said in an interview.

Right. The bill was Liberal, so Liberals should support it. Liberals who don’t support Liberal legislation are traitors to the great Liberal cause (heh heh heh — one might say they’re illiberal, a pun whose irony pleasantly destroys the illusion that the Libs are at all interested in, well, liberty). Looks like Wappel’s striving mightily to stave off the sad realization that he backed an Orwellian piece of legislation.

The truly odious part of this story, though, is that which isn’t included — any objective discussion of the measures themselves. To Wappel and Dion, this isn’t about abuse of power or civil liberties, it’s about Liberal party politics. Dion’s asserting dominance, and Wappel’s defending his flag.

Neither one gives a fuck about us.

27
Feb
07

This is why I like minority governments

Steve and his Conservatives got a newspaper about the nose today:

Harper couldn’t get a coalition together to extend two never-used and questionable anti-terrorism laws. What did these laws permit?

One of the measures allows police to arrest suspects without a warrant and detain them for three days without charges, provided police believe a terrorist act may be committed.

The other measure allows judges to compel witnesses to testify in secret about past associations or pending acts. The witnesses could go to jail if they don’t comply.

No potential for abuse there. Nope, not at all.

But wait, say the Conservatives: these provisions have never been abused. How do we know? They’ve never been used in the first place!

The two measures have never been used by police or prosecutors.

Kind of makes you wonder why they’re on the books, doesn’t it? It’s not as if Canada hasn’t been under any remotely likely terrorist threat, what with troops in Afghanistan, the Air India trial clusterfuck, and last summer’s no-liquids-on-airplanes hysteria (among others). If these measures were at all useful, I imagine they’d have been used.

So, two abusive and unnecessary pieces of legislation down, thousands to go. It’s a good start.

26
Feb
07

Soccer, headscarves, and hissy fits

We begin in la belle province, where headscarves and soccer don’t mix:

But it didn’t stop there. Briefly:

Five young teams from across Canada walked out of a Quebec soccer tournament Sunday because a young Muslim girl was ejected for wearing a hijab.

Curiously, the ref claims that headscarves are banned for safety reasons, while the tournament organizers claim that “The wearing of the Islamic veil or any other religious item is not permitted”. Both would have more credibility if they could pick a story and stick to it.

So far, so good, right? The issue here is where we should draw the line between religious freedom (freedom to wear headscarves, even if they might catch on something and strangle you) and organizational freedom (freedom to make your own rules for your own organization, even if they offend people). In the case of the Quebec Soccer Association, these two freedoms are in conflict. (Hey, nobody said liberty would be easy.) Both sides are debating it in the media, the QSA lost five teams from their tournament (and presumably lost both money and credibility as a consequence)… society marches on.

But that’s not enough, is it? Not for Canadians: here, government’s gotta get involved.

I suppose one could attribute Charest’s interest to his reëlection campaign — it’s reasonable for politicians running for office to tell us where they stand on the issues of the day — but, in principle, I’m annoyed that the Premier is immediately jumping into the fray, as if we simple peasants can’t be trusted to resolve the issue ourselves without the help of the Nanny State.

Of course, it’s entirely possible that the QSA is itself an organ of the nanny state (or rather, the nanny province). In that case, it’s perfectly expected for the provincial government to explain their decision — they owe it to their citizens — but leading off with a sound bite from the Premier seems a bit theatrical.

More ominous is what Charest has to say: it’s okay, they were playing by the rules.

“One of the practices of soccer is not only the sport itself on the field, but also the behaviour of the players, and how they are expected to behave towards each other, and the rules around how they are dressed,” the premier said Monday while campaigning for the Quebec provincial election. “My understanding is that the referee applied the rules of the soccer federation.”

Now, maybe I’m being a bit too cynical here, but it strikes me that the head of the provincial government — the body which makes the rules — has a vested interest in promoting unquestioning adherence to the rules (any rules) as The Right Thing To Do. After all, if people started questioning the QSA’s rules and getting away with it (damn uppidy peasants!), they might graduate to questioning the province’s rules.

And who knows where that might lead?

21
Feb
07

Dear internet: Shut up about God, already

No, really. Shut up.

Look, if you’re trying to argue about God or religion on the internet, you’re fighting a losing battle, no matter what you do. Everyone’s far too deeply entrenched in their respective positions to ever change, no matter how keen your wit or how lengthy your barrage of rhetorical artillery.

This isn’t a matter of “atheists versus theists” or “Christians vs. Muslims” or any such dichotomy you wish to propose. There are infinite arguments for or against the most minuscule facets of any particular theology — or lack thereof — and the internet being what it is, most of them are going to be represented. (For the math geeks in the audience, that means the cardinality of the set of viewpoints on religion represented on the internet is something like \aleph_1.) You are not going to win. You are not even going to break even.

In fact, after so much histrionic argument, the whole question has become profoundly uninteresting. “Is there a God, and does he want women to cover their heads?” I don’t care! It’s a question beyond evidence, beyond experimental reasoning, beyond the capacity of ZFC set theory to answer — and therefore, beyond temporal meaning or interest. All you’re doing is shouting about opinions of things that, de dicto, you can never hope to understand in a way that will let you convince others of your rectitude.

Shut up and read Kierkegaard, and look to your own faith rather than trying to convince me that I should (or shouldn’t) believe in your particular version of the Divine.

16
Feb
07

Chalk one up for the good guys

In case you haven’t heard:

Summary: airport security drops the ball, pilot and passengers pick it up and score.  I guess after September 11th, 2001, people just don’t like being hijacked.

Good show!

15
Feb
07

Science vs. Truth

Scott Aaronson over on Shtetl-Optimized just put forth a damn good article:

The point that sticks out to me is that science isn’t concerned about Truth, it’s concerned about results. In Scott’s words:

Regular readers of this blog will aver that I do have beliefs, and plenty of them. In particular, I don’t merely believe evolution is good science; I also believe it’s true. But as Richard Dawkins has pointed out, the reason evolution is good science is not that it’s true, but rather that it does nontrivial explanatory work.

Scientific investigation doesn’t produce “the truth”, and mistaking theories for claims about How Things Really Are can get you into a world of epistemic shit. What scientific investigation produces are theories — equations and conjectures that try to explain the past and predict the future, each just a little bit better than the last.

For example, Newtonian mechanics did an outstanding job of explaining the past and predicting the future for most reasonable problems. A few centuries later, Einstein wonders what happens at extremely high speeds — and General Relativity replaces Newtonian mechanics. Reality didn’t change. Our idea of what reality is didn’t change. The only thing that changed was the set of tools we use to reason about reality. The “Newtonian mechanics” tool worked pretty well for most problems, and still does. In principle, we could replace it entirely with the “General Relativity” tool, but for the most part GR is harder to deal with, so we use NM for most problems and GR for the things it can solve that NM cannot.

Then there’s quantum mechanics, which essentially deals well with very small scales that NM and GR can’t touch. QM and GR are, so far as we can tell, incompatible. Does this reveal a horrifying paradox in the nature of reality? No, it just means we haven’t found a single tool that we can use to answer every question we know how to ask. I don’t have a combination screwdriver, blowtorch, and table saw, either.

I think this is what really scares the creationist crowd: not that natural selection is a threat to their beliefs about the origins of life, but that natural selection doesn’t care about their beliefs. Natural selection isn’t at heart about truth or belief — like all theories, it’s about explanation and prediction. The sort of people who do wonderful things with theories like natural selection aren’t interested in truth: they’re interested in utility. And even if the creationists are right, their “theory” isn’t going to help epidemiologists check the progress of antibiotic-resistant bacteria (for example).

11
Feb
07

Mesh data structures, vol. 1: Vertex-face lists

So Boston is being remarkably stupid, and New York is being remarkably stupid, and I just can’t bring myself to give a shit. These places are the centroid of grass-eater activity in the United States — the centre of grass, if you will — so the fact that they’re freaking out over inanimate objects is not only unsurprising, but entirely expected.

Instead, I’m going to talk about graphics programming. To wit: how do you build a data structure to store triangle meshes?

The first thing that comes to mind may be something along the lines of:

typedef struct {
    float x, y, z;
} vertex;

typedef struct {
    vertex a, b, c;
} triangle;

typedef struct {
   size_t n_tris;
   triangle* tris;
} mesh;

This is basically a triangle soup — a huge wad of independent triangles. But that’s not really such a hot idea.

For one thing, each vertex can appear on any number of triangles. By representing a mesh as a blob of independent triangles, you’re duplicating vertices for no good reason. This doesn’t just cost you storage space — it also makes your life miserable when you’re trying to do stuff to vertices (like, say, animate your mesh). Rather than modify each vertex once, you have to track down every triangle containing that vertex and modify the copies.

This is, as they say, a pain in the ass.

Furthermore, the mesh file from which you’re getting your data probably stores it in a different — more sensible — format: namely, a list of vertices, followed by a list of faces. Each face is defined by indexes into the vertex list, not by explicit vertices. This is what we call a vertex-face list mesh representation.

By amazing coincidence, vertex-face lists are also quite convenient to draw quickly with OpenGL (and, I presume, DirectX).

Let’s do that instead:

typedef struct {
    float x, y, z;
} vertex;

typedef struct {
    size_t a, b, c; /* indices into vertex list */
} triangle;

typedef struct {
    size_t n_verts;
    vertex* verts;

    size_t n_tris;
    triangle* tris;
} mesh;

/* ... */

void
draw_mesh(mesh* m)
{
    glVertexPointer(3, GL_FLOAT, 0, m->verts);
    glDrawElements(GL_TRIANGLES, 3*m->n_tris, GL_UNSIGNED_INT, m->tris);
}

There’s a little bit of subtlety going on in that draw_mesh call: I’m assuming that arrays of vertex and triangle structs will behave like arrays of floats and size_ts. This is generally true for C code, but probably false for C++ if you add any extra crap to vertex and triangle (for instance, if you inherit from one of them, thus forcing C++ to give you a vtable). It may also break on 64-bit machines if they insist on lining up structs on 8-byte boundaries.

Note that modifying vertices is now straightforward: change the appropriate vertex, and all of its adjacent triangles reflect that change. In fact, it’s now easy to store (say) animated Quake 2 character models: you keep one vertex list for each keyframe, interpolate between them as you please, and render the interpolated frame using the single triangle list.

This brings up a matter of terminology. When we describe a mesh, we need to describe its geometry (the position in space of its elements) and its connectivity (which elements are adjacent to which). In this case, the vertex list describes the mesh’s geometry, and the face list describes its connectivity. In theory, all we need to do stuff to this mesh are these two chunks of data.

However, look back at our first attempt. We can also (in theory) do everything we need with a triangle soup — it’s just more annoying. Vertex-face lists are more convenient structures to manipulate than triangle soups, but they also have their annoyances — for instance, any operation on a mesh’s edges is a pain in the ass on a vertex-face list. However, if all you need to do to a mesh is draw it (really fast, even) and maybe change its geometry, the vertex-face list is just the ticket.

08
Feb
07

The magic fat pill?

Well, well, well.

What have we here?

The drug orlistat – made by GlaxoSmithKline (GSK) and sold as Alli – reduces the amount of fat the body absorbs from food. It is a half-dose version of a prescription medicine called Xenical, sold by Roche.

So basically, this is an artificial reduced-fat diet in your intestines.  You eat a bunch of stuff, orlistat prevents some of it (some of the fat) from being absorbed, and you shit the excess fat out.  Remember how well that worked before?

Most of the (surprisingly negative) press coverage has focused on orlistat’s uncontrollable-liquishits side effects, but let’s step back for a minute and see whether this is a good idea in the first place.

Well, reduced-fat diets are basically reduced-calorie diets: one gram of fat has 9 kcals of energy, some of which gets converted to glucose and (if not used) stored as adipose tissue.  So if you do nothing else but take Alli, you’ll cut some fat from your diet, and therefore some calories.  That’s going to work mildly well in the short term, as reduced-calorie diets tend to do.   The problem there is that your body doesn’t like losing fat — from an evolutionary perspective, fat is your last-resort protection against starving to death.  Therefore, your body would rather slow its metabolism to preserve that life-saving fat (at the expense of, say, muscle) than burn it off and leave you all sexy-lookin’.  (It’s a damn shame, but it’s true.)

Further, if you cut too much energy from your diet, you’ll just convince your metabolism that you are starving to death, and it’ll work as hard as possible to save every last gram of fat.

Now, consider that orlistat only blocks (some) dietary fat… but not all calories are fat calories.  You could eat a pound of sugar or drink a gallon of Coke for lunch, and that lumpy-looking blue pill won’t do squat to keep that sugar from turning into glucose, and then into adipose tissue.  Too many simple carbs in your diet?  This stuff isn’t going to fix your problem.

Okay, so we know that Alli blocks some fat from being absorbed — that means it’ll prevent some fat-soluble vitamins from being absorbed, too.  That’s perhaps not such a good idea.  (Again, orlistat is basically a reduced-fat diet in a pill, so the same goes for other reduced-fat diets.)  I imagine this stuff will also reduce absorption of essential fatty acids and CLA.

Is all of that worth it?  If you look at the weight loss figures reported in the study, you’ll notice that not much is happening.  The control group (low-fat diet plus placebo) lost about five pounds in a year; the experimental group (low-fat diet plus Alli) lost about twelve.  (I’m getting those figures from a CNN report, by the way, not that New Scientist article.)  Honestly, that’s none too impressive.   One can generally expect to lose (or gain) about a pound of body mass a week while staying healthy — if you pay attention and make that work for 90% of the year, that’s about forty-five pounds.  That’s from diligent attention to diet and exercise, incidentally, without the risk of crapping your drawers every time you eat a hamburger.

Further, the study only reports weight loss (you didn’t think I’d leave out my favourite hobby-horse, did you?), not fat loss, changes in body composition, or anything else.  Losing weight is easy — go to the kitchen, grab a steak knife, and saw off an arm.  Presto!  You’ve lost weight.

Is this stuff worth two bucks a day?  I doubt it.




anarchocapitalist agitprop

Be advised

I say fuck a lot
Grammar Nazi

Categories

Archives

Statistics FTW