A Few are Making a Stand

A few days ago I was reading an article by Bill Barnwell over at ESPN. Barnwell writes long, data-driven articles about sports (mostly football), and he has the ability to make what is often very dry subject material interesting. In this case, he caught my attention for something that wasn’t there.

This article was something like Blah Blah Blah NFL’s 10 Worst Teams. What he said about each team doesn’t matter for this episode; what matters is the list itself.

10. Denver Broncos
9. Detroit Lions
8. Buffalo Bills
7. Oakland Raiders
6. Washington
5. New York Giants
4. Tampa Bay Buccaneers
3. Cincinnati Bengals
2. Miami Dolphins
1. Arizona Cardinals

Don’t see it? Look at number 6 again.

When I noticed that, I dared hope for a moment that ESPN had decided as a powerful media company to simply not use an offensive racial slur on their site.

Nope. The r-word is still all over the place. But at least Bill Barnwell has made the choice to never utter it. If enough of his colleagues do as well, maybe something will change.

Robinson Crusoe Without the Whitewash

My recollections of the 20th-century film adaptations of Robinson Crusoe don’t include slavery. In the source material our hero is on a ship taken by Moorish “pirates” and he is made a slave.

(Pirates in quotes because they’re just doing the same shit as the Europeans.)

But slavery’s not so very bad, right?

While the rest of the crew is sent off God-knows-where, our narrator enjoys a fairly benign period of servitude. He’s technically a slave, but the degradation is absent. It’s just an involuntary job that Robbie executes well, and he is never beaten to an inch of his life, or raped, or humiliated in any of a thousand ways for the pleasure of someone else.

Then there is the escape. A pretty easy escape, really, but let’s just allow that literature was young and even the greats back then leaned on the gullibility of the bad guys. Crusoe escapes with another young slave named Xury who immediately becomes Robbie’s sidekick and biggest fan.

Free! Except of course they are on the open sea in a small boat and that is not sustainable. They have a few adventures along the shore, proving both the power of gunpowder and the stupidity of a hungry European deciding that lions aren’t fit to eat. Xury shows bravery and resourcefulness, and they continue to survive.

More than once, Crusoe said he was heading “south and east”. I checked the map, checked it again, and that just doesn’t work. South and east puts him right ashore. Which is weird, because otherwise Defoe’s descriptions of the geography are accurate.

As Crusoe is heading down the African coast bearing south and west, he reaches a point where Dakar now sits, thrusting out into the ocean. It is here that Robbie and his crew of one spot the sails of a Portuguese (slave) ship. They risk everything to give chase and attract the attention of the men on the ship, and eventually they are rescued.

The Portuguese captain is impressed with Crusoe’s little boat, and offers a nice chunk of cash for it. The captain is also impressed with Crusoe’s sidekick Xury, and offers almost as much for the kid as he did for the boat.

Before I tell you Crusoe’s response to that offer, let’s review. Crusoe has been a slave. He and the kid gained their freedom together, and have struggled together to stay alive. They have been partners, and Xury has shown some moxie in the process. Safe to say, without Xury, Crusoe would have died.

Yeah, you got it. Robbie sells his sidekick — but with a caveat! If the kid accepts Christianity he will only be a slave for ten years.

Well, all right then. I guess that makes it OK.

It was a different time. I get it. Slavery was to maritime trade what porn is to the Internet: The thing no one wants to talk about that funds the rest. But while Robinson Crusoe’s fortunes seem to be rising at this point in the narrative, I just don’t like the guy. Not at all.

I think the writer, Defoe, at a gut level, realized that his main guy was being a complete asshole. Friends don’t sell friends. So in the end Defoe (the writer) compels Xury himself to agree to the terms of the deal, where Crusoe (the character) could not consummate the deal alone without moral compromise. But if it was Xury’s choice, then he should have been the one to get paid.

In my previous episode about this story, I remarked on the lack of visceral detail during the scary times. Perhaps it’s this same detachment that allows Robinson to fucking sell his friend. Perhaps Crusoe doesn’t actually feel anything. That would explain a lot.

1

OF COURSE She’s Beautiful

I haven’t been getting much writing done lately, and an important way to break out of that slump is to make sure I spend more time reading. So this afternoon I was poking around the ol’ virtual bookstore looking for one of those free “first taste” novels intended to get one hooked on a series.

Today I found a book by Morgan Rice, the first of eight installments (and, presumably, counting.) That many installments in the story can be a red flag; the world does not need another Robert Jordan fumbling his way though an epic he knew how to start but not how to finish. As each book of Wheel of Time got longer, the amount that actually happened went down.

That notwithstanding, if each installment of the saga can show vestiges of a beginning, a middle, and an end, it could be a fun read.

There is one thing that annoyed me right off the bat, however. This is the first sentence of the blurb:

17 year old Ceres, a beautiful, poor girl in the Empire city of Delos, lives the harsh and unforgiving life of a commoner.

Beautiful. Not “resourceful”, not “paranoid schizophrenic”, not even “headstrong” (which is awful for different reasons). From that sentence, I am left to believe that her primary tool for escaping poverty will be her beauty. That’s the least-interesting tool imaginable.

And come on, she’s the hero in a pulp drama. There is no way anyone on this side of the blurb even considered the possibility that she might not be beautiful, or that the most worthwhile men she meets won’t also be beautiful. I get it; the beauty is part of a fantasy shared by the primary audience of this story. But the first high-impact word in the blurb — arguably the most import word in the whole description, the one word that will influence the success of the novel more than any other single word — is a throwaway.

She’s beautiful. Big fuckin’ deal.

1

An Unexected Disaster

I have been jonesing to get some writing done, so rather than go straight home, I went to one of my favorite local taverns. I ordered a beer, and while I was rearing to send a message to my sweetie informing her of my decision, I lifted my beer off the table.

Only, it was just the to half of my beer that lifted; the bottom half remained rooted on the coaster, and a full mugs-worth of beer gushed forth, cascading over the table, over my clothes, and over my lato.

Immediately I hoisted my comuter over the flood, shaking it to rid the keyboard of moisture. Waitstaff resonded quickly, with towels and aologies, but it seemed no lasting harm had been done.

I came home, still determined to get some writing done. But, it seems, there is a catch.

One key doesn’t work. I’d tell you what that key is, but I can’t tye it. erhas you can guess which key it is.

Addendum: I took the laptop to my company’s repair depot. “We get a lot like this on Mondays.”

I heard back this evening: All systems show signs of liquid damage. Recommendation: replace the computer. Just for the p key? And maybe the sound, but I never have the sound turned on anyway. (Seriously, never.) But… all systems.

I’m typing on a loaner right now, a machine that will probably become my new portable. No biggie, I really don’t need massive specs or super-duper whatnot, except for one thing. The other screen had a lot more pixels. That means a lot more lines of code. I’m feeling constricted.

3

Facebook, Continuous Integration, and Fucking Up

If you ask the engineers at Facebook (I have), they are experts at continuously evolving their platform almost invisibly to the users. If you ask the users, Facebook is really fucking annoying because shit is breaking all the time and the button that was there yesterday is nowhere to be found.

Continuous Integration is a development practice that means that each little tweak to the software goes through the tests and then goes live. It’s a powerful idea, and can massively decrease the risk of publishing updates — rather than push out the work of several geek-years all at once, with all the risk of something going terribly wrong, you push out the result of a couple of geek-weeks of effort on a regular basis, taking baby-steps to the promised land. Tick, tick, tick, with an army of robots making sure no old bugs sneak back in again.

I fully embrace this idea.

Never has a company been more proud of accomplishing this than Facebook. They crow about it around here. Also, never has a company been so bad at actually doing it. What Facebook has managed to do is annoy users with endless changes that affect how people work, while still publishing bugs.

The key is that a continuous, minor set of tweaks to software is good, but endless tweaks to how people experience the software is bad. People don’t want to be constantly adjusting to improvements. So in continuous integration, you can enhance the user experience, but you can’t lightly take away something that was there before. You can’t move things around every couple of weeks.

Back in the day when I went on Facebook more frequently, I was constantly bemused by a user interface that felt like quicksand. Meanwhile, frequent users reported a never-ending stream of bugs.

Facebook, you are the champion of Continuous Integration, and the poster child for CI Gone Wrong.

1

Two Things I Learned Today

  1. MapQuest still exists!
  2. MapQuest really sucks.

I learned the former when using the Web site to report for jury duty in Santa Clara County. Links to the locations of the courthouses take you to MapQuest.

For a brief explanation of the latter, MapQuest is overrun with intrusive advertising, and the “get directions to a place” feature does not include public transportation.

My next post is likely to be observations on the Wheels of Justice. Oh boy!

1

A Guide to Commenting Your Code

I spend a lot of time working with code that someone else wrote. The code has lots of comments, but they actually do little to improve the understandability of the work. I’m here to provide a concise set of examples to demonstrate the proper way to comment your code so that those who follow will be able to understand it easily and get to work.

These examples are in php, but the principles transcend language.

WRONG:

// get the value of the thing
$val = gtv();

RIGHT:

$thingValue = getTheValueOfTheThing();

WRONG:

// get the value of the thing
$val = getTheValueOfTheThing();

RIGHT:

$thingValue = getTheValueOfTheThing();

Oh so very WRONG:

// Let's get the value of the thing
$val = getTheValueOfTheThing();

We’re not pals on an adventure here.

RIGHT:

$thingValue = getTheValueOfTheThing();

You might have noticed that so far all my examples of the proper way to comment your code don’t have comments at all. They have code that doesn’t need a comment in the first place.

Computer languages are not created to make things easier to understand for the machine, they are to make sets of instructions humans can read that (secondarily) tell the computer what to do. So, if the code syntax is for the benefit of humans, treat it that way.

If you have to write a comment to explain what is going on in your code, you probably wrote it wrong. Or at the very least, if you need to write a comment, it means you’re not finished. I write many comments that start TODO, which my tools recognize and give me as a to-do list.

Stopping to come up with the perfect name for a variable, class, or function is an important part of programming. It’s more than a simple label, it’s an understanding of what that symbol means, and how it works in the system. If you can’t name it, you’re not ready to code it.

There is a special category of comments in code called doc blocks. These are massive comments above every function that robots can harvest to generate documentation. It’s a beautiful idea.

Here’s my world (not a standard doc block format but that’s irrelevant):

/*
|--------------------------------------------------------------------------
| @name "doSomething"
|--------------------------------------------------------------------------
| @expects "id (int)"
|--------------------------------------------------------------------------
| @returns "widget"
|--------------------------------------------------------------------------
| @description "returns the widget of the frangipani."
|--------------------------------------------------------------------------
*/
public function doSomething($id, $otherId) {
    $frangipani = getFrangipani($id);
    multiplex($frangipani, $otherId);
 
    return $frangipani->widgets();
}

The difficulty with the above is that the laborious description of what the function does is harmfully wrong. The @expects line says it needs one parameter, when actually it needs two. It says it returns a widget but in fact the function returns an array of widgets. If you were to try to understand the function by the doc block, you would waste a ton of time.

It happens all the time – a programmer changes the code but neglects to update the doc block. And if you’re not using robots to generate documentation, the doc block is useless if you write your code well.

public function getFrangipaniWidgets($id, $multiplexorId) {
    $frangipani = getFrangipani($id);
    multiplex($frangipani, $multiplexorId);
 
    return $frangipani->widgets();
}

Doc blocks are a commitment, and if you don’t have a programmer or tech writer personally responsible for their accuracy, the harm they cause will far surpass any potential benefit.

I have only one exception to the “comments indicate where you have more work to do” rule: Don’t try this at home.

public function getFrangipaniWidgets($id, $multiplexorId) {
    $frangipani = getFrangipani($id);
 
    // monoplex causes data rehash, invalidating the frangipani
    multiplex($frangipani, $multiplexorId);
 
    return $frangipani->widgets();
}

This is useful only when the obvious, simple solution to a problem had a killing flaw that is not obvious. This is a warning sign to the programmer coming after you that you have tried the obvious. Often, when leaving notes like this, and explaining why I did something the hard way, I realize that the easy way would have worked after all. At which point I fix my code and delete the comment. But at least in that case the comment did something useful.

2

My 2018 Resolutions

Last year I made several ambitious-but-attainable resolutions. I failed at all of them.

For 2018, my goal is much simpler: do better at everything than I did in 2017. The bar is pretty low.

4

Ah, Irony

In an article at I Fucking Love Science, about strange references in hundreds of scientific publications to a paper that doesn’t exist, is this sentence:

Nevertheless, it seems that the phantom reference is a symptom of wider problems within academic science publishing, such as low-quality control, careless editing, and – the real bugbear – predatory journals.

The article’s actually pretty interesting, and worth the thirty seconds it would take you to read it. But man. Low-quality control, in a sentence about low-quality editing. If you’re ever going to be really, really careful about a sentence you write, it should be the one critical of others’ editorial standards.

2

Funny How that Timing Worked

So if I have my facts straight, on Tuesday or Wednesday of this week The New York Times talked to our President-like Product* and asked him if, hypothetically, Mueller’s investigation of the Republican collusion with Russia were to be expanded to include Trump’s finances, would that be crossing a line?

Trump responded, with his usual thoughtless bravado, that such an expansion would indeed be crossing a line. Totally unacceptable.

Then on Thursday, it became known that Mueller has in fact extended his inquiry to include Trump’s finances. Whups!

There are a a handful of important takeaways here:

1) The NYT almost certainly already knew the investigation was expanding.
2) Trump did not know.
3) NYT was not above baiting Trump to say something he would regret later.
4) Trump is easily manipulated.
5) Trump can’t spot a trap question to save his life.
6) That same guy talks to Putin, who is no slouch at interrogation.

Number four above is the one that scares me most.

But let’s not lose perspective on the actual news. People with the power to arrest criminals are looking at Trump’s tax returns. No matter which side of the aisle you sit on, that has to be a good thing. If you believe he has nothing to hide, you will naturally embrace this chance to see him exonerated while keeping his finances private. If you think he’s up to his eyeballs in foreign entanglements, well, now’s the time to find out.

This is a good thing, as long as you believe in truth.
____

* I promised, after the election, to suck it up and no longer use disparaging names for our then-president-elect. Today I was unable to live up to my own standard, so I’m calling myself out to save you the trouble.

1

I’ll Make a Note for Next Year

I didn’t realize it was turn right in front of bicyclists without signaling day. Had I known that, I might have made other transportation plans.

Your Privacy, Sold (Again)

If you watched the last season of South Park, you know what can happen if your entire Internet history is made public. Riots, divorce, the collapse of civilization. But did you know that your Internet Service Provider can keep track of every Web site you visit? Forget privacy mode on your browser; that only affects what gets stored locally. It’s mostly good for letting you do credit card transactions on someone else’s computer, or at an Internet Cafe.

It does not keep a host of companies from recording every site you visit.

Up ’till now, those companies haven’t been allowed to share that information. But that’s about to change. The companies that keep that data have cashed in on the current legislation-for-sale atmosphere and have bought a rule change that will enable them to sell that data.

Our President will no doubt sign the bill, and if there’s any silver lining to all this, it’s that his own browsing history will shortly be available for purchase. If he, or other congressional leaders, had any idea what they were signing, they would have realized that they have more to lose than just about anyone else.

For instance, DNS records already made public don’t look good for the GOP. They were collected by a group who thought the Russians were trying to hack the RNC, only to find that the communication went both ways.

Anyone want to guess how much child porn is in The Donald’s browsing history?

Meanwhile, even though I don’t go to any sites that are remotely illegal, I’ll be taking measures I probably should have done long ago to protect my privacy, rather than rely on laws. To be honest, I’m not sure exactly what I’m going to do; I’m not keen on using the Tor Browser (though I’m open to volunteering some server resources to the project). I’ll be looking at VPN’s (Virtual Private Networks) to see if they offer anonymity.

I’d be happy to hear from anyone out there with knowledge in this area. In any case, I’ll report back what I learn.

2

Joseph and the Amazing Technicolor Scientific Survey

Pharaoh heard that in his prisons there lived a man who could interpret dreams. He called for Joseph, and his soldiers brought the young man before him.

“I have had a dream,” Pharaoh said. “In my dream there are seven fat cows, and seven thin cows. The thin cows eat the fat cows but they remain thin. What does it mean?”

Joseph pondered, and quietly asked God for guidance, and said, “it means that there will be seven years of plenty, and Egypt will prosper like never before. But there will follow seven years of hardship, and unless Egypt prepares now, by saving as much of the plenty as this great nation can, there will be great suffering.”

Pharaoh nodded, seeing the wisdom of Joseph’s words. It only made sense to prepare for hard times while things were going well, even if the precision of Joseph’s prediction was questionable.

“Um… Pharaoh,” said the trusted advisor on his left, the chief architect of the pyramid project about to launch, “Seven years of plenty! That’s great! If you ignore this man’s advice, I can make the monument to you even more magnificent.”

On his right, another adviser spoke. “If bad times follow the good, it is the will of the gods. WE will survive, OUR families will not starve, even if millions of the working class who just finished your pyramid die. That, too, is the will of the gods. The workers will die happily, knowing they contributed to your eternal might.”

Joseph listened to this discourse and said, “No, seriously, It’s going to be bad. I’m 99.9% sure it’s going to be really really bad.”

“Aha!” cried the architect. “So you’re not certain!

Pharaoh looked from his advisors to Joseph and back. “Make the monument bigger,” he said.

2

That Carbon Dioxide Tipping Point

I file this under politics because it is politics that is blinding us.

The oil industry* and their paid shills (known as deniers)** made a few waves recently when, in a carefully-worded survey of climate scientists, fewer than half were willing to single out carbon dioxide as the single greatest contributor to global warming.

“Half of all Scientists disagree with climate change!” was the nonsensical conclusion. A slightly-less-nonsensical conclusion was “Humans create carbon dioxide; if that’s not the primary driver of global warming, then warming is not because of humans.”

But let’s look at that for a moment. There’s another conclusion, and while it’s much more reasonable, it’s also much more scary: Carbon Dioxide isn’t the the primary driver of global warming any more. We’ve crossed a tipping point.

Meet Methane, and the point of no return.

While CO2 was the problem, there was something we could do about it: produce less CO2. Let the algae and the rain forests (whoops!) absorb the surplus back, and let our planet return to its previous equilibrium. We dithered, and denied, and the tundra began to thaw. Now the tundra is burping up enormous amounts of methane.

As a greenhouse gas, methane makes CO2 look like a punk kid with missing teeth.

So if many scientists don’t think Carbon Dioxide is the biggest contributor any more, that doesn’t mean they don’t believe the surface of our planet is getting hotter, it means that the game has changed. It means things have moved to a stage that we cannot reverse just by suddenly not being so selfish and short-sighted. It means there is nothing we can do to stop the change, and the sooner we turn our efforts to dealing with it, the less it will hurt.

But man, it’s gonna hurt.

___
* shorthand for all carbon-based energy companies
** almost all the publicized climate-change deniers are on the energy company payrolls. I say “almost” only because there are probably a few who are just stupid.

When does School Let Out?

Recently I was riding on a path and ahead of me was a small bank of flood-deposited sand and gravel. It looked pretty solid, so I thought I could coast gently over it and be fine.

Nope.

Plunk! and a scraped-up knee, bleeding down my shin as I plodded on to work. “Lesson learned!” I thought to myself. “Unless you have big, fat tires, that’s not the terrain for you.” So at the expense of a little flesh I became a wiser bicyclist.

Yesterday morning I was riding calmly through a little park. Many people walk their dogs on those paths, and I like to give dogs plenty of space when I come up behind them. It’s not fair to the dog to expect them to just step calmly aside when startled from behind. So when the human walking a pretty bulldog didn’t respond to my bell, I did what I often do: I left the sidewalk and circled around on the grass. I made a point of giving him a cheery “Good morning!” as I slogged through the lush lawn.

Only, this particular time, the deep green hid the fact that the step back up to the pavement was rather high. I hit it at too soft an angle, didn’t hop with my front tire, and spilled over the handlebars and onto the pavement. Plunk!

My OTHER knee is now scraped up, and I have a nasty contusion on my thigh where it hit the headlight attached to my handlebars. Lesson learned: Always assume that transition will be dangerous unless handled properly. So at the expense of a little flesh I am now a wiser bicyclist.

I just hope I reach the end of the syllabus soon.

1