Odd Plurals

We all know about irregular plurals like “mother-in-law” → “mothers-in-law”, “attorney general” → “attorneys general”. I just ran across another one, courtesy of a music podcast.
One of the hosts was saying that there are about 11,000 people who listen to the show, but only 100 or so write in or like it on social media. He added,

Where are the rest of the 10,900 people? You piece of shits.

(emphasis added)

Posted in Miscellaneous | Tagged , | Leave a comment

Kind Of

Do you remember, some years ago, some people had a habit of using “literally” not in the dictionary sense, but for emphasis, as in “The boss is literally breathing down my neck”? In recent months, I’ve noticed people using “sort of” and “kind of” not to mean “more or less” or “in a way”, but for punctuation, emphasis, or decoration.

A lot of times, adding “kind of” doesn’t change much (“we need to kind of speak up about this”), and so it is merely useless. At best, it means “the following isn’t exactly what I mean, but it’s close, and I want to move on, rather than waste time finding the correct word.”

Sometimes, though, it contradicts the rest of the sententce. I’ve heard “This is kind of really important.” And just this morning, in a news story about Afghanistan, NPR’s correspondent said,

I think for Mr. Mattis it’s slightly personal, which is he wants to come back and make sure that he’s connected over here and provides the best kind of advice on what to do forward.

Which immediately raised the question, “What kind of advice is the best kind?”

I’d like to appropriate a piece of advice often attributed to Mark Twain: instead of saying “kind of”, say “fucking”, your editor will delete it and your sentence will be as it should be. Except that people don’t employ editors in casual speech, so maybe autocorrect can be modded to do this.

Posted in Miscellaneous | Tagged , , , , | Leave a comment

Programming Tip: Open and Close at the Same Time

One useful programming habit I picked up at some point is: if you open or start something, immediately close it or end it. If you open a bracket, immediately write its closing bracket. If you open a file, immediately write the code to close it.

These days, development environments take care of the niggling little details like matching parentheses and brackets for you. That’s great, but that’s just syntax. The same principle extends further, and automatic tools can’t guess what it is you want to do.

There’s a problem in a lot of code called a resource leak. The classic example is memory leaks in C: the code asks for, and gets, a chunk of memory. But if you don’t free the memory when you’re done with it, then your program will get larger and larger — like a coffee table where a new magazine is added every month but none are ever taken away — until eventually the machine runs out of memory.

These days, languages keep track of memory for you, so it’s easier to avoid memory leaks than it used to be. But the best way I’ve found to manage them is: when you allocate memory (or some other resource), plan to release it when you’re done.

The same principle applies to any resource: if you read or write a file, you’ll need a file handle. If you never close them, they’ll keep lying around, and you’ll eventually run out. So plan ahead, and free the resource as soon as you’ve alocated it:

Once you’ve written

open INFILE, "<", "/path/to/myfile";

go ahead and immediately write the code to close that file:

open INFILE, "<", "/path/to/myfile";
close INFILE;

and only then write the code to do stuff with the file:

open INFILE, "<", "/path/to/myfile";
while ()
	print "hello\n" if /foo/;
close INFILE;

The corollary of this is, if you’ve written the open but aren’t sure where to put the close, then you may want to take a look at the structure of your code, and refactor it.

This same principle applies in many situations: when you open a connection to a remote web server, database server, etc., immediately write the code to close the connection. If you’re writing HTML, and you’ve written <foo>, immediately write the corresponding </foo>. If you’ve sent off an asynchronous AJAX request, figure out where you’re going to receive the reply. When you throw an exception, decide where you’re going to catch it.

And only then write the meat of the code, the stuff that goes between the opening and closing code.

As I said, I originally came across this as a tip for avoiding memory leaks. But I’ve found that doing things this way forces me to be mindful of the structure of my code, and avoid costly surprises down the line.

Posted in Hacking, Things I've Learned | Tagged , , | 3 Comments

“It’s Getting Old” Isn’t A Rebuttal

One response that I see a lot on Twitter and elsewhere is some variation on “calling Trump supporters racist is getting old”. And maybe I’m growing stupid as I grow older, but it finally dawned on me what was bugging me about that.

I’ve been in plenty of discussions where one side or another used an argument that had been debunked long ago — I used to debate creationists on Usenet, after all. But this feels different. It’s “Oh God, here we go again”, but not in a “now I need to dig up the FAQ one more goddamn time” way.

“Calling me racist is old” is all about style, not substance. It doesn’t say “I’m not a racist”, it merely says “Stop using those words”. It’s not about hearing a false factoid that just won’t die; it’s about hearing a joke for the millionth time that wasn’t even that funny to begin with.

It’s the sort of thing you say when you’re trading insults or yo-mamma jokes with someone. It’s not serious. It doesn’t matter. Certainly neither you nor anyone you know or care about is in danger of losing their health insurance, or die from a back-alley abortion, or have ICE break into their home and ship them to a foreign country.

It is, in short, something said by those who have the luxury of caring only whether their team wins, not whether said win is going to have any real-world repercussions.

Posted in Uncategorized | Tagged , , , | Leave a comment

Triggered by the Right Side of History

There’s a bit of controversy going on at Yorktown High School in Virginia, where teachers have put up signs:

Screen capture of controversial sign at Yorktown High School

Patriots Know:

Facts are not political
Diversity stengthens [sic] us
Science is real
Women’s rights are human rights
Justice is for all
We’re all immigrants
Kindness is everything
We are Yorktown

I gather that “Patriots” is the name of the school’s sports team, and by extension refers to the student body, not simply people who love their country.

What’s odd here is that conservatives have complained about these signs being overly-political. TV personality Tucker Carlson is quoted as saying,

Carlson called the signs “the sneakiest type of propaganda… propaganda passing itself off as obvious observations.” He asked [senior student John] Piper if anyone at the school thinks that science “is not real.”

Oh, I’m sure you could find some Juggalos to tell you that

Water, fire, air and dirt
Fucking magnets, how do they work?
And I don’t wanna talk to a scientist
Y’all motherfuckers lying, and getting me pissed

but I’ll concede Carlson’s point: pretty much everyone thinks that science is real, or at least supports that notion. But of course not everyone knows that science isn’t a body of knowledge, but a method for figuring out what’s true. Not only that, but a lot of people are very selective about which scientific findings they accept. And, well, not to put too fine a point on it, one major US party (hint: it rhymes with “Reschmuglican”) has turned into an anti-science party.

And therein lies the problem: as long time reader Fez pointed out, if the statements on the signs are seen as political — and specifically leftist — it’s only because the political right has rejected much that should be uncontroversial. Like the reality of climate change, and it doesn’t matter how many jobs you save if New York is under water and Nebraska is too arid for anything to grow.

Likewise, even though it’s obvious that women’s rights are human rights, since the eighties the Republican party has been running on the idea that imply, even if it’s rarely made explicit, that women take a back seat to men, and that their rights rank below those of a pre-sentient (not merely pre-sapient) bundle of cells.

Likewise diversity, justice for all, and tolerance of immigrants. The American political right is on the wrong side on all of these issue, and I think they know it and feel defensive about it.

This all reminds me of something Patton Oswalt wrote a little while ago:

But when I Tweet something POSITIVE, or HOPEFUL, in support of a group that’s been made to fear or doubt because of Trump and his ghoul brigade’s actions? A helpful link for peaceful action? Praising someone who speaks up eloquently against the smirking racism of Trump’s parking lot carnival of an administration?

THAT’S when the responses get violent, and threatening, and ominous. As if the language itself — the grammar of thoughtfulness — lands in their guts like glass shards. Empathy and understanding literally feel like an attack to them.

I don’t think he’s quite right about this, but I have to say that the Yorktown HS kerfuffle is data in his favor.

So if positive ideas bother you, or the implications of those ideas (e.g., if we’re all immigrants, then maybe someone who looks and speaks differently from you, whose cooking smells weird, and whose accent you can’t decipher, might move in next door to you), perhaps it would be a good idea to think about what it is that bothers you, and whether your fears are justified. Or, for that matter, whether you’re on the right side of history.


Posted in News, Politics | Tagged , , | Leave a comment

Now What?

So we’ve survived the first week of Trump’s presidency. Have some cake. If you were one of the many people who took part in activism, pat yourself on the back. If you weren’t, it’s not too late to start.

It’s great that everyone’s riled up. And while we’re pumped up and paying attention to government, it might be worth figuring out what our long-term plans should be. Here’s my list, in no particular order:

Gerrymandering reform

In case you forgot, gerrymandering is the practice of drawing legislative districts to favor one party (see, for instance, this map of Maryland). Gerrymandering is one of the factors pushing divisions between the left and right: Representatives can be attacked for being insufficiently ideologically pure, which pushes them away from the center, and have no real incentive to compromise.

For me, as a Marylander, it means that the Republicans have written me off, and the Democrats take me for granted. I’d like both parties to court my vote, and for the biyearly congressional elections to be a meaningful referendum on Representatives’ job performance.

Electoral College reform

I think everyone agrees that while the Electoral College may have been useful at one time, it’s not the XVIII century anymore. Time to get with the times and implement majority vote.

Since the Electoral College is enshrined in the Constitution, there’s no way to eliminate it without an amendment, which is difficult. But there’s a hack: each state can pass its own laws about how its Electors vote. And in most states, they have to vote the way a majority of that state’s voters voted, which makes perfect sense. But what if each state had a law saying that its Electors will vote whichever way the entire US voting population voted?

Obviously, people in Massachusetts will be upset if a Republican gets all of their Electoral votes just because he won a majority of the US vote, just as Oklahomans won’t like their Electoral votes going to a Democrat. But this already happens, in effect, in that people get a president they don’t want.

Of course, you don’t want your state to be the only one that apportions its Electors this way. This only makes sense if there are enough states doing this, that they can decide the outcome of the election — that is, if there’s a group of states that adds up to 270 Electoral votes or more.

Thankfully, there’s a project to do exactly that. Contact your state legislators and encourage them to join in.

Ranked voting

This one’s more of a long shot than the others, but I’ll throw it out there anyway. In our current system, you can only vote for one candidate, and whoever gets the most votes wins. This leads to a problem with third-party supporters. In 2000, if you were liberal, maybe you liked Green Party candidate Ralph Nader, could tolerate Democrat Al Gore, and disliked Republican George Bush. So do you vote for Nader, knowing that he can’t win, and that you’re taking away a vote for Gore (and against Bush)? Or do you hold your nose, vote for Gore against Bush, and help confirm the idea that third parties don’t stand a chance?

Under ranked voting, also known as instant-runoff voting, you vote for multiple candidates, ranking them in order of preference. Our hypothetical voter, above, might vote

  1. Ralph Nader
  2. Al Gore
  3. George Bush

meaning “I like Nader, but I’ll settle for Gore.”

Yes, there are problems with ranked voting, and there are situations where it fails. But its problems are rarer and less severe, I believe, than those with our present system.

Campaign finance reform

This is related to the previous item, in that the current systems helps perpetuate a system where only the major players have a chance. If candidates were treated equally, say all given $100 million to make their case, then it would make it more likely that candidates are judged by their experience and policies, rather than their ability to raise money.

On the other hand, there’s a danger that extremist whackjobs might appear reasonable by virtue of being treated as equals with sane-party candidates. But then again, given who’s living in the (Oh So Very) White House right now, we may be past that point already.

While I don’t have a firm opinion on this topic and am open to being educated, I do think the Citizens United SCOTUS decision needs to be overturned. In case you forgot, that’s the one that said that donating money to a campaign is political speech, and since you can’t abridge free speech, you can have unlimited amounts of money pouring into politics.

Education, education, education

This one is fundamental. We need better education, and more of it.

People complain about American jobs being shipped overseas. But most of those are unskilled jobs. It’s never going to be cheaper to hire an American than a Bangladeshi, or a robot. So let’s prepare our population for better jobs.

For starters, we can fund elementary and high schools properly. I’m ashamed for my country every time I hear of a teacher having to buy supplies out of her own pocket. Federal funds can help with this: when I pick up the phone to talk to tech support, I might get someone who went to school in Arkansas or Oregon, so it’s in my benefit to help education in other states.

College is crazy expensive. The University of Maryland, a state university, estimates that it’ll cost $25,000 per year to send your child there. $47,000 if you’re not a Maryland resident. That’s mortgage-level expensive.

Why can’t we bring the costs down? One simple approach would be an education tax. Raise taxes on everyone by a bit, and bring tuition costs down a lot for those going to college. This would have all sorts of knock-on effects: more people getting educated; more people inventing new things, or writing books, or starting businesses; more people making a better living; more people hiring other people.

And I think that’ll do it for now.

Posted in Politics | Tagged , , , , , , | Leave a comment

Women’s March, Rights, and Politics

I attended the Women’s March on Washington, yesterday. It turned out, I’m told, to be the largest inauguration protest in the history of the United States, and possibly the largest political protest ever, if you count the sister marches in other cities around the globe (including Antarctica).

At one point, we ran into, I believe, the American Socialist Party. They are, as I believe, the Communist-Lite bunch that Sean Hannity warned you about. I don’t remember seeing them out on the Mall before, so I suspect that they may have stepped up their activities in recent years.

If they have, they’re not alone. Witness the popularity of Bernie Sanders, who may not have won so much as the Democratic nomination, but got pretty damn far for an American who describes himself as a democratic socialist.

But of course he and Clinton lost the presidency to Trump. He may not have won a majority of votes, but he did get 46%, a not inconsiderable amount.

So what this all seems to suggest is a repeat of history: we’re living in a new gilded age, with income inequality at record-high levels, and populist factions appear to be gaining popularity in response: on one hand, on the left, people like Sanders and Warren, who promise to, basically, make the rich bastards pay their fair share so that the little guy can get a fair shake. I’m pretty sure that the communists of the early 20th century had the same message, and that that’s what made them so appealing to so many.

And on the right, there’s Donald Trump, who would be very happy to be the object of a cult of personality, and clearly feels most at home at the top of an autocratic dictatorship like — yeah, I’m gonna say it — Nazi Germany or Fascist Italy.

I can’t prove that history is repeating itself, but it does look that way. And so, we are faced with the problem of how to avoid both a fascist dictatorship and a communist dictatorship (thankfully, the two look so much alike (the key word is “dictatorship”) that we really only need one plan for both contingencies).

Of the two, I’m far more worried about the fascist dictatorship: these days, in America, the right is the side more likely to make threats of violence (“Second Amendment remedies, anyone?). The lefties I’ve met are far more likely to get everyone’s input, not execute kulaks.

On the right, on the other hand, I see more right-wing authoritarians (RWAs) who enjoy having a strongman in charge, and have a history of passing laws to prevent people from voting.

Posted in Politics | Tagged , , | Leave a comment