Fascism Is Anti-American

I can’t believe I have to say any of this stuff. I shouldn’t have to. Nobody should have to say any of this. But I want to be on record. I want the world to know where I stand.

When I first started writing this, there were two points I wanted to make. The first was that Donald Trump, based on his stated positions, is not just conservative. He’s not just Islamophobic, or racist. He’s an out-and-out fascist.

I thought that was going to be a hard sell, so I started lining up citations and references. But over the past few days, everyone else has come to the same conclusion. I’m not the only one to call Trump’s ideology fascism. Fast Company did a well-researched and -cited piece on just that topic. A writer at Quartz called Trump an “American moral emergency”. And Slate’s Jamelle Bouie did a detailed analysis on what makes Trump’s ideology fascism, citing a tweet by one of Jeb Bush’s advisers that also called Trump fascist.

So I can dispense with the defense of that first point and concentrate on my second, more important one:

The scary thing isn’t that Trump is a public, blatant fascist. He’s just one man, after all. The scary thing is that huge numbers of Americans agree with him. Huge numbers of Americans would happily re-enact the opening steps of the Nazis’ “Final Solution“. That terrifies me. And it sickens me.

Eighty years ago, millions of Germans went along with a program of “let’s force the Jews to wear an identifying patch on their clothing.” There isn’t a lot they could say in their defense afterward[1], but one thing they could have said was “we had no idea it was going to go that far after we made them wear the patches.” Today, we Americans have no such excuse. We know exactly where this path leads. We have grown up on tales of the Nazis’ ruthless genocide, and our own heroism in defeating them, and on lines like “once you start down the dark path, forever will it dominate your destiny, consume you it will…” And yet millions of us will blithely cast that aside, and vote for a man who wants to slap an identifying badge on all Muslims — in the nation we claim to be “the land of the free”?

I am disgusted.

There’s no way to tell for sure if the firearm-bearing, anti-Islamic protesters who circulated a list of names and addresses of “Muslim[s] and Muslim sympathizer[s]” in the town where Ahmed “Clock Boy” Mohamed used to live are also Trump supporters or not. But a friend of mine saw that article and pointed out, “These are Brownshirt tactics.”

Protesting with shotguns and semi-automatic rifles in front of a minority religious temple? Publicizing the names and addresses of people who either are, or support the rights of, members of a particular religion (and one with strong ties to an ethnicity and culture)? These are tactics that are specifically intended to intimidate people.

This is leading up to the next Kristallnacht. In America this time, not Germany. If it doesn’t happen in Irving, Texas, maybe it’ll be in Dearborn, Michigan, or in Paterson, New Jersey. And after storefronts are smashed, mosques burned and houses plundered… then what?

People have already spoken approvingly of the internment camps we sentenced American citizens to, back in World War II. That’s the next step on the dark path. Here, in America, people are laying the groundwork for a genocide.

I am sickened by how many of my fellow Americans are going along with this. I am disgusted. Our country has no right to call itself “the land of the free” when it does things like this. And nobody who supports it can call themself a good American — this is about as un-American and flat-out anti-American as you can get.

Nine years ago, the last time I heard a call for putting “identifying marks” on Muslims, it turned out to be a hoax — one that drew a disgustingly high number of supporters out of the woodwork. At that point, 39% of people polled supported the idea. I can only hope the percentage has dropped since then, but it obviously hasn’t dropped far enough.

And the number should be zero, dammit!

If you support this, you are not an American. You are a would-be Nazi.

[1] And, to give them credit, they mostly didn’t even try to justify it afterward. As a nation, they owned up to their crimes, and took their lumps, and have vowed to never again allow such a thing. You’ll note that Germany is the single nation in the EU that’s taking in the most refugees, the most eagerly. ↑↑

Why Did My Layout Just Go All Wonky?

If you add Boostrap’s CSS to a layout that’s already working just fine, you may find that things shift in strange, subtle ways. And even not-so-subtle ones, like basically your entire layout breaking.

Generally, this seems to manifest as block-level elements becoming too small, and clipping out content inside their bounding boxes. A div that used to be tall enough to hold a a 40-pixel-high navigational icon suddenly cuts off the bottom half of it. The right-floating aside that used to look just right now looks oddly too-narrow — and you don’t have a screen-shot of its old appearance, but you could swear the line-breaks are in different places. Like, maybe, there’s not quite as much text on each line anymore?

You’re not going insane. The problem is that you originally built your layout using the W3C box model, where width declarations apply only to the content of a box and the padding, border and margin are all considered to be “extra”, outside that width.

And then you added bootstrap.css, which includes * {box-model: content-box;} in it.

And now your layout is using the IE Quirks-mode box model, in which width applies to the visible parts of a box, meaning the padding and border as well as the content. This is arguably much more intuitive than the W3C model, but it can also be argued that once you’re no longer sucking at your mother’s nipple, “intuitive” just means “whatever you’ve been trained to expect”.

So if you weren’t expecting to have all your boxes suddenly be measured from border to border instead of just across the content itself, then you might not consider this “intuitive”. But now, hopefully, you’ll at least recognize the problem and know how to fix it.

Of course, Bootstrap isn’t the only CSS framework that includes a box-model: content-box reset. Now that support for content-box is widespread, lots of frameworks and CSS resets are using it. Bootstrap is just the one that happened to actually cause this problem in my actual life recently. In case you were thinking this seemed like an unlikely occurrence.

This also serves as a lesson in the importance of knowing what the heck is inside the third-party libraries and tools you’re using. Just blindly including without understanding what they do (or how they do it) will lead to problems down the road. (In this case, a scant few feet down the road!) They’re kind of like abstractions that way — they have a strong tendency to leak.

Thoughts On “The Rating Game”

I started reading The Verge’s recent article, “The Rating Game” (subtitled “How Uber and its peers turned us into horrible bosses”), and quickly started thinking, “Wow, I have to tweet about this. Including some comments I have.”

By the time I was halfway through, I’d come up with so many comments, they’d have required a huge tweetstorm to fit them all into. Instead, I’m taking my own advice to just write up a blog post and then tweet the link to that.

These are various reactions to various parts of the article — and partly just to the entire thing as a whole. They’re not necessarily in any particular order (point-by-point, order of importance, whatever).

Worse Than Dystopia

Talking about how customer ratings can get Uber/Handy/etc. workers fired, The Verge’s Josh Dzieza pointed out that “If you imagine the things customers rate down for as firing decisions in a traditional workplace, they look capricious and harsh. It’s a strange amount of power for customers to hold, all the more so considering that many don’t know they wield it.”

And I was reminded of the awful, dystopian first few chapters of Marshall Brain’s online essay/novel, Manna, where workers’ job time is ruthlessly monitored and controlled by expert systems that give them orders through headsets and track their productivity according to creepy, quasi-Taylorian work metrics. Workers know that they can and will be fired — automatically, by the system’s algorithms — if their productivity falls below a certain level.

The Uber setup reminds me of Manna, except it manages to be even worse. In the science fantasy land of Manna, at least the decision to terminate you was made by a computerized, unbiased algorithm driven by vaguely objective data. In the reality that Uber’s employees live in every day, the decision is made by assholes who want to bring drinks in the employee’s car, or who dislike the fact that they have a beard (for reasons that may well be pure xenophobia of one or more types).

We’ve managed to make a real-world system that’s worse than a fictional, didactic dystopia.

Think about that for a few minutes. It gets worse the longer you ponder it. Read More »

What’s Wrong With the “Minimal Weighings” Puzzle for Front-End Interviews

A while back, I came across a post by Philip Walton, who points out that most front-end interview questions aren’t well suited for their basic task of… well, testing a candidate’s front-end development knowledge. At least, the sorts of things he ran into were mostly “logical puzzles, generic coding challenges, and algorithm design problems”, as opposed to the kinds of questions that might test a candidate’s actual knowledge of front-end coding.

I’m happy at my current job, have been so for five years now, and don’t expect to be on the job market again any time soon. But if I were out there, I’m sure I’d run into more of those puzzles and brain-teasers. Like the one that runs:

You have N coins. They all weigh the same amount, except for one that is counterfeit. It might weigh slightly more, or slightly less, than the other coins. You have a balance, which can compare the weights of any two objects. How can you determine which is the counterfeit coin, using only X weighings?

Some time, I want to respond to that question about determining which of a set of coins is the “wrong” or “deviant” weight with a minimal number of weighings like so:

Me: Why only three weighings? Does it cost us money to use this scale or something?

Interviewer: Well, maybe not money, but it does take some time. So you could think of it as representing a way of minimizing how many CPU cycles the operation takes.

Me: Fair enough. But come on, are CPU cycles really that scarce? This might be a reasonable question to ask an Assembly or even C programmer, or if we were going to be working in an embedded system with limited resources. But seriously: You’re interviewing me for a client-side web development position. Any environment my code runs in has more than enough CPU.

Interviewer: Some people’s phones are kind of underpowered…

Me: No. Look, any environment my code is running in has a full, complete GUI running on it. That thing is using up so many more CPU cycles than a few extra comparisons, it’s not even funny. Sure, I should know about algorithmic complexity, and I should prefer constant-time algorithms, then O(log n) ones, then O(n) ones, before getting into O(n log n) or O(n2) ones. But shaving a few comparisons off one loop? That’s ridiculous. That’s optimizing for the wrong thing, namely, CPU cycles over programmer time and effort and brain-space.

If I ever need to know that particular algorithm, I can look it up. Which is why I’ve never bothered to learn it. But seriously, if I ever need to know that algorithm? Then we are doing something completely wrong, and probably at an architectural level.

This will probably not get me the job. That’s completely okay. That job is broken, because its interview process is broken — it’s selecting for the wrong thing(s). Which means everyone else at that job has already been selected on the wrong criteria.

I can’t fix that. The best I can do is keep my distance.

But if you’re using questions like that as part of your hiring process… think again. What are you selecting for? What do your coders actually need to know, and what are things that they will never, in a million years, need to use on the job?

And which of those things are your interview questions testing?

(By the way, if you want some decent front-end developer interview questions, you can find a bunch at https://github.com/h5bp/Front-end-Developer-Interview-Questions.)

Microsoft Continues Their War Against Uptime

One of the things we’ve heard about Windows 10 is that it’s “the last windows version”, and from here on out, there’ll just be patches, incremental updates, and maybe the occasional service pack.

So, in some ways, it’s sort of like Chrome’s habit of silently upgrading itself with no muss and no fuss. Except for one problem:

Microsoft still can’t seem to send Windows updates without requiring you to restart the whole computer. Which means blowing away all your browser tabs, all the documents you were working on, and whatever other stuff you had open. It’s really annoying, and a major pothole in any workflow.

My Surface Pro Experience

I’ve had a Surface Pro 3 for a few months now. I’m generally pretty happy with it — it’s a wonderful balance of the form factor, weight, and portability of a (large) tablet, with all the power of a full Windows desktop machine[1]. It’s got decent startup time and pretty good battery life.

And it’s running Windows 8.1, so I’ve had some experience with its update schedule. Read More »

Book Review: The Martian, by Andy Weir

In something of a departure from my previous themes of web/software development and political/cultural issues in tech, I’m doing a book review. Given that it’s The Martian, it is something that that’s likely of interest to geeks… but as time goes on, I may branch out even more.

What I’m saying is, this coyote’s tracks are likely to start wandering from the territory they’ve previously covered. Coyotes do that.

It’s funny how long it can take us to get around to doing things. I’ve had a to-do item in my phone since December of 2013 that I should find and read Andy Weir’s The Martian — a friend with good taste recommended it to me then. I’ve had the actual, physical book sitting around my apartment for something like six to eight months now. And yet, it’s only the imminent release of the movie, plus the fact that I’ll be attending a sci-fi con next weekend and I want to be able to converse about the thing, that’s finally gotten me off my ass to crack the thing open.

The more fool me. I should’ve read this thing ages ago! It’s just plain awesome.

It’s been described as “Robinson Crusoe on Mars” and as “Cast Away on Mars”, and, not having seen or read either of those, I suspect those descriptions are good, as far as they go. And xkcd’s Randall Munroe says it’s for people who wish all of Apollo 13 had been more of the scene where the engineers have to figure out how to connect the two incompatible air filters. Which is funny as hell, but sells the book short.

Yes, this thing is rock-solid, hard SF, in the vein of the scene in Have Space Suit, Will Travel where the protagonist does time/​distance/​acceleration calculations to figure out that his captors have probably taken him to Pluto (and he just happens to have memorized the orbital distances of all the planets[1]). Yes, there are numbers, there are chemical elements and compounds, and there are calculations of how many liters of hydrogen you can extract from such-and-so many liters of hydrazine. Other parts hinge on just how many calories per kilogram you can get from potatoes, and how many square meters of space it takes to grow them.

But despite all that science, this book did not garner its considerable acclaim by appealing to a narrow, sci-fi-nerds-only audience. The bedrock of the book is science, but the theme is that of human ingenuity triumphing over adversity. Its heart is about a whole bunch of people, all working together for a common goal, even when, at times, they can’t contact each other. Read More »

Skipping Regexes in ES6 is Nothing Compared to Skipping Boolean-Comparison Warts

Yesterday, Wes Bos tweeted about ES6’s startsWith(), endsWith(), and includes() methods. He said it was “[t]hree less JavaScript Regexes you’ll have to write”.

Which is true, but I feel it misses the point. I mean, the regexes for initial match and final match are really not that hard, and the regex for plain inclusion is, well, basically the bare form of any regex: put slashes around it, and you’re done.

The coolest thing about these new methods isn’t the ability to change /^foo/, /foo$/, or /foo/ into just plain foo. That’s a savings of at most three keystrokes, and fairly little cognitive load. No, the coolest thing about these is not having to add != -1 at the end of them!

I think looking at it as “not having to write regexes” is really missing the point. In fact, I’m going to dust off something I wrote on a private Livejournal, back in 2007:

When doing regex matches on strings, I’m sick and tired of writing things like:

if (some_string.search(/some_regex/) != -1) {

In particular, it’s the bold part I object to. And for what it’s worth, there’s a similar wart in PHP, where searching for a substring requires the construct:

if (false === strpos($haystack, $needle)) {

In both of these languages, the problem is that the function or method that’s doing the searching isn’t returning a strict Boolean, but it is being evaluated in a Boolean context. PHP’s strpos() returns the position at which the needle starts in the haystack string (which may be zero if the needle is right at the beginning of the haystack), or FALSE if the needle isn’t there. JavaScript’s string.search() method similarly returns the position at which the matched text starts (which, again, may be zero), or -1 on failure.

And both of these languages evaluate zero as false in a Boolean context, so that you can find the text you’re looking for (right at the beginning of your string) and have the if statement claim it’s not there.

Perl avoids this entire problem by simply making a binding to a pattern match return Boolean, and not bother giving you the position. (To be honest, you hardly ever need the actual position.) And maybe I’ve been spoiled by years of writing things like:

if ($some_string =~ /some_regex/) {

…but, honestly, I think Perl is getting it right and the other two are getting it wrong.

So that’s what I wrote back in 2007. At that time, of course, PHP and Perl were both more significant; I wouldn’t mention them nearly as much today. Which is a bit of a shame, because the analysis of how too much information makes life harder is still apropos, and Perl still gets it right in a way that various other languages don’t.

The ES6 methods help fix that, because they just return Boolean, instead of getting all fancy-pants and giving you the position where the match was found. (In fact, back in 2007, when everyone was using Prototype.js and the idea of messing with built-in objects’ prototypes wasn’t as unfashionable as it is now, I pondered adding a function called “contains” to the String prototype in my company’s standard JavaScript library. And check it out; Firefox and Chrome have a String.includes() method, which used to be named contains() at least in Firefox.

But they still only take a case-sensitive string to search for, not a regex. Which makes me sad.

I Feel Like Part of the Problem

In San Francisco now, I no longer feel like a useful, contributing member of The City’s social or cultural scene. Merely by virtue of being “a developer”, I feel like I’ve become Part Of the Problem.

I sure as hell try not to be. I try to encourage the arts; I try to defend and promote nightlife and clubs; I try to encourage affordable housing. I’ve lost track of how many times I’ve tried to explain to other laissez-faire, “the free market will fix everything!” types why just building “housing” (i.e., market-rate housing) in San Francisco right now means “building housing for millionaires and multi-millionaires”, housing that people making less than, say, $200,000 a year cannot possibly afford.

But when a dear, beloved friend tweets: “Had one of those little things happen today that upped my feeling of “threat level” and need to bug the F out of SF.”, I don’t just feel the need to respond with “Do you want to talk about it?” or “Is there anything I can do to help?”

I also feel the need to say: “I’m sorry.”

Not just in the sense of “I’m sorry to hear that a bad thing happened to you today,” but in the sense of “I feel like I’m personally partly to blame for this, and I am sorry about that.”

Because I’m a developer. I’m not part of startup culture, thank Goddess — I bailed out of that toxic mess of sexism, overwork, and self-delusion five years ago, and haven’t looked back. But I am still part of “high tech” culture, to some degree.

And despite my efforts to improve it, I’m sick and tired of being associated with it.

I’m not about to change careers, of course. For one, I have a dependent; I can’t just chuck everything and take months to retrain myself (in what, anyway?) and do a career-shift. And for two, I don’t want to cede the field to the kind of brosephs and entitleist assholes who are making “developer” a dirty word in places from San Francisco to Hamilton, Ontario. Better that I stay and fight to make high-tech and software development be the forward-looking, inclusive, diverse kind of field I want it to be.

I just don’t feel like it’s working, right now.

Year-End Self-Grading

The past couple of years, I’ve posted a couple of year-end retrospective posts, analyzing how much I’d posted, and how much of it had to do with gender issues. Time for this year’s round-up! (A few days late.)

This year (well, last year), I managed only 12 posts total. Which sucks. Of those, two were tagged with “gender”, for a rate of 16.667%. Which is above the 10 or even 12% that I’d like to maintain.

But somehow, with only 12 posts written at all, it feels pretty unsatisfying. Especially given that I completely missed Ada Lovelace Day. (I was sick a lot in the run-up to it. Which is no excuse.)

Then again, the fact that my gender posts had nothing to do with Ada Lovelace Day is kind of encouraging — it shows that I am actually operating according to the principles I set forth in my original “Ada Lovelace Day Is Not Enough” post: Don’t ghettoize posts about gender into just one day of the year.

Still: Need to post more. That’s the bottom line, MAKE MOAR COYOTE TRACKS.

The Opposite of Spam

I got the most astonishing email the other day. I can only describe it as the opposite of spam, in two different ways. I’ll get to just what the ways were in a minute. First, the back-story.

It seems it must be a year since I bought John Resig’s Secrets of the JavaScript Ninja. (I highly recommend it, by the way.) Manning Publications gave me a PDF, shipped me a book, and since then, they’ve periodically sent me other emails for things like half-off sales.

But then they sent me one titled “We hate to see you go”, that said: “According to our records, it’s been over a year since your last purchase from manning.com. We want to confirm your interest in hearing about news and special offers from Manning.”

So, the first way this email was unlike spam: It was based on a pre-existing business relationship. Even among the most ardent spam-haters, I don’t think I’ve ever heard anyone claim this isn’t a valid communiqué.

But the second way it was unlike spam is that, despite that pre-existing business relationship, it didn’t assume I’d be interested in receiving their emails and simply offer me a teensy unsubscribe link in case that were wrong. No, instead, this email explicitly said: “To continue receiving email from us, please click the link below or reply to this message…. If you do not confirm your interest, you will no longer receive any promotional emails from us.” (emphasis in original)

Wow! The default action is “we’ll stop sending you marketing crap, even though you’ve already bought something from us before.”

Needless to say, I’ve already clicked on their “keep me subscribed” link. This is the kind of company I do want to keep hearing from.

Marketers, take note: This is how to do it right.