Baseball is Back, and maybe even the Padres

Spring is here, a new baseball season is starting, and I find myself oddly excited for this year. I really haven’t paid much attention to baseball the last few years. I’m not excited because of the teams nearby, but because of the perennially-awful San Diego Padres, who were once, long ago, my home team. It’s even possible they’ll be good this year.

Already they’ve won two in a row to start the year. You wouldn’t think much of that if you rooted for any other team, but the Padres haven’t managed that feat since 2011.

They also signed a big-name free agent, Manny Machado, who will be making gobs and gobs of money for the next ten years. This sort of move is not characteristic for them. But while there is plenty of conversation about Machado, it’s Fernando Tatís, who has now played in exactly two major league games, that is getting all the buzz.

Part of that buzz is because Padres management is managing his contract incorrectly. “Incorrect” in this case means not dicking over the player by keeping him in the minors an extra year, to squeeze an extra prime year out of his contract. Essentially The Padres are giving up a year of 27-year-old Tatís for a year of 22-year-old Tatís (numbers may not be exact, but the idea is there)*. Tatís will have another peak-years season to offer when he’s negotiating his next contract. The decision could cost the Padres tens of millions of dollars, and reap the player a similar amount, if he lives up to his potential.

From a bean-counting standpoint, the Padres are being dumb, and bean-counters run baseball. Yet the Padres, with some encouragement from veteran players like Machado, have decided to forego the contract shenanigans and start trying to be good NOW. As a side effect, the players sound pretty happy down there, as do the fans.

On a side note, with a potential lockout or player strike looming, this is a gesture by Padres management that other teams are probably not going to be happy about. But the Padres seem to be intent on making the pie bigger, rather than squabbling over who gets which slice. I have to say I like that.

One reason for the decision to bring up the rookies may be that the Padres are the only major-sport team still in San Diego. Now that there is no football team, the Padres may be making a play for the hearts and minds of sports fans looking for a new team to pull for. They may have a chance to make the pie quite a bit larger down there.

I say rookies, plural, because tonight another kid will make his major-league debut on the mound. If he looks sharp, my optimism will be compounded.

Anyway, I feel pretty good about this year. Right now they are playing the San Francisco Giants —a pretty bad team (they pinch-hit for a corner outfielder on opening day) — and it’s a long year, so the real test will come later. The Giants have an exciting prospect of their own, but it has been explained to the fans here that it would be crazy to bring him up now, and lose a prime year at the end of his contract. Because that’s how baseball works.

Except, right now, in San Diego.

___

* this is wrong. My point is quintuplufied by the actual math. See the comments.

1

Gimme Swift

As a computer programmer, I live in a familiar cycle: Write some code, then run it repeatedly to work out all the kinks. There is a moment when you hit “run” for the first time, already anticipating what the errors might be, thinking about next steps when the error inevitably presents itself.

It’s been weird writing server-side Swift. I do my hacking, adding a feature or refactoring or whatever, I make the compiler happy, then it’s time to get to the nitty-gritty. I roll up my sleeves, start the program… and it works. Just like that. I run the tests against the other systems. It works.

It’s like you’re all ready for a fight and the other guy doesn’t show up. NOW what are you going to do?

Swift can be annoying with how hard-assed it is about certain things, but that picky compiler that sometimes forces long-winded syntax is like that really picky English teacher who you realize after the fact gave you a command of words you didn’t have before. If you have a null pointer in Swift, you went out of your way to create it.

Programming languages exist for the convenience of humans, not machines. So if you can make a language that makes it harder for humans to make a mistake, why wouldn’t you?

Man I enjoy writing code in Swift. Of the four languages I use regularly, Swift is hands-down the one I’m most productive with, even though I’ve been using the others for far longer. And just today I remembered that functions could return tuples, and I was like, “Damn!” all over again, thinking how I can shrink my interfaces.

That and a performance profile comparable to C (each is better for certain sorts of operations), and you have a language with some mojo. This ain’t JavaScript, homey.

Most of my days are consumed writing code in other languages (at least for now), and what strikes me every day is that the mistakes I make would not have been possible in Swift. Think of that!

3

Optimizing Your Code (code means life)

This is a kind of geeky episode, but I think there is a lesson here that goes far beyond computer science. You might want to give it a go, even if programming is not your thing.

I am slowly updating a body of code made by other people. They optimized for the oddest things. For instance, when you get the profile of a person, you also get the profiles of the people who work for that person, including their pictures.

Sometimes, you see, in some application I’ve never worked on, that information is useful. But rather than make a way for our apps to ask, “hey, who is this guy the boss of?” and subsequently, “what do they look like?”, the system returns all that information whether you want it or not. Which makes all requests for a profile dramatically slower whether they need that information or not, and chews up bandwidth sending pictures that will never be used, and generally makes the world worse.

The people that wrote that code were carefully optimizing to reduce the number of round trips to the server. One app saves a couple of milliseconds while all other apps pay the price. While I disagree with that optimization in our case, I understand it. It comes, ultimately, from programmers who remember a different Internet. I guess. When requests took up that much extra time, wasted bandwidth was an even bigger problem.

Now there’s a new sheriff in town, and I’m applying my own optimizations. And while you might guess that I’m making services that very quickly return only the data you asked for, there is another optimization I find far more important. I am optimizing for clarity.

Right now I am maintaining a service with methods ‘getProfile’, ‘getFullProfile’, and (God help me) ‘getFullProfile2’. The well-intentioned architects of this system created a standard of providing structured comments for each method; but the doc block for two of the three methods mentioned above were copied from somewhere else and were just wrong.

Other methods in the system return partial data from a person’s profile, but often the names given to the data fields don’t match anything else. ‘prefName’ in one so-called profile might be ‘ub_emp_preferred_name’ in another. It’s madness.

Optimizing for clarity begins with recognizing that a person’s profile is a thing that can be clearly defined. “This is what a profile is,” one could declare. When you ask for a profile, there is no mystery what you are going to get. If you need more, you know how to ask.

There are times when such a rigid structure will cost you an extra server request or two, and it might make your server work a little extra. But here’s the secret: Engineer-days are worth more than processor-milliseconds. That’s true even if the processor-milliseconds add up to more than a day. A core running in a data center costs maybe a buck a day (though I suspect it’s much less). I’m embarrassed to tell you what I make for a day’s work, but it’s a bit more than a buck.

Design for clarity. I think this principle extends far past the software world. It certainly applies in industrial design, where even the simple objects we use every day benefit from a design that does not cause question marks to float over our heads. Simplicity is achieved; it does not happen on its own.

I am working on code that accepted complexity rather than working for simplicity, and in the end made more work for everyone. Perhaps, even if you are not a programmer, there is a lesson here: Work for simplicity. Work for clarity. Work less later, because your task is simple and clear.

1

What You Pay to Google

I do it too. I use Google’s “free” services. But they’re not free. Google makes a shit-ton of money off me. Consider this list of things The Goog knows about me:

name, age, blah blah blah – tragically that is already forfeit
thousands of web sites I’ve visited
thousands of searches I’ve done (yeah, those searches)
the full content of thousands of emails I’ve sent or received. I don’t use my gmail account, but any time I send a letter to a gmail address my words are duly noted. Every word that goes through gmail is archived.
Almost every purchase I’ve made online
Every purchase I’ve made in stores using Google wallet (which are none, because that is my pathetic line in the sand.)

Google, along with all tech companies, has to reveal what they collect about you if they want to do business in Europe. But here’s the thing: While I can get a full accounting of activity on my Google account, I can find no way to see, and delete, the data collected about me while I’m not actively logged into g-whatever. Which is most of my life.

I use Duck-Duck-Go for searching now, which is better anyway if you want to refine your search with + or -. I have not put a full embargo on gmail addresses, but it’s tempting. Somehow they have the right to read the communications of someone who has never entered into any sort of agreement with them. (I am not such a person, but they must exist.)

Google must hate Facebook for getting caught harvesting shit that is none of their business so often. If it weren’t for Facebook’s ineptitude, Google might still live in an unregulated world. As it is, they are doing their damndest to obey the letter of the law while still collecting “anonymous” data they are not responsible for revealing. It is not anonymous. If it were, it would have no value.

Screw those guys.

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

Jury Life: The Trial

It has been a while since I wrote that title, and I’m wondering just what to say. There’s the small version: an insecure kid — both emotionally and economically insecure — crossed a line more than once, trying to keep his mildly awful suburban girlfriend close by so he could talk her out of dumping him.

We saw, at the start of the trial, during the testimony of the girlfriend’s dad, a video of the kid in front of the girlfriend’s house. He is obviously angry. At the end, he scoops up the family cat and walks away. I seriously questioned my ability to be objective after that.

Dad said the cat was gone for days, but finally came back. The first lie of the trial. Turns out The Kid and Max were besties, and Max is choosy about his pals. Dad also denied threatening to shoot The Kid.

Complicating things: Awful Girlfriend’s mother became a lifeline for the kid. He was unwelcome in his own home, but she had his back. Even after everything, she tutored him up to get his GED. Her husband is not aware of this. But from her delivery of testimony it’s easy to see where Awful Girlfriend learned her ways.

Reflecting on all the questions about abuse during voir dire, it turns out the girlfriend was not above pummeling her physically-smaller beau. At least, according to her mother.

If you haven’t guessed already, I was (still am) sympathetic to the defendant. But there was simply no getting around the fact he did two of the three things he was accused of. The third just smelled like the DA going for broke, and was just silly.

Apparently we’re on the fast version of this story, so I’ll just say I was elected jury foreman because I’d been on a jury before, Juror 4 did a great job challenging everything, and I wish I’d challenged Juror 10’s desire to get the fuck out of there to make sure he was actually voting his conscious.

Guilty on two out of three.

If I were the judge, I would put this smart, emotional kid into community service, caring for people. I can see him in a nursing home, doting over the residents. I think The Kid could shine in a role where caring too much is a good thing. Losing a friend will be brutal for him, but this is what he was built to do.

There’s a lot more I can say; observations during the trial, the fidgety and annoying habits of Juror 2 (had I written this three weeks ago, that would have been its own episode), the friendly bailiff — but ultimately we did our job. I’m disappointed that we were asked to do our job in this case; this seems like something that didn’t really need to go to trial. Perhaps Miss Li, the defense attorney, felt that the witness testimony would affect sentencing. She might be right. It’s not her fault jury trials are really fucking expensive, and she is obligated to do what is best for her client.

Justice is a slippery thing, my friends, and the law is not always about right and wrong. But this time the law was clear and I have to trust the judge to do the right thing.

2

What Have We Become?

Today on the radio I heard an ad from McDonalds. It went like this: slow down from your hectic life and take a few minutes to wolf down a breakfast at our fast food chain.

To emphasize, we have the flag bearer of food with speed realizing that people aren’t slowing down enough to eat their breakfasts. So now they’re saying, “Hey, slow down, bud! Cut twelve minutes out of your day to have a McGriddle!”

51 Bottles of Beer on the Wall

I was poking around in the musty, poorly-lit tunnels beneath the smooth and glitzy blog you are reading, and I discovered a rather unsettling fact: I have 51 episodes I started but didn’t finish, yet still haven’t deleted. For the next week or three, I’ll be pulling up the ones that deserve to see the blinding light of the public eye.

So if you see some references that are clearly dated, welp, that’s why. If you see episodes that start to develop but then suddenly stop, it’s because I liked the episode, but at this stage I’m not gong to finish it (in all likelihood because I can’t remember the incidents described any longer). Some episodes might still have cobwebs, or spots of rust. Some might be full zombie now, shambling out of the past, hoping to find relevance by eating your brain.

We will start with a marketing campaign by McDonalds that ended a while back. I had meant to explore the idea a little more, but I stopped mid-sentence. Probably scrabbling for the right word. Or just distracted by something shiny.

I will mark the episodes from the archives with the tag “bottle of beer”.

Note that actual current episodes might appear as well, like the one that just landed in the Jury Life series. Crazy times at MR&HBI!

3

I CAN Hear Them

I’m at a bar that plays its music loud. I haven’t found a place like this since Tiki House down San Diego way. That bar is gone now, lamented by many. Tiki Dave was looking to hang up his spurs many years ago.

Anyway, I’m in a place called The Office in San Jose, and they keep the tunes cranked up. When I came in, there was some pretty serious hip-hop playing, confirming I’m an old white guy and I don’t really get it. But if I tuned out just enough to let the music happen to me, it worked out all right.

While I’ve been here the playlist has evolved, through some pretty sweet rock that I heard without hearing, until someone asked, loudly but in a sweet voice, “Can you hear the guns, Fernando?”

I could hear the fuckin’ guns. BOOM! When I was a kid I turned ABBA up loud. Especially this song. When was the last time you cranked up a purportedly easy-listening band like this, to make the listening not-so-easy? I was not the only person in this place singing along.

On a side note, this is a song an American could not write.

___

During the typing of this episode, I’ve heard John Denver loud and now it’s Bay City Rollers! S! A! T-U-R! D-A-Y! Night!

2

Bucket List Item 418

Go to the North Pole just to ask, “What time is it?”

1