An interesting article today: Simple things are complicated: making a show password option. It referenced Government Design Principles: Make things open: it makes things better which I thought was an interesting and sensible government policy…
Category Archives: Chatter
The Bourne shell and Bash aren’t the right languages for larger programs
Today I read The Bourne shell and Bash aren’t the right languages for larger programs. It linked to this DKMS script which was interesting. TIL: ‘readonly’ in BASH.
The latest from Baldur Bjarnason
I think I might be becoming a Baldur Bjarnason fanboi. Two from him I read today:
My new MacBook Pro sucks
Let me count the ways…
So my old MacBook Pro was a 17-inch, Late 2011 model. It was great and worked for 10 years. I wouldn’t have “upgraded” at all except that one of the fans started playing up and was making a whirring noise I couldn’t stop (and also my version of Xcode was too old and no longer supported) so I bit the bullet and got myself a 16-inch, 2019 model. Of course I had to go from 17″ to 16″ because there is no 17″ model any more (that’s not better).
This is what cable management looked like on my old MacBook Pro:
See how everything is nice and tidy? This is what cable management looks like on my new MacBook Pro:
An untidy mess. That’s not better.
Then there’s the remote control situation. I used to have three remote controls for my old MacBook Pro. It was handy having one on my bedside table, one on my desk, and one on my other desk.
Of course my remote controls, which worked perfectly, aren’t compatible with my new MacBook Pro, so I had to buy this new Bluetooth thing (which cost me $47):
Of course the new Bluetooth thing doesn’t work very well. I press the button to pause my music and it “wakes up” and establishes a new Bluetooth connection, but doesn’t actually pause the music. So I press pause again, but the music doesn’t pause, so I press pause again, and the music goes off for a second and then back on, then I press once more and the music stops. You couldn’t make this stuff up. That’s not better.
I deliberately got myself an Intel CPU MacBook Pro, because I wanted my VMWare Fusion VMs to still work, and they do, but my copy of Doom III doesn’t work on my new MacBook Pro, and I can’t find a copy that will, so that sucks. That’s not better.
When I go to play StarCraft II it takes longer to load on my new computer than it did on my 10 year old computer. Then when I’m playing the game I can’t press F2 to select my army because they’ve gone and replaced the function keys with a ridiculous “touch bar” and after several months’ use my muscle memory still hasn’t got used to the new layout. I would prefer not to have a touch bar, it’s not better.
So my old MacBook Pro was awesome and one of the best computers I have ever owned. And my new MacBook Pro is a step backwards in almost every way. :(
Blue light
Got myself a blue light. Reddit says it’s good.
Best Unicode Fonts for Programmer
So today I went looking for a font to replace ‘Inconsolata 14’ in my NetBeans IDE because it wasn’t supporting Unicode and I found Best Unicode Fonts for Programmer which lead me to DejaVu Sans Mono.
While I was at it I changed my Konversation font from Ubuntu Mono 12 to DejaVu Sans Mono too.
My friends on #lobsters also recommended:
- Monaco (Apple font)
- JetBrains Mono
- Fira Mono (13pt)
- Hack
- IBM Plex Mono
I love being a programmer
My ZFS RAID array is resilvering. It’s a long recovery process. A report on progress looks like this:
Every 10.0s: zpool status love: Tue May 4 22:32:27 2021
pool: data
state: DEGRADED
status: One or more devices is currently being resilvered. The pool will
continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
scan: resilver in progress since Sun May 2 20:26:52 2021
1.89T scanned out of 5.03T at 11.0M/s, 83h19m to go
967G resilvered, 37.54% done
config:
NAME STATE READ WRITE CKSUM
data DEGRADED 0 0 0
mirror-0 ONLINE 0 0 0
sda ONLINE 0 0 0
sdb ONLINE 0 0 0
mirror-1 DEGRADED 0 0 0
replacing-0 DEGRADED 0 0 0
4616223910663615641 UNAVAIL 0 0 0 was /dev/sdc1/old
sdc ONLINE 0 0 0 (resilvering)
sdd ONLINE 0 0 0
cache
nvme0n1p4 ONLINE 0 0 0
errors: No known data errors
So that 83h19m to go wasn’t in units I could easily grok, what I wanted to know was how many days. Lucky for me, I’m a computer programmer!
First I wrote watch-zpool-status.php:
#!/usr/bin/env php
<?php
main( $argv );
function main( $argv ) {
$status = fread( STDIN, 999999 );
if ( ! preg_match( '/, (\d+)h(\d+)m to go/', $status, $matches ) ) {
die( "could not read zpool status.\n" );
}
$hours = intval( $matches[ 1 ] );
$minutes = intval( $matches[ 2 ] );
$minutes += $hours * 60;
$days = $minutes / 60.0 / 24.0;
$report = number_format( $days, 2 );
echo "days remaining: $report\n";
}
And then I wrote watch-zpool-status.sh to run it:
#!/bin/bash watch -n 10 'zpool status | ./watch-zpool-status.php'
So now it reports that there are 3.47 days remaining, good to know!
Zeal
Today I discovered Zeal. Looks like it’s gonna come in handy…
Camel case
Today I read up on Camel case over on Wikipedia.
136 facts every web dev should know
I found this fun list of things to know: 136 facts every web dev should know before they burn out and turn to landscape painting or nude modelling.
I particularly liked these points:
124. Web dev frameworks are for organisations, not small software teams or individual developers. The value frameworks provide lies in bridging team boundaries: they create a shared understanding that aids in collaboration across groups, simplify messaging, and establish clear conventions. Frameworks turn teams in large organisations into service interfaces.
125. Individual teams or individual developers don’t have that problem, so they get less value from a web dev framework. The more opinionated the framework is and the more of the web platform it abstracts away, the more its value proposition skews towards solving organisational problems and the less value it provides to individual teams.




