LGBT Wedding Cakes

This makes me uncomfortable. As much as I would prefer that bakeries not discriminate, I don’t like using the law to compel them to, both from a political perspective and from a legal one.

Politically, I think it’s a mistake. The argment for allowing gay marriage has long been that gay marriage has almost zero impact on straight persons. If you don’t support gay marriage, then don’t marry someone of the same sex. And many, if not all, conservatives understand that — especially in more libertarian areas. Gay marriage doesn’t change the rules for straight marriage. It doesn’t compel the clergy to officiate at gay weddings or live with a gay roommate or even be polite to gay people. But … now you can be compelled to bake a gay wedding cake. And that complicates the libertarian case for LGBT rights.

It also comes across as spiteful. Unless you think unhappy bakery owners make your wedding cake more delicious. Salty tears and such. Continue reading LGBT Wedding Cakes

On Charlie Hebdo and Sacred Cows

Cross-posted from Facebook.

A few of my more liberal friends seem to be taking the stance that “yes, it’s horrible to be killed for what you say, but c’mon, Charlie Hebdo was really racist / xenophobic / Islamophobic!” I don’t speak French and have no particular insight into French media, so I can’t really say it isn’t (although I think this Atlantic article below does a decent job of explaining what Charlie Hebdo actually is).

But I would like to point out that there is a difference between racist xenophobia and a general disdain for sacred cows. An attack on an institution, its beliefs, or its leadership is not the same as an attack on a group of people. It may very well offend many within that group, but offense is not malice. It may very well be wrong, but it is not wrong because it is racist or xenophobic.

By way of analogy, suppose Charlie Hebdo published an image of Thomas Jefferson fucking a slave. Right-thinking patriotic Americans would almost certainly take offense, but it wouldn’t be fair to simply describe the image as anti-American or America-phobic. It is less an assault on the American people and more a mockery of American exceptionalism. The left, most of all, should understand that distinction.

There’s an article floating around stating that Charlie Hebdo is not satire because satire is directed at the powerful and Muslims are not powerful in France. That may be the case (see above disclaimer about my lack of Frenchiness), but there’s a difference between mocking a people and mocking the icons and ideas which hold power over them. An unemployed marginalized refugee from Syria does not hold much power, but the restrictions against the depiction of Muhammad do.

That distinction matters. Much of the left is built on the principles of both respect for people without regard to their origin, and on “speaking truth to power”. But if you conflate a people with the things they believe, then following this first tenet excludes an entire class of “power” from the second. In its own way, an obscene depiction of a revered religious figure speaks truth to power as much as a protest that ridicules Wall Street, a speech by the Dalai Lama that “offends the feelings of the Chinese people” or, more topically, a satirical movie about the assassination of Kim Jong Un.

Pagination in Meteor

Meteor‘s a nifty “reactive” Javascript framework, and I’ve been plunking away on it with the help of the fantastic Discover Meteor book.  One thing I don’t quite agree with the book, however, is their Pagination Chapter (paywall, sorry) doesn’t actually implement traditional pagination so much as a variation on infinite pagination. That is, rather than show posts 1-10, then 11-20, their example shows 1-10, then 1-20, and so on.

This is potentially less-than-ideal for a couple of reasons. First, it forces the client to keep a growing number of posts in memory. 10-20 posts probably isn’t a big deal, depending on your app, but if you’re displaying hundreds of photographs (or animated GIFs), this could get pretty annoying. Granted, you can minimize the impact by only loading elements that are visible on screen, but it’s a headache that you don’t have to deal with traditional pagination.

The other potential issue is that, because Meteor is a real-time framework, the server needs to constantly monitor changes to the database and pass along those changes to the client. As the number of documents inside a database query grow, the number of updates being passed back increases as well. I haven’t been using Meteor long enough to know how much of an impact this makes in practice, but updating off-screen data is, at least, a sub-optimal use of bandwidth.

So, how do we work around this?

Continue reading Pagination in Meteor

Hong Kong

WP_20141116_16_11_55_Pro

It looks like the Occupy protests in Hong Kong are winding down. I had the chance to see what was actually happening on the ground last week and to talk with some people there. A few take-aways from my point of view:

The majority of Hong-Kongers probably don’t support continued occupation of city streets. I think recent polls have it at somewhere around 60-80% wanting the protesters to leave. I would further guess that overall support varies drastically based on age and how often they drive.

The challenge for pro-democracy activists is to figure out how to turn this into a long-run movement. Opposition to Occupy isn’t based so much on opposition to universal suffrage as a belief that direct confrontation with mainland China is a losing proposition.

Continue reading Hong Kong

Is it Constitutional to Suspend Deportations? What About Work Permits?

As much I’m OK with suspending deportations from a policy perspective, can the president constitutionally suspend deportations?

If you replace “suspend deportations” with “we will deport unauthorized immigrants who have not committed a violent crime ONLY AFTER we finish deporting every unauthorized immigrant convicted of a violent crime” (read: a long, long time from now — if ever), then that just sounds like prosecutorial discretion. It’s no different that letting someone arrested for public intoxication out of jail because we don’t have the resources to try every publicly drunk person out there. That doesn’t mean we technically can’t re-arrest that person and try them later (at least until the statute of limitations runs out), it just means we’re not going to do it any time soon.

One catch: Obama is saying that the deportation suspension will last three years. But he’s only in office for another two. If his (possibly Republican) successor decides to re-start deportations, I’m not sure that the Obama’s three-year promise will carry much weight in court.

What I’m not so sure about is the granting of work permits. You could argue that this power is incident to the president suspending (or deferring) deportations, but that seems like a stretch. This would be an affirmative act by the executive branch, as opposed the president simply declining to spend a limited pool of resources in a certain way. And given that Congress has already capped the total number of work-related visas to begin with, it’s an affirmative act that conflicts with Congress’s stated intent.

One possibility is to simply treat the “work permits” as the president saying he will defer prosecuting any employers who hire unauthorized immigrants with such a permit. But again — seems like a stretch.

Cross-posed on Facebook.

California Propositions 2014

Cross-posting my thoughts on this election cycle’s propositions for posterity’s sake:

Prop 1 – Yes. Spend more money on much-needed water infrastructure. The con argument as far as I can tell is that isn’t a magic bullet for CA’s drought problems (which largely stem from farming water-intensive crops in dry areas) and general concerns that the state isn’t very good at handling large sums of money (which would be persuasive if there were some more responsible group that we could hand the money to).

Prop 2 – Yes. Toughen CA’s rainy day fund. Good governance generally.

Prop 45 – No. I’m a bit torn on this actually (as is the Democratic Party apparently — Senators Boxer and Feinstein endorse but Nancy Pelosi opposes. Prop 45 requires that the Insurance Commissioner approves any rate hikes by insurance companies. In theory, this allows regulators to keep premiums down, but I’m not convinced that a lack of regulation is the reason for crazy health insurance premiums. Lack of pricing transparency and excess bureaucracy seem to play a bigger role, and Prop 45 doesn’t address that. However, Prop 45 would introduce additional delay and administrative uncertainty to putting new health plans on the Covered California healthcare exchange, which would reduce some of the options available to new enrollees. So, leaning no on this, but happy to hear from someone more familiar with how healthcare works.

Prop 46 – No. This proposition mixes together a bunch of medical malpractice issues that should really be addressed separately. The big one is that it increases the $250K cap on pain and suffering in medical malpractice lawsuits to $1M. This isn’t a big deal in and of itself — the $250K cap was put in place in 1975. Adjusted for inflation, that’s about $1M in today’s dollars (and really, as a lawyer, I’m not one to dispute higher jury awards).

What I don’t like though is that it requires mandatory drug testing of doctors whenever an “adverse event” occurs. Ugh. Being a doctor is already a pretty demoralizing job. Mistakes happen because doctors are human, and overworked sleep-deprived humans at that. Peeing in a cup won’t fix that.

Prop 47 – Yes. Prop 47 reduces penalties for drug and other minor crimes. Harsh sentencing guidelines haven’t done much to actually reduce drug use or petty theft. They have, however, cost us obscene amounts of money and wrecked havoc on civil liberties.

Prop 48 – Yes. The story behind Prop 48, as far as I can tell, is that when the state approved casinos for Native American tribes, a couple tribes got screwed by technicalities and left out. This just puts those tribes on equal footing with the rest of the tribes. Also, casinos don’t bother me and the tribes are giving us money.

(AngularJS) Testing headers with whenGET / expectGET

Jotting this down here in case anyone else stumbles on the same issue(s) in AngularJS.

Suppose you’re mocking out $httpBackend in a unit test and want to test headers, like so:

// Assume $httpBackend and $http have been properly injected above
it('should not send a token if none is set', function() {
 $httpBackend.whenGET('/api-call', function(headers) {
   expect(headers.Authorization).toBeUndefined();
 }).respond(200, {hello: 'world'});
 $http.get('/api-call');
 $httpBackend.flush();
});

This won’t work. If a function is passed to whenGET, it expects a true/false return value to signal whether the headers were correct. Instead, try this:

// Assume $httpBackend and $http have been properly injected above
it('should not send a token if none is set', function() {
 $httpBackend.whenGET('/api-call', function(headers) {
   return !headers.Authorization;
 }).respond(200, {hello: 'world'});
 $http.get('/api-call');
 $httpBackend.flush();
});

Now, however, when the header test fails, you’ll get the following error:

Error: Unexpected request: GET /api-call

This is a bit misleading, since it implies the $http call somehow never hit $httpbackend. However, the issue isn’t that the GET request was unexpected; it’s that the the GET request with that particular header was incorrect. If you swap whenGET with expectGET, you’ll get a much more sensible failure message:

 Error: Expected GET /api-call with different headers

In both cases, returning the correct header should make this failure go away.

The Use and Abuse of Text Messages

I have a new(-ish) pet peeve: receiving a text message when an e-mail (or a Facebook message or whatever) would suffice. As a rule of thumb, if a message does not require my attention within 24 hours, don’t text me. E-mail me.

E-mail’s pretty awesome. I can flag messages I think are important (or star them in Gmail). I can use tools like Boomerang to postpone responding to messages until later. I can search for old e-mails when I need to recall something that someone said. I can set up filters to sort my e-mails based on context. I can forward funny pictures to my friends. I can attach things (like calendar invites!). I can read and write them on my phone or my laptop. I can have more than one e-mail address and separate work e-mails from not-work e-mails. I can CC and BCC and do all the wonderful things that have been part of e-mail since time immemorial (1978-ish?).

Continue reading The Use and Abuse of Text Messages