Rubenerd logo

Rubenerd



A few days back on a small phone

On the day Australia’s prime minister lost power, so too did my iPhone 7+. The Lightning-headphone adapter I begrudgingly used had been working sporadically since last Thursday, further fuelling my resentment for its necessity and existence.

Upon waking Friday morning, the phone hadn’t charged in the intervening hours, and had lost sufficient power to give up the ghost entirely. No combination of spare cables, plugs, chants, or laptop USB ports revived it from its Lightning-induced stupor. Not the first reaction that springs to mind when picturing a violent meteorological event, despite its relative brevity.

A Genius Bar tech in the Sydney George Street store saw the port wasn’t communicating with the phone, confirming my suspicion it was the port itself and not the battery. To their credit, they swapped my phone out, right there, right now, for free. For people who claim Apple is overpriced, this is one of the many things you’re paying for.

But in the interim, I went back to my iPhone 5s. I did a restore of the 7+ to the 5s in iTunes, but it was so slow I did a clean install. Some observations:

  • iOS 11 works shockingly well, when cleanly restored. I read they’d included some optimisations in the most recent build, and it shows. Apps do take a few solid seconds to launch, but the animations and UI are smooth.

  • It’s impossibly light. Obviously it would be compared to the giant 7+, but I’ve left home wondering if it was even in my pocket.

  • The fit and finish is still the best of any iPhone I’ve ever used. The 3G was ergonomic but plasticy; the iPhone 6 and 7+ are laughably un-ergonomic. The iPhone 5s feels precision crafted, like an expensive watch.

  • Fate/Grand Order—the only mobile game I care about—is the only application that feels sluggish at times. The sprites and transitions render beautifully, but you spend longer on waiting screens.

I emphasise though, that’s the result of using the latest iOS on a four year old phone. In case you haven’t noticed I’m extremely impressed.

So I’m going to keep using it, as an experiment! Now that my new Kindle has usurped the giant iPhone 7+ from its book and manga duties, if it turns out I can live with the smaller screen, an iPhone SE may be in my future.



Australian Prime Minister Morrison

Our new prime minister, second from the right

Yesterday was surreal. Australia’s prime minister, and my phone were both replaced, again. My iPhone 7+ couldn’t hold a charge anymore, and neither could Malcolm Turnbull with his own party.

Australia now has its seventh prime minister in a decade: Scott Morrison, second from the right in Nick Haggarty’s ABC photo. There’s a metaphor in that too.

For some international context

Most of my dear readers here are Singaporeans and Americans. Singapore uses the same parliamentary system, so imagine the PAP lost confidence in Lee Hsien Loong—if you could imagine that—and replaced him.

For Americans, prime ministers are akin to your American house majority leaders. They’re voted in behind closed doors by their party, and must be an elected representative. And unlike an executive president, they only stay in control at the discretion of their party.

(Our executive is the same as Canada’s, New Zealand’s, the UK’s, you may have heard of her. Though we all have a Governer General so poor ’Liz doesn’t need to fly around everywhere).

A prime minister resigning during their term, or having a successful spill motion against them by their party is uncommon—or at least used to be—but not unusual. Prime minister Cameron resigned in the UK after Brexit, as a recent example.

What’s bizarre about the Australian experiment is the rate with which they’re replaced. No sitting prime minister has served a full term since 2007, before members of their own party got antsy and deposed them:

  • Kevin Rudd, of the centre-left Labor party
  • Julia Gillard, Labor
  • Kevin Rudd, again
  • Tony Abbott, of the centre-right [sic] Liberal party
  • Malcolm Turnbull, Liberal
  • Scott Morrison, Liberal

The next spill

Yesterday’s spill motion against Malcolm Turnbull was the second this week. On Tuesday, Peter Dutton challenged him but didn’t have the numbers. The second time, Malcolm Turnbull didn’t contest, with two other party members stepping up. It was slim pickings:

  • Julie Bishop made her name defending mining companies from having to pay compensation to asbestos victims. Maybe she’s progressed since then; we can’t tell, she keeps hiding behind whiteboards.

  • Scott Morrison was the architect of the horrid Stop The Boats campaign, which has resulted in the death and suffering of refugees in overseas camps. He also famously presented a lump of coal to parliament, in some bizarre reverse-Christmas stocking logic to defend the industry from renewables.

  • Peter Dutton expanded Scott Morrison’s camp solution, and has done more to usher in police state rules under his super ministry than any other portfolio holder in recent memory. I’ve had nightmares about this guy; and would have considered moving away from Australia again if he got in charge.

I’m glad we didn’t get Mr Dutton. But if I may quote a coworker and get blue for a second: for fuck’s sake.

Compared to Turnbull

Malcolm Turnbull was an interesting, if thoroughly disappointing leader. He was credited by his detractors for lurching their conservative party violently to the left, but centre-lefties like myself viewed him as a relatively spineless puppet for the wilder factions of his party; willing to capitulate and backtrack on what may have been his genuinely-held beliefs in a now-vain attempt to maintain power.

His legacy in my industry will be his wholesale destruction of the National Broadband Network. Before economies of scale could be realised, he replaced the single technology with a slower, and more expensive grab bag, dubbed the Multi-Technology Mix. Taxpayers will be footing the bill for this for decades; so much for the good economic managers.

In the aftermath of the first spill last week, a smiling Scott Morrison now-infamously held Malcolm Turnbull’s shoulder and proclaimed him to be “his leader.” To have someone from Turnbull’s camp become leader has the far-right pundits furious; this wasn’t the outcome they wanted!

Time to vote these muppets out next year.


Performance management Friday Fanmail

Friday Fanmail time! Each and every Friday, except when I either forget or couldn’t be bothered, I post a piece of fanmail sent to me regarding this blog, so that we may all pay witness to their majestic words.

Today’s came from what I can only assume to be a thoroughly legitimate enterprise, based on their professional wordart skills, JPEG artifacting, and aspect ratio.

PERFORMANCE MANAGEMENT!

I’m convinced. But can I attend?

Who Should Attend
CEO’s
General Managers
Managers
Supervisors
Human Resources
Unsubscribe here to opt-out
© [REDACTED] 2011

I suppose I’m one of those, but it looks like I’m receiving this message seven years too late! Noooo!


Airline Sign Generator

I remembered this old sign generator site from years back, and saw they have a slew of new ones. This is my latest creation!

Airways Airlines

Well, that was less inspired than I expected. I’ll try again.

Aeroline du Plane

That doesn’t even make sense. Sleep probably would have been more productive an activity for this time of night.

As for the plane itself—the Aeroline du Plane as it were—you can tell it’s a Boeing 757 on account of the fuselage looking like a 757.



PostgreSQL NOT IN with NULL

Earlier this week my colleague clued me into a potential Postgres pitfall I’d yet to be bitten by, but it could happen.

Say you’re doing a once-off query like this. Yes, it’s a contrived, simplified example.

SELECT book, isbn 
FROM inventory 
WHERE isbn NOT IN (
    SELECT isbn FROM orders
)

This superficially works, but Postgres will not match NULL values in this subquery when using NOT IN. Ouch!

So the only way to be safe is to check the field is also NOT NULL:

SELECT book, isbn 
FROM inventory 
WHERE isbn NOT IN (
    SELECT isbn FROM orders 
    WHERE isbn IS NOT NULL
)

Or the more robust alternative, short of doing a proper join, is to strategically deploy NOT EXISTS:

SELECT book, isbn 
FROM inventory 
WHERE NOT EXISTS (
    SELECT isbn FROM orders 
    WHERE inventory.isbn = orders.isbn
)

I did some digging, and also found this interesting article on Explain Extended on the performance implicaitons of using these different queries.


Places I read but still mispronounce

The photo above is from some night Shinjuku wanderings back in March. It’s not in any of below places, so therefore its inclusion is entirely pointless.

Chesapeake Bay
Cheapskate Bay

Arkansas
Are-kansas

Riyadh
Riddya

Sydenham
Syd-en-em-en-ememem

Worcester
Worcestershire

Llanfair­pwllgwyngyll­gogery­chwyrn­drobwll­llan­tysilio­gogo­goch
Llama-frasm-keysmash-gogo-gogog-gogogoch

Argument mnemonics

I like argument and option mnemonics. I can see why standard usage documentation prefers to sort arguments l15y, but this way makes them much easier to remember.

For example, my standard directory listings:

$ ls -cola

From the FreeBSD ls(1) manpage:

  • Use time when file status was last changed for sorting or printing
  • Include the file flags in a long (-l) output
  • List files in the long format
  • List all; include directory entries whose names begin with a dot

Or for sorting by ascending time modified, using the name of those Singaporean and Malaysian train systems:

$ ls -lrt

From that same manpage:

  • List files in the long format
  • Reverse the order of the sort
  • Sort by descending time modified (most recently modified first)

And the classic, audio-sounding aux:

$ ps aux

From the FreeBSD ps(1) manpage:

  • Display information about other users’ processes as well
  • Display information associated with the following keywords: user, pid, %cpu, %mem, vsz, rss, tt, state, start, time, and command.
  • When displaying processes matched by other options, include processes which do not have a controlling terminal

And finally, a somewhat lowbrow insult to give to a folder that may be using way too much of your drive space:

$ du -sh

From the FreeBSD du(1) manpage:

  • Display an entry for each specified file
  • “Human-readable” output. Use unit suffixes.

Unfortunately, tar and related tools will never have mnemonic arguments, unless cjvf becomes an overpriced clothing line or something.


Communicating isn’t just stating facts

This answer on by Upper_Case appeared in the Hot Network Questions sidebar on StackExchange:

Communicating well is not a matter of stating true facts (though that is important). It is about expressing things that are accurate in a way that the other party will understand. It is common, in my personal experience, for technically-minded people (like engineers) to only focus on the accuracy of their statements.

I call this the not seeing the forest for the trees problem, and is one of the reasons I originally disabled blog comments.