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

My Visit to One of the Most Expensive Buildings in the World

Most of the top ten most expensive buildings in the world are opulent resorts or mighty skyscrapers. There is a nuclear power plant in the mix, and then there’s Apple Park. The new headquarters for my company doesn’t soar up to scrape the ionosphere’s belly, and it doesn’t drip with ridiculous lavishness. The cost came not from coating everything with gold but from building to design tolerances that the construction industry simply doesn’t do.

To make everything fit so tightly in earthquake country first meant resting the whole damn thing on shimmy-shake pads. Thinking about that puts the scale into perspective: The building is a ring; the whole of the new football stadium for the San Francisco 49’ers fits in the “garden” inside the ring.

When I first got through security and walked up to the building, the soft morning rain and the sun at my back produced a rainbow that seemed to emerge from the middle of the giant ring. One prone to symbolism might find that portentous. I took a picture, but I can’t show it to you. (I might have cheated but the picture’s not that great.)

Inside, it feels like the future. Like the fictional sets of many, many science fiction movies, but real, and… functioning. Considering that this whole thing was built on so many simulations, so many never-been-done-but-it-should-work-probably ideas, the whole thing has come together quite nicely.

I was on the third floor and I stepped out of the elevator to see the treetops of the cafeteria. The cafeteria was indoors at that moment (there are stunningly massive sliding glass doors — four stories tall — to open the cafeteria to the outside on good days), but it still felt arboreal.

One thing that enhanced that feeling was the near invisibility of the fence at the edge of the balcony looking down. Glass, clean, almost invisible, making me feel like I was floating over the space below. Happily, I am not prone to vertigo.

It is a building that glorifies glass. The stories you may have heard about distracted employees running into walls is true. Glass and pale cool stone define this quiet world.

I walked through the center of the ring, the path making satisfying crunching sounds beneath my feet. I saw places that had not been ready for the recent rains, standing water on top of newly-planted ground cover. And there is no place in the area built with Apple’s beer bashes in mind. (*WHAAT?*) Yet, there was a serenity in those rolling hills that I really enjoyed. I can imagine a monastery feeling that way.

When we started our stroll through the center of the ring the sky was offering a gentle sprinkle, but by the time we got to the path to the duck pond it was dumping rain and I was more inclined to get back inside. From the organic chaos of grass and trees and rain to the quiet, controlled world of glass and stone once more.

The people I was meeting with — now residents of this place — pointed out spots where trim was missing or small finishing tasks were incomplete. I imagine it will be a year or more before the miles-long to-do list is completed.

My group will not be moving to the new campus; even before ground was struck Apple had outgrown its new headquarters. It holds something like 13,000 people — similar to the Hewlett Packard campus that was razed to make room — but where the old buildings stood between parking lots, the Apple Campus leaves much of the real estate for parkland which I look forward to exploring. Apple was named for the local orchards; in part it was Apple’s success that destroyed them. Nice to see at least a few acres of them come back.

I may not work over there, but I will be finding excuses to visit.

2

So, I’m Married Now

Yep, my best friend in the whole world, my sweetie, my soul mate and I tied the knot today. I’m more than a little pleased by that.

19

Goodbye, Cassini

In about twenty hours, the spacecraft Cassini will plunge into the atmosphere of Saturn and destroy itself, to protect any potential life on Saturn’s moons. Can’t have Earth-life-tainted space junk floating around out there.

Cassini’s mission has been an astonishing success — with an emphasis on astonishing. It found things that turned some of our notions on their heads, and revealed a small moon with a liquid water geyser(!). It’s going to take a while to figure that one out.

I’ll not go into all the details; there’s actually a pretty nice write-up at fivethirtyeight, and you can get real-time updates straight from NASA.

The scientific instrument I most appreciate is the plain ol’ camera – Cassini sent home some beautiful images. Here’s a low-res markup of one of my favorites: A shot of Earth taken through the rings of Saturn.

The universe is still filled with mystery; we’re barely out of our own back yard and everywhere we turn we find things that astonish us. As we struggle with the trials of having a lot of sentient creatures packed onto the rocky parts of the surface of one small planet, we would do well to take a breath and look up, and be awestricken by what we see.

2

Basking in my Own…

A long time ago I published a Chapter One here on this blog called Gravity. It was a little bit that I thought had legs. Eventually I devoted a NaNoWriMo to exploring the character, and today I read much of it. It has some pretty sweet moments, if I do say so myself.

A Jane Doe awakens in a hospital, and feels gravity for the first time. Everything is wrong, even though everything is empirically perfectly normal.

At the core is a battle between Liberty on one side, and Justice for All on the other (that’s how one side frames it, anyway). But it’s really a story of soldiers. Bitter rivals sharing a room, one crippled. Were she not crippled, Benji would have killed her and bragged about it later. But it was Jane’s own side that crippled her, that tore her down. They took her wings. And that is the only thing, the ONLY thing, Benji would never do. She was beautiful when she flew.

Though it would be irresponsible not to consider that Jane volunteered for this mission, confident that her own compass would never waver, even if her memory were erased.

Note: Benji and Jane never become a love interest. Seriously. You can discover respect without wanting to bone someone.

5

Patio Life: California

I was looking for something cool and fizzy to sip on the patio this evening, and the Official Sweetie of Muddled Ramblings and Half-Baked Ideas suggested a Gin and Tonic, with some fancy tonic already cold in the fridge. I’m not ordinarily a G&T kind of guy, but the idea fit conditions perfectly.

Then she said, “Ooo! You want a lime? I’ll go out and pick you a lime.”

 

1

Patio Life Returns

Life is good.

1

Lens Lust: The Phases

One thing about owning a camera whose nature changes when you change lenses — you start looking at a lot of lenses and imagining what you could do with them. Lens lust is perfectly human and even healthy. A few years ago I really started to appreciate what you might call extreme lenses, the lenses that push the boundaries of what is possible.

I even bought one kinda-extreme lens, and I still covet that lens’s even more extreme little brother, a lens made by Canon that cannot be matched on other SLRs because of physics. (The hole on the front of modern Canon cameras is larger, and the size of the hole is one of the things that limits what a lens attached to it can do.) I will own that lens one day.

But after a while, you’ve seen all the great lenses. You’ve appreciated the Noctilux and the latest Zeiss offerings, and you’ve seen that less-than-ten-made gigantic-yet-fast telephoto selling for the price of a modest home. (The perfect portrait lens, if you can get half a mile from your subject.)

Window shopping is about surprise, about finding something new and delightful, and people simply aren’t designing new crazy-extreme lenses fast enough. So now when I go hunting for over-the-top, cost-no-object glass, my response is “oh yeah, that one.” That doesn’t mean I might not linger over the specs, but it’s like I’m re-reading a favorite novel.

Then there is the magical day when you discover a whole new category of lenses to lust after. And this time around, a lot of them are pretty cheap. Welcome to the world of vintage glass. If you don’t mind undertaking the chore of focussing the camera yourself, a whole new world unfolds.

Although I assume technology has changed the way lens makers go about their craft, Zeiss lenses have been very good for a very long time. Others have been trying to knock Zeiss off their pedestal for a long time as well. Pentax made a serious run at Zeiss and produced some optically excellent lenses with superb build quality, and these days you can find those lenses cheap. And while shopping you can appreciate that the radioactive 8-element 50mm (it has thorium in one lens element) is not as good as the 7-element design that followed, with its expensive-to-manufacture curved interface between two glued elements, but that the Super-Multi-Coated Takumar is maybe a little better than the SMC Tacumar that followed. I expect that I’ll have a Pentax in the barn before too much longer.

And then there’s Zeiss itself. It was in the wrong half of Germany and at the end of World War Two and the whole damn factory, engineers and all, was carted off to Mother Russia. Some say quality degraded over time, but you can find some very cheap Russian lenses that are actually improvements on the Zeiss designs — improvements made by the Zeiss people themselves.

Which is all to say when you open yourself to vintage glass, not only do you find some pretty spectacular deals, you find some pretty cool stories as well. Learning the histories of some of the seminal lenses in photography is a special lens-lust bonus.

But while they’re not making enough crazy-extreme new lenses, they are by definition not making any more historically-iconic or secret old-school super-bargain lenses. Lately, when I’ve popped over to eBay to type in sexy lens phrases, I see the same list I always do. My fantasy wish list is becoming more stable; there are no new surprises as some oddball piece of glass hits me from out of the blue. I think there are still some discoveries in the vintage realm; some of the “vintage” lenses I drool over have performance comparable to modern lenses, but farther back in time (and cheaper yet) there are lenses that give a different feel to the photos. I picked up one Russian 50mm for pretty much free that falls into that category, and I will be doing a series of self-portraits with it in the near future.

But finding those lenses doesn’t provide the same visceral rush. You’re not really looking for the gems, the designs that were ahead of their time, you’re just choosing out of a bucket because what you want is the “bucket” look.

s-l500Are there new horizons? New categories of lenses I haven’t discovered yet, that I can drool over and study to learn their nuances? I hope so. There is the category “new lenses that act like old lenses”, discussed under the banner “lomography”, and while some of them are funky, I haven’t found any compelling reason not to just use an old lens instead. In fact, most of lomography is about using crappy old Holgas, pinholes, and plastic lenses, but if you really insist on spending money you can find a funky brass-bodied lens with apertures you slip in through a slot on the side. So… actually, it looks like I’ve already worked that vein dry.

I suppose it’s a sign of maturity, when you’ve taken a passion to where there are no more surprises, but it’s also an indication of why maturity sucks. I guess now I should spend more of my time looking at photographs, rather than lenses. After all, that’s how you become a better photographer. But I’m also an engineer, and I’m unapologetic for my fascination with this interface between art and engineering.

And I’m thinking that lens designers need to get off their lazy asses and make more wacky stuff.

5

Another Reason Mexican Television is Awesome

I’m in a local cantina and on the TV there’s some sort of quiz show happening. When the contestants get the answer wrong they get a pie in the face. When they get it right, they get a generous shot of tequila.

“Tequila!” the teammates of the most recent correct answer shouted in unison. Good times.

2

It Feels Different this Year

I’m a hockey fan, and if you insist that I be more specific I will tell you that I’m a fan of the local NHL franchise, the San Jose Sharks. Almost every year this team makes it to the playoffs. Almost every year they exit early.

Which is mostly just math. Half the teams in the playoffs are eliminated in the first round. By the end of the second round, only four remain. So MOST of the teams that make the playoffs go home early. But you do that too many years in a row, you get a reputation. Even if you go home because of a bizarre bounce in an overtime that shouldn’t have happened except the ref blew a call with 33 seconds to go in regulation.

Right now San Jose is skating agains St. Louis in a titan battle of saints in which God must be careful not to take sides. Like Joseph, Louis has earned a reputation for early exits. One of the two will reach the finals.

Three games in, it’s pretty easy to see that my team is the better of the two. Nashville took it to San Jose a couple of times in the previous round, but the Sharks answered by playing really good hockey. That good hockey has carried into the semifinal round with the Blues.

The Blues deserve to be here. They are a very good team, and they beat powerhouse Dallas fair and square. They beat the Stars by beating on them, and getting under their skin, and making Dallas do stupid things. They came out against the Sharks with the same strategy — and it failed utterly. A dude friggin’ pulled Joe Thornton’s beard and the Sharks laughed it off and scored on the power play. The Sharks, under the leadership of captain Joe Pavelski, just don’t take the bait.

Last game, Newt Gingrich Ken Hitchcock pulled his bullies and agitators and tried to match the Sharks with speed and skill. For a while, it seemed to be working. But nobody plays Sharks hockey better than the Sharks do.

And there’s the thing. Some time around the start of 2016 Joe Thornton started backchecking with energy and the rest of the team stepped up and Burns stopped making stupidly overoptimistic passes and it feels different this year. This isn’t a team getting by, it’s a team offering both an unstoppable offense and a disciplined defense (3 shutouts in the last 4 playoff games) and exposing no weaknesses to exploit. A team like that can laugh when an agitator on the other side tries to lure them into mistakes. Even people on the East Coast are waking up to what a good team this is.

It feels different this year. The Sharks aren’t looking for answers, they aren’t looking for the weakness of the other team. They’re playing their game, and they’re doing it well. It’s up to their opponents to solve the Sharks, and so far none has. Man, it’s been fun to watch.

It’s sports, and anything can happen. I felt confident two years ago when the Sharks went up 3-0 on the Kings only to choke away the playoffs. But this year the Sharks handled the Kings pretty easily, and while Nashville gave them a run for their money the way the Sharks emerged from that series has carried over.

What’s different this year? Maybe the most important thing is the C on Pavelski’s sweater. But don’t forget Wardo, and Donkey, and Jones. Don’t forget old man Zubrus making the fourth line a disciplined unit and a legitimate threat. Hertl’s lovely slap shot to open the scoring last night is now a rarity; under the new management the Czech kid is expected to be a complete player, not just a sniper but a stout defender and a guy willing to mix it up down near the goal. He has embraced the role and thrives on the chaos around the net. “Now I go to net, get rebound and score. Is better.”

The team knows: this is their chance. The older players, Thornton and Marleau in particular, know that time is running out, and this year they’re playing like their legacies are on the line. The new kids are hungry, and skilled, but they are inheriting discipline from the old-timers. It really is a joy to watch. At this time they are still six wins from their first championship, but no matter what happens I thank the Sharks for making it different this year.

1

Dreamtime

You know how sometimes you have a dream in the morning that you get up and start your day, then you wake up and have to do it all over again? I had one of those dreams this morning. In my dream, I went back to bed. It was a good dream.

3

An Open Letter to the Drivers Sharing the Road with Me on my Ride Home

Let’s start with the guy driving the faded red pickup truck, tires caked with mud, a skull wearing a german helmet adorning the back window, mariachi music blasting into the heavy traffic. You know who you are.

Thank you.

You went out of your way to make my journey home safer — not once, but twice, protecting me not only from yourself but from other assholes as well. The world needs more folks like you.

As for the minivan driver and the woman driving the beat-up sedan, I’d like to thank you as well. Also the woman who waved me through the four-way stop.

Toward the end of my ride I realized how out of shape I was when I started hallucinating. I could have sworn the guy who slowed down way before he needed to, specifically to give me a safe space to pass a moving van parked in the bike lane some distance ahead, and who leaned over to make eye contact with me and wave me ahead, a kind and courteous gentleman, was driving a big, shiny, new BMW.

But that’s just not possible, is it?

Still, hallucinations aside, it was a good ride home, and I’d like to thank all the courteous drivers out there who made it happen. I hope to see you all again soon.

3

wp-cli, Where have you been all my life?

WordPress updates can be pretty insecure. FTP was invented back before there was an Internet, and when when no one thought that bad people might be on the same network you’re using (why even have a password if you let everyone see it?). Ah, for those naïve and simple times!

Yet even today most of the Web-site-in-a-box products you can get to run on your GoDaddy account use FTP. I control my own server, and you can bet your boots that FTP is turned right the hell off.

It can be a hassle setting WordPress up to allow its update features to work in a very secure fashion, however. I was wrangling rsa certificates when I ran across another solution: rather than push a button on a web page to run an update, log into the server and run a command there. Simple, effective, secure, without file permission fiddling and authorized_keys files.

wp-cli does way more than updates, too. It is a tool I’ve been pining for for a long time, without even knowing it. Want to install a plugin? wp plugin install "xyz" and you’re done. Back up the ol’ database? They have you covered. Welcome to my tool belt, wp-cli!

If you’re not afraid to type three commands to update your site, rather than trying to maintain a hole in your security in such a way that only you can use it, then this is a great option for you. Check it out at wp-cli.org.

John Scott, NHL All-Star

John Scott plays hockey. He’s a lunch-pail, blue-collar player who works hard to stay in the league. He’s been called a dying breed, or an old-schooler, but those are just soft words to disguise what he does so well. He’s an enforcer. He’s a peacekeeper. He keeps the peace by making it absolutely clear that he will destroy anyone who violates the peace. He was on the team I support last year, and it’s funny how many fights didn’t happen when John Scott came on the ice.

But if it’s fisticuffs you want, John Scott is your bloke.

CZ6qWnSXEAAOYnsThere are thugs around the league that everyone hates. Raffi Torres, technically a member of my favorite team, comes to mind. People hate Raffi, and for good reason. But people don’t hate John Scott. He’s a bruiser, a puncher, but not a dirty player. If you don’t violate John Scott’s peace, you need not fear.

Not only do hockey fans not hate John Scott, they like him so much that this year they elected him to the all-star game. Part of it is a joke, of course, the fans punking the league. But they’d never punk the league with Raffi Torres. He’s an asshole. They punked the league with someone they liked. I’m sure many people in San Jose hopped on the John Scott bandwagon, even though he doesn’t play here anymore.

The NHL did not handle the situation gracefully. They tried to bury him, to shuffle him out of the lineup, and to apply personal pressure to get him to step down. Scott readily acknowledges that he is not the most skilled player in the NHL, but when the league began dicking him over to knock him out of the game, he pushed back, in a low-key, John Scott sort of way. Because that’s who he is; that’s always been his game. Play by the rules, there’s no problem. Step over the line, and he will guide you back, gently, at first.

Fans howled. Whether they were his supporters before or not, the NHL brass was trying to nullify their vote. He will be playing in the all-star game.

Then the other all-star players voted, and he has a C on his sweater. Team captain. John Fuckin’ Scott, team captain in the all-star game. The players, at least, remembered who really pays their checks, and they don’t mind punking their employers now and then to boot. You can read a feel-good piece about it (twins any minute now!) over at espn (also the source of the above image).

And now I’ll probably watch at least some of that horrible game, just to hear the arena get loud when Scott steps onto the ice. The game is suddenly interesting, at least for a few minutes. Final victory: NHL.

1

Gulp

Today as I was driving to work (really had planned to bike today, but…) I was in stop-and-go next to a Maserati. “That’s a handsome automobile,” I thought. About then I caught a whiff of the oil going out my tailpipe and that brought to mind the mortality of all useful machines. I stopped to look at one of the Maseratis that parks in my structure. It is indeed handsome, even on extended inspection. “I wonder of there’s a Maserati convertible?” I pondered.

There is a Maserati convertible, it turns out. And it’s also a handsome automobile. And… it’s pricey.

Ha. “Pricey.” OK, I know a prestige marque commands a premium, but I wasn’t ready for a price tag that’s damn near twice the Jaguar F-type. That’s the competition, I figure. And while I find the Jag a little butt-heavy (I have heard that the trunk had to be expanded to meet the marketing requirement that it could hold a big-ass set of golf clubs – but if it can only hold one set, that’s what the passenger seat is for), and the Maserati is allegedly a four-seater, there’s just no way to justify spending absurdly too much for the Maserati (assuming you are already reconciled to spending far too much for the Jaguar).

Unless, unless, the Maserati has fewer stupid gizmos. There’s stuff on most modern cars I’d pay to not have. It would take a lot of not-having to justify that price, however.

1