John Roderick on Portland

Seal of Portland

From the latest Road Work, episode 152:

Certainly in 1990, there was no reason to go to Portland. There was absolutely nothing there. It was sleazy, run down.

It seemed like the sun never shined in Portland.

It was moss-covered.

Media

When’s the best time to use a plane lavatory?

I don’t fly often, maybe every couple of months for either work or personal trips. But it’s a sufficient amount that I’ve picked up a few tricks that make flights much nicer, or at least more tolerable. So when I saw a blog network I otherwise ignore for ethical reasons posit a question regarding the timing of optimal aircraft washroom patronage, I felt the need to comment.

Singapore Airlines Boeing 777, photo by Adrian Pingstone

There are three times, one of which is related to another flight trick:

  • Before you fly. That’s obvious.

  • You should always order a special dietary meal, even if you’re not vegetarian or kosher, for example. The food is nicer, and you get it before anyone else. This means you can also use the bathroom after you eat, while the rest of the cabin is distracted with choosing their food.

  • Within 45 minutes of landing, ideally just before they put the seatbelt lights on for arrival. The bathrooms at airport gates are packed as soon as planes land, so good luck trying to get a bathroom.

Here are some other pointers:

  • Ignore the advise that you shouldn’t sit near a bathroom, because the noise is distracting. On long haul flights, like Sydney to San Francisco, you’ll be unreasonably relieved you chose that isle seat right next to one.

  • Take a little washer with you in your carry on, if you’re not in the care of a civilised company like Singapore Airlines that provide them. A quick trip to the bathroom to wash your face feels indescribably wonderful.

The photo above of a Singapore Airlines Boeing 777 was taken by Adrian Pingstone. That plane, presumably, has some of those aforementioned lavatorial facilities.

Travel

Using Subversion with GitHub

Today I (re)learned that GitHub repositories can be managed with Subversion over HTTPS. GitHub’s documentation lists these steps:

$ svn co --depth empty https://github.com/user/repo

Then get the trunk branch, which maps to HEAD and is usually master:

$ svn up trunk

Then get your branches:

$ svn up --depth empty branches

I’ve had moving off GitHub as a stalled personal project for a long time, but this might help.


My 2019 essential tool list

Every few years I collate a list of the shell tools I use, in the hopes it might be useful to someone. These install on my FreeBSD, NetBSD, macOS, and Debian boxes, unless otherwise stated. Most package names are derived from pkgsrc, but should be similar in others package managers. BSD/MIT licenced packages or similar have a green ♥ because they make me especially happy.

This list does not include fully-fledged ncurses or console applications, like IRC clients or music players. As FedEx would say, those are for another post. Ah man, so good.

Utilities

  • ag: fast grep alternative ️♥
  • ansible: easiest orchestration system
  • aria2: parallel curl/fetch/wget replacement with torrent support
  • checkbashisms: to verify script portability
  • colordiff: nice syntax highlighting for diff
  • colorize: nice syntax highlighting for logs
  • fd: high-performance find alternative ️♥
  • htop: nicer top, especially useful for visualising CPUs
  • lsof: list open files ️♥
  • lzop: ultra fast compression for temporary file transfers
  • oksh: Portable OpenBSD KornShell, my current preferred shell ️♥
  • p7zip: for extracting 7zip files Windows people send me
  • plzip for parallel compression with safe integrity checks
  • sqlite3: alongside other things, I also use for personal DBs
  • sudo: auditable super user interface
  • tmux: detach sessions, like screen ️♥
  • tree: display directories as trees, DOS style
  • watch: periodically run process to review changes

Disks

  • dcfldd: no more piping dd to lv for copying blocks with a progress bar
  • ddrescue: data recovery and robust disk copying
  • fio: flexible IO performance tester
  • iotop: easy disk activity monitor
  • qemu-utils: disk image conversion from the legendary emulator
  • smartmontools: SMART drive monitoring and reporting
  • testdisk: partition analyser and recovery tool

Entirely pointless

  • cmatrix: Matrix emulator (pity that movie didn’t have sequels)
  • cowsay: echoes Copy on Write drive structures… yes, that’s it
  • figlet: cute text banners in a variety of different styles/fonts
  • lolcat: such colour, so rainbow ️♥
  • neofetch: pretty system information ️♥

Writing, blogging, podcasting

  • docbook: still the standard for online technical docs
  • exiftool: reads EXIF data from images
  • eyeD3: for batch processing ID3 tags in MP3s
  • ffmpeg4: video processing Swiss Army Kife
  • go-hugo: fastest static site generator
  • ImageMagick: image processing Swiss Army Knife
  • jpegoptim: lossless [sic] JPEG image optimiser
  • mkdocs: web documentation generator from Markdown ️♥
  • normalize: normalise, incorrectly spelled, across audio files
  • pngcrush: lossless PNG optimiser
  • svgcleaner: correct, minify SVG images
  • tesseract: simple to use image OCR ️♥
  • wn: the WordNet lexical database of English ️♥
  • youtube-dl: download videos from YouTube, Vimeo, etc ️♥

Networking (for a non-networking guy!)

  • 2ping: bi-directional ping testing
  • arping: layer 2 ping (Thomas Habets version)
  • bwm_ng: next-gen bandwidth monitor
  • links: quick console browsing in a pinch; I don’t need elinks
  • mosh: interactive SSH replacement for high-latency connections
  • mtr: traceroute and ping in one tool
  • ncftp: because yes, FTP still exists in 2019
  • nmap: port scanner for firewall testing… yes, that’ll do
  • rsync: still the best sane data transferer
  • sshfs: quick and dirty remote disk mounts over SSH
  • sshuttle: quick and dirty VPN over ssh
  • tcpdump: quick way to inspect NIC traffic without Wireshark ️♥

OS specific

  • debian-goodies: lots of useful apt package tools (Debian)
  • docproj: metapackage for FreeBSD documentation (FreeBSD) ️♥
  • firehol: simple Linux iptables (Debian)
  • iocage: super easy, ZFS-enabled jail interface (FreeBSD) ️♥
  • mactex: everything you need for LaTeX on Mac (macOS)
  • mas: shell interface to the Mac App Store (macOS) ️♥
  • pkgsrc: replaced Homebrew with it, thanks NetBSD! (macOS) ️♥
  • reprepro: apt repository and package generator (Debian)
  • tag: manipulate macOS extended attribute tags (macOS) ️♥

Australian solar to Singapore via undersea cable

This is such an amazing story, and involves both my homes, so I naturally have no choice but to discuss it. For those new to my blog, I’m Australian but spent most of my childhood and early adult life in Singapore, lah.

The Guardian Australia’s environment editor Adam Morton reported on a new electricity project that would see Australia supply solar-derived energy to Singapore via a 3,800 km cable:

Known as Sun Cable, it is promised to be the world’s largest solar farm. If developed as planned, a 10-gigawatt-capacity array of panels will be spread across 15,000 hectares and be backed by battery storage to ensure it can supply power around the clock.

Overhead transmission lines will send electricity to Darwin and plug into the NT grid. But the bulk would be exported via a high-voltage direct-current submarine cable snaking through the Indonesian archipelago to Singapore.

I confirmed the distance between Singapore and Darwin on Wolfram Alpha. I like to think of myself as a geography nerd, but I always underestimate just how far west Singapore is. The cable would somehow need to route around Batam, Bintan, maybe down past Kalimantan and between Java and Bali. This sort of thing has been done many times before with fibre optic cables, but a high voltage power cable is mind blowing.

To help us all visualise how this would work, I created a detailed diagram in SimCity 3000. You can’t build undersea cables in that release, but the concepts are otherwise all there.

That comes across as me being sarcastic; I was just having a little fun. It otherwise strikes me as a brilliant idea. Australia has huge tracts of flat land baking under the sun, and Singapore is rich enough to generate all its power with natural gas. Why not funnel it into a large solar array?

A short-sighted politician hell bent on privatisation once commented that Australian state and federal governments shouldn’t be in the business of running telcos or power companies, which were subsequently sold to… Singaporean and Chinese government companies. The current climate denialists in Canberra might not have a clue, but at least Singapore sees the obvious economic benefit to investing in Australian renewables.


Rhett and Link on equine identification

From their speed talking challenge episode.

That's not a horse.

Media

That time he whinged about a headache

Midway through June I started feeling a slight throbbing in my head, coupled with motion sickness. It’s been three weeks, and while it hasn’t got any worse, it also hasn’t improved. My ability to whinge has though, so allow me to be self indulgent for a moment.

I used to get terrible migraines growing up, often twice a month. After turning thirty I get the equivalent number a year, which is a vast improvement, even if the change is utterly inexplicable. If you’ll let me get mushy, I’ll bet moving in with Clara helped with this more than anything else. Most of what I get now are the garden variety headaches that can be mitigated with some ibuprofen, Tiger Balm, drinking lots of water, and taking a cool shower.

Mitigated? I’ve been writing too many technical reports and tenders.

But this headache is different. The closest I can describe it is motion sickness, without at least the satisfaction of having gone somewhere for my pain. I’ve had a few tests and seen two doctors, and got a clean bill of health each time. This is great! But also frustrating; I would have almost preferred them telling me I had something so they could just address it.

So for now I just keep living with this mildly frustrating headache that I’ve now had for more than three weeks. Hey, at least I wasted your time having you read this too :).

What was your longest headache? What are your triggers? How do you cope? I’d love to hear from you via Twitter, or on the email address on my About page. Let me know Ruben sent you.


Design anti-patterns: Misleading buttons

Here’s another to add to my increasing list of online anti-patterns. If you go to a website, say Scribd, and click the Download link, you’re asked to sign up or log in. This… is not downloading the document! Therefore, the link isn’t misleading, it’s outright lying. What it should say is Sign In to Download; but we all know why they don’t.

The related anti-pattern appears on software download sites that run advertisements with giant Download buttons. There’s only one reason they do this, and I won’t insult your intelligence spelling it out!


Automatic Korn Shell aliases

I’ve mentioned a few times that I’m trialling the Korn Shell as my daily driver. I used tcsh for many years due to my preference for FreeBSD, but I prefer writing quick one-liners in Bourne.

Today I learned the Public Domain Korn Shell (pdksh) defines the following aliases automatically, as per the NetBSD ksh(1) manpage. NetBSD is where I first used the Korn Shell, and it’s bundled in its base system.

autoload='typeset -fu'
functions='typeset -f'
hash='alias -t'
history='fc -l'
integer='typeset -i'
local='typeset'
login='exec login'
nohup='nohup '
r='fc -e -'
stop='kill -STOP'
suspend='kill -STOP $$'
type='whence -v'

Sure enough:

$ type
==> Usage: whence [-afpqv] name  ...

I’ve seen manpages for other Korn Shell variants list more options, but I’m going to treat this list as canonical. It’d be a fun exercise to compare and contrast.


Unlimited plans are almost always flops

Antony Scotti wrote about why he could no longer recommend Bitcasa a few years ago:

So, what happened? The unlimited plan was dropped, but for a short time they grandfathered anyone with an unlimited plan. This was only temporary until they upgraded their service, changing their pricing plan completely and forcing users to transfer to their new service with a new plan or their files would be deleted.

He concluded:

Overall I feel that the company’s focus has changed from being a customer driven company to a company that offers services for other businesses to build upon using Bitcasa technology.

I’m automatically weary of any online services that refer to either size or time as unlimited. Leaving aside it’s physical impossibility, or that trickery is usually employed to constrain you in other ways, they have a near perfect track record of reneging. It’s bait and switch 101.

We should be encouraging sustainable, honest business models, so companies like this don’t feel like they have to do race-to-the-bottom tactics like this to compete.