If you don’t care about programming languages, feel free to skip this entry.
Continue reading “Type Safety”Vacation Nerdsnipe
We bought into Disney Vacation Club some years ago, because having a timeshare would mean we’d have this incentive to take vacations. We are bad at taking vacations. There’s always stuff to be doing, after all.
But if you don’t use your timeshare, that’s effectively money you just gave away to be burned. So…take a vacation! Awesome. We’re doing that. And our lives are better. But now, having booked one, I couldn’t stop clicking around on the DVC website. Oh, they’re partnering up with National Geographic to offer different vacations? That sounds cool. What are they…oh, check it out, walk the Camino de Santiago and learn all about the stuff there. Neat! I totally want to do that! And ask someone how it is that the Spanish for “James” is “Iago” because that makes no sense at all. Some language is having some fun, is what I’m saying.
And I totally do want to do that…wait a second. Walking. Yes, that would be rad. I totally want to…sure, sure, I have arthritis and can’t actually be walking all day for two days in a row, let alone 11, but I…no, I don’t know whether Lise would want to or not, but it would be pretty cool still, and…yeah, okay, no, probably not actually realistic. And there’s a half hour I’m not getting back, but still.
National Geographic. Spain. Churches, museums, architecture, and exercise: how can you not be interested?
Tabloids, All The Way Down
So, in “The Avengers,” there’s a scene where Tony Stark and Pepper Potts are having 12% of a moment when they’re interrupted by Agent Phil Coulson. Pepper addresses him as, “Phil,” and Tony says, “…His first name is ‘Agent’.” This is funny because that’s not his name, and it points out how narcissistic Tony is, that he doesn’t even care about another human being enough to learn his name.
Some time ago, I enjoyed supermarket tabloids, and the part I enjoyed most was the part where they didn’t pretend to be anything other than entertainment and heavy-handed satire. Because I was a young idiot and I liked the feeling of being in on the joke. Anyway. One of the tactics there was to attach a signifying tag to a person’s name. Maybe to tell us how we’re supposed to feel about them, or maybe just to remind us why we’re nominally supposed to be interested in a story about them. Whatever, the tag always appears next to the name, so the tag becomes part of the name.
So now, I’m thinking that isn’t funny, it’s just disrespectful and manipulative, and it’s appropriating someone’s identity. It’s kind of violent, really, and gross. Anyway, I stopped being entertained by the tabloids several years before The Weekly World News went under. Occasionally, I think about Ed Anger or Bat Boy with a little nostalgia, but I also suspect that if I were to go back and read any of those articles I’d be less entertained than I remember.
And the only reason I’m thinking about all this right now, today, is that I’m suddenly struck by a pattern in the headlines of nominally serious news outlets. From yesterday’s Washington Post: “Brazil’s Bolsonaro hospitalized with abdominal pain, floats possibility of surgery.” Prefixing the president’s name not with his title but with his country seems a little strange, but maybe, if he hasn’t been in the news lately, people don’t know what country he’s from? But why would we care especially if some otherwise unremarkable Brazilian were hospitalized and possibly going to have surgery? I’m sure there are thousands of people in exactly that situation. Oh, it’s because the Washington Post has tagged Mr. Bolsonaro with “Brazil’s” and not with “President”.
Sort of like how the American news media en masse decided that it would be, “President Bush,” “Chancellor Merkel,” and, “Saddam.” You know, high school sucked, and not least because it was full of unsophisticated teenagers. But it turns out that that is actually excellent practice for American society at large. No wonder I just want to stay in my room and not talk to anyone.
So, I’m Out
It’s already been well over a year since I looked at Facebook or Instagram, and at the beginning of the month I stopped looking at Twitter. After two weeks, I checked back in and nope, I hadn’t missed anything amazing, but I sure had missed out on a bunch of anxiety and whatever we’re calling the Twitter equivalent of vaguebooking. So, being essentially drama-averse, I’ve actually gone and deleted my Facebook, Instagram, and Twitter accounts. Here’s to a better 2022!
Serializing SwiftUI Color
There are plenty of resources out there that will tell you how to make SwiftUI’s Color conform to the Codable protocol. They all boil down to creating a UIColor (when you’re running on iOS) or NSColor (when you’re running on macOS) and then grabbing the color components from there, because SwiftUI is helpful by not letting you access those things directly. The thing I learned yesterday is that if you construct your SwiftUI Color from a color asset catalog and then you construct an NSColor out of it, you need to set a color space before you can grab the components. If you don’t do that, then the thread that’s doing the work will crash. So, the code needs to look like this:
import SwiftUI
#if canImport(UIKit)
import UIKit
#elseif canImport(AppKit)
import AppKit
#endif
extension Color {
// swiftlint:disable:next large_tuple
var components: (red: Double, green: Double, blue: Double, opacity: Double) {
#if canImport(UIKit)
typealias NativeColor = UIColor
#elseif canImport(AppKit)
typealias NativeColor = NSColor
#endif
var red: CGFloat = 0
var green: CGFloat = 0
var blue: CGFloat = 0
var opacity: CGFloat = 0
var native = NativeColor(self)
#if canImport(AppKit)
native = native.usingColorSpace(NSColorSpace.genericRGB)!
#endif
native.getRed(&red, green: &green, blue: &blue, alpha: &opacity)
return (red, green, blue, opacity)
}
}
Do They Even Use These?
So, the new 16″ MacBook Pro has a notch. The choice is always there. You could, of course, not include a camera at the top of the screen. Nowadays that’s pretty much a non-starter, what with video conferencing being the way so much happens. So then, if you put a camera up there, do you keep the display a rectangle and therefore have a lot of dead space to the left and right, which you still have to build and pay for, and the users bitch about the size? Or do you put in a notch, giving up some menu bar / display space in the middle of the top of the screen but save like half a centimeter on the overall dimension, and let users bitch about how they can’t see their menu bar?
Guess what? People who want the 16″ (as opposed to the 13″) laptop care less about the size and weight of their device than they care about screen real estate. If size or weight were the deciding factor, they’d get the MacBook Air, or be happy with an iPad Pro. Or a Microsoft Surface.
We’re also supposed to be happy that they brought back MagSafe charging and an SD card slot. I guess these are cool, but here’s what else we have: only 3 USB C ports. But you know what I do have, now that USB C is more and more ubiquitous? I have a lot of peripherals that use USB C connectors to connect to the host computer. I have more than three. But you know what you can’t daisy chain? USB C connectors.
Here’s my bet. The people responsible for the notch don’t actually want to use the 16″ MacBook Pro.
Three Dots at the Mall
I get that wearing your N95 mask under your chin keeps your neckbeard from getting COVID but what’s the deal with the women doing it? … I am sure your dog is awesome and I’d love to hang out but not inside the restaurant …
What If Tulips, But…
In the early 90s, you could patent anything if you took an existing product and appended, “…but on a computer.” By the late 90s, you could sell anything to the public at large, claiming that it was a disruptive business that would change the way every human on the planet did the thing they’ve been doing for hundreds of years by pitching it as doing the thing, “…but on the Internet.” By early in 2001, just about everyone had finally figured out that that was wrong.
Today, it seems that the answer is to do the thing, “…on a phone.” Never mind that photography is a skill and so is music production; the thing that every smartphone tries to be is the best ever digital camera and recording studio. If you are not a creative genius but only barely competent, adding an extra gigapixel and some really clever digital signal processing to your phone will not materially affect your photos or recordings. And yet, that’s the platform that’s got everyone excited. It’s ubiquitous.
I’m really just grumpy because all the hubbub is about solving problems I don’t have. I suck at photography, so I don’t actually care about the very latest camera on the very latest phone. I guess if there were other sensors that were useful to me, I might care more. Like what? I dunno. Maybe…soil acidity? Temperature probes? I mean, it’s kind of useful being able to use my phone as a level and a compass, but honestly a spirit level is way cheaper and more durable, as well as easier to use. A measuring tape is more reliable, cheaper, and unlikely to break if I drop it. External sensors are cool, but honestly, going around my house and garden, what measurements do I want to take on an ongoing basis? I…don’t.
Because here’s a thing: unless you use the collected measurements to inform some decision, to take some action, then they’re not actually data. They’re just junk, piling up and taking your attention. So I don’t even know. I feel like the computational power of a phone, and the capabilities of its standard sensors, are just really amazing solutions that are in search of a problem. Absent the problem, they’re just feature checkboxes.
Sturgeon’s Law
My Audible subscription just renewed and I got all enthusiastic. Back when Netflix was DVD only, we had a, “go ahead and try it,” policy: stick whatever recommendations in the queue, and when they showed up, pop ’em in and hit play. If the movie wasn’t compelling after the first 15 minutes, we’d put it back in the mail. The cost of trying something new was pretty small. Same with the Audible subscription – you can return books, so I go ahead and take risks when I’m flush with credits. When I get down to one or two left, I get really conservative.
So anyway, I went ahead and tried out a modern fantasy book. It didn’t absolutely suck, and the author had subsequently been fleshing out his universe and written many more books, so I plumped for two more in the main thread and one in a spinoff. The spinoff was okay, although the narrator’s idea of a Scottish accent was…grating. But the second book in the main series managed to lose me mid-way. I had hoped that, even within the predictable tension/conflict arc of the episode there might be interesting characters doing fun things; by the beginning of act 3 the only interesting character was the dog, and the others were getting less believable with exposure, not more.
I’m keeping the two books I finished — I figure it’s fair since I did listen all the way through and enjoyed the first one enough to try the others. But they’ll sit there in my audio library, a reminder not to go down that particular road again.
Daily News
Once upon a time, before the death of irony (what do you think, did irony really die in 2001? I feel like it’s sort of still around) there was a link soup column called, “Suck.” The format was a short essay written in a glib, cynical voice (I just typoed that as, “void,” and that’s totally appropriate) riffing on some trend-of-the-moment, with one or two links to stories or websites sprinkled in each sentence. It totally earned the name, “Suck,” by not putting alt text on the links, so you had no idea where the link went. If you followed every one, you’d have a boatload of open tabs to click through, so it would suck up your day, as well as being a sucky website.
That said, it occurs to me now that as shitty a way of aggregating a daily news feed as that was, I think I’d rather have that than the horrendous torrent of vague hot takes on Twitter. At least Suck was meta enough to give some hints about whether the link would be worth following or not, albeit still being vague about the content in what’s clearly recognizable today as a clickbait move. Dunno if they were getting referral money from those links or not.
Once upon an even earlier time, for about a week I thought I might enjoy writing for the school paper. I got a tiny bit of training and actually went out on assignment and turned in a story and then decided that while I could possibly have gotten enough better at writing short essays – for no money and no grade – that people might want to read them, I had no actual desire to do it. Too much like work. One of the things I remember about the training, though, is that the headline is supposed to engage readers, giving a gist of a story while inviting the reader to keep going. Apparently, that’s not true any more. Nowadays, it seems that the purpose of a headline is just to drive hate clicks.
So, that’s the evolution of discourse.
Here’s the best of today’s crop:
“Senate Republicans make new infrastructure offer as House Democrats urge Biden to dig in” – Washington Post
So, the public humiliation of the Democratic party is continuing. Everyone who cares already knows that the Republicans don’t give a shit about public infrastructure. So if they’re not going to build roads and bridges, what are they doing? They’re making the Democrats dance to their tune. Why? Go ask the kids who swiped the loser kid’s backpack and are now playing keep-away before school, why are they doing it. They’re doing it because it’s fun. Because they like taunting the helpless. Because they actually don’t like that kid and they want that kid to suffer. Because the suffering of others is fun. And that’s the kind of people they are.
Of course I didn’t click through to the story. Why would I?
“Nature Will Help Protect Us From Climate Doom – If We Let It” – Mother Jones
Seriously, God bless the hippies. They’re so cute, how they think that there’s some big agent out there, “Nature,” and that agent doesn’t actually include human beings. Because things humans do are not part of nature, because humans are unnatural. Sure, I’m playing semantic games, and we all know that’s not what is meant in this context, but come on. Think for a hot second while you read that headline – climate doom for whom? Let it, how? Is there any mystery left about how human activity has altered the climate? Nah, not really. And do sea level rise, weather pattern shifts, and average temperature increases threaten all life on the planet, or just the established human land use patterns? Yeah, we all know the answers there, too. So what needs to change? Yeah, we know that, too. I mean, there could actually be something in this article about new farming practices or something but that headline doesn’t suggest it; it’s just trying to restate the warnings we were getting 50 years ago.
I’m one of the hippies and even I can see that this headline is aimed squarely at a point that we’ve passed long ago. Of course I’m not gonna click that.
“How Many People Die When Polluters Exceed Their Limits?” – Wired
I’m gonna go ahead and guess that the answer is, “All of them.” I mean, everyone dies, right? Yeah, I know, this is about the fact that pollution causes disease, either by pathways we know explicitly or by means we don’t quite know but which we can see clearly in statistical analysis. So, really, this is like saying, “Okay, you’re going to die sometime because nobody’s fucking immortal. Now, if you suck on this exhaust pipe for 12 hours a day, you’re gonna be real short of breath and lose a significant amount of brain function due to lack of oxygen, as well as get a very elevated risk of a whole suite of cancers. Which will likely kill you sooner rather than later. But if we cut it down to 4 hours a day, the same damn things will be true, except it’ll take longer. So what’s the number of hours that’s right for you?”
Substitute heavy metals leached into the drinking water, or whatever pollutant you want. I still see this as an attempt to convince somebody that maybe some stranger’s life isn’t worth throwing away just so you can pay less for your next t-shirt. I bet that if you really think cheap electronics are more important than clean water, no news story is going to change your mind. That said, if it does, then give this writer a fucking medal.
“We worked in a VR office for a few months and didn’t totally hate it” – Mashable
I guess that puts you one up on literally every human working in a cube farm, ever.
No, I’m not going to read about how it’s almost not horrible, being a veal in a pen, when the pen is in your own house.
“The future of remote work is a lot like living in a video game” – Mashable
…because video games have become just like fucking work! Grinding an MMO to get leveled up so you can do your part in a big raid, or grinding so you can build some better longhouse, or getting better at tapping different buttons so you can make sandwiches faster and sell more things. Have you yet realized that your “recreation” time is being spent doing dumb shit that we used to pay teenagers minimum wage for? You are paying a monthly subscription fee to be allowed the privilege of working fast food, or working in a goddamn warehouse! Work isn’t becoming like a video game, video games have become work!
Of course I’m not gonna click that!
“The U.S. is alarmingly close to an autonomous weapons arms race” – Fast Company
For this news organ, “alarmingly close,” is the style guide’s preference over, “already in.”
I guess that the target market for Fast Company is people who do not read any tech news, nor listen to any popular science podcasts. People, that is, who are utterly unaware of the developments in robotics since 1990.
No, I’m not going to read that.
“Will rule of law succeed where Congress failed and hold Trump accountable?” – The Guardian
No.
Saved you a click.
“‘Never seen levels like this’: Union president on airline passenger misconduct” – CNN
This is a story about how people are garbage, which comes as a complete surprise to everyone who has never read the comments section anywhere on the Internet.
As well as being a story, this one is a video clip, which means that in addition to being told that people are garbage, it’s going to use even more of your data stream. So, people with power are being dicks to people they have power over. Saved you a click. And a gig of data.