They Know Too Much

Tonight I was surprised when I saw a banner ad with the name of my employer in it. Had the robot that created the ad known the significance of that name, it would not have bothered. But I loaded a Web page, and the Google-backed ad placement service provided personal data to the adbot, and there it was.

WTF? Then I realized I was using Chrome. I don’t normally. This eye-opening invasion is in fact what most people experience every day.

From a legal standpoint, I should be able to demand that Google delete all their profile information about me. But in fact I can only demand they delete the information directly related to my google accounts. Somehow, despite the depth of this profile, they cannot find a way for me to establish its ownership. Fuckers.

Why I am Not Convinced that We Should Remove Trump from Office

Anyone who thinks Donald Trump would even take the time to learn what the rules are before he broke them is delusional. The Donald has lived his entire life in a world where the rules don’t apply to him. He’s even bragged about that. He’s not intentionally breaking the rules, because he doesn’t care what the rules are to start with.

So it’s not going to take much digging to come up with a smoking gun bad enough to get Trump convicted of some malfeasance or other, and when the rat is on the table, a few carefully-selected Republicans in the Senate will have to “vote with their consciouses” and Donnie won’t be president anymore.

But here’s the thing. Should that happen, the Republican Party will let out a huge sigh of relief. The Republicans right now are paddling a canoe in choppy waters with a fizzing hand grenade rolling around in the boat. The ones doing the paddling know that if the hand grenade goes off, the boat sinks.

Along come the Democrats, who say, “We demand that you throw that hand grenade overboard!” The Republicans protest, but in the end they reluctantly jettison their deadly cargo. Not their fault! And so the same bastards that brought us WWE politics will be allowed to carry on, and suddenly the other clowns like Ted Cruz seem like rational guys (all of them are guys).

Or we could just suffer Trump for a couple extra months, and leave the hand grenade in their boat. The senate is in play in that scenario; just imagine the fallout within the party if Trump causes them to lose everything.

Ultimately, that’s what I want. I want the Republicans to suffer badly enough that they, ON THEIR OWN, not only throw the hand grenade overboard, but they also jettison the big-money assholes and foreign powers that paid to put that grenade in the boat in the first place. I want the Republican Party to be so damaged by this that they shift tack and try to be ACTUAL CONSERVATIVES.

If that happens, then perhaps Trump will have made America great again after all.

Deadspin, I hardly Knew Ye

It was about a month ago that I read on the pages of deadspin.com how corporate assholes had destroyed Sports Illustrated. There are no more journalists at that respected institution, and actually not even any more photographers. Three months ago Sports Illustrated broke a huge story about an athlete, rape, and intimidation. It was a careful, researched piece of journalism.

That will never happen again at SI. The new corporate masters want clickbait but no actual content. Many staffers — the ones involved with journalism or, ironically, illustrating sports — were let go.

One of the journalistic institutions that railed most loudly about the corporate machine silencing the voices of writers was Deadspin. They seriously do not pull their punches there. They will tell you exactly why your favorite team sucks (technically they are a sports outlet), but they will also tell you why mainstream journalists are so lost when covering a man-child president — looking for a plan when there is none, looking for a policy when the man in charge is incapable of formulating one.

But now Deadspin has fallen to the same corporate bullshit. Their media owners tried to impose a mandate that they only cover sports, and the social issues that were directly related, but to stay away from pop culture and politics in particular. The deputy editor said no, and was fired. Much of the staff quit in response.

This is not small.

Over at ESPN, there has been a slow, quiet purge of columnists who dare talk about race and gender inequality in the context of sports. Although management says they have “clarified” their rules about only talking about politics and race when it is directly germane to sports, it’s pretty much impossible to say that Jemele Hill crossed some invisible line. Her essays were always in the context of sport. But that wasn’t what the ESPN bosses really wanted, no matter what they said. The didn’t want anyone rocking the boat.

Deadspin, if you squint at the name just right, looks like it might have been born to mock ESPN. And up until this week, it was a fearless voice. Boat-rockers one and all. But in the last couple of days, in the wake of mass resignations, many recent “political” articles have been replaced by straight-up sports stories. Three years after Colin Kaepernick took a knee, even the “renegade” media outlets have been coerced to the idea that somehow that athlete’s protest was not related to sports — even if it was a protest about something that touched athletes and their communities directly.

To the writes who quit Deadspin, who have put their livelihoods at risk for a matter of principle: I have an underutilized little server in a bunker outside Las Vegas, Nevada. If you want to fire up Rebornspin, I’ll host you no charge.

2

I’m Doing it Wrong

It is a lovely evening, and I’m enjoying patio life. My employer had a beer bash today, but The Killers are playing and I didn’t reserve a spot in time. So I came home instead, and after proper family greetings I repaired to the patio to do creative stuff. It’s blogtober, after all.

So what creative stuff have I been up to?

Creating a class that extends Event Service Sessions to add calendar server capabilities. (php is about the worst language on the planet for injecting new context-related capabilities into an existing class definition. In other words, php is not friendly to duck punching, or “Monkey Patching” as the kids call it these days.

The linked Wikipedia article completely misses the most common use-case for this practice, in which I want to get a thing from some service and then augment it. But php doesn’t flex that way, so I just have to deal with it.

Which is to say, I’m doing Friday evening wrong. It is lovely out, my co-workers are chugging down the last of their beers as The Killers wrap up. I am on my patio with my dogs, the air finally starting to cool after an unusually warm day. It is nice. You’d think I could find a better use of this time than wrangling with a programming language.

But apparently you’d think wrong.

3

Sometimes it’s not so Good when People are Happy to see You

“There he is!” both my fellow engineers said as I walked into the office this morning. I knew right away that this was not going to be the Monday I expected it to be.

“The database is down,” my boss said before I reached my chair. “Totally dead.”

“Ah, shit,” I replied, dropping my backpack and logging in. I typed a few commands so my tools were pointing at the right place, then started to check the database cluster.

It looked fine, humming away quietly to itself.

I checked the services that allow our software running elsewhere to connect to the database. All the stuff we controlled looked perfectly normal. That wasn’t a surprise; it would take active intervention to break them.

Yet, from the outside, those services were not responding. Something was definitely wrong, but it was not something our group had any control over.

As I was poking and prodding at the system, my boss was speaking behind me. “Maybe you could document some troubleshooting tips?” he asked. “I got as far as the init command, then I had no idea what to do.”

“I can write down some basics,” I said, too wrapped up in my own troubleshooting world to be polite, “but it’s going to assume you have a basic working knowledge of the tools.” I’d been hinting for a while that maybe he should get up to speed on the stuff. Fortunately my boss finds politeness to be inferior to directness. He’s an engineer.

After several minutes confirming that there was nothing I could do, I sent an urgent email to the list where the keepers of the infrastructure communicate. “All our systems are broken!” I said.

Someone else jumped in with more info, including the fact that he had detected the problem long before, while I was commuting. Apparently it had not occurred to him to notify anyone.

The problem affected a lot of people. There was much hurt. I can’t believe that while I was traveling to work and the system went to hell, no one else had bothered to mention it in the regular communication channels, from either the consumer or provider side.

After a while, things worked again, then stopped working, and finally started working for realsies. Eight hours after the problem started, and seven hours after it was formally recognized, the “it’s fixed” message came out, but by then we had been operating normally for several hours.

By moving our stuff to systems run by others, we made an assumption that those others are experts at running systems, and they could run things well enough that we could turn our own efforts into making new services. It’s an economically parsimonious idea.

But those systems have to work. When they don’t, I’m the one that gets the stink-eye in my department. Or the all-too-happy greeting.

1

PG&E is a Bunch of Evil Bastards, but Hold On a Sec

A couple of years ago, there were several horrifying wildfires in California. (Trump blamed all the dang trees.) It turns out many of those fires were caused by criminally negligent practices by Pacific Gas and Electric.

Remember Erin Brockovich? That same PG&E is still around.

LONG diversion coming, but it’s an interesting story. If you don’t want to enjoy my ground-rehashing journalism, scroll down to “But anyway…”

Then there was the period where California tried to bring a market economy to power distribution. I lived in San Diego at the time, and our deal was different than the rest of California. SDG&E was the pilot for phase two of the program. I could choose my own power generator. Obviously I chose a company that generated electricity (relatively) responsibly. And while the electricity that my ultra-hippie power-generation company actually produced probably didn’t reach my outlets, it all evens out on the grid.

But the grid isn’t a magical system that transparently moves power to where it’s needed. The grid has choke-points, and there are critical spots between northern and southern California that PG&E and Enron and Ross Perot identified early on.

The evil companies were actually contracted to write the software that tied electric rates to supply, and they built in a key weakness: If they could contrive a shortage in one part of the state, they could charge everyone extortionist rates. The film-flams even had cute names in the internal memos at Enron and their pals. I don’t know how much California paid them for this service.

PG&E was a pal.

The system went into place, and after a few months the energy companies started actively fucking with California. They COULD have subtly and gently influenced the energy market over the course of years, and might still be doing it now, but greedy fucks will always be greedy fucks and the evil energy companies decided to loot California for as much as they could get as fast as they could get it.

Rolling blackouts hit Southern California, as too much electricity was bottled up in the north. People lost the contents of their freezers. Businesses failed. Hospitals scrambled. People died. The energy companies made a quick billion dollars.

The narrative at the time, guided by a credulous media was, “those darn Californians sure waste a lot of energy!” And none of us down in the rolling blackouts thought to consider that energy companies like PG&E would intentionally do this to us.

But they had. And when the dust settled and California scrapped its free-market energy experiment (the energy companies made sure there would be no actual free market), PG&E was sitting on a giant pile of fraudulent cash. The lawyers would be coming.

Lucky for PG&E, Enron was even more evil, and had been destroying the lives of their own employees while they ripped off California. In slick maneuvering the lawyers defending Enron’s top criminals managed to seal the documents implicating the evil energy companies in collusion and fraud on a scale this country has not seen before or since. (Before the docs were sealed, they were widely reported on, but once they were sealed, they could not be used for other prosecutions.)

Meanwhile, PG&E split itself in half. One half had the money, the other half could be sued. Both halves are owned by the same motherfuckers; they were just pulling yet another fast one. Without the smoking gun of the sealed documents, that was enough to protect the dirty money they had made. SDG&E did similar sleight-of-hand. My hippie electricity provider apologized for not being to do business in such a toxic environment.

We’ll pass over the time when PG&E’s negligence led to a gas line explosion that blew up a few houses. “Decaying infrastructure,” the headlines said, as if a company making billions using the infrastructure wasn’t responsible for maintaining it.

But anyway…

Then there were the fires, and the roughly 2400 lawsuits that followed when people figured out that PG&E was a bunch of assholes that doesn’t mind killing people for profit.

PG&E faced a lot of ire. One of the biggest criticisms was, “If you’re not going to do the work to make your part of the grid safe, at least turn off the power in at-risk areas before another disaster happens.”

When we think of the grid we think of giant skeletal frames bearing wire, marching in eerily straight lines across the landscape. But there’s another part of the grid, where those massive lines terminate and split into smaller high-voltage transmission lines. There are a bazillion of those power poles in California, and they are not all inspected as often as they should be. Branches get close to lines, the wind blows, lines come down and fires start.

In the face of lawsuits and PG&E’s contrived dodge-the-consequences bankruptcy and generally bad PR, PG&E is determined this year to not be the cause of another deadly wildfire. Today they have shut down the power to large chunks of Silicon Valley for safety, along with widespread shutdowns in more rural areas up north.

People are somehow surprised about this, even though PG&E has been saying they would do it for more than a year now.

That whole diversion above was mainly to let you all know I’m no shill for PG&E. I hate those fuckers. I hate them more than you do. I hate them almost as much as the poisoned families Erin Brockovich represented do.

But there is outrage today against the evil bastards that is misplaced. We TOLD them to stop causing deadly wildfires. That is what they are doing. They TOLD us that they might have to turn off the power, and we should be ready.

THIS IS NOT A SURPRISE. It is not out of the blue.

It is not some screw-job by PG&E. They don’t make money when we eat barbecue by candlelight.

On the other hand, I do have to wonder. I can sense a petulant child behind these shutdowns, a pudgy frowny sweaty child-face saying “you want safety? I’ll shut all you fuckers down and then you’ll appreciate what I do for you!”

Obviously I can’t prove that.

But these shutdowns do prove what perhaps we’ve known for a long time. The grid sucks. The grid has given the evil bastards at PG&E and Enron and the rest the power to jerk us over. The grid has been inconvenient for those same bastards to maintain, so they don’t, and it kills people.

Even when the grid is working perfectly, it is terribly inefficient. More than half the energy generated is lost in transmission.

We need to destroy PG&E, cut through the bullshit corporate layers and recover the money they have stolen from us. Don’t sue the shell companies, sue the people. But it’s not just enough to destroy PG&E. We have to destroy the grid.

The grid gives them power. The grid causes deadly fires. The grid consumes half the electricity generated in this country even before it reaches an outlet.

The technology exists, now, to make electricity a cottage industry. I imagine my neighborhood making a deal and turning all our rooftops into a solar collective. Those panels wouldn’t cover the energy use of the park, but we could partner with local energy companies and because of local generation, the transmission loss would be reduced, so the price could be reduced as well.

“Buy local” is especially appropriate when referring to electricity.

2

Rock Week

After an extended grind at work, it was time to take a few days to get my regular life back on track. I had several goals, from getting back on the bike to installing a ceiling fan to making appointments with doctors.

I was successful-ish. I got enough done to feel like I was catching up, but I didn’t accomplish all I wanted to. I didn’t ride my bike as often as I had planned, but I got plenty of exercise. I didn’t get the new ceiling fan installed, but I learned about alternative home wiring.

I moved a lot of rock. On Wednesday I shoveled up old rock and moved it to its new home in the raised gardens where is color would not be wasted. I was pretty blasted on Thursday, but the real cost of exercise comes two days later, and in Friday I was hurtin’.

Hello, Saturday.

The night before I couldn’t sleep. A shit-ton (shit ≡ 6.5) of rock was going to be dropped in the street. There would be no stopping until all 13,000 pounds were not in the street anymore.

I woke up feeling all right, and when the Most Wise Official Sweetie called to have the rock dropped in the driveway rather than the street, my anxiety dropped. And I felt pretty good, physically.

“Today is going to suck,” Official Sweetie said. I was inclined to agree. But if you accept that going in, you can steel yourself to the pain.

The rock arrived, deposited with great care in the driveway. Five cubic yards, 6.5 tons, 13,000 pounds. A shit-ton. “That’s a lot of rock!” The dump-truck driver said, many times.

I didn’t reply, “We’re going to rock this town!” though I probably should have. I believe that was the only pun or cultural reference relating to rock that was not spoken over the next two days.

I just wanted to be a machine. Even as the great pile of rock loomed over me, I wanted nothing more than to be a tireless agent of transport. Shovel shovel shovel, trundle trundle trundle, dump. But we weren’t there yet. There was planning to do. Brian stuff.

Official Sweetie did the brain stuff. She also pushed more than a couple of barrow-loads of rock. She is tireless. She is awesome. But it was up to me to move old rock and to place the new stepping-stones.

Once I had discussed whimsey-level for the paving stone placement, and I put some math to use to establish spacing, I spent a while carrying paving stones and digging them in to their new happy places.

Eventually it was time to move rock.

Shoveling is a skill. “Lift with your legs, not your back,” is the axiom, but for the longest time my knee heartily disagreed with that aphorism. For the first few hours of shoveling I put an enormous load on my arms to compensate for all the other body parts not ready to step up. My arm was on fire and I knew there would be hell to pay. Finally I found an odd straight-backed crouching form that did not extend my knee through its vulnerable range, and shoveling improved greatly.

Eight shovels a load, around the house and up a curb. Ten-shovel loads were tough to pull up the curb so I decided to walk more, and just roll with it. It was a big job and it was going to take some time.

As night fell I was beat. Junked. But not finished. My body was hammered enough that I knew I couldn’t assume I’d be motile the next day. I really wanted to finish. My tireless, motivated bride wanted that even more than I did.

But it was not to be. My feet hurt so bad I had difficulty walking. As the night grew darker cars were giving me less room as I pushed loads of rock around on the street. “Five more loads after this one,” I told myself. I had to call it quits for the night.

I managed the five loads, another few hundred pounds of rock moved from A to B. Completely depleted I staggered home with Official Sweetie and when we got there I greeted the dogs and just lay on the floor.

My watch was happy, congratulating me on my biggest workout ever. My dogs were happy to have a chance to bury themselves in such a magnificently redolent pack leader. I was less happy; I knew that as empty as I felt at that moment, there was still a lot of rock to move.

Sunday came round, as Sundays always insist on doing, and I was mildly amazed to discover that I could move. I could even walk. I was expecting agony and I got… okness.

My feet — I don’t know if I’ve properly communicated how they felt Saturday night. I was filthy down to my pores, but I put off taking a shower as long as I could because that required standing. I was amazed that I could put on shoes, let alone walk.

The good part about Sunday was that the job was finite and known. Three or four more hours of shovel, shovel, shovel, trundle trundle trundle dump, with occasional breaks for level level level. Two wheelbarrows, two motivated trundlers, and a few thousand pounds of pebbles.

Then it was over. I gathered up our tools and staggered once last time along the path I had blazed along the street.

The rock is spread, and it looks good. My legs were noodles, but no worries about getting exercise during my time off.

3

Gilfoyle’s Been Having it Tough, Lately

We just celebrated two years with Gilfoyle, and I have to say that while the little dog is an asshole, he is an endearing one. Chicks dig him especially, but men also respect his demeanor. He has that certain something, and even as his social skills improve, he will always be an asshole. Perhaps that is to be expected from a ten-pound dog bred to move cattle around.

A few weeks ago we were at the vet for routine stuff, and she spent an unusual amount of time listening to his heart. Something wasn’t right. Experts were consulted, measurements were taken, and all is not well with Gilly’s little ticker.

On Monday the Official Sweetie of Muddled Ramblings and Half-Baked Ideas took him in to have a heart-monitoring rig strapped to his body, so the vet could get a good reading on his heart in more normal circumstances.

Gilfoyle handled the visit well, and consented to having a lot of his lush fur shaved off while it was installed. When I go home from work I found this:

He hardly noticed the rig at all, except when he was cutting corners too closely. Official Sweetie kept a diary of events that might be of interest when looking at the data: “3:20 p.m.: Squirrel; 5:40 p.m.: UPS delivery.”

A day later it was time to remove the heart monitor. About noon I called from work with some rather good news, and OSMRHBI didn’t react at all. She was not in a good place.

It was the tape, you see. The vet, carefully following the letter of the instructions, had used a particular very sticky tape to affix the sensors to the poor little guy. When I called, Official Sweetie had just spent an agonizing amount of time trying to peel the tape off a frightened, hurt, confused, betrayed dog.

The title of this episode may be deceptive; Gilfoyle has recovered from the trauma, although he still has stripes of adhesive in his fur. The Official Sweetie, being cursed with a remarkably good memory and a wonderfully big heart, will take a little longer to recover from the episode.

And now we wait for the data to be loaded up and analyzed by the experts. Gilfoyle has been downright spry lately, still improving after a couple years of normal dog life. I’m not sure what his life was like before he joined our family, but I’m pretty sure it wasn’t normal.

Of course I’ll let you all know what the prognosis is when Gilly’s numbers are crunched – at least I will if it’s still Blogtober.

2

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