Category Archives: Tech

Groovy, null, and ‘null’

Groovy will let you call toString() on a null object. The result is the word ‘null’, which might be what you’re expecting if you know the object is null, but probably isn’t what you’re expecting if you don’t.

So if you’re, say, binding a SQL parameter and you forget to check for nulls like you would in Java, and you forget to use a null-safe operator like you should in Groovy, and you get a null value, what happens? Does groovy…

  1. Throw a NullPointerException like Java?
  2. Set the field to null?

Neither. It sets the field to the string ‘null’.

Make sure to use myVariable?.toString() instead of myVariable.toString() for cases like this!

Airplane Mode: Battery Saver!

I keep one of my old phones as a spare and for tinkering (to the extent that you can do that). I upgraded it to LineageOS and used it for a few days when my most recent phone died last month.

13 days ago I charged it, put it in airplane mode and put it in my laptop bag. Today it’s still at 34% charge. On a 5 year old battery.

Obviously it didn’t last that long with actual usage, and wouldn’t even just sitting in the bag with wi-fi and data sync. But I’m still impressed!

Flickr vs. Instagram / Who’s in Control?

Social media is a mess these days. Most of us follow too many people and organizations to keep up, so we need some way of narrowing it down…but the tools are typically built into each service, which has different priorities about what it wants you to see than you do. As they say, if you’re not paying, you’re the product.

I realized this is why I still prefer Flickr to Instagram: I’m still in control when I browse Flickr. With Instagram, the best I can do is pick from one firehose or another. Flickr has its issues, but I can find stuff there, and the timeline isn’t re-ordered to suit someone else’s priorities.

Ironically, I post more often on Instagram than on Flickr. Because I like Flickr more, I feel like I should take my time & curate my photos better. But I also end up posting many at a time on Flickr, and single photos on Instagram. I don’t feel like I’m spamming if I post twenty pictures to Flickr, but I do if I post that many* to Instagram.

I mentioned this on Mastodon, and my brother remarked that Flickr feels more like “adding to a collection,” while other sites are more “shoveling things at my friends/followers.” That’s true of most social networks: Facebook, Twitter, Instagram, even Mastodon are all about now. Going back to look at someone’s history feels like an accident. Or stalking.

On Facebook, it would be really weird to go through someone’s old posts and comment on them. On Flickr, that’s totally normal. If Twitter is like shouting into the void, hoping someone will hear you, Flickr is like building a gallery and hoping someone will visit. When someone finally does,** they’ll see it, and look around. But that scream on Twitter is already fading on the wind.

Especially if Twitter thinks your friends would be more interested in seeing a sponsored post instead.

*Instagram does let you post multi-photo stacks, but the stack only ever appears as a unit. Only the cover photo appears in timelines or searches, and the whole stack shares one description and one set of tags. Flickr lets you group photos into albums however you want, and people (including you) can find any individual photo and go from there to the rest of the album.

**Not that Flickr isn’t subject to the siren call of now either, but the long tail still exists there.

It’s not all here.

I talk about different things in different places.

Just because I’m not talking about something on one site, doesn’t mean I’m not talking about it.

Just because I’m not talking about something online doesn’t mean I’m not talking about it offline.

Just because I’m not talking about something doesn’t mean I’m not learning about it and trying to do something…or at least be better.