random stringshttps://blog.randomstring.org/2024-03-11T12:45:30-04:00new mouse report2024-03-11T12:45:30-04:002024-03-11T12:45:30-04:00-dsr-tag:blog.randomstring.org,2024-03-11:/2024/03/11/new-mouse-report/
<p>My RSI prevention strategy involves change: I use three different
keyboards, four or five pointing devices, and move around to different
places. On my main desktop, I mostly use a thumb trackball, with a mouse
in second place and a drawing pad in distant third.</p>
<p>On Friday the trackball died in a peculiar way.
</p>
<p>My RSI prevention strategy involves change: I use three different
keyboards, four or five pointing devices, and move around to different
places. On my main desktop, I mostly use a thumb trackball, with a mouse
in second place and a drawing pad in distant third.</p>
<p>On Friday the trackball died in a peculiar way.
</p>
<p>It decided that Y-axis measurements should be much more precise than
the normal X-axis reporting, and so I needed to roll the ball about
eight times further in one dimension than the other. Not good. I changed
the battery, which did nothing, and unplugged and replugged the dongle.
Nothing changed. I flipped the mouse off and on again, and that killed
it – the system reported that the mouse connected and had a charge, but
did not accept clicks or geometry from it.</p>
<p>Well, I have a spare, retired because the main button refused to
acknowledge being held down. That’s a problem for dragging over text for
copying it. Time to buy a replacement.</p>
<p>The new trackball, an Elecom EX-G Pro, appeared about 20 hours later.
Unlike the former occupant, a Logitech M570, the Elecom can be used with
a USB connection, a proprietary dongle, or a generic Bluetooth
connection. X11 recognizes it as having 12 buttons:</p>
<p>left, wheel-click, right, wheel-roll-down, wheel-roll-up,
wheel-tilt-left, wheel-tilt-right, leftside “back”, leftside “forward”,
far-left-by-thumb, far- right-finger, and a central button just south of
the wheel</p>
<p>which is actually one button too many: the far-left-by-thumb button
is nearly impossible to tap without changing my grip on the mouse.</p>
<p>There are also bottom buttons for BT pairing, resolution switching,
and a slider for off/slow-report/fast-report – for battery saving, I
guess. And an additional slider for switching from BT to proprietary
wireless dongle.</p>
<p>The ball is exactly the same size as the Logitech M570 series. It
feels smooth. The wheel, however, is high-friction and clicky. Some of
the corners of the mouse actually feel sharp.</p>
<p>Some config to help things out:</p>
<p>In .xsessionrc:</p>
<pre><code>xinput set-prop "ELECOM TrackBall Mouse EX-G Pro TrackBall Mouse" 305 12
xinput set-prop "ELECOM TrackBall Mouse EX-G Pro TrackBall Mouse" 290 0, 0, 1
xinput set-prop "ELECOM TrackBall Mouse EX-G Pro TrackBall Mouse" 292 11</code></pre>
<p>The first line sets the top-of-mouse button as the universal drag
lock button. Tap it, tap another button (usually 1, the main button),
and it is considered to be held down until you tap the other button
again. Excellent for precise copying to the primary buffer.</p>
<p>The second and third lines enable scroll-by-ball: hold down the
far-right button and roll the ball to scroll. Much smoother than the
wheel.</p>
<p>In .xbindkeysrc:</p>
<pre><code>"xvkbd -text "\[XF86Copy]""
m:0x0 + b:8
"xvkbd -text "\[XF86Paste]""
m:0x0 + b:9</code></pre>
<p>Sets the nominal forward-and-back buttons to copy and paste, very
useful if your terminals support bracketed paste mode (they almost all
do). Requires xbindkey to be running.</p>
<p>All together, this creates a workflow on the mouse: position the
cursor at one end of a selection-to-be. Top button, button 1. Roll the
cursor to the other anchor point, taking as long as desired,
repositioning until you get it right without having to hold down a
button. Button 1 again. ‘Back’ to copy, go find your desired window,
‘Forward’ to paste. Not quite as fast as holding down a button while
dragging to select, but much easier on my finger joints.</p>
belts and suspenders at home2024-03-04T06:54:16-05:002024-03-04T06:54:16-05:00-dsr-tag:blog.randomstring.org,2024-03-04:/2024/03/04/belts-and-suspenders-at-home/
<p>I have almost 30 years of professional experience as a sysadmin.</p>
<p>Failure is inevitable. Hardware will fail, software will be
discovered to have flaws, reconfiguration will be mistaken.</p>
<p>The antidote is to have reliable recovery mechanisms: everything will
eventually break or need to be changed, so in turn you need to be able
to recover back to a stable position, so you can try again.</p>
<p>Recovery mechanisms are not all-purpose. I usually describe them in
three phases: </p>
<p>I have almost 30 years of professional experience as a sysadmin.</p>
<p>Failure is inevitable. Hardware will fail, software will be
discovered to have flaws, reconfiguration will be mistaken.</p>
<p>The antidote is to have reliable recovery mechanisms: everything will
eventually break or need to be changed, so in turn you need to be able
to recover back to a stable position, so you can try again.</p>
<p>Recovery mechanisms are not all-purpose. I usually describe them in
three phases: </p>
<ul>
<li><p>short-term examples include version control, RAID, failover
systems, snapshots. These let your systems continue to function after a
specific failure or let you revert back to a known good state in a short
period of time.</p></li>
<li><p>medium-term examples: backup (with tested recovery), cold spares,
automated deployment systems, alternative paths. These keep you going
after a major but limited-scope failure.</p></li>
<li><p>long-term examples: archives, remote backup, distributed remote
deployment, disaster-recovery plans. These let you rebuild somewhere
else.</p></li>
</ul>
<p>Understanding your systems allows you to plan how you will deal with
the inevitable mishaps. Carrying out those plans allows you to have
confidence that you won’t dig yourself into a hole that you can’t
escape.</p>
<p>The differences between a house network and a small business network
are not that great. The business probably has more money to spend, but
they have similar needs for reliability. Your family and/or housemates
are probably fewer people than your business associates – or perhaps
not.</p>
<p>What reliability measures are worthwhile on even a small network?</p>
<ul>
<li>NTP</li>
<li>DNS</li>
<li>DHCP</li>
<li>NAS</li>
<li>RAID</li>
<li>backup</li>
<li>central syslog</li>
<li>version control for your configuration</li>
<li>diverse routing to the Internet – if it’s cheap enough</li>
</ul>
<p>What’s not worthwhile unless you have other goals, like “learning
this skill”?</p>
<ul>
<li>Kubernetes and similar orchestration systems</li>
<li>most multiple-system containerization or VM migration systems</li>
<li>internal multi-path networking</li>
<li>multi-path disks</li>
<li>ansible, chef, puppet, cfengine, nix…</li>
</ul>
the two most common fail-to-post errors2024-02-07T07:26:46-05:002024-02-07T07:26:46-05:00-dsr-tag:blog.randomstring.org,2024-02-07:/2024/02/07/the-two-most-common-fail-to-post-errors/My two most common issues in not posting to this blog:<p>My two most common issues in not posting to this blog:</p>
<ul>
<li>start writing a post, discover that it is ten thousand words and
still hasn’t made the point properly</li>
<li>muse about writing a post, wonder whether even I want to remember
the subject of consideration</li>
</ul>
<p>This entry is brought to you by both of those issues.</p>
prediction scoring2023-12-14T08:15:40-05:002023-12-14T08:15:40-05:00-dsr-tag:blog.randomstring.org,2023-12-14:/2023/12/14/prediction-scoring/
<p>In May of 2022, I <a href="https://blog.randomstring.org/2022/05/03/predictions-for-2023/">made
a few predictions about US politics</a></p>
<p>Here’s the meat:</p>
<pre><code> Assuming that the opinion is issued substantially as-is, I will make some predictions about 2023.
‘Red’ states will pass laws restricting basic civil rights...
Corporations that rely on high-skill workers will not be able to hire them in those states.
Those corporations will move out of the red states.</code></pre>
<p>In May of 2022, I <a
href="https://blog.randomstring.org/2022/05/03/predictions-for-2023/">made
a few predictions about US politics</a></p>
<p>Here’s the meat:</p>
<pre><code> Assuming that the opinion is issued substantially as-is, I will make some predictions about 2023.
‘Red’ states will pass laws restricting basic civil rights...
Corporations that rely on high-skill workers will not be able to hire them in those states.
Those corporations will move out of the red states.</code></pre>
<pre><code> The economies of red states are substantially worse off compared to blue states now. When the corporations move out, the tax base will be further reduced.
When the Federal budget is roughly balanced, blue states subsidize red states. The Federal budget is running at a significant deficit in order to prop up the economy.
Option 1: the attack on civil rights is enough to change Congress definitively to blue in November.
The Supreme Court will be expanded to 15 or 17 justices.
The Republican Party splinters.
Option 2: Congress becomes red in November, or wishy-washy.
The United States tends towards a Christian Fascist state.</code></pre>
<p>How did I do?</p>
<p>Red states did pass laws restricting civil rights, especially
abortion. {100%}</p>
<p>Corporations are having trouble getting high-skill workers to move to
Red {75%} states.</p>
<p>Some have moved out, some are planning to do so, some are not.
{50%}</p>
<p>Red state economies have suffered more in the last 18 months.
{100%}</p>
<p>Option 1: did not happen.</p>
<p>Option 2: went wishy-washy {25%}</p>
<p>Better than throwing darts at a dartboard, not really good enough to
commit to a single plan.</p>
pareidolia but for meaningfulness2023-11-18T08:13:38-05:002023-11-18T08:13:38-05:00-dsr-tag:blog.randomstring.org,2023-11-18:/2023/11/18/pareidolia-but-for-meaningfulness/
<p>I had thought that ‘pareidolia’ referred exclusively to the human
tendency to see human faces everywhere – any time you see two dots or
circles and a line below them, boom :) it’s a face. It can be triggered
by rocks, clouds, shadows, uneven browning on a tortilla or a
pancake.</p>
<p>It turns out, though, that pareidolia covers any kind of overactive
pattern matching. Humans look for meaningful patterns all the time,
without thinking about the search, and when something trips the right
thresholds in our brain, we seize upon it. The result can be faces,
voices, music or just a cloud that looks like a moose.</p>
<p>Here’s my thesis: the large language models (LLMs) and similar
generative software processes that people currently refer to as “AI” –
those are exceptionally well-tuned to produce patterns that will trigger
threshold recognition in human brains. Not by accident – that’s the
goal. They are pareidolia-circuit stimulators.</p>
<p>The problem is that LLM output is exactly as meaningful as any other
kind of pareidolia. Every well-formed paragraph is a false-positive
error.</p>
<p>And when people repeatedly mistake their overactive pattern
recognition for reality, we call that a mental disorder: psychosis.</p>
<p>-30- </p>
<p>I had thought that ‘pareidolia’ referred exclusively to the human
tendency to see human faces everywhere – any time you see two dots or
circles and a line below them, boom :) it’s a face. It can be triggered
by rocks, clouds, shadows, uneven browning on a tortilla or a
pancake.</p>
<p>It turns out, though, that pareidolia covers any kind of overactive
pattern matching. Humans look for meaningful patterns all the time,
without thinking about the search, and when something trips the right
thresholds in our brain, we seize upon it. The result can be faces,
voices, music or just a cloud that looks like a moose.</p>
<p>Here’s my thesis: the large language models (LLMs) and similar
generative software processes that people currently refer to as “AI” –
those are exceptionally well-tuned to produce patterns that will trigger
threshold recognition in human brains. Not by accident – that’s the
goal. They are pareidolia-circuit stimulators.</p>
<p>The problem is that LLM output is exactly as meaningful as any other
kind of pareidolia. Every well-formed paragraph is a false-positive
error.</p>
<p>And when people repeatedly mistake their overactive pattern
recognition for reality, we call that a mental disorder: psychosis.</p>
<p>-30- </p>
tech note: slow SSH login2023-10-28T07:42:02-04:002023-10-28T07:42:02-04:00-dsr-tag:blog.randomstring.org,2023-10-28:/2023/10/28/tech-note-slow-ssh-login/
<p>If your Debian system is suddenly very slow to login – like, 25 to 90
seconds of apparent inactivity on every new ssh – it’s not DNS.</p>
<p>Check to see if your <code>elogind</code> or
<code>systemd/logind</code> is actually running. Look for a log entry in
<code>auth.log</code> along the lines of</p>
<pre><code>dbus-daemon[4501]: [system] Failed to activate service 'org.freedesktop.login1'</code></pre>
<p>right after an SSH attempt.</p>
<p>If so, restart the daemon.</p>
<p>-30- </p>
<p>If your Debian system is suddenly very slow to login – like, 25 to 90
seconds of apparent inactivity on every new ssh – it’s not DNS.</p>
<p>Check to see if your <code>elogind</code> or
<code>systemd/logind</code> is actually running. Look for a log entry in
<code>auth.log</code> along the lines of</p>
<pre><code>dbus-daemon[4501]: [system] Failed to activate service 'org.freedesktop.login1'</code></pre>
<p>right after an SSH attempt.</p>
<p>If so, restart the daemon.</p>
<p>-30- </p>
750 chars: security re-org2023-09-22T08:15:16-04:002023-09-22T08:15:16-04:00-dsr-tag:blog.randomstring.org,2023-09-22:/2023/09/22/750-chars-security-re-org/
<p>Some people play Wordle to get their brains moving in the morning. I
find one of Linked-In’s incredibly stupid “AI”-driven “articles” where
they limit you to 750 characters of commentary (times 5-7 article
segments) and write a cohesive answer to the whole thing in one
block.</p>
<p>Herewith: “How Do You Work With Other IT Departments To Manage
Security Risks”</p>
<p>Either your company understands that security is the prime risk
assessment and management tool, or it does not. Figure this out
first.</p>
<p>Assuming your company cares, get an executive mandate. Bring the IT,
Ops, Network Engineering, Security, Software Development, Hardware
Engineering, Legal, and all other relevant groups together. Establish a
common vocabulary, write a policy, and appoint a committee that has the
authority to approve exceptions and change policy.</p>
<p>Policy is implemented in plans, and if your company is large enough,
some groups will need their own plans. Write them to a common skeleton,
and publicize them internally.</p>
<p>Include Business Continuity and Disaster Recovery as subsets of
Security: that’s where they belong. Done in 750.</p>
<p>-30- </p>
<p>Some people play Wordle to get their brains moving in the morning. I
find one of Linked-In’s incredibly stupid “AI”-driven “articles” where
they limit you to 750 characters of commentary (times 5-7 article
segments) and write a cohesive answer to the whole thing in one
block.</p>
<p>Herewith: “How Do You Work With Other IT Departments To Manage
Security Risks”</p>
<p>Either your company understands that security is the prime risk
assessment and management tool, or it does not. Figure this out
first.</p>
<p>Assuming your company cares, get an executive mandate. Bring the IT,
Ops, Network Engineering, Security, Software Development, Hardware
Engineering, Legal, and all other relevant groups together. Establish a
common vocabulary, write a policy, and appoint a committee that has the
authority to approve exceptions and change policy.</p>
<p>Policy is implemented in plans, and if your company is large enough,
some groups will need their own plans. Write them to a common skeleton,
and publicize them internally.</p>
<p>Include Business Continuity and Disaster Recovery as subsets of
Security: that’s where they belong. Done in 750.</p>
<p>-30- </p>
words about my mother2023-09-05T19:09:39-04:002023-09-05T19:09:39-04:00-dsr-tag:blog.randomstring.org,2023-09-05:/2023/09/05/words-about-my-mother/
<p>This is what I would like you to know about my mother:</p>
<p>She didn’t like what people were doing to the world; she found some
ways she could be effective at making things better; she did them.</p>
<p>It is not required of us that we fix the world, but it is required
that we try to leave it better than when we came into it. Mom
succeeded.</p>
<p>This is what I would like you to know about my mother:</p>
<p>She didn’t like what people were doing to the world; she found some
ways she could be effective at making things better; she did them.</p>
<p>It is not required of us that we fix the world, but it is required
that we try to leave it better than when we came into it. Mom
succeeded.</p>
<p>She was the ten thousandth accredited Leader of a La Leche League
group; La Leche League is an international organization that was founded
to teach women how to breastfeed, because that’s not actually a thing we
have an instinct for.</p>
<p>People in my professional field have a saying about computer
interfaces: “The only instinctive interface is the nipple; after that
it’s all learned.” For baby humans, that’s half-true: if you rub a
nipple on their lower lip, they will open their mouth and try to latch
on. For new mothers, it’s not true at all. We learn how to nurse from
watching other people do it. If nobody around you does that, you won’t
know how to do it either.</p>
<p>So Mom spent forty-plus years teaching breastfeeding. Human
breastmilk conveys antibodies that fortify a baby’s immune system. It
changes over time to match changing nutritional needs. It’s full of fat
and cholesterol because those are the things we use to grow brains.</p>
<p>When La Leche League had too many internal political battles, Mom
helped found Breastfeeding USA. Same goal. Mostly the same methods. Less
political angst. Mom had the basic liberal fallacy, one to which I often
fall victim: she thought that if a person had all the facts, they would
come to the right conclusion. It’s an optimistic viewpoint.</p>
<p>Mom taught me to read. I – and my sisters – all learned to read
before we went to school. One day my parents decided to send me to a
kindergarten class. Mom walked me in, made sure I was comfortable, left.
At some point I picked up a book off the shelf and took it to the
teacher or their assistant: “Could you help me with this?” I asked. They
said “No.” I cried.</p>
<p>Eventually Mom was back, and wanted to know why I was in tears. She
asked me. I explained. She asked them why they wouldn’t help. They said
“Oh, we don’t teach reading until the first grade. We just do letters
and numbers.” Mom said, “Dan knows how to read. He wanted help with any
particularly big words.” She took me home. I did not go back there.</p>
<p>It is probably significant that I invited my favorite librarians to
my bar mitzvah.</p>
<p>Mom loved reading mysteries and romances, and occasionally science
fiction. Sometimes our tastes overlapped, and I was always glad to be
able to make a recommendation to her.</p>
<p>Mom was on my side against the school system, whenever the school
system was wrong. She talked to my first-grade teacher about my
proclivity for finishing the assigned work in a few minutes and then
reading any book I could get my hands on. They agreed to move me up to
the second grade. I was rather frustrated in second grade – not
academically. I was still bored. I got so bored that one day I finished
my work, wrote “I’m going home” at the top of the worksheet, handed it
in, went out to the hallway, got my coat and lunchbox, and walked. Out
the front door of the school, down the street, over to the four-lane
highway, crossed at the light, and so on about 2 miles home. I opened up
the door to the mudroom, hung up my coat – Mom was rather surprised to
see me – and I headed off to the bathroom. While I was taking care of
that, Mom called the school. “Do you know where my son is?” she
asked.</p>
<p>“In class,” said the secretary. “No, he’s not.” said my mother.</p>
<p>There were no negative repercussions from my parents. Obviously if I
did something that drastic, something caused me to do it. There’s no
more profound feeling of security than knowing that your parents are
really and truly on your side.</p>
<p>This continued all the way through high school: in my senior year, I
took what was billed as college freshman literature equivalent. The
English department head taught the class; his plan was to let the
seniors watch films all year long. I objected to a lack of education,
Mom backed me up. Instead I had an independent study course supervised
by another teacher.</p>
<p>Mom’s lesson: when the system is failing you, you can try to fix the
system, or you can work around it. The system never proposes solutions
outside its control; you have to do that yourself.</p>
<p>My mother taught me to cook. Though I haven’t used the skill in a
handful of years, she taught me to bake bread. Mom made several
excellent kinds of bread, but what she made most was a whole wheat
sandwich loaf and a white loaf called bulka. Mom considered baking bread
for her family and friends to be a political act, but it was also
practical. Once she bartered 15 loaves of bread for a wheelbarrow.</p>
<p>I don’t bake much these days, but I do cook a fair bit. I am a better
cook than my mother usually was, but I never reached her depth of
understanding of baking. Her Pesach brownies, made with matzo meal and
baking powder, were the best possible brownies. I am glad that she
taught my sisters how to make them. I try from time to time, but I
haven’t got them right yet.</p>
<p>Mom loved sewing, and made sure that I know how to mend a tear or
attach a button. But I didn’t have any love for it, so she didn’t press
me to do more. Love is taking care of other people, and sometimes that
means not pushing them to do the things that you like to do.</p>
<p>Mom loved cats. She especially loved Pansy, who came over with her
from England, and guarded me as I slept.</p>
<p>Mom’s last request was that Dad hold her hand as they took her off
the medicine that was keeping her conscious. They told each other that
they were each the most important person in the other one’s life. I am
sure that this is true.</p>
<p>In memory of my mother (1945 - 2023)</p>
house network 20232023-08-18T07:43:54-04:002023-08-18T07:43:54-04:00-dsr-tag:blog.randomstring.org,2023-08-18:/2023/08/18/house-network-2023/
<p>In the spirit of <a href="https://shkspr.mobi/blog/2023/08/my-underkill-home-network/">underkill
home network</a> and <a href="https://blog.networkprofile.org/my-home-network-complete-details-2023/">overkill
home network</a></p>
<p>In the spirit of <a
href="https://shkspr.mobi/blog/2023/08/my-underkill-home-network/">underkill
home network</a> and <a
href="https://blog.networkprofile.org/my-home-network-complete-details-2023/">overkill
home network</a></p>
<p>Internet:</p>
<ul>
<li>Verizon FIOS terminating in their optical network terminal. Assume
gigabit ethernet for all wired connections hereafter.</li>
</ul>
<p>Network:</p>
<ul>
<li><p>router/firewall: 4 x 2.5Gb ports. Attached to a UPS. Connected to
the main switch.</p></li>
<li><p>Main switch: 12 port unmanaged fanless GE switch. Powered by the
same UPS as the router/firewall.</p></li>
<li><p>Den switch: connected to the main switch. 8 ports.</p></li>
<li><p>Living room switch: connected to the den switch. Currently a
managed, fan-cooled 48 ports, but soon to be changed out for a 12 port
fanless.</p></li>
<li><p>Wireless access points 1, 2: connected to the main
switch.</p></li>
<li><p>Wireless access point 3: connected to the den switch.</p></li>
<li><p>Wireless access points 4,5: connected to the living room
switch.</p></li>
</ul>
<p>Servers:</p>
<ul>
<li>main server is connected to the main switch, on its own UPS.</li>
<li>media server is connected to the den switch, on its own UPS.</li>
</ul>
<p>Wired stations:</p>
<ul>
<li>my desktop is connected to the main switch. Own UPS.</li>
<li>my wife’s desktop, same.</li>
<li>my wife’s other desktop, connected to the living room switch.</li>
<li>there is a currently unused ethernet-over-AC connection from the
main switch</li>
<li>music player in the living room</li>
<li>media-watching tiny desktop in the living room</li>
<li>In the den:
<ul>
<li>a Roku for the TV</li>
<li>the home theater receiver</li>
<li>the HDHomeRun TV tuner</li>
</ul></li>
</ul>
<p>Wireless devices:</p>
<ul>
<li>4 laptops</li>
<li>3 chromebooks</li>
<li>4 tablets</li>
<li>six phones</li>
</ul>
learning opportunity: LLM2023-08-18T07:18:51-04:002023-08-18T07:18:51-04:00-dsr-tag:blog.randomstring.org,2023-08-18:/2023/08/18/learning-opportunity-llm/If a service is being provided by an LLM, one of the following cases
applies:<p>If a service is being provided by an LLM, one of the following cases
applies:</p>
<ul>
<li>it was always bullshit<sup id=sf-learning-opportunity-llm-1-back><a href=#sf-learning-opportunity-llm-1 class=simple-footnote title=" in the technical sense of material spewed out without any regard for accuracy or truth, at all.">1</a></sup></li>
<li>the people in charge can’t tell the difference</li>
<li>the people in charge don’t care about the difference</li>
</ul>
<p>LLMs are bullshit generators. Modern humans expect bullshit in
specific areas (advertising, marketing websites, customer service
transactions) and are not otherwise looking for it; this is going to be
a mistake.</p>
<ol class=simple-footnotes><li id=sf-learning-opportunity-llm-1> in the technical sense of material
spewed out without any regard for accuracy or truth, at all. <a href=#sf-learning-opportunity-llm-1-back class=simple-footnote-back>↩</a></li></ol>one of the one true ways of ops2023-07-26T21:19:07-04:002023-07-26T21:19:07-04:00-dsr-tag:blog.randomstring.org,2023-07-26:/2023/07/26/one-of-the-one-true-ways-of-ops/
<p>I’m going to tell you the secret (it’s not a secret) to building
reliable, operable, debuggable infrastructure. This is going to be
terse, but hopefully understandable to someone with just a little
experience.</p>
<p>I’m going to tell you the secret (it’s not a secret) to building
reliable, operable, debuggable infrastructure. This is going to be
terse, but hopefully understandable to someone with just a little
experience.</p>
<p>You’re going to need some infrastructure. Infrastructure is not the
stuff that you are building, and it’s not the tools that you are
building the stuff with. Infrastructure is the reliable services which
you depend on to help you build your stuff.</p>
<p>At a minimum:</p>
<ul>
<li>an Internet connection</li>
<li>a computer acting as a firewall/router to protect you from the
Internet</li>
<li>a network switch, preferably one which is configurable with
VLANs</li>
<li>more computers than you would think, some of which will be
specialized by speed or amount of storage, RAM, processors, special
hardware…</li>
</ul>
<p>The first rule is that nothing can be built without a firm
foundation. A firm foundation does not change unless someone makes an
active decision to change it, or something breaks. A broken foundation
must be detected and fixed.</p>
<p>To detect things changing, we need a monitoring system. The
monitoring system should make read-only inquiries via SNMP, check on the
functionality of services on remote computers by running tests on them
ranging from pings to port connections through HTTPS queries and SQL
queries. When it has checked on everything, it needs to go through and
do it again. The monitoring system needs a reliable way of sending an
alert. It must reliably continue sending the alert periodically until it
is stopped by a person or the detected problem is no longer
detected.</p>
<p>The monitoring system needs to know what time it is. Use NTP.
Designate at least one machine as an NTP server, and have it talk to a
pool of NTP servers out on the Internet, as well as all of your internal
machines.</p>
<p>The monitoring system needs to be able to send alerts. If the
Internet is up, send email, preferably to a paging service. How will you
get alerts if the Internet is down? You can try cellphone gateways, but
I recommend a different method: set up a small copy of part of your
monitoring system somewhere else. Have this one just monitor the
availability of your services from an outside perspective. Are you
pingable? Are the ports for your applications open? Can a login page be
retrieved? If not, shout via email.</p>
<p>From now on, your main monitoring system gets a new monitor for every
machine you put into service, and new alerts for every new service you
run, internally or externally.</p>
<p>Now you can detect changes. You need to track changes. On a reliable
server machine with lots of disk space, install your version tracking
system. On that or a similar machine, install a web server that can host
a copy of your preferred operating system’s installation system. And,
also, multiple copies of the complete repository of external software.
Why so much space? Someday you will upgrade the operating system, and
for some period of time you will need a copy of the old and a copy of
the new. And new is usually larger than old.</p>
<p>Install a system that can install operating systems on new machines.
That’s usually a combination of DNS, DHCP, PXE, and a PXE-boot menu.
Figure out how you want to name machines now. Figure out how you will
handle expansion in the future. Come up with a flexible network routing
and address allocation policy that is also reasonably efficient.
Remember that humans like unique names for things that they depend on,
but are okay with meaningful+serial names for machines that are
interchangeable.</p>
<p>You now need a way to take a freshly installed (via PXE) machine and
install and configure specific software on it. Study the available
configuration automation systems (ansible, puppet, chef, bconfig,
cfengine, whatever) and pick one that you can live with for a long time.
Consider carefully whether things should be fundamentally pushed from a
server to a client or pulled from a server by a client. Always prefer
pull for repeated tasks.</p>
<p>When someone tells you that technology Z doesn’t provide security,
just convenience, believe them.</p>
<p>You will probably find yourself in need of a database pretty soon. If
you do not have a burning need for a specific database, there are only
three you should consider (as of 2023): sqlite, mariadb (formerly
mysql), and postgresql. Strongly consider using languages with a
built-in database layer that can use all three of these systems.
Consider picking Postgresql and just sticking with it, unless your needs
are very, very simple – in which case, sqlite might be exactly what you
want.</p>
<p>Learn a major web server: either nginx or apache. They both work
well. I think nginx has a slightly better configuration language, but in
the end you’re going to be deploying configs via that config automation
system.</p>
<p>For every language you develop in, you must find out what library
management system they have and make a local repo of the libraries that
you use. You only build from the local repo. Only. Ever. Local. When you
want a new version of something you bring it down into your local repo.
Don’t remove the old one, it might be better. After three versions have
gone by, you might not care any more. This defends against someone
poisoning the upstream source – a supply chain attack. It is not a
perfect defense.</p>
<p>Which systems are ‘development’ and which are ‘production’? They
should look the same, be deployed the same, but you need a gateway
between them. At any moment you should be prepared to repel boarders,
including developers snooping where they should not and clients tugging
on exposed ports. A formal process with a gatekeeper is good, but
remember that codifying and practicing for emergencies makes everyone
feel better on the tragic but inevitable day when disaster strikes.</p>
<p>You need to know who you are trusting. OS developers? Package
maintainers, library authors, coworkers, contractors, clients? Figure
out the data flows and the trust relationships. Document this. You need
a wiki. Pick one that stores wiki pages in the filesystem, not in a
database: the wiki is going to be a precious documentation source, and
on the day you can’t run the wiki software but you can grep and read the
files, you will thank me.</p>
<p>Access control. You will need to get into your system remotely, which
means Wireguard or SSH or both, one over the other. You need to manage
special privileges, which means logins on each machine and sudo or doas
privileges. In whatever application you are building, consider your
security model first and every time you make a change. Keep it separate
from your infrastructure access control.</p>
<p>Now size the backups and make them, automatically and repeatedly. The
rule of backups is this: nobody cares about backups, they only care
about restores. You have three distinct backup targets:</p>
<ul>
<li>oops, I deleted/changed a thing. Can I get it back fast?
<ul>
<li>use a snapshotted filesystem, with automatic snapshots (I like
ZFS)</li>
<li>use a version control system (yes, for its own sake)</li>
<li>use a self-service per-user backup/restore system (don’t do
this)</li>
</ul></li>
<li>this computer died taking a lot of data with it. Can we restore it
fast?
<ul>
<li>have an onsite backup to disk</li>
<li>make those backups nightly</li>
<li>have multiple copies of freshly acquired data</li>
<li>have an offsite backup of the onsite backup for that day when
everything burns (or the power goes out)</li>
<li>could you have a live backup server? It costs more. That might be
worthwhile.</li>
</ul></li>
<li>the lawyer/accountant says we need to retain this for years. Can we
do that efficiently?
<ul>
<li>encrypt that data and store the passphrase in three different secure
places.</li>
<li>offsite is probably good</li>
<li>keep an onsite catalog of where you put it</li>
</ul></li>
</ul>
<p>I haven’t mentioned your load balancing, streaming database
replication, second site, internal firewalls, office systems, or
printing. If you can avoid ever buying a printer, do that. If you can
minimize printing, do that. Buy a larger monitor rather than more reams
of paper and toner. Use wired networking for every machine with a fixed
location, and treat your wireless networks as being outside visitors.
Survey the MAC addresses of the wired machines and refuse changes
without authorization. If you handle payments of any kind, read the PCI
documentation and do better than they demand. You can do it: they demand
the minimum that they can cope with.</p>
<p>Buy more capacity up front. Compare fully depreciated capital assets
versus the cash flow of rented/leased/flexible services, and bet that
you will be in it for the long haul. If you aren’t sure, scale back.
Don’t depend on the whims of giants: buy commodities that you can get
from anywhere.</p>
<p>There’s always more. This is enough to get you a firm enough
foundation that your organization can survive to find out what you need
to do differently.</p>
quote of note n=11: copyright2023-07-10T09:15:58-04:002023-07-10T09:15:58-04:00-dsr-tag:blog.randomstring.org,2023-07-10:/2023/07/10/quote-of-note-n-11-copyright/
<blockquote>
<p>Let’s take a second to remember that copyright is the reason ~every
child doesn’t have access to ~every book ever written.</p>
</blockquote>
<p>– <a href="https://news.ycombinator.com/item?id=36660477">holmesworcester at
Hacker News</a></p>
<p>-30- </p>
<blockquote>
<p>Let’s take a second to remember that copyright is the reason ~every
child doesn’t have access to ~every book ever written.</p>
</blockquote>
<p>– <a
href="https://news.ycombinator.com/item?id=36660477">holmesworcester at
Hacker News</a></p>
<p>-30- </p>
desktop audio update2023-07-09T09:19:04-04:002023-07-09T09:19:04-04:00-dsr-tag:blog.randomstring.org,2023-07-09:/2023/07/09/desktop-audio-update/
<p>Previously:</p>
<p>In the office, my desktop feeds an Apple USB-C DAC ($9, no sale
needed) to an optoisolator to a NAD 712 stereo receiver. I bought the
NAD in 1998, new, no discount. It has a 1/4” headphone jack which
automatically disconnects the speaker connections – a pair of Paradigm
Monitor 3 Mark 3s. The usual headphones are Superlux 688b, Truthear
Zeros, TRN V90s, or occasionally Sennheiser 280HDpro. The desktop runs
equalization software (PulseEffects on top of PipeWire) that corrects
each output, though it does have to be selected whenever I change
outputs. The Paradigms were purchased used from a guy driving a white
van, for $200 the pair – an excellent value.</p>
<p>Now:</p>
<p>My desktop is connected to a Topping MX3s ($199) via USB. The MX3s is
a tiny box – about one quarter of a standard box of tissues – with a USB
DAC, a headphone amplifier, and a 50W (4 Ohm) stereo amplifier. Yes, for
real speakers. This is basically the same power output as the NAD 712,
which is merely six times the weight and half the power efficiency. The
headphone jack is 1/8” and does not automatically disconnect speakers,
but the front button allows selection of headphones, speakers, or both.
All other bits remain the same.</p>
<p>It’s really quite nice.</p>
<p>-30- </p>
<p>Previously:</p>
<p>In the office, my desktop feeds an Apple USB-C DAC ($9, no sale
needed) to an optoisolator to a NAD 712 stereo receiver. I bought the
NAD in 1998, new, no discount. It has a 1/4” headphone jack which
automatically disconnects the speaker connections – a pair of Paradigm
Monitor 3 Mark 3s. The usual headphones are Superlux 688b, Truthear
Zeros, TRN V90s, or occasionally Sennheiser 280HDpro. The desktop runs
equalization software (PulseEffects on top of PipeWire) that corrects
each output, though it does have to be selected whenever I change
outputs. The Paradigms were purchased used from a guy driving a white
van, for $200 the pair – an excellent value.</p>
<p>Now:</p>
<p>My desktop is connected to a Topping MX3s ($199) via USB. The MX3s is
a tiny box – about one quarter of a standard box of tissues – with a USB
DAC, a headphone amplifier, and a 50W (4 Ohm) stereo amplifier. Yes, for
real speakers. This is basically the same power output as the NAD 712,
which is merely six times the weight and half the power efficiency. The
headphone jack is 1/8” and does not automatically disconnect speakers,
but the front button allows selection of headphones, speakers, or both.
All other bits remain the same.</p>
<p>It’s really quite nice.</p>
<p>-30- </p>
sacrificial jacks2023-06-28T13:43:54-04:002023-06-28T13:43:54-04:00-dsr-tag:blog.randomstring.org,2023-06-28:/2023/06/28/sacrificial-jacks/
<p>If you have some sort of data or power cable that you tend to plug
and unplug frequently, consider putting a sacrificial extender cable in
between. The cost of replacing a jack on a motherboard or other fixed
device is pretty high; the cost of replacing a plug on a device is often
similar to the cost of the device in the first place.</p>
<p>For a headphone connection, for example, you can get a 6” extender
for a cost less than the shipping. USB extensions are a little trickier
- you need to match a bunch of different characteristics, but pretty
reasonably priced when available. Power plug extensions are cheap, but
it may take a little while to find one <em>short</em> enough to be
reasonable.</p>
<p>-30- </p>
<p>If you have some sort of data or power cable that you tend to plug
and unplug frequently, consider putting a sacrificial extender cable in
between. The cost of replacing a jack on a motherboard or other fixed
device is pretty high; the cost of replacing a plug on a device is often
similar to the cost of the device in the first place.</p>
<p>For a headphone connection, for example, you can get a 6” extender
for a cost less than the shipping. USB extensions are a little trickier
- you need to match a bunch of different characteristics, but pretty
reasonably priced when available. Power plug extensions are cheap, but
it may take a little while to find one <em>short</em> enough to be
reasonable.</p>
<p>-30- </p>
memorializing a prediction2023-06-11T13:38:08-04:002023-06-11T13:38:08-04:00-dsr-tag:blog.randomstring.org,2023-06-11:/2023/06/11/memorializing-a-prediction/
<p>I will bet a shiny nickel that in 2028, you will be able to buy newly
made spinning disks and that they will be economically justifiable for
large media collections, backups and archives. Not sure I’d make that
bet for 2033, though.</p>
<p>-30- </p>
<p>I will bet a shiny nickel that in 2028, you will be able to buy newly
made spinning disks and that they will be economically justifiable for
large media collections, backups and archives. Not sure I’d make that
bet for 2033, though.</p>
<p>-30- </p>
how did dial-up ISPs work?2023-06-09T13:57:37-04:002023-06-09T13:57:37-04:00-dsr-tag:blog.randomstring.org,2023-06-09:/2023/06/09/how-did-dial-up-isps-work-/
<p>My wife worked for the first public ISP for several years. My first
job, still in college, was for a local ISP, eventually becoming the head
of all technical operations. And my next job was at a major commercial
ISP, one which leased POPs to AOL among other businesses.</p>
<p>Here’s how they worked, at a technical and business level:</p>
<p>My wife worked for the first public ISP for several years. My first
job, still in college, was for a local ISP, eventually becoming the head
of all technical operations. And my next job was at a major commercial
ISP, one which leased POPs to AOL among other businesses.</p>
<p>Here’s how they worked, at a technical and business level:</p>
<p>Every aspect of an ISP, economic and technological, is based on the
ability of IP connections to time-share multiple connections by
packetizing them. Consider every point-to-point network connection as a
train track populated by packets, train cars that always move at the
speed limit to the other end of the track, where the sign on the front
of the car is read by the stationmaster, who selects a route for the
next leg of each car’s journey.</p>
<p>The stationmaster doesn’t care whether all the cars are going to the
same destination or not. If the station only has three tracks, then
every car arriving on track 1 is headed out on 2 or 3; every car coming
in on 2 is going out on 1 or 3. Which one should be selected? That’s up
to the sign on the car and the stationmaster’s policy.</p>
<p>A minimally viable ISP in 1994 bought a T1 line to another, larger,
ISP, who would agree to route all their packets. This is called “buying
transit”. That gets you 1.5 megabits per second in each direction. The
T1 terminates in a modem-like piece of equipment called a CSU/DSU, which
was usually attached via a high-speed (for the time) V.35 serial
connection to a router – often a Cisco 25xx series 1U device. Some of
them had interface cards that had all the functions of the CSU/DSU built
in, and so the T1 would go directly into the router. Integration is nice
– it guarantees compatibility among the integrated components, takes up
less space, improves reliability, and usually uses less power and
therefore generates less heat.</p>
<p>That router would talk via 10Mb/s ethernet - wow, fast! - to the
local equipment, which would include a server running
authentication/authorization software (based on the RADIUS protocol,
usually), a local mail server, perhaps a local FTP server, and, for most
of that period, a local USENET server. Finally, we have the equipment to
allow clients to log in: a bank of telephone lines from the local phone
company, each attached to a modem, which was connected to an RS232
serial line to a terminal server – that is, a computer with a lot of
serial ports. The terminal server would offer a terminal connection to a
local computer, or a SLIP connection, or a PPP (point-to-point protocol)
connection, and whichever of these was available would be connected over
the local Ethernet.</p>
<p>So: clients would dial in on a phone number (a roll-over number was
an arrangement by which the telco would connect inbound calls on one
number to whichever line was next in sequence, until they were all busy
at once), negotiate with the modems, authenticate for a PPP session, and
then send and receive packets.</p>
<p>Every packet that stayed local to the ISP was an economic win for the
ISP, because local packets weren’t using up the valuable commodity of
the general Internet connection. That’s why there would be local mail
and Usenet and FTP – and eventually local web servers. Typically, a
high-quality ISP could run at a ratio of 5 or 8 to 1 – 5 to 8 times the
bandwidth on modems compared to the upstream bandwidth. A few years
later, Akamai’s line of business was in convincing ISPs to give them
space and power for free in their POPs or datacenters, using the clever
argument that every web request answered by an Akamai cache server was a
request not using valuable Internet transit. Meanwhile, Akamai’s clients
appeared to be ridiculously fast to anyone asking for their content from
an Akamai-affiliated ISP. (Oh, yes, after I worked for the big ISP I
worked for Akamai.) The hard part of running an ISP in the first few
years was letting people know you existed – newspaper ads, physical
bulletin board ads, billboard ads, radio spots – you needed to invest in
these things.</p>
<p>A few years later, Lucent Technology, who had been spun off from
AT&T, came up with an all-in-one box called the AscendMAX. In one
medium-large box, an ISP could have every component of a POP:
efficiently wired telephone circuits going to built-in modems, a
high-speed transit connection, routing services, and authentication
(usually reflected back to central authentication servers).</p>
<p>Then Lucent outsmarted themselves.</p>
<p>There was an ISP boom. Everyone was offering a variation on $20/month
all-you-can-eat dialup service. To expand to a new location, you just
needed to arrange for some space in a rack, a T3/DS3 backhaul to your
core networks, a set of T1/DS1 lines for dialup, and one or more
AscendMAX boxes to connect everything together. Lucent was selling
thousands. Lucent’s salespeople were getting rich on commissions, and
pretty soon they started offering financing for ISPs which were clearly
going to be making money hand-over-fist forever. The financing was at a
nice interest rate, too, and the business was solid, so Lucent’s only
collateral was the AscendMAX itself. If an ISP failed, well, some other
ISP would happily buy the repossessed, refurbished, discounted equipment
from Lucent. And all this went so well that the stock price soared, and
some funny accounting tricks were played to make it go even higher.</p>
<p>Then it crashed, and Lucent found themselves the proud owners of
thousands of repo’d AscendMAX units, and no buyers. See the Wikipedia
article for details.</p>
koreader is not perfect, but it is very good2023-06-08T21:55:02-04:002023-06-08T21:55:02-04:00-dsr-tag:blog.randomstring.org,2023-06-08:/2023/06/08/koreader-is-not-perfect-but-it-is-very-good/
<p><a href="https://koreader.rocks/">koreader</a> is an open source
ebook reader application originally designed to replace the firmware on
Kobo E-Ink reading tablets, and then ported to run on Amazon Kindle,
Android, PocketBook, and Remarkable devices. Under Android it runs as a
normal application. It also runs as an application in Linux and
(reportedly) in MacOS. It reads basically all non-DRM book formats. It
is highly configurable and featureful, though not infinitely so.</p>
<p>If you have an OPDS-speaking book server, it can search and download
from that. If you want to run a tiny sync server for keeping track of
which page you are on across multiple koreaders, that’s pretty easy.</p>
<p>If it ran smoothly on MacOS and I could get it to work on my
semi-antiquated Chromebook, it would be even closer to perfect. Sadly,
it doesn’t – yet.</p>
<p>-30- </p>
<p><a href="https://koreader.rocks/">koreader</a> is an open source
ebook reader application originally designed to replace the firmware on
Kobo E-Ink reading tablets, and then ported to run on Amazon Kindle,
Android, PocketBook, and Remarkable devices. Under Android it runs as a
normal application. It also runs as an application in Linux and
(reportedly) in MacOS. It reads basically all non-DRM book formats. It
is highly configurable and featureful, though not infinitely so.</p>
<p>If you have an OPDS-speaking book server, it can search and download
from that. If you want to run a tiny sync server for keeping track of
which page you are on across multiple koreaders, that’s pretty easy.</p>
<p>If it ran smoothly on MacOS and I could get it to work on my
semi-antiquated Chromebook, it would be even closer to perfect. Sadly,
it doesn’t – yet.</p>
<p>-30- </p>
considerations for ebook reader interfaces2023-06-06T12:20:33-04:002023-06-06T12:20:33-04:00-dsr-tag:blog.randomstring.org,2023-06-06:/2023/06/06/considerations-for-ebook-reader-interfaces/
<p>It’s a nice title, but what this <em>really</em> is, is my personal
preferences on interfaces for reading fiction. Everyone is allowed to
have preferences. Mine are special because I read a lot – on average, a
little over 200 books each year… </p>
<p>It’s a nice title, but what this <em>really</em> is, is my personal
preferences on interfaces for reading fiction. Everyone is allowed to
have preferences. Mine are special because I read a lot – on average, a
little over 200 books each year… </p>
<p>Statista (no link because they are essentially a news site, just one
with a longer news cycle and an odd focus) suggests that 3 in 4
Americans read at least one book per year, with average expenditure just
over $100. They also claim that the recreational book market in the USA
is about $25 billion, which is consistent - a third of a billion
Americans, times 100, times 0.75. $100 gets you four new hardcovers, or
six first-rank ebooks, or roughly a year of a Kindle Unlimited
subscription when it goes on sale, or between ten and a hundred
regularly priced ebooks. I will not abide by DRM and assert that
anything I get to read, I get to store in memory (internal or external)
as long as I can.</p>
<p>So, the first point: format. The best and most widespread current
format is EPUB, which is a slightly formalized version of wrapping HTML
and CSS with some naming conventions in a ZIP-compressed archive. This
is the dominant format and anything else should be convertible into it,
with two exceptions.</p>
<p>Comic books are best wrapped in the CBR or CBZ formats, which are RAR
or ZIP archives of JPEG or PNG images, named in page order. Simple and
effective.</p>
<p>Books which depend on precise layout – typically technical
illustrations or art books – do best in the ridiculously overcomplicated
PDF, which is optimized for print but can be displayed on screen.</p>
<p>The reading of comics and art books is, as far as I’m concerned, a
different category than reading fiction. It’s fine by me if the software
is similarly specialized – I don’t demand a unified reader. Hardware
which is adequate for reading fiction is not necessarily adequate for
viewing comics; a good comics viewer may be unwieldy for fiction on the
go. (An A4-sized display is great for comics or art, but tends to be as
heavy as a lightweight laptop (or, indeed, functionally is a lightweight
laptop); an A5-sized display is about the same as a mid-sized hardcover
page, and an A6 approximates a paperback page – and is achievable on a
large smartphone.)</p>
<p>Here’s what I won’t compromise on:</p>
<ul>
<li>display density of 200 dpi or higher</li>
<li>fast page turning. How fast? Fast enough that I don’t notice
it.</li>
<li>lighting for reading in dim and dark circumstances</li>
<li>a readable dark page with light letters, for nighttime reading</li>
<li>controllable brightness</li>
<li>the typeface I like (Palatino or a close relative) in the size that
I want</li>
<li>with line spacing under my control (I typically want 0.85 to
1.2)</li>
<li>nearly everything on screen is the book itself - one status line is
good; I prefer footers to headers.</li>
</ul>
<p>Features that I like but don’t need:</p>
<ul>
<li>an OPDS client to fetch books from my server</li>
<li>a sync client to keep track of the last page read on each book
across devices</li>
<li>one-touch access to the table of contents</li>
<li>reprogrammable/customizable menus and gestures</li>
</ul>
<p>Features that I find nearly useless:</p>
<ul>
<li>a book-cover based file browser</li>
<li>timers</li>
<li>dictionary lookups</li>
<li>multiple bookmarks per book</li>
<li>note-taking</li>
</ul>
<p>Features that I need to turn off if they exist:</p>
<ul>
<li>speed-reading gizmos</li>
<li>animated page flips</li>
<li>text-to-speech output (obviously useful for other people)</li>
</ul>
<p>Screens:</p>
<p>OLEDs are the best in the dark. All modern displays are pretty good
in indoor moderate lighting. E-Ink is only superior in bright sunlight,
and you never get color (or at least good color) with E-Ink.</p>
minimal due diligence2023-05-10T10:40:48-04:002023-05-10T10:40:48-04:00-dsr-tag:blog.randomstring.org,2023-05-10:/2023/05/10/minimal-due-diligence/
<p>‘Due diligence’ is the business terminology for taking care of
details when you enter into a contract. Those details include very basic
things like:</p>
<ul>
<li>does the seller exist?</li>
<li>do they have a history of fraud?</li>
<li>are they on a list of terrorist supporters? (yes, really)…
</li></ul>
<p>‘Due diligence’ is the business terminology for taking care of
details when you enter into a contract. Those details include very basic
things like:</p>
<ul>
<li>does the seller exist?</li>
<li>do they have a history of fraud?</li>
<li>are they on a list of terrorist supporters? (yes, really)…
</li>
<li>are the terms of payment reasonable?</li>
<li>is it likely that the seller can provide what they claim to be
selling?</li>
</ul>
<p>When you’re looking into buying a whole company, due diligence goes
deeper into checking the financial health and operational practices of
the business you are buying – and on the other hand, the seller will
want to know that you have the money or financing at hand, at the
least.</p>
<p>It’s usually a good idea to apply the same sort of discovery or
estimation to your own clever ideas, especially if your new plan will
involve the expenditure of a significant amount of time or money.</p>
<p>As an example, I was reading a blog post about running a set of
repository mirrors for open source projects, when I was struck with the
inspiration that I could run my own mirror for the house. This is not
immediately completely insane – I/we run mirrors at work for projects
that we use. But it did occur to me that I should do some basic due
diligence before committing.</p>
<p>A simple pro/con list is a good start:</p>
<table>
<caption>house mirror pros/cons</caption>
<thead>
<tr class="header">
<th style="text-align: center;">PRO</th>
<th style="text-align: center;">CON</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: center;">fast access to packages</td>
<td style="text-align: center;">uses lots of disk space</td>
</tr>
<tr class="even">
<td style="text-align: center;">less external bandwidth</td>
<td style="text-align: center;">reconfigure machines</td>
</tr>
<tr class="odd">
<td style="text-align: center;">allows install/upgrades</td>
<td style="text-align: center;">can’t update mirror</td>
</tr>
<tr class="even">
<td style="text-align: center;">without external net</td>
<td style="text-align: center;">without external net</td>
</tr>
<tr class="odd">
<td style="text-align: center;"></td>
<td style="text-align: center;">more stuff to maintain</td>
</tr>
</tbody>
</table>
<p>Given a 5-10x reduction in bandwidth for package updates, and that I
don’t pay for bandwidth that way, versus a large increase in disk
storage and stuff to maintain, I’ve decided not to bother.</p>
models of language vs models of reality2023-03-20T19:01:22-04:002023-03-20T19:01:22-04:00-dsr-tag:blog.randomstring.org,2023-03-20:/2023/03/20/models-of-language-vs-models-of-reality/
<p>It is essential to realize that these technologies [large language
models, currently called AI] do not answer questions about a model of
reality, but about a model of language.</p>
<p>The utterances that they produce are statistically good at being
plausible conversation related to the input prompt. Any relationship to
reality is basically coincidental. Our tendency to view it as meaningful
is a product of anthropomorphism and the social conventions of our
culture.</p>
<p>People who use tools are responsible for their actions.</p>
<p>(I first wrote a slightly altered version of the above on the XBBN
mailing list on January 30, 2023, in response to a query from Candy
Sidner.)</p>
<p>-30- </p>
<p>It is essential to realize that these technologies [large language
models, currently called AI] do not answer questions about a model of
reality, but about a model of language.</p>
<p>The utterances that they produce are statistically good at being
plausible conversation related to the input prompt. Any relationship to
reality is basically coincidental. Our tendency to view it as meaningful
is a product of anthropomorphism and the social conventions of our
culture.</p>
<p>People who use tools are responsible for their actions.</p>
<p>(I first wrote a slightly altered version of the above on the XBBN
mailing list on January 30, 2023, in response to a query from Candy
Sidner.)</p>
<p>-30- </p>
quote of note - history of WWW tools2023-03-07T08:18:32-05:002023-03-07T08:18:32-05:00-dsr-tag:blog.randomstring.org,2023-03-07:/2023/03/07/quote-of-note-history-of-www-tools/
<blockquote>
<p>The thirty year history of the World Wide Web seems to be one of
barely glomming together a relatively robust, relatively well maintained
set of information sources and then destroying them at the first sign of
a company offering a slicker product… which then spectacularly dies.</p>
</blockquote>
<p>– Jason Scott <span class="citation" data-cites="textfiles">@textfiles [twitter.com]</span> June 28, 2022</p>
<p>-30- </p>
<blockquote>
<p>The thirty year history of the World Wide Web seems to be one of
barely glomming together a relatively robust, relatively well maintained
set of information sources and then destroying them at the first sign of
a company offering a slicker product… which then spectacularly dies.</p>
</blockquote>
<p>– Jason Scott <span class="citation"
data-cites="textfiles">@textfiles [twitter.com]</span> June 28, 2022</p>
<p>-30- </p>
fingerprints2023-03-06T09:18:37-05:002023-03-06T09:18:37-05:00-dsr-tag:blog.randomstring.org,2023-03-06:/2023/03/06/fingerprints/
<p>I have had phones with fingerprint unlocks on the back, side and
in-screen.</p>
<p>Back is best.</p>
<p>-30- </p>
<p>I have had phones with fingerprint unlocks on the back, side and
in-screen.</p>
<p>Back is best.</p>
<p>-30- </p>
an opinionated tmux config2023-03-03T11:56:43-05:002023-03-03T11:56:43-05:00-dsr-tag:blog.randomstring.org,2023-03-03:/2023/03/03/an-opinionated-tmux-config/
<p>I switched from GNU <code>screen</code> to <code>tmux</code> when I
discovered that the minor bug I had been experiencing for years had been
reported several times and always dismissed with “can’t reproduce”.</p>
<p>It took about 20 minutes to properly switch over, and another day or
two to discover my own biases and desires. What follows is a discussion
of my own preferences in <code>tmux</code> config.</p>
<p>I switched from GNU <code>screen</code> to <code>tmux</code> when I
discovered that the minor bug I had been experiencing for years had been
reported several times and always dismissed with “can’t reproduce”.</p>
<p>It took about 20 minutes to properly switch over, and another day or
two to discover my own biases and desires. What follows is a discussion
of my own preferences in <code>tmux</code> config.</p>
<pre><code># I don't split windows. Splitting windows into panes is not for me.
unbind %
unbind \#
unbind \"
# flip back and forth between two windows with prefix-spacebar
bind Space last-window
# fix default binding for changing to window 10 instead of 0
bind 0 selectw -t:10
#bind -n C-Left previous-window
#bind -n C-Right next-window
bind -n M-Left previous-window
bind -n M-Right next-window</code></pre>
<p>When I work from home, I open up an ssh window to work and run tmux
over on my server there. This effectively embeds a tmux inside a tmux.
Alt/Meta is inboard of Control on my keyboards, so I use raw ctrl-arrows
to move between windows on the outside/home tmux and raw meta-arrows to
move around the inside/work tmux.</p>
<pre><code>setw -g automatic-rename off</code></pre>
<p>Turns out that automatic renaming never does what I want – so I name
everything manually.</p>
<p>And that’s it. Nothing else I need, so far, is particularly
weird.</p>
minimalism is an affectation of the wealthy2023-02-23T10:43:06-05:002023-02-23T10:43:06-05:00-dsr-tag:blog.randomstring.org,2023-02-23:/2023/02/23/minimalism-is-an-affectation-of-the-wealthy/
<p>People use tools to get things done. Tools vary in capabilities.
Using a perfect or great tool is more comfortable, takes less time, or
does a better job than using a good-enough tool. Using a poor tool
incurs penalties in time, comfort and/or quality.</p>
<p>Minimalism is, in the current parlance, a “flex”. Minimalism is a
statement that you can afford to prefer a non-optimal set of tools in
order to satisfy an aesthetic fad.</p>
<p>-30-</p>
<p>People use tools to get things done. Tools vary in capabilities.
Using a perfect or great tool is more comfortable, takes less time, or
does a better job than using a good-enough tool. Using a poor tool
incurs penalties in time, comfort and/or quality.</p>
<p>Minimalism is, in the current parlance, a “flex”. Minimalism is a
statement that you can afford to prefer a non-optimal set of tools in
order to satisfy an aesthetic fad.</p>
<p>-30-</p>
lessons from usenet2023-01-25T10:17:23-05:002023-01-25T10:17:23-05:00-dsr-tag:blog.randomstring.org,2023-01-25:/2023/01/25/lessons-from-usenet/
<p>Modern social media could have learned some useful things from
Usenet. Mostly, they haven’t.</p>
<p>Here are some of those lessons:</p>
<p>Modern social media could have learned some useful things from
Usenet. Mostly, they haven’t.</p>
<p>Here are some of those lessons:</p>
<ul>
<li>Reverse chronological feeds (most recent first) are a disaster.</li>
<li>Proper threading maintains context</li>
<li>Every discussion group needs a nominal topic, even if that’s
“friendly conversation”</li>
<li>Groups can be formally or informally moderated, but when there is no
moderation, the group explodes into chaos</li>
<li>Every user needs an obvious and easy killfile</li>
<li>No mercy for spammers, ever</li>
<li>Good communities form around a nucleus of people who write good
things</li>
<li>Persistent pseudonyms become real people. Anonymous and drive-by
posters don’t make good neighbors.</li>
</ul>
audio setups early 20232023-01-06T10:01:20-05:002023-01-06T10:01:20-05:00-dsr-tag:blog.randomstring.org,2023-01-06:/2023/01/06/audio-setups-early-2023/
<p>Of interest to highly technical budget-quality optimizing folks,
mostly.</p>
<p>Of interest to highly technical budget-quality optimizing folks,
mostly.</p>
<p>This is how I’m dealing with music playback in the house as of
January 2023. My goals are reasonably high-quality music at a long-term
reasonable price, while avoiding paid streaming services.</p>
<p>First up, storage. Music (and local video) is stored on the media
center box, a Pentium G4560 (2 cores, 4 threads) PC with 8GB RAM and
4x3TB disks in RAID10. All the machines I’m going to mention are running
Debian Stable. Disk space is usually at a premium, so at some point I
will likely migrate to a 2 disk ZFS mirror, probably around 14-16TB
usable. Music is largely ripped from CDs at 320Kb/s MP3 or FLAC; some is
purchased digitally if available in those formats.</p>
<p>The media center exports a music filesystem via read-only NFS, and
runs Owntone, a web-interface music player/server which can play to
Chromecast Audio, Apple Airplay, and anything which can play an MP3
stream – Firefox and Chrome certainly can. Owntone transcodes to 320Kb/s
MP3 as necessary.</p>
<p>Hooked to this via HDMI is a Yamaha RX-V675 7.1 channel home theater
receiver, which feeds main speakers, center, surround, and front
presence/elevation speakers. It has measured room equalization, albeit
not the most capable on the market. Main speakers are PSB Century 800i
(2.5 way towers, 1” dome over 2x 8” woofers, front ported, ports
stuffed) sitting on Monoprice 12” powered woofers getting the same
signal. After equalization, this can go down to 20Hz at 90dB (1m). There
is also a PSB Alpha Subsonic 5 subwoofer for movie LFE. All of these
things were bought new but with fairly large sale discounts.</p>
<p>In the living room is an old laptop with a SMSL Sanskrit 10th MkII
DAC feeding Kali LP8v2 powered monitors. The DAC was on sale for
half-price ($70) and the speakers were on sale for $200 apiece down from
$250. The laptop uses equalization software when playing from the
console/NFS, but not from the Shairport-sync remote client.</p>
<p>In my bedroom is a Google Chromecast Audio (sadly discontinued, $25
when new) connected to JBL LSR305x powered monitors, bought on sale from
MassDrop at $170 for the pair.</p>
<p>In the office, my desktop feeds an Apple USB-C DAC ($9, no sale
needed) to an optoisolator to a NAD 712 stereo receiver. I bought the
NAD in 1998, new, no discount. It has a 1/4” headphone jack which
automatically disconnects the speaker connections – a pair of Paradigm
Monitor 3 Mark 3s. The usual headphones are Superlux 688b, Truthear
Zeros, TRN V90s, or occasionally Sennheiser 280HDpro. The desktop runs
equalization software (PulseEffects on top of PipeWire) that corrects
each output, though it does have to be selected whenever I change
outputs. The Paradigms were purchased used from a guy driving a white
van, for $200 the pair – an excellent value.</p>
<p>Finally, the dining room has a computer hooked up to a TV and
Cambridge SoundWorks PCWorks 2.1 system. PCWorks is (was) an amazing
product: Two 2” full-range speakers in little plastic cubes and a 4”
mid-woofer in a bizarre plastic bandpass box along with a 9W amplifier.
It is absolutely an upgrade over any TV’s built-in sound, nicely
adequate for background music, and ridiculously high value-to-price at
$50 or so.</p>
<p>Currently unused but known to be functional:</p>
<ul>
<li>a Yamaha RXV990 receiver (pre-HDMI era) with useful 2.1 capabilities
and mediocre 5.1</li>
<li>a NAD T750 receiver (pre-HDMI) with similar capabilities</li>
<li>2 Paradigm Esprit v2 narrow towers</li>
<li>2 Paradigm MiniMonitor Mark 3</li>
<li>2 PSB Century 400i bookshelf speakers</li>
</ul>
<p>I expect some version of these to be gifted to the kids when they
move out permanently.</p>
uphill battle2022-12-09T13:25:40-05:002022-12-09T13:25:40-05:00-dsr-tag:blog.randomstring.org,2022-12-09:/2022/12/09/uphill-battle/
<p>I am aware that this trick never works (cf ‘Hacker’). Still, I need
to try.</p>
<p>Please stop using the terms AI, Artificial Intelligence, and even ML
and Machine Learning. In the same spirit as “the cloud is just someone
else’s computer”, please regard all these systems as Statistical
Correlation Networks, SCNs.</p>
<p>When you read, hear, or say AI you carry the baggage of a hundred
years of science fiction stories. You will then make mistakes in
reasoning about SCNs.</p>
<p>Yes, it is amazing what SCNs can do, but they aren’t people you can
teach and reason with.</p>
<p>-30- </p>
<p>I am aware that this trick never works (cf ‘Hacker’). Still, I need
to try.</p>
<p>Please stop using the terms AI, Artificial Intelligence, and even ML
and Machine Learning. In the same spirit as “the cloud is just someone
else’s computer”, please regard all these systems as Statistical
Correlation Networks, SCNs.</p>
<p>When you read, hear, or say AI you carry the baggage of a hundred
years of science fiction stories. You will then make mistakes in
reasoning about SCNs.</p>
<p>Yes, it is amazing what SCNs can do, but they aren’t people you can
teach and reason with.</p>
<p>-30- </p>
new phone minireview2022-11-11T10:03:24-05:002022-11-11T10:03:24-05:00-dsr-tag:blog.randomstring.org,2022-11-11:/2022/11/11/new-phone-minireview/
<p>Being a mini-review of the Asus Zenfone 9.</p>
<p>(It’s mini because the phone is the smallest current flagship.)</p>
<p>Previous phone: OnePlus 7Pro, a 6.7” screen with rounded edges and an
enormous battery life. This one has a 5.9” flat screen. Flat is much
better. The manufacturers decided that rounded edges were “premium”, so
they put it on the highest end phones… making them less usable and more
prone to weird glare and distortion. </p>
<p>Being a mini-review of the Asus Zenfone 9.</p>
<p>(It’s mini because the phone is the smallest current flagship.)</p>
<p>Previous phone: OnePlus 7Pro, a 6.7” screen with rounded edges and an
enormous battery life. This one has a 5.9” flat screen. Flat is much
better. The manufacturers decided that rounded edges were “premium”, so
they put it on the highest end phones… making them less usable and more
prone to weird glare and distortion. </p>
<p>How much smaller is it? Let’s ignore the crude physical dimensions
and go with this: at a comfortable reading width, the OnePlus shows 35
lines of book text, and the Asus shows 30 lines of the same text. I
guess I’ll be flipping pages 14% more often.</p>
<p>In exchange, the Asus is much lighter and much more comfortable to
hold one-handed… and I have big hands. Not NBA big, but proportionate to
my height, which is still somewhere in the 99th percentile.</p>
<p>It’s fast, but all flagship phones are fast, even the ones that are
three years old. It has cameras, but all the phones have cameras. Unless
you are a camera person, it will be enough.</p>
<p>It is reported to have excellent battery life. It claims to be
waterproof (IP68), but I note that the warranty specifically disclaims
water damage. Hmph. And it has a headphone jack, which is awesome. When
did it become awesome? About five years ago, when flagship phones
stopped having them because you were expected to buy expensive
low-quality wireless earbugs which would then need to be recharged and
someday become more toxic waste.</p>
<p>Feature that I miss from the OnePlus that nobody is selling this
year: instead of having a stupid cut-out hole in the screen for the
front camera, the OnePlus had a motorized drawer for the front camera. I
tested it about fifty times and used it about three times. Much nicer.
Bring that back, along with the physical three-way switch for
mute/stun/kill.</p>
<p>Overall, I think I’m content. But I also think that if I were more
budget constrained, I would be pretty happy with one of Motorola’s
near-flagships instead.</p>
why apple mail products stop sending mail2022-09-02T09:49:00-04:002022-09-02T09:49:00-04:00-dsr-tag:blog.randomstring.org,2022-09-02:/2022/09/02/why-apple-mail-products-stop-sending-mail/
<p>If you have an Apple Mail client (MacOS, iPhone, whatever) that
recently stopped sending email to some servers, the reason is because
Apple doesn’t play nicely with other products. There is a solution…</p>
<p>If you have an Apple Mail client (MacOS, iPhone, whatever) that
recently stopped sending email to some servers, the reason is because
Apple doesn’t play nicely with other products. There is a solution…</p>
<p>SMTP conversations begin with the client saying HELO (or EHLO) and
identifying their hostname or IP address. Clients that send garbage or
the server’s IP address are spamming tools. Therefore, watching for bad
behavior here is a good anti-spam measure.</p>
<p>Apple changed their client behavior sometime in the last few months,
and it shows up irregularly as people update their software.</p>
<p>If you are running a Postfix server, the setting you need is</p>
<pre><code>smtpd_helo_restrictions =
check_helo_access </code></pre>
<p>Find the postmap database that check_helo_access is using and add a
line like this:</p>
<pre><code>smtpclient.apple OK</code></pre>
<p>then re-map it and things should start to work.</p>
if your tech company is growing, you need in-house recruiters2022-09-02T07:29:04-04:002022-09-02T07:29:04-04:00-dsr-tag:blog.randomstring.org,2022-09-02:/2022/09/02/if-your-tech-company-is-growing-you-need-in-house-recruiters/
<p>If your company is planning on hiring 4-6 technical people a year,
your next hire should be a recruiter. It is probably best if they do not
have experience being a recruiter or a salescritter. Hire someone with a
liberal arts degree or technical communications experience.</p>
<p>If your company is hiring more than that, why don’t you already have
an in-house recruiter?</p>
<p>External recruiters are lying spammers. It’s the nature of the
economics: they don’t get paid until they land a candidate, but they
can’t afford to learn enough about your company or the role to get good
candidates, so they need to work in bulk. An external recruiting company
wants 20-30% of first-year salary as a fee. If you’re hiring 5 people a
year, you can afford to pay an internal recruiter the average of their
salaries, which should be quite nice indeed - external recruiters are
paid on commission, which induces feast-or-famine responses and
consequent unethical practices.</p>
<p>An internal recruiter can talk to your hiring managers, ask
questions, and build trust. An internal recruiter is inherently more
trustworthy to a prospective candidate, too: they can reference the
company’s name from day one, and can offer actual details
immediately.</p>
<p>-30- </p>
<p>If your company is planning on hiring 4-6 technical people a year,
your next hire should be a recruiter. It is probably best if they do not
have experience being a recruiter or a salescritter. Hire someone with a
liberal arts degree or technical communications experience.</p>
<p>If your company is hiring more than that, why don’t you already have
an in-house recruiter?</p>
<p>External recruiters are lying spammers. It’s the nature of the
economics: they don’t get paid until they land a candidate, but they
can’t afford to learn enough about your company or the role to get good
candidates, so they need to work in bulk. An external recruiting company
wants 20-30% of first-year salary as a fee. If you’re hiring 5 people a
year, you can afford to pay an internal recruiter the average of their
salaries, which should be quite nice indeed - external recruiters are
paid on commission, which induces feast-or-famine responses and
consequent unethical practices.</p>
<p>An internal recruiter can talk to your hiring managers, ask
questions, and build trust. An internal recruiter is inherently more
trustworthy to a prospective candidate, too: they can reference the
company’s name from day one, and can offer actual details
immediately.</p>
<p>-30- </p>
can we rebuild Usenet on top of blogs?2022-06-23T08:28:13-04:002022-06-23T08:28:13-04:00-dsr-tag:blog.randomstring.org,2022-06-23:/2022/06/23/can-we-rebuild-usenet-on-top-of-blogs-/
<p>Blogs publish articles, or entries, which are basically the same as
Usenet posts – but there’s no widespread mechanism for grouping and
replying. We can fix that. </p>
<p>Blogs publish articles, or entries, which are basically the same as
Usenet posts – but there’s no widespread mechanism for grouping and
replying. We can fix that. </p>
<p>All reputable blog systems produce a URL that yields a full-text RSS
feed. That takes care of publishing. Traditionally, Usenet articles have
headers signalling From, Subject, Newsgroups, and References. From and
Subject aren’t needed – the From is either in the URL or in the blog’s
content, the Subject is in the title or body. Newsgroups is a
super-threading semantic, and might not be needed. Tags could be a
better arrangement, particularly if people agree on some distinct
keywords when they feel it appropriate.</p>
<p>Then we add a threading semantic to the RSS feed signalling that a
particular entry is a reply to a particular thread. One obvious mechanic
for that is for all participating blogs to guarantee that the URL for
each entry on their site is unique, and use that URL in a Reference
header signalling that this entry is a reply to that particular URL.
Let’s mandate the Tags header as well.</p>
<p>Now we need an indexing/discovery service. Let’s make sure that’s
federated. Compatible servers can hook in as new leaves, getting a copy
of all the known living feed URLs plus the last hundred tags seen from
each URL. Note that we are indexing and searching on metadata, not data:
some megacorp might want to suck down all the data, but a server should
be runnable on a small budget by an individual.</p>
<p>Finally, ask RSS readers to fire off the blog-writing client/editor
to construct an entry with a particular Reference header on demand,
copying the Tags but leaving them editable.</p>
<p>Et voila, Super-Decentralized Usenet.</p>
perfectly willing to believe2022-06-18T09:02:19-04:002022-06-18T09:02:19-04:00-dsr-tag:blog.randomstring.org,2022-06-18:/2022/06/18/perfectly-willing-to-believe/
<p>The categories of certainty of knowledge are statistical and
fuzzy.</p>
<p>In the course of everyday life, I don’t bother conducting experiments
to see if gravity is still working (I haven’t received a bill in ages)
or the atmosphere is still breathable. I just assume that they are in
more or less the same state as they used to be. Occasionally this is
wrong, and I am surprised by a terrible humidity or excess pollen or
dust, but it saves a great deal of deliberation time which can be used
to think about other things, such as whether I have remembered to take
the laundry out of the washer.</p>
<p>The categories of certainty of knowledge are statistical and
fuzzy.</p>
<p>In the course of everyday life, I don’t bother conducting experiments
to see if gravity is still working (I haven’t received a bill in ages)
or the atmosphere is still breathable. I just assume that they are in
more or less the same state as they used to be. Occasionally this is
wrong, and I am surprised by a terrible humidity or excess pollen or
dust, but it saves a great deal of deliberation time which can be used
to think about other things, such as whether I have remembered to take
the laundry out of the washer.</p>
<p>As I converse with people or bots convincingly pretending to be
people (and perhaps, eventually, bots which are people), most statements
come with an implicit certainty tag: I am not knowingly lying to you, I
am convinced that this is true. This is called basic honesty, and is
both valuable and common. But from time to time I want to talk about
more speculative things, and so I tag my conversational topics
explicitly.</p>
<p>I have come to note that I use the phrase “I am perfectly willing to
believe –” when I think that a proposed theory is consistent with what I
know about the universe, but I have very little evidence for it and none
against it. I often use it to propose a more moderate version of some
explanatory story. For example, consider the proposition that Martin
Luther King Junior was assassinated in a plot by the United States
government. Do I believe that LBJ signed an order to kill him? I haven’t
seen such a document. Is it consistent with my understanding of the
workings of the government? I am perfectly willing to believe that some
section of the Federal government, probably in an intelligence agency,
decided to set it up. I don’t have evidence for it, I don’t have
evidence against it, and right now I don’t believe it – but that just
means that if more evidence comes to light, I am prepared to accept
it.</p>
<p>In general, I don’t believe in big conspiracies, because people do
like to talk about what they have been doing. But I am perfectly willing
to believe in any number of small conspiracies – limited by number of
participants and timespan – because that’s a thing that humans really
like to do. Many businesses start out as a small conspiracy to exploit a
situation; they stop being conspiracies when they go about their
business openly.</p>
script assistant2022-05-14T17:53:17-04:002022-05-14T17:53:17-04:00-dsr-tag:blog.randomstring.org,2022-05-14:/2022/05/14/script-assistant/
<p>I’ve had this idea for seven years and haven’t done anything with it,
so I hereby release it into the public domain and hope someone will make
it – preferably an open source version.</p>
<p>Live theater rehearsals rely on actors memorizing their lines.
Historically, not everyone learns their lines at the same time. So, for
rehearsals, people are walking around on stage clutching bundles of
paper, usually with highlighter over their lines.</p>
<p>Everybody has a smartphone now, so let’s use that. This application
can be handled in HTML, CSS and JavaScript with a fairly minimal backend
for synchronization and distribution. Or you can make yourself unhappy
and do it as native apps in every platform you want to support.</p>
<p>I’ve had this idea for seven years and haven’t done anything with it,
so I hereby release it into the public domain and hope someone will make
it – preferably an open source version.</p>
<p>Live theater rehearsals rely on actors memorizing their lines.
Historically, not everyone learns their lines at the same time. So, for
rehearsals, people are walking around on stage clutching bundles of
paper, usually with highlighter over their lines.</p>
<p>Everybody has a smartphone now, so let’s use that. This application
can be handled in HTML, CSS and JavaScript with a fairly minimal backend
for synchronization and distribution. Or you can make yourself unhappy
and do it as native apps in every platform you want to support.</p>
<p>In the setup phase, someone loads a play script or musical book into
the server and tags every line with one of:</p>
<ul>
<li>nobody</li>
<li>stage directions</li>
<li>character X</li>
</ul>
<p>Just a little pattern recognition can do an excellent job of
autotagging, but proof-reading is essential.</p>
<p>Once all the lines are tagged, setup is over.</p>
<p>The subsequent phase is to start a rehearsal session, which needs a
distinctive name. Each participant logs in to the server from their
smartphone and selects a character, overview, or director. Multiple
simultaneous logins of each of these can happen, but director ought to
be password protected.</p>
<p>During a rehearsal, all devices receive a copy of the script/book. If
a character is selected, that character’s lines are rendered in a very
obvious form – special background/foreground color combos, and/or
larger, bolder, different fonts – or even whispered via text to voice.
It should be difficult to accidentally change characters, but fairly
easy to change on purpose. Per-device customization of character’s
special line rendering is a good idea. If the selected character has a
line on the next scrollable page, there should be an indication of that
before we get there.</p>
<p>The director gets a special set of controls to synch all the other
views. Although the director controls feel like a mix of absolute and
relative position changes, they are actually all implemented as a goto
to an absolute line position. The director controls should include
directly starting at a particular point and moving relatively forward or
backward.</p>
<p>So: a rehearsal session starts. Actors log in and select characters.
The stage managers and techs and anyone who is observing select
overview. The director, and very likely an assistant director or two,
select the director view, which is the overview plus motion controls.
Those controls send instructions to all the logged in views to move to
the next line or page or other mark.</p>
<p>-30-</p>
a poem2022-05-06T07:19:28-04:002022-05-06T07:19:28-04:00-dsr-tag:blog.randomstring.org,2022-05-06:/2022/05/06/a-poem/
<div class="line-block">beep, boop<br/>
bleep, bloop<br/>
creep, croup<br/>
deep, dupe<br/>
heap, hoop<br/>
keep, coop<br/>
leap, loop<br/>
neap, no-op</div>
<p>-30- </p>
<div class="line-block">beep, boop<br />
bleep, bloop<br />
creep, croup<br />
deep, dupe<br />
heap, hoop<br />
keep, coop<br />
leap, loop<br />
neap, no-op</div>
<p>-30- </p>
predictions for 20232022-05-03T08:19:10-04:002022-05-03T08:19:10-04:00-dsr-tag:blog.randomstring.org,2022-05-03:/2022/05/03/predictions-for-2023/
<p>Last night Politico published an unprecedented leak of a Supreme
Court decision overturning Roe v Wade, the decision that established a
right of privacy and the consequent right to an abortion. The opinion of
the court’s reactionary majority specifically includes reasoning to
overturn the decisions about marriage equality, legal contraception, and
general privacy of sexual behavior.</p>
<p>Assuming that the opinion is issued substantially as-is, I will make
some predictions about 2023.</p>
<ul>
<li>‘Red’ states will pass laws restricting basic civil rights.</li>
<li>Corporations that rely on high-skill workers will not be able to
hire them in those states.</li>
<li>Those corporations will move out of the red states.</li>
<li>The economies of red states are substantially worse off compared to
blue states now. When the corporations move out, the tax base will be
further reduced.</li>
<li>When the Federal budget is roughly balanced, blue states subsidize
red states. The Federal budget is running at a significant deficit in
order to prop up the economy.</li>
<li>Option 1: the attack on civil rights is enough to change Congress
definitively to blue in November.
<ul>
<li>The Supreme Court will be expanded to 15 or 17 justices.</li>
<li>The Republican Party splinters.</li>
</ul></li>
<li>Option 2: Congress becomes red in November, or wishy-washy.
<ul>
<li>The United States tends towards a Christian Fascist state.</li>
</ul></li>
</ul>
<p>-30- </p>
<p>Last night Politico published an unprecedented leak of a Supreme
Court decision overturning Roe v Wade, the decision that established a
right of privacy and the consequent right to an abortion. The opinion of
the court’s reactionary majority specifically includes reasoning to
overturn the decisions about marriage equality, legal contraception, and
general privacy of sexual behavior.</p>
<p>Assuming that the opinion is issued substantially as-is, I will make
some predictions about 2023.</p>
<ul>
<li>‘Red’ states will pass laws restricting basic civil rights.</li>
<li>Corporations that rely on high-skill workers will not be able to
hire them in those states.</li>
<li>Those corporations will move out of the red states.</li>
<li>The economies of red states are substantially worse off compared to
blue states now. When the corporations move out, the tax base will be
further reduced.</li>
<li>When the Federal budget is roughly balanced, blue states subsidize
red states. The Federal budget is running at a significant deficit in
order to prop up the economy.</li>
<li>Option 1: the attack on civil rights is enough to change Congress
definitively to blue in November.
<ul>
<li>The Supreme Court will be expanded to 15 or 17 justices.</li>
<li>The Republican Party splinters.</li>
</ul></li>
<li>Option 2: Congress becomes red in November, or wishy-washy.
<ul>
<li>The United States tends towards a Christian Fascist state.</li>
</ul></li>
</ul>
<p>-30- </p>
log more on failure than success2022-02-25T10:40:31-05:002022-02-25T10:40:31-05:00-dsr-tag:blog.randomstring.org,2022-02-25:/2022/02/25/log-more-on-failure-than-success/
<p>When something goes wrong, especially (but not limited to) at
startup, you should log an error message that is as informative as
possible. In particular, if your service has parameters that might
conflict with any other running process –say, it wants to listen to a
particular port– you should have the error message mention all of those
details.</p>
<p>It’s even better if the failure does a little diagnostic and tells
you what other process is using that port.</p>
<p>This message brought to you by the Campaign for More Informative
Error Messages. -30- </p>
<p>When something goes wrong, especially (but not limited to) at
startup, you should log an error message that is as informative as
possible. In particular, if your service has parameters that might
conflict with any other running process –say, it wants to listen to a
particular port– you should have the error message mention all of those
details.</p>
<p>It’s even better if the failure does a little diagnostic and tells
you what other process is using that port.</p>
<p>This message brought to you by the Campaign for More Informative
Error Messages. -30- </p>
smart homes are still for tinkers2022-02-17T12:01:34-05:002022-02-17T12:01:34-05:00-dsr-tag:blog.randomstring.org,2022-02-17:/2022/02/17/smart-homes-are-still-for-tinkers/
<p>There are two kinds of smart home enthusiasts: the kind who buy into
a particular cloudy ecosystem and need to buy all new stuff every few
years, and the kind who spend all their time tinkering on their in-house
systems. Fairly often the tinkers also end up buying all new stuff, but
they get to do it in incremental steps where everything works (more or
less) during the transitions.</p>
<p>I’m not an enthusiast: I want a return on investment in money,
convenience or fun. </p>
<p>There are two kinds of smart home enthusiasts: the kind who buy into
a particular cloudy ecosystem and need to buy all new stuff every few
years, and the kind who spend all their time tinkering on their in-house
systems. Fairly often the tinkers also end up buying all new stuff, but
they get to do it in incremental steps where everything works (more or
less) during the transitions.</p>
<p>I’m not an enthusiast: I want a return on investment in money,
convenience or fun. </p>
<p>There’s a thermostat in each fridge that keeps it at the right
temperature. It’s never failed except when the whole house had a power
outage, and I’ve never needed to obsess over the current temperature.
The house thermostats get changed twice a year: when we start keeping
windows open regularly, and when we stop.</p>
<p>The lights in the house are controlled by wall switches. There are
precisely two places in the house where it would occasionally be nice to
change the state of a light switch which is not close at hand. It’s not
much of an inconvenience.</p>
<p>The electrical outlets have things plugged into them, most of which
are either off or charging at any given moment. There is exactly one
place in the house where I would like to occasionally flip power state
from across the room. I could solve that with a remote RF power switch,
and it would be reasonably cheap, but I haven’t.</p>
<p>I have extensive music systems, which don’t respond to voice commands
because there are no permanently active microphones in my house. It’s
stored in a central system, shared to all the computers that want to
read from it, and can be accessed in several ways, including a web
player that will direct sound to any set of speakers in the house. It’s
not “smart”. It’s unobtrusive, and doesn’t do things on its own.</p>
<p>And that’s what I like.</p>
in 2022 there are no slow computers2022-02-10T07:15:04-05:002022-02-10T07:15:04-05:00-dsr-tag:blog.randomstring.org,2022-02-10:/2022/02/10/in-2022-there-are-no-slow-computers/<p>It is 2022. There are no slow computers<sup id="sf-in-2022-there-are-no-slow-computers-1-back"><a class="simple-footnote" href="#sf-in-2022-there-are-no-slow-computers-1" title=" for the purposes of normal desktop activities">1</a></sup>. There is a lot of slow software.
</p><p>It is 2022. There are no slow computers<sup id=sf-in-2022-there-are-no-slow-computers-1-back><a href=#sf-in-2022-there-are-no-slow-computers-1 class=simple-footnote title=" for the purposes of normal desktop activities">1</a></sup>. There is a lot of slow software.
</p>
<p>In 2000 a desktop computer might take 3-5 minutes to boot from
power-off to being ready to read your email, enter data into a
spreadsheet, or play a game. An Intel Pentium III cpu was a 32-bit,
single core, single threaded unit running at something less than 1GHz in
the middle-grade systems normal for business, and 128 to 512MB of RAM
was normal. A big hard disk for a desktop would be a 2GB device on a
66MB/s interface. A nice monitor would be 17” on the diagonal and show
1280x1024. LAN speeds were 100Mb/s ethernet and a small office might
have a 1Mb/s DSL link.</p>
<p>In 2022, a desktop computer takes 30 seconds to 2 minutes to boot. A
normal office CPU is a 4 core, 8 thread 64-bit system running at 3-4GHz,
with 8-16GB of RAM and a 1TB SSD running at about 500MB/s. A cheap
monitor is 1920x1080 at 24” or so. A small office will have 400Mb/s
WiFi, 1Gb/s ethernet, and an Internet link might be 100 to 900Mb/s.</p>
<p>So: 50x faster, 16x as much memory, 10x faster disk transfer (and
1000x more operations per second), and an Internet that runs 100x
faster.</p>
<p>The nature of office work has not changed significantly since then.
To a certain extent, people are asking their computers to do more – push
more pixels, calculate smoother fonts – but the actual work has not
changed much. Yet complaints about slow computing are rampant. Why is
this?</p>
<p>I already told you: it’s the software. The normal load-out of
Microsoft Windows, Office 365, two anti-malware scanners and a diet of
heavy JavaScript applications split between remote servers and your
local browser eats all of those hardware and infrastructure
improvements.</p>
<p>I blame object-oriented software development, the practice of writing
software at the highest level of abstraction possible, and the
commercial pressures of feature checklists over performance – plus
general sloppiness. It’s possible to avoid much of this when an informed
user picks and chooses the software that they are going to run, but if
your software choices are made for you by an enterprise IT department,
you’re sunk.</p>
<ol class=simple-footnotes><li id=sf-in-2022-there-are-no-slow-computers-1> for the purposes of
normal desktop activities <a href=#sf-in-2022-there-are-no-slow-computers-1-back class=simple-footnote-back>↩</a></li></ol>reliable indicators of trouble2021-12-20T08:00:17-05:002021-12-20T08:00:17-05:00-dsr-tag:blog.randomstring.org,2021-12-20:/2021/12/20/reliable-indicators-of-trouble/
<p>When a backup fails to complete, that’s a reliable sign of trouble.
Most of the time it’s in the backup mechanism, but the second most
likely underlying cause is a problem in the thing which is being backed
up.</p>
<p>-30- </p>
<p>When a backup fails to complete, that’s a reliable sign of trouble.
Most of the time it’s in the backup mechanism, but the second most
likely underlying cause is a problem in the thing which is being backed
up.</p>
<p>-30- </p>
superstition2021-12-18T07:54:43-05:002021-12-18T07:54:43-05:00-dsr-tag:blog.randomstring.org,2021-12-18:/2021/12/18/superstition/
<blockquote>
<p>When you believe in things that you don’t understand, Then you
suffer, Superstition ain’t the way</p>
</blockquote>
<p>– Stevie Wonder</p>
<p>Every time I write about the mechanical processes behind this blog, I
stop adding entries to it. Recognizing a pattern is the first part of
building a superstition. It’s also the first part of building a
hypothesis, because the two processes are one and the same. Humans love
to recognize patterns. We have special names for some of them –
pareidolia, recognizing faces where they don’t exist. Paranoia, seeing
enemies where they don’t exist. If you think of these as distortions of
helpful evolved processes, then superstition is just a general
phenomenon of seizing on the wrong explanation for an interesting
pattern.</p>
<blockquote>
<p>When you believe in things that you don’t understand, Then you
suffer, Superstition ain’t the way</p>
</blockquote>
<p>– Stevie Wonder</p>
<p>Every time I write about the mechanical processes behind this blog, I
stop adding entries to it. Recognizing a pattern is the first part of
building a superstition. It’s also the first part of building a
hypothesis, because the two processes are one and the same. Humans love
to recognize patterns. We have special names for some of them –
pareidolia, recognizing faces where they don’t exist. Paranoia, seeing
enemies where they don’t exist. If you think of these as distortions of
helpful evolved processes, then superstition is just a general
phenomenon of seizing on the wrong explanation for an interesting
pattern.</p>
smoothest pelican upgrade yet2021-10-27T09:53:03-04:002021-10-27T09:53:03-04:00-dsr-tag:blog.randomstring.org,2021-10-27:/2021/10/27/smoothest-pelican-upgrade-yet/
<p>This blog is created by Pelican, a static site generator that
combines some text files that I write with a layout and some CSS styles
to produce the HTML that is rsync’d over to the nginx webserver which
answers your requests.</p>
<p>I just upgraded from 4.6 to 4.71, and also from an older python3
release to Debian’s current 3.9 release. Nothing appears to need to be
changed, which is nice and relaxing compared to the last few
upgrades.</p>
<p>-30- </p>
<p>This blog is created by Pelican, a static site generator that
combines some text files that I write with a layout and some CSS styles
to produce the HTML that is rsync’d over to the nginx webserver which
answers your requests.</p>
<p>I just upgraded from 4.6 to 4.71, and also from an older python3
release to Debian’s current 3.9 release. Nothing appears to need to be
changed, which is nice and relaxing compared to the last few
upgrades.</p>
<p>-30- </p>
setting vim options makes me itch2021-09-29T09:50:09-04:002021-09-29T09:50:09-04:00-dsr-tag:blog.randomstring.org,2021-09-29:/2021/09/29/setting-vim-options-makes-me-itch/
<p>It’s hard to break the habits of a lifetime – or at least, those
rooted decades deep.</p>
<p>Ever since I can remember, I always wanted to be a goodfeather.
Sorry, wrong reference. As far back as I can recall, I have been wary of
making changes to vi (later vim) settings out of a fear that I would
become reliant on them, and thence unproductive when I had to work on a
freshly installed machine.</p>
<p>There are several good arguments against this position.
</p>
<p>It’s hard to break the habits of a lifetime – or at least, those
rooted decades deep.</p>
<p>Ever since I can remember, I always wanted to be a goodfeather.
Sorry, wrong reference. As far back as I can recall, I have been wary of
making changes to vi (later vim) settings out of a fear that I would
become reliant on them, and thence unproductive when I had to work on a
freshly installed machine.</p>
<p>There are several good arguments against this position.
</p>
<p>First, even a sysadmin who is professionally installing machines just
doesn’t do that much by hand any more. A one-off machine is a rarity; a
corporate cattle machine will have basically everything ready to go by
the time anyone would want to log in and edit something.</p>
<p>Second, I spend far less time installing and investigating broken
machines these days. It isn’t impossibly rare, but it is decidedly
unusual now.</p>
<p>Third, humans are adaptable. Even if I were to become entirely
dependent on soft text wrapping and line numbers, not having them is not
the end of the world. I would notice fairly quickly and either make the
appropriate settings, or more likely just carry on without them.</p>
<p>I suppose I am ready to allow a few more entries into my general
<code>.vimrc</code>.</p>
an element of style2021-09-11T07:58:19-04:002021-09-11T07:58:19-04:00-dsr-tag:blog.randomstring.org,2021-09-11:/2021/09/11/an-element-of-style/
<p>I just realized that I internalized the O’Reilly house style decades
ago, and so I think it’s the proper way to write documentation.</p>
<p>Primary elements: the document, even at book length, takes the form
of a precise, pedantic, but informal letter to the audience. The author
might reference themself as “I” and tell brief anecdotes to
contextualize the material, and frequently encourages the reader in the
second person:</p>
<blockquote>
<p>You can also reticulate the frobnitz with the ‘–frob-harder’ switch
if that feels more natural to you.</p>
</blockquote>
<p>As a side effect, this style of technical writing minimizes the
number of gendered pronouns, which I always prefer because I don’t know
who is reading the work.</p>
<p>-30- </p>
<p>I just realized that I internalized the O’Reilly house style decades
ago, and so I think it’s the proper way to write documentation.</p>
<p>Primary elements: the document, even at book length, takes the form
of a precise, pedantic, but informal letter to the audience. The author
might reference themself as “I” and tell brief anecdotes to
contextualize the material, and frequently encourages the reader in the
second person:</p>
<blockquote>
<p>You can also reticulate the frobnitz with the ‘–frob-harder’ switch
if that feels more natural to you.</p>
</blockquote>
<p>As a side effect, this style of technical writing minimizes the
number of gendered pronouns, which I always prefer because I don’t know
who is reading the work.</p>
<p>-30- </p>
recovery from audiophilia2021-08-16T11:50:57-04:002021-08-16T11:50:57-04:00-dsr-tag:blog.randomstring.org,2021-08-16:/2021/08/16/recovery-from-audiophilia/
<p>When you stop looking for ways to improve your sound reproduction
experience and instead look for new music to listen to, you have begun
to recover from audiophilia.</p>
<p>Or at least, I have.</p>
<p>Places in the house with acceptable sound systems:</p>
<ul>
<li>my bedroom</li>
<li>the living room</li>
<li>the den/theater</li>
<li>the office</li>
<li>the other end of the office</li>
<li>the third system in the office</li>
<li>two portable systems</li>
</ul>
<p>Places in the house with marginal sound systems:</p>
<ul>
<li>the kitchen</li>
<li>the dining room</li>
</ul>
<p>-30- </p>
<p>When you stop looking for ways to improve your sound reproduction
experience and instead look for new music to listen to, you have begun
to recover from audiophilia.</p>
<p>Or at least, I have.</p>
<p>Places in the house with acceptable sound systems:</p>
<ul>
<li>my bedroom</li>
<li>the living room</li>
<li>the den/theater</li>
<li>the office</li>
<li>the other end of the office</li>
<li>the third system in the office</li>
<li>two portable systems</li>
</ul>
<p>Places in the house with marginal sound systems:</p>
<ul>
<li>the kitchen</li>
<li>the dining room</li>
</ul>
<p>-30- </p>
years of experience are a bad proxy2021-07-06T08:40:45-04:002021-07-06T08:40:45-04:00-dsr-tag:blog.randomstring.org,2021-07-06:/2021/07/06/years-of-experience-are-a-bad-proxy/Let’s say that you are constructing a technical employment
advertisement and you would like to specify that this position requires
someone who knows what they are doing in a few technologies.<p>Let’s say that you are constructing a technical employment
advertisement and you would like to specify that this position requires
someone who knows what they are doing in a few technologies.</p>
<p>A typical want ad will say something about required years of
experience in each of those technologies. This is bad because it is not
merely imprecise, but it is a proxy for what you actually want. Clear
communication requires that you ask for what you want, not something
that approximates it.</p>
<p>(Also, asking for specific years of experience might open you to age
discrimination lawsuits in parts of the world where that’s a thing. I am
not a lawyer.)</p>
<p>Let me offer you this scale, instead:</p>
<ul>
<li><p>Beginning: has started to use this technology</p></li>
<li><p>Familiar: has successfully completed at least one major project
using this technology</p></li>
<li><p>Proficient: routinely uses this technology in many
projects</p></li>
<li><p>Advanced: has taught others; is comfortable discussing design and
development of the technology itself</p></li>
<li><p>Expert: generally recognized and associated with the
technology</p></li>
</ul>
<p>Each of these stages represents a clear jump in competence. Which
would you rather have: a person who has read this scale and declares
that they are familiar with your primary programming language, or
someone who read “3-5 years of Ruby” and decided that because they have
encountered Ruby once or twice a year for each of the last four years,
that fits? In the other direction, people can acquire significant skills
in short periods of time if the conditions are right. There are
technologies where it is possible, given the right conditions, to gain
proficiency in a year or two.</p>
<p>One might also be interested in recency: I have beginner-level
competency in a bunch of languages that I haven’t used in ten years. I’d
like to think that it would only be a matter of a week or two to regain
those skills, but they have certainly rusted. I might drop them from my
resume, or leave them on since the jobs I like tend to be interested in
generalists who learn things quickly.</p>
<p>It is rare for a position to demand an Expert in anything; it’s more
likely that an Expert is part of your organization’s founders or is
approached personally, rather than through an open advertisement.</p>
<p>This post was generally inspired by <a
href="https://cellio.dreamwidth.org/2100936.html">Hiring Dark
Pattern</a></p>
that should not go there2021-06-19T09:28:37-04:002021-06-19T09:28:37-04:00-dsr-tag:blog.randomstring.org,2021-06-19:/2021/06/19/that-should-not-go-there/
<p>Twenty-five years ago, approximately, my housemates and I bought
office chairs – rolling five-star bases, adjustable arms, comes in a box
with an L-shaped hex driver like IKEA stuff – and put them in our dining
room around the table. They were cheap and comfortable.</p>
<p>I can’t tell you how many people looked at that arrangement and
needed to talk about their sudden feelings.
</p>
<p>Twenty-five years ago, approximately, my housemates and I bought
office chairs – rolling five-star bases, adjustable arms, comes in a box
with an L-shaped hex driver like IKEA stuff – and put them in our dining
room around the table. They were cheap and comfortable.</p>
<p>I can’t tell you how many people looked at that arrangement and
needed to talk about their sudden feelings.
</p>
<p>I can tell you that a bunch of friends immediately declared their
intention to do the same when they next bought furniture – including my
parents. I think most of them did.</p>
<p>Back in the 1980s, a “home computer” would come with a video output
that would drive a television as though it were producing a TV channel.
VCRs used the same system when they first came out. Dedicated monitors
were too expensive unless you were rich or could justify the expense for
business purposes.</p>
<p>Over time it became normal that you bought a specialized,
high-resolution monitor. It could be a big expense – I remember tracking
prices obsessively.</p>
<p>Then LCD monitors went from being terrible and expensive to mediocre
and almost affordable, just before everyone bought a new TV (as ATSC
digital television was introduced). That led to a production revolution
that made big high-res (1920x1080) TVs cheap, and that brought down the
prices of monitors using the same technology.</p>
<p>Still, there is a disconnect in many people’s head between “computer
monitor” and “TV”. No company makes a 42” 4K computer monitor for a
reasonable price, but dozens will sell you a 42” 4K TV for cheap. Pretty
much every computer has an HDMI output, though, and all those TVs use
that input.</p>
<p>It turns out that at normal office desk depths, putting such a TV at
the back of the desk is just like having four normal 21” monitors - the
kind that go for $100 each these days - mounted next to each other, but
without the annoying bezels in between them. So that’s what we do in our
house for the desks that need them. It’s typically 25-40% cheaper than
the separate monitors would be, too.</p>
<p>Just like the office chairs at the dining table, people seem split
between immediate revulsion and delight.</p>
bears repeating2021-06-14T19:19:28-04:002021-06-14T19:19:28-04:00-dsr-tag:blog.randomstring.org,2021-06-14:/2021/06/14/bears-repeating/
<p>Biometrics are usernames, not passwords.</p>
<p>And you can’t change them when you change your name, and you might
accidentally change them via trauma.</p>
<p>-30- </p>
<p>Biometrics are usernames, not passwords.</p>
<p>And you can’t change them when you change your name, and you might
accidentally change them via trauma.</p>
<p>-30- </p>
where the cloud came from2021-04-25T08:48:13-04:002021-04-25T08:48:13-04:00-dsr-tag:blog.randomstring.org,2021-04-25:/2021/04/25/where-the-cloud-came-from/
<p>The Cloud – where did we get that metaphor?</p>
<p>The answer is pretty simple. Imagine you are a techie working on an
Internet project in the late 1990s. You are explaining to a
less-technical audience how your application is going to be built. You
have a whiteboard, and you draw some simple things as you talk:</p>
<p>The Cloud – where did we get that metaphor?</p>
<p>The answer is pretty simple. Imagine you are a techie working on an
Internet project in the late 1990s. You are explaining to a
less-technical audience how your application is going to be built. You
have a whiteboard, and you draw some simple things as you talk:</p>
<p>“Here is our datacenter in Los Angeles” – big rectangle – “and in the
meet-me room we have border routers” – little circles – “that are
connected to seven other networks and our long-haul links to San Jose
and Seattle.” You start drawing lines and a vague map of the United
States.</p>
<p>One of your colleagues interrupts. “As of next Wednesday, it’s going
to be nine peer networks.”</p>
<p>Inspiration strikes. Instead of concentrating on the specifics of
where the networks are connected to each other, you draw a big floofy
cloud in the middle of the map, and just draw a line connecting your
data center to the cloud, and another line connecting on the East Coast
– maybe around Virginia, maybe around Boston or NYC, it’s hard to tell –
and then another rectangle for another data center. “Let’s not get into
specifics, we’re growing and everybody else is growing and the important
thing is that it’s all interconnected pretty well.”</p>
<p>The metaphor works, and pretty soon everyone in your company is
drawing a cloud to represent all the parts of the Internet that don’t
need to be described in depth right now. They go to conferences and draw
the clouds; everybody likes this and clouds start appearing in white
papers, then official documentation, and eventually it’s ubiquitous.</p>
<p>Somewhere around 2000, a person asks where a particular server is,
and the engineer at the white board says “it’s in the cloud”, meaning
that the actual position is not relevant, as long as it is
well-connected. And after that, everything is “in the cloud”.</p>
make systemd journald dump to rsyslogd2021-04-21T09:47:13-04:002021-04-21T09:47:13-04:00-dsr-tag:blog.randomstring.org,2021-04-21:/2021/04/21/make-systemd-journald-dump-to-rsyslogd/
<p>This is a reminder to myself on how to make the
<code>systemd journald</code> relay everything through
<code>rsyslogd</code>, so we get useful info in <code>/var/log</code>.
</p>
<p>This is a reminder to myself on how to make the
<code>systemd journald</code> relay everything through
<code>rsyslogd</code>, so we get useful info in <code>/var/log</code>.
</p>
<p>In <code>/etc/systemd/system/syslog.service</code>, set</p>
<pre><code>Requires=syslog.socket</code></pre>
<p>In <code>/etc/rsyslog.conf</code>, set</p>
<pre><code>module(load="imuxsock" SysSock.Name="/run/systemd/journal/syslog" ) # provides support for local system logging</code></pre>
<p>then restart rsyslogd.</p>
advanced technology2021-04-14T09:46:17-04:002021-04-14T09:46:17-04:00-dsr-tag:blog.randomstring.org,2021-04-14:/2021/04/14/advanced-technology/
<p>Fun fact of the day: the AT in SATA is a direct reference to the IBM
PC/AT launched in 1984.</p>
<p>Fun fact of the day: the AT in SATA is a direct reference to the IBM
PC/AT launched in 1984.</p>
<p>Let’s work backwards.</p>
<p>SATA, the Serial AT Attachment, is different from PATA, the Parallel
AT Attachment because, among other things, it uses a 7 conductor cable
rather than a 40 or 80 conductor cable. The accompanying power connector
is wider than the standard data cable.</p>
<p>PATA was formerly ATA, back when it didn’t have a serial competitor.
It was also called EIDE, Enhanced Integrated Drive Electronics, and
before that just Integrated Drive Electronics. All of these names stem
from the fact that the connector just extends the PC/AT 16 bit ISA bus
out to the drive, where the controller is mounted on the drive
itself.</p>
<p>Prior to ATA, drives had dedicated controllers that plugged into the
system bus, that then ran cables out to the disk drive itself. Some
controllers could handle two disks!</p>
<p>If you had a fancy computer, you might have had a Small Computer
Systems Interface controller, SCSI. That could talk to 7 other devices
in its original incarnation. SCSI controllers were expensive and SCSI
disks were expensive, but SCSI could also talk to printers and scanners
and similar strange beasts. The SCSI protocol lives on in SAS, Serial
Attached SCSI – which uses the same connectors as SATA. Almost all SAS
controllers can talk to SATA disks, so having the SAS capability is
useful.</p>
<p>The original ATA spec could transfer 8.3MB/s. SATA3 specifies 6GB/s.
The latest successor, U.2, is a way of carrying 4 PCIe bus lanes out to
a pluggable drive - 32GB/s for PCIe version 3.</p>
quote: outsourcing risk2021-03-10T10:59:28-05:002021-03-10T10:59:28-05:00-dsr-tag:blog.randomstring.org,2021-03-10:/2021/03/10/quote-outsourcing-risk/
<blockquote>
<p>However, this only works as long as the other party actually
internalizes the risk and liability. Since there are no consequences for
mishandling data, operating IT services you’re not structurally
competent to operate, and eventually having your crown jewels stolen -
the contractor doesn’t really internalize risk, has no incentive to
mitigate it.</p>
</blockquote>
<blockquote>
<p>This sounds like general problem of enterprise security. There are no
consequences. I can entirely get why a company would outsource IP
cameras to a third party cloud, even with storing data on-site. Business
runs on contracts. It’s entirely normal to contract out everything
except your core competencies, if it’s cheaper this way. It’s how you
turn CAPEX, complex OPEX and high risk into simple OPEX and low risk. A
contract is in big part a risk shifting tool. This works well in
practice… outside IT. The problem is, with IT and data, there’s a
mismatch between expectations and reality. An enterprise should feel
safe buying their video surveillance from Verkada, because between the
contract and the legal framework, Verkada should be bankrupt now, and
their management possibly facing jail time. That’s the part where
contracts work as Cover-Your-Ass tool: if you shift risk and liability
to outside party, the liability is not on you.
</p>
</blockquote>
<blockquote>
<p>However, this only works as long as the other party actually
internalizes the risk and liability. Since there are no consequences for
mishandling data, operating IT services you’re not structurally
competent to operate, and eventually having your crown jewels stolen -
the contractor doesn’t really internalize risk, has no incentive to
mitigate it.</p>
</blockquote>
<blockquote>
<p>All this to say: Verkada should go down after this, and their
customers should be named and shamed widely - the latter is so that
future customers of IT services put more care into vetting companies
they contract IT out to. You shouldn’t get to CYA with a contract where
assumptions around contracting are broken.</p>
</blockquote>
<p>– from <a
href="https://news.ycombinator.com/item?id=26409399">TeMPOral on Hacker
News, 20210310</a></p>
how to add DNS/TLS to your existing DNS server2021-02-18T08:46:53-05:002021-02-18T08:46:53-05:00-dsr-tag:blog.randomstring.org,2021-02-18:/2021/02/18/how-to-add-dns-tls-to-your-existing-dns-server/
<p>I will assume you have a working DNS server listening on the default
port, 53, and that you have certbot or some other means of acquiring SSL
certs.</p>
<ul>
<li><p>Install stunnel4</p></li>
<li><p>Create a config file in
<code>/etc/stunnel4/dns.conf</code></p></li>
</ul>
<pre><code>pid = /var/run/stunnel4/stunnel.pid
[dns]
accept = 853
accept = :::853
connect = 127.0.0.1:53
cert = /etc/letsencrypt/live/randomstring.org/fullchain.pem
key = /etc/letsencrypt/live/randomstring.org/privkey.pem
</code></pre>
<p>Substitute the locations of an appropriate SSL cert and key.</p>
<ul>
<li>Start stunnel4.</li>
</ul>
<p>-30- </p>
<p>I will assume you have a working DNS server listening on the default
port, 53, and that you have certbot or some other means of acquiring SSL
certs.</p>
<ul>
<li><p>Install stunnel4</p></li>
<li><p>Create a config file in
<code>/etc/stunnel4/dns.conf</code></p></li>
</ul>
<pre><code>pid = /var/run/stunnel4/stunnel.pid
[dns]
accept = 853
accept = :::853
connect = 127.0.0.1:53
cert = /etc/letsencrypt/live/randomstring.org/fullchain.pem
key = /etc/letsencrypt/live/randomstring.org/privkey.pem
</code></pre>
<p>Substitute the locations of an appropriate SSL cert and key.</p>
<ul>
<li>Start stunnel4.</li>
</ul>
<p>-30- </p>
Apple M1 MBP micro-review2021-02-17T14:34:27-05:002021-02-17T14:34:27-05:00-dsr-tag:blog.randomstring.org,2021-02-17:/2021/02/17/apple-m1-mbp-micro-review/
<p>My work-issued MacBook Pro (Retina, late 2013) began to break down:
the speakers fried, it was running out of memory (8GB), and then it
started rebooting spontaneously. I mentioned this and work bought a
replacement. Since I’m capable of working around exciting new bugs, they
sent me the newest M1 MacBookPro, with an Apple-designed and -produced
M1 8 core CPU.</p>
<p>Herewith, a micro-review. </p>
<p>My work-issued MacBook Pro (Retina, late 2013) began to break down:
the speakers fried, it was running out of memory (8GB), and then it
started rebooting spontaneously. I mentioned this and work bought a
replacement. Since I’m capable of working around exciting new bugs, they
sent me the newest M1 MacBookPro, with an Apple-designed and -produced
M1 8 core CPU.</p>
<p>Herewith, a micro-review. </p>
<p>Physically: it is slightly smaller than the 2013 MBP. The screen
bezels are a tiny bit shorter on all sides. The hinge has been moved
further back, and the trackpad is annoyingly larger. It now has more
physical movement, which I consider a bit of a minus. The ESC key is
where it should be, but the rest of the function key row has been
replaced by the touchbar, which is, as far as I can tell, 100%
gimcrackery. Mostly it shows spelling suggestions and helpfully informs
you when it thinks you are typing into a password box.</p>
<p>Total ports: 2 USB-C / thunderbolt! ports on the left, one of which
has to be used for power. One headphone/mic combo jack on the right.
That’s it. No more SD card, USB-A ports, HDMI, or nice row of LEDs to
let you know the battery charging status.</p>
<p>Operationally (after about an hour and a half?): this does not feel
significantly different from the 4-core i5 in the old machine. The extra
RAM is good. The camera is doing a little better job with brightness
levels. The speakers work.</p>
<p>It really doesn’t feel faster, and I have the seven-year-old one
right next to it.</p>
<p>The new processor is supposed to be roughly on par with my house
server’s Ryzen 3600. It doesn’t feel like it.</p>
<p>But let’s face it: I don’t stretch these machines. They run web
browsers, terminals, WireGuard, and LibreOffice.</p>
<p>If the old one could get a RAM upgrade and the speakers fixed, that
would have been just fine.</p>
<p>Annoyances: the wasteful touchbar thing. The excessively large
touchpad, which I keep brushing by accident while typing. The lack of
useful ports.</p>
users will learn things if they have motivation2021-01-17T12:45:26-05:002021-01-17T12:45:26-05:00-dsr-tag:blog.randomstring.org,2021-01-17:/2021/01/17/users-will-learn-things-if-they-have-motivation/
<p>I don’t know about your mother, but my mother is not even a power
user – Windows, hunt-and-peck typing – and she taught herself to use IRC
because that’s what the other people in her social group were using.</p>
<p>I assume she didn’t use any /command except /join – maybe not even
that, because if you’re only using one channel then you can have your
client autojoin – but that was enough to get her in. Presumably she
learned group etiquette on the fly, the way most people do.
</p>
<p>I don’t know about your mother, but my mother is not even a power
user – Windows, hunt-and-peck typing – and she taught herself to use IRC
because that’s what the other people in her social group were using.</p>
<p>I assume she didn’t use any /command except /join – maybe not even
that, because if you’re only using one channel then you can have your
client autojoin – but that was enough to get her in. Presumably she
learned group etiquette on the fly, the way most people do.
</p>
<p>People are all “I can’t use that, I’m too dumb, I can’t learn nerd
stuff” but before the browser era millions of non-nerds sat down with
friends, were guided through minimal instructions, and dealt with
inconsistent semi-hidden interfaces.</p>
<p>You’re all so focused on point-and-click that you think people won’t
learn stuff when it gets them what they want. Pro-tip: primates are good
at learning stuff that gets them what they want, and the things most
primates want most of the time are food, sex, status and socialization.
The Internet only became useful as a way of getting food in the last
decade, but it’s been doing well in the other three since the birth of
Usenet. Is easy nice? Yes. Is it necessary? No. Not for the right
motivation.</p>
assumptions2021-01-12T11:33:00-05:002021-01-12T11:33:00-05:00-dsr-tag:blog.randomstring.org,2021-01-12:/2021/01/12/assumptions/
<p>Coworker: the username was autofilling so I assumed it was correct.
But you know what they say about assuming.</p>
<p>Me: That it is indistinguishable from making a mistake, only you
didn’t realize you had even made a decision?</p>
<p>Coworker: the username was autofilling so I assumed it was correct.
But you know what they say about assuming.</p>
<p>Me: That it is indistinguishable from making a mistake, only you
didn’t realize you had even made a decision?</p>
a thing which should be obvious2020-12-05T18:57:40-05:002020-12-05T18:57:40-05:00-dsr-tag:blog.randomstring.org,2020-12-05:/2020/12/05/a-thing-which-should-be-obvious/
<p>A smart contract can prove that someone who knew a secret agreed to
the terms of the contract, but it can’t prove that someone who says they
aren’t party to that contract is lying.</p>
<p>A smart contract can prove that someone who knew a secret agreed to
the terms of the contract, but it can’t prove that someone who says they
aren’t party to that contract is lying.</p>
pseudovalidation techniques2020-12-01T16:30:20-05:002020-12-01T16:30:20-05:00-dsr-tag:blog.randomstring.org,2020-12-01:/2020/12/01/pseudovalidation-techniques/
<p>Pseudovalidation is a major goal of marketing and advertising.
Actually validating a claim is expensive and often boring. Why not just
make people feel like they’re important in some way?</p>
<p>But once you recognize it, pseudovalidation feels disrespectful:
these people are lying to me and don’t even care if I know it:</p>
<p>Pseudovalidation is a major goal of marketing and advertising.
Actually validating a claim is expensive and often boring. Why not just
make people feel like they’re important in some way?</p>
<p>But once you recognize it, pseudovalidation feels disrespectful:
these people are lying to me and don’t even care if I know it:</p>
<pre><code>Subject: Lunch?
Hi Dan,
My Head of Delivery asked me to reach out to you (see below) and offer to
buy you lunch through Uber Eats for a quick virtual meet and greet.
Here is a 1-minute video <URL/explainer> about what we
do and why PERSON would like to get on your radar.
Let me know if you think it’s a bad idea?
MARKETROID
---------- Forwarded message ----------
From: PERSON (no email address)
Date: Nov 18, 2020, 9:41 AM
Subject: Meeting with Dan
To: MARKETROID (no email address)
MARKETROID - I came across Dan’s LinkedIn profile. Here is the link
<yup, a linked-in profile>
Try to see if you can get an email and invite Dan to a virtual lunch.
I think Dan would be a great person to get in front of.
Thanks.
PERSON-diminutive-nickname
PERSON
Head of Delivery at COMPANY
Watch Our Software Development Humor Commercials </code></pre>
<p>Let’s see what we’ve got.</p>
<p>MARKETROID plays on our sympathy for them as a hard-working
MARKETROID who just wants to get their job done. They offer a small
bribe for our attention. As pseudovalidation that you have come to the
attention of PERSON, (who commands MARKETROID and is thus mighty and
powerful), they send a copy of an email which is curiously unconvincing
as the sort of email actual humans send to each other.</p>
<p>Note that at no time does MARKETROID say</p>
<ul>
<li>what COMPANY does</li>
<li>why it would be interesting to us</li>
<li>why they think we are clearly the people they need to sell to</li>
</ul>
<p>Nor is it normal for a salescritter or MARKETROID to forward internal
email to someone outside the company. Usually there’s about seventeen
lines of extralegal disclaimers at the bottom explicitly rejecting that
as an action compatible with continued employment.</p>
<p>Update, from a day later: as part of my job, I occasionally inspect
the company-wide spam filters to see whether they are effective. Guess
what a coworker determined was spam, with every word the same except
that it had my coworker’s name inserted instead of mine?</p>
<p>Note to salescritters: if your phrasing is creepy when it’s repeated
to different people, it really is a bad idea.</p>
this one trick always backfires2020-11-17T09:10:16-05:002020-11-17T09:10:16-05:00-dsr-tag:blog.randomstring.org,2020-11-17:/2020/11/17/this-one-trick-always-backfires/
<p>In the last few years, email marketers have started sending streams
of messages that reference each other, apparently attempting to induce a
feeling of an existing relationship, and then shame that I am somehow
not carrying my end of it.</p>
<p>This does not work anymore. </p>
<p>In the last few years, email marketers have started sending streams
of messages that reference each other, apparently attempting to induce a
feeling of an existing relationship, and then shame that I am somehow
not carrying my end of it.</p>
<p>This does not work anymore. </p>
<p>My internal evaluator has been so overloaded by these pathetic
(literally; look it up) entreaties that I am starting to view
non-marketing emails with a skeptical eye. “Oh really?” asks my stream
of consciousness. “My boss wants to meet at a different time tomorrow?
You expect me to fall for that? NEVER.”</p>
<p>Plaintive whines about “Did this email slip through the cracks?” or
“Can we reschedule? [an appointment that was never made]” are now
instantly rejected.</p>
<p>Tough noogies, marketers.</p>
Amazon Fire HD 10 (2019)2020-10-17T18:25:53-04:002020-10-17T18:25:53-04:00-dsr-tag:blog.randomstring.org,2020-10-17:/2020/10/17/amazon-fire-hd-10-2019-/
<p>I began an entry in July of 2018 with this:</p>
<blockquote>
<p>The Amazon Kindle Fire HD10 (2017) is the high-end tablet of their
line. The hardware is mediocre and the software is quite bad. I do not
recommend you purchase this or any other Fire tablet… unless you have
some very specific requirements.</p>
</blockquote>
<p>I can now say this:</p>
<p>The Amazon Kindle Fire HD10 (2019) is the high-end tablet of their
line. The hardware is mediocre and the software is quite bad. I can
recommend that you purchase this tablet if you are comfortable with the
use of <code>adb</code> and command line tools. It is cheap ($95 on
Prime Day) and capable of doing a number of useful things, such as…</p>
<p>I began an entry in July of 2018 with this:</p>
<blockquote>
<p>The Amazon Kindle Fire HD10 (2017) is the high-end tablet of their
line. The hardware is mediocre and the software is quite bad. I do not
recommend you purchase this or any other Fire tablet… unless you have
some very specific requirements.</p>
</blockquote>
<p>I can now say this:</p>
<p>The Amazon Kindle Fire HD10 (2019) is the high-end tablet of their
line. The hardware is mediocre and the software is quite bad. I can
recommend that you purchase this tablet if you are comfortable with the
use of <code>adb</code> and command line tools. It is cheap ($95 on
Prime Day) and capable of doing a number of useful things, such as…</p>
<ul>
<li>reading comics</li>
<li>reading ebooks</li>
<li>watching YouTube (I recommend NewPipe)</li>
<li>watching other video streaming services</li>
<li>controlling other electronics when a web-based or Android control
application is available</li>
<li>casual web browsing (get Firefox, install uBlock Origin)</li>
</ul>
<p>There are guides on xda-developers to installing the Google store
(you’ll need 4 apks), installing a new launcher, disabling the
horrendous Amazon launcher, and even installing a new keyboard, which
was sorely lacking on the 2017 edition. All of those things require
developer mode and connecting <code>adb</code> (the Android debugger)
via a USB cable. If that’s not a mystery to you, and you aren’t looking
to run high-end games, this is not an awful machine. And it is
cheap.</p>
when did I start to expect good fonts?2020-10-04T15:36:29-04:002020-10-04T15:36:29-04:00-dsr-tag:blog.randomstring.org,2020-10-04:/2020/10/04/when-did-i-start-to-expect-good-fonts-/
<p>In the beginning of my experience, it wasn’t that computers had fonts
so much as each computer had A Font, and that was how the computer
talked to you. All of them were quite low resolution; blocky and
bad.</p>
<p>Now I expect every character to be drawn in an appropriate, smooth,
curved, and informatively differentiated typeface.</p>
<p>When did that change start, and when was it complete?
</p>
<p>In the beginning of my experience, it wasn’t that computers had fonts
so much as each computer had A Font, and that was how the computer
talked to you. All of them were quite low resolution; blocky and
bad.</p>
<p>Now I expect every character to be drawn in an appropriate, smooth,
curved, and informatively differentiated typeface.</p>
<p>When did that change start, and when was it complete?
</p>
<p>To a certain extent, it begins with Macintosh, the first
widely-available system to offer a GUI on an all-drawn screen (rather
than character cells) and the LaserWriter, a printer whose pixels were
not visible without a magnifying glass. I didn’t own one of those,
though. What I did own was a 80386SX, a 32-bit CPU with a 16-bit bus,
which had an astonishing 2MB of RAM and a 130MB hard disk, supporting an
extended VGA card which could manage 256 colors at 1024x768 resolution.
We used to think that was hot stuff.</p>
<p>Word for Windows was the first software I had regular access to that
could manage some semblance of fidelity to a typeface on screen (not
high fidelity) and on paper (not bad, really).</p>
<p>Convincing screen typography didn’t really materialize until 2000 or
so, when higher-resolution displays could show TrueType scalable fonts.
Before that, anything I saw on screen was a poor imitation of a book;
sometime after that, I started expecting a close match.</p>
dice rolls2020-09-20T14:35:03-04:002020-09-20T14:35:03-04:00-dsr-tag:blog.randomstring.org,2020-09-20:/2020/09/20/dice-rolls/
<p>How the RPG rules describe dice rolls:<br/>
this result on the dice is a critical success,<br/>
this range is a success,<br/>
that range is a failure,<br/>
this result is a critical failure.</p>
<p>How every RPG player feels about it:<br/>
this is a critical success,<br/>
this is nearly a critical success,<br/>
this is an excellent success,<br/>
these are very good successes,<br/>
this is a success,<br/>
that’s just a little failure,<br/>
that’s a failure,<br/>
these are failures too,<br/>
that result is a critical failure. </p>
<p>How the RPG rules describe dice rolls:<br />
this result on the dice is a critical success,<br />
this range is a success,<br />
that range is a failure,<br />
this result is a critical failure.</p>
<p>How every RPG player feels about it:<br />
this is a critical success,<br />
this is nearly a critical success,<br />
this is an excellent success,<br />
these are very good successes,<br />
this is a success,<br />
that’s just a little failure,<br />
that’s a failure,<br />
these are failures too,<br />
that result is a critical failure. </p>
what software does a firewall run, anyway?2020-09-11T11:57:49-04:002020-09-11T11:57:49-04:00-dsr-tag:blog.randomstring.org,2020-09-11:/2020/09/11/what-software-does-a-firewall-run-anyway-/
<p>What’s running on the firewall? A big list follows, with discussion.
</p>
<p>What’s running on the firewall? A big list follows, with discussion.
</p>
<ul>
<li>ACPId - reports on thermal performance</li>
<li>atd - executes delayed jobs via at</li>
<li>cron - executes repeating jobs, like the local backup, the remote
backup, and the automated package updater.</li>
<li>dbus-daemon - nearly useless, but Linux more or less requires
it</li>
<li>ddclient - dynamic DNS client updater, fires off an update when we
get a new external address</li>
<li>dhclient - DHCP client, gets external address from the fiber
ISP</li>
<li>dhcp6c - DHCPv6 client, not currently in use but plausible</li>
<li>dhcpd - DHCP server, for handing out addresses on the inside
network. Has a failover arrangement with another server</li>
<li>getty - console management</li>
<li>irqbalance - a daemon on SMP Linux systems that evens out load
across cores</li>
<li>postfix - handling local mail.</li>
<li>radvd - IPv6 routing advertisements</li>
<li>rsyslogd - the reliable syslog daemon</li>
<li>snmpd - statistics reporting</li>
<li>sshd - SSH daemon, allows access only from internal IPs</li>
<li>systemd-udevd - last remnant of systemd, managing device names</li>
<li>unbound - DNS caching resolver</li>
<li>vnstatd - network bandwidth monitor</li>
</ul>
<p>Not appearing because they are kernel tasks:</p>
<ul>
<li>interface configuration</li>
<li>wireguard tunnels</li>
<li>routing</li>
<li>firewalling</li>
<li>IPv6 tunnel</li>
</ul>
<p>I will get around to discussing them at a later date.</p>
<p>What’s not running on the firewall?</p>
<ul>
<li>apache, nginx, or any other webserver</li>
<li>postgresql, mariadb, or any other database</li>
<li>mail service for other machines. This one is a toss-up: mail service
is relatively low-impact for modern hardware and low (single family)
volumes. But it has a lot of moving parts and implies lots of storage,
which impacts backup/restore time. As much as possible, I’d like the
restoration process for this firewall to be fast. So mail is on a
different, more resilient server.</li>
<li>an authoritative DNS server. unbound looks to many other sources,
but it isn’t the source of my DNS authority for internal or external
networks. This is more of a toss-up than mail, because DNS service is
quite small.</li>
<li>systemd. We’re using sysvinit because it is much smaller, has fewer
moving parts, and does not annoy me anywhere near as much.</li>
<li>daemontools, or a similar service manager. daemontools is great for
semi-reliable services, because it will fire them back up again when
they terminate. On a firewall, though, I want everything to be so
reliable that any premature death is a major pain point that indicates I
need to fix it ASAP.</li>
</ul>
quoting myself, part n+32020-09-10T15:51:10-04:002020-09-10T15:51:10-04:00-dsr-tag:blog.randomstring.org,2020-09-10:/2020/09/10/quoting-myself-part-n-3/
<p>For every computer system, someone needs to know what they are doing,
and check up on it when something goes wrong. That person is the
sysadmin.</p>
<blockquote>
<p>If you don’t know who the sysadmin is, it’s you.</p>
</blockquote>
<p>It’s just like everything else in life: if you care about a thing,
you are responsible for taking care of it. If nobody takes care of it,
it decays and dies.</p>
<p>For every computer system, someone needs to know what they are doing,
and check up on it when something goes wrong. That person is the
sysadmin.</p>
<blockquote>
<p>If you don’t know who the sysadmin is, it’s you.</p>
</blockquote>
<p>It’s just like everything else in life: if you care about a thing,
you are responsible for taking care of it. If nobody takes care of it,
it decays and dies.</p>
last spinning boot disk replaced2020-09-07T11:35:28-04:002020-09-07T11:35:28-04:00-dsr-tag:blog.randomstring.org,2020-09-07:/2020/09/07/last-spinning-boot-disk-replaced/
<p>Today I replaced the last spinning root disk in the house. The media
server still has 4x3TB spinning disks, but the old 120GB spinning boot
disk has been replaced by a cheap 1 TB SSD. Boot times improved
dramatically, and the database access for various things now feels
instantaneous.</p>
<p>Process follows, but it’s nothing extraordinary.</p>
<p>Today I replaced the last spinning root disk in the house. The media
server still has 4x3TB spinning disks, but the old 120GB spinning boot
disk has been replaced by a cheap 1 TB SSD. Boot times improved
dramatically, and the database access for various things now feels
instantaneous.</p>
<p>Process follows, but it’s nothing extraordinary.</p>
<ol type="1">
<li>I shut down the machine</li>
<li>Disconnected the four storage drives, just to be careful</li>
<li>Connected the new SSD</li>
<li>Booted to single user mode</li>
<li>Partitioned the new SSD (sdb1 and sdb2, for root and swap)</li>
<li>dd if=/dev/sda1 of=/dev/sdb1 bs=1M</li>
<li>that took about 30 minutes</li>
<li>grub-install /dev/sdb</li>
<li>e2fsck -f /dev/sdb1</li>
<li>resize2fs /dev/sdb1</li>
<li>update-grub</li>
<li>Double-checked UUIDs from /dev/disks/by-uuid and
/boot/grub/grub.cfg</li>
<li>shut down the machine</li>
<li>unplugged the old root drive, moved the SSD over to that SATA port,
reconnected the storage drives</li>
<li>power up</li>
<li>marvel at the speed of boot, investigate other issues like the
ethernet claiming to be flaky (the plug was loose; replugging solved
it).</li>
</ol>
please focus your attention2020-08-04T16:49:11-04:002020-08-04T16:49:11-04:00-dsr-tag:blog.randomstring.org,2020-08-04:/2020/08/04/please-focus-your-attention/
<p>One thing that UNIX users have that Mac and Windows users don’t: it’s
generally quite easy to change their window manager theme – and to
write/draw their own.</p>
<p>Window decorations – a frame, a titlebar, some buttons – are handled
by the X11 window manager, which is itself a replaceable part. Window
managers range from minimalist exercises in reductionism through gaudy
feature-festivals like Enlightenment, the original perpetrator of
shaped, translucent and transparent effects. But…
</p>
<p>One thing that UNIX users have that Mac and Windows users don’t: it’s
generally quite easy to change their window manager theme – and to
write/draw their own.</p>
<p>Window decorations – a frame, a titlebar, some buttons – are handled
by the X11 window manager, which is itself a replaceable part. Window
managers range from minimalist exercises in reductionism through gaudy
feature-festivals like Enlightenment, the original perpetrator of
shaped, translucent and transparent effects. But…
</p>
<p>But most window manager themes get something quite wrong. They focus
lots of your attention on the active window, which is good, and then
they make the decorations for all the other windows dim, drab – and
frequently unreadable. Here’s my insight:</p>
<p>The purpose of decoration on non-active windows is to have a
maximally readable title, so that you can differentiate them and select
the right one.</p>
<p>The purpose of decoration on the active window is to stand out from
the rest, so that at a glance toward the screen you know which one is
active.</p>
<p>Now, I said that it’s easy to create your own window manager theme –
and so I’ve followed through and created a series of themes for XFWM,
the window manager that is part of the XFCE desktop. The latest is
designed for large displays, 4K and more. The active window gets a
bright, rounded border (in a configurable color) and the inactive
windows get thin (black/white/black, 3 pixels total) frames and high
contrast black on light grey titles.</p>
<p>And, as with all software one writes oneself, it doesn’t have to
please anyone except me.</p>
quote of the day entry n+12020-07-15T14:53:20-04:002020-07-15T14:53:20-04:00-dsr-tag:blog.randomstring.org,2020-07-15:/2020/07/15/quote-of-the-day-entry-n-1/
<blockquote>
<p>“Magic”, applied to technology, is an indictment, not a
compliment.</p>
</blockquote>
<p>– me, July 15 2020. </p>
<blockquote>
<p>“Magic”, applied to technology, is an indictment, not a
compliment.</p>
</blockquote>
<p>– me, July 15 2020. </p>
validation2020-06-23T12:56:24-04:002020-06-23T12:56:24-04:00-dsr-tag:blog.randomstring.org,2020-06-23:/2020/06/23/validation/
<p>A departing co-op (student intern, paid) said that she had been told
by another co-op that the company’s keywords were “clever, competent,
and kind” and that she was amazed to discover that we all lived up to
that.</p>
<p>Since I was the first person at the company to start using that
phrase – in employment advertisements, where I was describing necessary
traits of the people I wanted to hire – I am entirely chuffed.
</p>
<p>A departing co-op (student intern, paid) said that she had been told
by another co-op that the company’s keywords were “clever, competent,
and kind” and that she was amazed to discover that we all lived up to
that.</p>
<p>Since I was the first person at the company to start using that
phrase – in employment advertisements, where I was describing necessary
traits of the people I wanted to hire – I am entirely chuffed.
</p>
self-reflection: when do I post?2020-06-18T12:37:46-04:002020-06-18T12:37:46-04:00-dsr-tag:blog.randomstring.org,2020-06-18:/2020/06/18/self-reflection-when-do-i-post-/
<div class="sourceCode" id="cb1"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb1-1"><a aria-hidden="true" href="#cb1-1" tabindex="-1"></a></span>
<span id="cb1-2"><a aria-hidden="true" href="#cb1-2" tabindex="-1"></a><span class="fu">ls</span> <span class="at">-alt</span> <span class="at">--time-style</span> +%A<span class="kw">|</span><span class="fu">awk</span> <span class="at">-F</span> <span class="dt">\ </span> <span class="at">-e</span> <span class="st">'{print $6}'</span> <span class="kw">|</span><span class="fu">sort</span><span class="kw">|</span> <span class="fu">uniq</span> <span class="at">-c</span> <span class="kw">|</span> <span class="fu">sort</span> <span class="at">-nr</span></span>
<span id="cb1-3"><a aria-hidden="true" href="#cb1-3" tabindex="-1"></a></span>
<span id="cb1-4"><a aria-hidden="true" href="#cb1-4" tabindex="-1"></a><span class="ex">76</span> Friday</span>
<span id="cb1-5"><a aria-hidden="true" href="#cb1-5" tabindex="-1"></a><span class="ex">47</span> Thursday</span>
<span id="cb1-6"><a aria-hidden="true" href="#cb1-6" tabindex="-1"></a><span class="ex">19</span> Tuesday</span>
<span id="cb1-7"><a aria-hidden="true" href="#cb1-7" tabindex="-1"></a><span class="ex">18</span> Wednesday</span>
<span id="cb1-8"><a aria-hidden="true" href="#cb1-8" tabindex="-1"></a><span class="ex">15</span> Saturday</span>
<span id="cb1-9"><a aria-hidden="true" href="#cb1-9" tabindex="-1"></a><span class="ex">12</span> Monday</span>
<span id="cb1-10"><a aria-hidden="true" href="#cb1-10" tabindex="-1"></a> <span class="ex">4</span> Sunday</span></code></pre></div>
<div class="sourceCode" id="cb1"><pre
class="sourceCode bash"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="fu">ls</span> <span class="at">-alt</span> <span class="at">--time-style</span> +%A<span class="kw">|</span><span class="fu">awk</span> <span class="at">-F</span> <span class="dt">\ </span> <span class="at">-e</span> <span class="st">'{print $6}'</span> <span class="kw">|</span><span class="fu">sort</span><span class="kw">|</span> <span class="fu">uniq</span> <span class="at">-c</span> <span class="kw">|</span> <span class="fu">sort</span> <span class="at">-nr</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="ex">76</span> Friday</span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="ex">47</span> Thursday</span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="ex">19</span> Tuesday</span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a><span class="ex">18</span> Wednesday</span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a><span class="ex">15</span> Saturday</span>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a><span class="ex">12</span> Monday</span>
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true" tabindex="-1"></a> <span class="ex">4</span> Sunday</span></code></pre></div>
the internet is railways, not highways2020-06-16T08:04:39-04:002020-06-16T08:04:39-04:00-dsr-tag:blog.randomstring.org,2020-06-16:/2020/06/16/the-internet-is-railways-not-highways/
<p>Internet Fast Lanes: Every time somebody says “Fast Lane” in this
argument, I get a little more upset. The Internet doesn’t have fast
lanes and slow lanes.</p>
<p>The Internet is not a highway.</p>
<p>The Internet is a railway system.</p>
<p>Internet Fast Lanes: Every time somebody says “Fast Lane” in this
argument, I get a little more upset. The Internet doesn’t have fast
lanes and slow lanes.</p>
<p>The Internet is not a highway.</p>
<p>The Internet is a railway system.</p>
<p>The Internet is made up of train tracks and switches. Every train
travels at the same speed along a given track. If you want to increase
the traffic, you can raise the speed on the whole section of track, or
you can lay down another track next to it.</p>
<p>When you pay for Internet service, you pay for a section of track
(two, actually, one in each direction) between your house and the
nearest train station owned by your ISP. You will never receive more
trains than can fit down the track you paid for, and you will never be
able to send more trains than can fit on the outbound track.</p>
<p>As long as a given track is being used less than 100% (nose-to-tail
trains), all traffic will flow perfectly. Tracks cannot be used at more
than 100%, because you can’t fit another train on. If the local station
master wants to put another train on, some train waiting to go out must
be delayed. Only a few trains can fit on the siding, and if more come in
than can be handled, some trains will be disintegrated.</p>
<p>The decisions that an ISP can make are:</p>
<ul>
<li><p>increase the speed of a track</p></li>
<li><p>increase the number of tracks between two points.</p></li>
<li><p>decide which trains waiting on the siding get to go through, and
which ones are disintegrated.</p></li>
</ul>
<p>” Fast Lane” means they want an extra fee to not disintegrate your
trains so often.</p>
<p>“Net Neutrality” means that they aren’t allowed to look at your
train’s origin, destination and manifest before deciding to disintegrate
it or not.</p>
<p>Therefore: if your tracks are not utilized 100%, no trains need to be
disintegrated. The disintegration is a system of last resort, which you
turn to only in extreme circumstances, because you could not build
capacity to keep up with demand. “Fast Lane” is a sign of a broken
system, which can be fixed by managing your systems properly and
predicting demand.</p>
when you want to work with text2020-06-13T12:47:26-04:002020-06-13T12:47:26-04:00-dsr-tag:blog.randomstring.org,2020-06-13:/2020/06/13/when-you-want-to-work-with-text/
<p>You probably already know this, but as a reminder:</p>
<ul>
<li><p><code>sed</code> is for inserting, replacing and deleting.
<code>-i</code> causes sed to edit in place.</p></li>
<li><p><code>pandoc</code> is for converting between text formats like
HTML, Markdown, RST, TeX, various wikis…</p></li>
<li><p><code>calibre</code> has command-line subtools like
<code>ebook-convert</code> which can produce good EPUB from lots of
other formats.</p></li>
<li><p><code>libreoffice</code> handles typical office document tasks.
Graphical.</p></li>
<li><p><code>sigil</code> is specialized as an EPUB authoring tool.
Graphical.</p></li>
<li><p><code>scribus</code> can do page-layout tasks up to full daily
newspapers. Graphical.</p></li>
</ul>
<p>With those and a good text editor, you can produce good-looking
documents ranging from a business letter through a book.</p>
<p>You probably already know this, but as a reminder:</p>
<ul>
<li><p><code>sed</code> is for inserting, replacing and deleting.
<code>-i</code> causes sed to edit in place.</p></li>
<li><p><code>pandoc</code> is for converting between text formats like
HTML, Markdown, RST, TeX, various wikis…</p></li>
<li><p><code>calibre</code> has command-line subtools like
<code>ebook-convert</code> which can produce good EPUB from lots of
other formats.</p></li>
<li><p><code>libreoffice</code> handles typical office document tasks.
Graphical.</p></li>
<li><p><code>sigil</code> is specialized as an EPUB authoring tool.
Graphical.</p></li>
<li><p><code>scribus</code> can do page-layout tasks up to full daily
newspapers. Graphical.</p></li>
</ul>
<p>With those and a good text editor, you can produce good-looking
documents ranging from a business letter through a book.</p>
spammers keep on spamming2020-06-11T07:13:57-04:002020-06-11T07:13:57-04:00-dsr-tag:blog.randomstring.org,2020-06-11:/2020/06/11/spammers-keep-on-spamming/
<p>Comments go via email; if they contribute, I put them up. If they
don’t, you never see them.</p>
<p>Don’t use the new search engine Privado (no link on purpose.) They
keep spamming me with requests to mention them in a positive light.
That’s not going to happen.</p>
<p>Comments go via email; if they contribute, I put them up. If they
don’t, you never see them.</p>
<p>Don’t use the new search engine Privado (no link on purpose.) They
keep spamming me with requests to mention them in a positive light.
That’s not going to happen.</p>
why perl is the best language2020-06-08T20:35:45-04:002020-06-08T20:35:45-04:00-dsr-tag:blog.randomstring.org,2020-06-08:/2020/06/08/why-perl-is-the-best-language/
<p>Perl is the best language if it’s the language that you remember well
enough.</p>
<p>My father loves math puzzles. He told me about one he was working on,
and I did a quick estimate of how complex the answer space was and told
him that it would be faster to have a computer try out every answer than
to be clever about solving it.</p>
<p>Of course he wanted me to prove that, so I had to brush off Perl or
Python. For some reason, Perl felt better.
</p>
<p>Perl is the best language if it’s the language that you remember well
enough.</p>
<p>My father loves math puzzles. He told me about one he was working on,
and I did a quick estimate of how complex the answer space was and told
him that it would be faster to have a computer try out every answer than
to be clever about solving it.</p>
<p>Of course he wanted me to prove that, so I had to brush off Perl or
Python. For some reason, Perl felt better.
</p>
<p>The puzzle: assign the numbers 1 through 9 to letters without
repetition or omission in order to solve the following equations:</p>
<ol type="1">
<li>AB x C = DE</li>
<li>DE + FG = HI</li>
</ol>
<pre class="#!perl"><code>
for (my $A=1; $A <= 9; $A++) {
for (my $B=1; $B <= 9; $B++) {
next if $A == $B;
for (my $C=1; $C <= 9; $C++) {
next if $B == $C;
next if $A == $C;
for (my $D=1; $D <= 9; $D++) {
next if $C == $D;
next if $B == $D;
next if $A == $D;
for (my $E=1; $E <= 9; $E++) {
next if $D == $E;
next if $C == $E;
next if $B == $E;
next if $A == $E;
for (my $F=1; $F <= 9; $F++) {
next if $E == $F;
next if $D == $F;
next if $C == $F;
next if $B == $F;
next if $A == $F;
for (my $G=1; $G <= 9; $G++) {
next if $F == $G;
next if $E == $G;
next if $D == $G;
next if $C == $G;
next if $B == $G;
next if $A == $G;
for (my $H=1; $H <= 9; $H++) {
next if $G == $H;
next if $F == $H;
next if $E == $H;
next if $D == $H;
next if $C == $H;
next if $B == $H;
next if $A == $H;
for (my $I=1; $I <= 9; $I++) {
next if $H == $I;
next if $G == $I;
next if $F == $I;
next if $E == $I;
next if $D == $I;
next if $C == $I;
next if $B == $I;
next if $A == $I;
if (((10 * $A + $B ) * $C) == (( 10* $D) + $E)) {
if ((10 * $D + $E) + (10 * $F ) + $G == (( 10 * $H ) + $I )) {
print $A.$B."x".$C."=".$D.$E." ".$D.$E."+".$F.$G."=".$H.$I."\n";
}
}
}}}}}}}}};</code></pre>
<p>oh, right, the answer:</p>
<ul>
<li><p>17x4=68</p></li>
<li><p>68+25=93</p></li>
</ul>
<p>Takes 1.25 seconds to run on my old Macbook, and 0.74 seconds on my
house server.</p>
I get spam2020-06-08T08:05:53-04:002020-06-08T08:05:53-04:00-dsr-tag:blog.randomstring.org,2020-06-08:/2020/06/08/i-get-spam/
<p>I got spammed by Privado – no link, they really want a link – which
claims to be a privacy-enhanced search engine. Investigating their
privacy policy, you can see that they are a proxy for Microsoft Bing. In
effect, they exist in order to put ads in front of Bing searches: it’s
another company eking out a profit margin between ads from ad networks
and paying AWS fees.</p>
<p>Anti-recommended. </p>
<p>I got spammed by Privado – no link, they really want a link – which
claims to be a privacy-enhanced search engine. Investigating their
privacy policy, you can see that they are a proxy for Microsoft Bing. In
effect, they exist in order to put ads in front of Bing searches: it’s
another company eking out a profit margin between ads from ad networks
and paying AWS fees.</p>
<p>Anti-recommended. </p>
how to make mass modifications in LDAP2020-05-28T19:11:00-04:002020-05-28T19:11:00-04:00-dsr-tag:blog.randomstring.org,2020-05-28:/2020/05/28/how-to-make-mass-modifications-in-ldap/
<p>In the spirit of “the best way to get a correct answer is to post an
obviously wrong answer on USENET”, I hereby present the most efficient
method of mass-alteration of LDAP user entities I can think of.</p>
<p>You probably shouldn’t do this.</p>
<p>In the spirit of “the best way to get a correct answer is to post an
obviously wrong answer on USENET”, I hereby present the most efficient
method of mass-alteration of LDAP user entities I can think of.</p>
<p>You probably shouldn’t do this.</p>
<p>As you know, LDAP is a terrible protocol for getting basic user
information and handling authentication of them. You also probably know
that it is a well-established standard, and so it is likely to be among
(or the sole) method of getting authentication in your new application
without maintaining yet another username/password database. Also, the
replacements for LDAP tend to want to use LDAP as a source of
knowledge.</p>
<p>There is, effectively, one open-source LDAP server: OpenLDAP, also
called <code>slapd</code>. There are effective but non-powerful tools to
manipulate the data: <code>ldapsearch</code> and
<code>ldapmodify</code>. Do not be deceived by the existence of
<code>ldapadd</code> and <code>ldapdelete</code>: those are
<code>ldapmodify</code> in disguise.</p>
<p>When setting up users in that tenuous space between four and many –
if there are four, you can probably ask them all to come sit down and
type in a password, whereas <em>many</em> is the number where that just
isn’t feasible – I have found that the best plan is as follows:</p>
<ul>
<li><p>Construct an ldif file for your users with the help of
migrationtools, which is probably in a package of that name.</p></li>
<li><p>Edit the ldif file with the help of vim or emacs, whichever makes
you happiest. Use lots of regexps.</p></li>
<li><p>For example, the form:</p></li>
</ul>
<pre><code>s/cn: \(\a*\) \(\a*\)/cn: \1 \2\rgn: \1/
</code></pre>
<p>That looks for common names (Maeve Binghy), separates them by the
first space, and writes the given name field on the next line. You can
do a similar thing with <code>sn: \2</code> to get the surname field.
There are falsehoods you should know about names, and this violates
several of them – but it gets you going.</p>
<ul>
<li><p>Then make careful edits.</p></li>
<li><p>Then delete all the dn’s that you no longer care about and
re-insert them. If you grep the dn: field out of your ldif into a new
one, then remove the prefix dn:, <code>ldapdelete</code> will take that.
Make sure you have blank lines separating them.</p></li>
</ul>
<p>There, I told you it was awful.</p>
<p>UPDATE: Apparently I’m not the only one.
<code>apt show ldapvi</code>:</p>
<pre><code>Package: ldapvi
Version: 1.7-10+b3
Section: text
Maintainer: Rhonda D'Vine <rhonda@debian.org>
Homepage: http://www.lichteblau.com/ldapvi/
APT-Sources: http://http.debian.net/debian buster/main amd64 Packages
Description: perform an LDAP search and update results using a text editor
From a first glance ldapvi looks like ldapsearch: You search for entries in
the ldap database. But the results get opened in your preferred editor, and
you can change, add or delete entries from there. After you are done you quit
the editor and ldapvi offers you several options: View your changes as LDIF,
commit changes or discard them.</code></pre>
<p>I rest my case.</p>
things to check2020-05-15T15:32:55-04:002020-05-15T15:32:55-04:00-dsr-tag:blog.randomstring.org,2020-05-15:/2020/05/15/things-to-check/
<ul>
<li>Is it plugged in?</li>
<li>At both ends?</li>
<li>Does the other end work with something else?</li>
<li>Are all the power switches on? Including the one on the strip, the
one on the back, and the one that’s not connected?</li>
<li>Is DNS working?</li>
<li>Are you out of disk space?</li>
<li>Are you out of inodes?</li>
<li>Where are the logs?</li>
<li>What do the logs say?</li>
<li>Have you ever gotten it to work before?</li>
</ul>
<p>This entry brought to you by being out of disk space, a day after I
asked for more disk space as a precautionary measure.</p>
<ul>
<li>Is it plugged in?</li>
<li>At both ends?</li>
<li>Does the other end work with something else?</li>
<li>Are all the power switches on? Including the one on the strip, the
one on the back, and the one that’s not connected?</li>
<li>Is DNS working?</li>
<li>Are you out of disk space?</li>
<li>Are you out of inodes?</li>
<li>Where are the logs?</li>
<li>What do the logs say?</li>
<li>Have you ever gotten it to work before?</li>
</ul>
<p>This entry brought to you by being out of disk space, a day after I
asked for more disk space as a precautionary measure.</p>
email disclaimers: even when they improve, they fail2020-04-17T11:09:56-04:002020-04-17T11:09:56-04:00-dsr-tag:blog.randomstring.org,2020-04-17:/2020/04/17/email-disclaimers-even-when-they-improve-they-fail/
<p>Email disclaimers are stupid and they make your company look
stupid.</p>
<p>The only email disclaimer that seems to have any legal effect
whatsoever is when a lawyer says “This email does not create a client
confidentiality relationship.” All others are completely bogus. The
lawyer one is almost bogus, since it is a reminder that should not be
needed – but apparently a lot of people get confused easily. Law is like
that.</p>
<p>A common feature of bogus disclaimers is that they tell the reader
that if they aren’t the proper recipient, they should stop reading
immediately. You know, at the end of the email. Very clever.</p>
<p>I found a dubious improvement today: a company sent me an email with
a disclaimer that was referenced via a URL. So: you get to the bottom of
the email, find a link to a disclaimer, and then click on it to go
retrieve it and read it. The punchline: “you are prohibited from reading
this email”.</p>
<p>Great work, people. Your mission is done.</p>
<p>Since you have read this far, I would like to point out that you, my
reader, are now bound by an agreement. <a href="https://randomstring.org/~dsr/eula.html">You can find the details
here.</a></p>
<p>Email disclaimers are stupid and they make your company look
stupid.</p>
<p>The only email disclaimer that seems to have any legal effect
whatsoever is when a lawyer says “This email does not create a client
confidentiality relationship.” All others are completely bogus. The
lawyer one is almost bogus, since it is a reminder that should not be
needed – but apparently a lot of people get confused easily. Law is like
that.</p>
<p>A common feature of bogus disclaimers is that they tell the reader
that if they aren’t the proper recipient, they should stop reading
immediately. You know, at the end of the email. Very clever.</p>
<p>I found a dubious improvement today: a company sent me an email with
a disclaimer that was referenced via a URL. So: you get to the bottom of
the email, find a link to a disclaimer, and then click on it to go
retrieve it and read it. The punchline: “you are prohibited from reading
this email”.</p>
<p>Great work, people. Your mission is done.</p>
<p>Since you have read this far, I would like to point out that you, my
reader, are now bound by an agreement. <a
href="https://randomstring.org/~dsr/eula.html">You can find the details
here.</a></p>
secure-ish DNS for small environments2020-03-12T09:24:31-04:002020-03-12T09:24:31-04:00-dsr-tag:blog.randomstring.org,2020-03-12:/2020/03/12/secure-ish-dns-for-small-environments/
<p>Who do you trust? And do you trust them indefinitely far into the
future?</p>
<p>If you have specific reasons to believe you will be targetted by an
interested, competent, resourceful attacker: you need serious
information security measures, which will be painful and potentially
expensive in both time and money. I have no such specific fears, so I’m
merely interested in protecting my household against generalized
attacks, the sort of thing that Google and Facebook and Amazon and every
advertiser in the world carries out as a matter of course.</p>
<p>In this installment, I’m going to increase the difficulty of tracking
my household network via intercepting DNS requests. I will assume you
know a fair amount about DNS and feel comfortable configuring daemons
and running them – this isn’t a step-by-step HowTo.</p>
<p>Who do you trust? And do you trust them indefinitely far into the
future?</p>
<p>If you have specific reasons to believe you will be targetted by an
interested, competent, resourceful attacker: you need serious
information security measures, which will be painful and potentially
expensive in both time and money. I have no such specific fears, so I’m
merely interested in protecting my household against generalized
attacks, the sort of thing that Google and Facebook and Amazon and every
advertiser in the world carries out as a matter of course.</p>
<p>In this installment, I’m going to increase the difficulty of tracking
my household network via intercepting DNS requests. I will assume you
know a fair amount about DNS and feel comfortable configuring daemons
and running them – this isn’t a step-by-step HowTo.</p>
<p>Let’s start with an overview of what we’re working with. This is the
house network of an opinionated sysadmin, with a handful of users
ranging from a former director of technical support for a major network
through some teenagers who like to play games. I prefer to optimize for
cost, with the proviso that I discount my cost of designing, installing
and maintaining systems significantly.</p>
<p>There is one internet connection, which hands off as a gigabit
ethernet port. I have an overkill-spec firewall, previously documented
on this blog. There’s a general purpose server that I expect to be up
nearly continuously, and then a bunch of client machines and access
points and so forth.</p>
<p>I already run an authoritative DNS server (bind) for internal service
on the server, and a caching resolving service (unbound) on the
firewall. I block access to Google’s 8.8.8.8 and 8.8.4.4 DNS resolvers,
because of an annoying interaction between ChromeOS devices and the odd
static IPv6 setup.</p>
<p>My goal is to reduce the analyzability of our DNS traffic. The
current state is that unbound and bind both know about the root servers,
so we don’t directly query the ISP’s DNS servers and so they don’t get
the easiest possible log. Instead, they would have to direct a router
upstream of us to log all port 53 requests. That’s a little more work
for them, but not much. And it’s only a little data, which costs little
to store against a rainy day when you suddenly want to find out my
history and correlate it against my other suspicious activities, like
voting and being kind to people who ask for help.</p>
<p>If all the root servers and TLD servers spoke DNS-over-TLS, this
problem would be solved immediately. That’s not the case.</p>
<p>There are lots (dozens!) of public-facing DNS servers that do speak
DNS-over-TLS. Some of them have explicit no-logging policies. My policy
decision here is to have unbound use at least a dozen of them as
forwarders.</p>
<p>Unbound will serve as a local cache, and forward requests over TLS to
the multiple upstream resolvers; it will know about local domains and
forward those to the bind server. The bind server will treat the unbound
server as its own forwarder for anything that it doesn’t know about
locally.</p>
<p>Useful implementation notes:</p>
<p>For unbound.conf, you want something similar to this:</p>
<pre><code> qname-minimisation: yes
hide-version: yes
hide-identity: yes
root-hints: "/etc/unbound/root.hints"
tls-cert-bundle: "/etc/ssl/certs/ca-certificates.crt"
private-domain: "local"
private-domain: "use-application-dns.net"
forward-zone:
name: "local"
forward-addr: 10.12.0.2
forward-zone:
name: "use-application-dns.net"
forward-addr: 10.12.0.2
forward-zone:
name: "."
forward-ssl-upstream: yes
forward-addr: 1.1.1.1@853#cloudflare-dns.com</code></pre>
<p>Note that you can add multiple <code>forward-addr:</code> entries to
a <code>forward-zone</code>, and that the form for DNS over TLS is
<code>IP @ port # domainname</code> so that you can match the upstream
cert to a particular name. The <code>tls-cert-bundle</code> above is
appropriate for Debian.</p>
<p>The existence of the zone “use-application-dns.net” without any
resolvable hosts in it is a hint to Firefox and eventually other
DNS-over-HTTPS clients that they should not bypass all the local
arrangements in order to send data to Mozilla’s preferred trading
partner of the day.</p>
the stale config bug2020-02-22T13:04:53-05:002020-02-22T13:04:53-05:00-dsr-tag:blog.randomstring.org,2020-02-22:/2020/02/22/the-stale-config-bug/
<p>Since this class of bug just bit me, I figured I would write it up in
the nearly futile hope that it might prevent me from making it
again.</p>
<p>This bug is most often evident when we have a software stack that has
varying levels of configuration available in each layer, ranging from
simple components that are either installed or not to complex components
with configuration stored in files.</p>
<p>Today’s example is my home theater computer, which has these relevant
layers:</p>
<p>Since this class of bug just bit me, I figured I would write it up in
the nearly futile hope that it might prevent me from making it
again.</p>
<p>This bug is most often evident when we have a software stack that has
varying levels of configuration available in each layer, ranging from
simple components that are either installed or not to complex components
with configuration stored in files.</p>
<p>Today’s example is my home theater computer, which has these relevant
layers:</p>
<ul>
<li>a television with an HDMI connection to</li>
<li>a smart receiver (a computer with a set of AV switches, ADCs, DACs,
and amplifiers)</li>
<li>a Linux server connected via HDMI to the receiver
<ul>
<li>on the server: A/V output hardware via HDMI</li>
<li>either ALSA or PulseAudio to manage the sound</li>
<li>a choice of playback programs that can use ALSA or PulseAudio or
either</li>
<li>and the media that we want to play back</li>
</ul></li>
</ul>
<p>Today’s problem is that PulseAudio is an erratic piece of crap that
frequently forgets its own configuration, exits without warning, and
chews up CPU time. Oh, sorry, that’s not the problem as such, that’s a
sub-problem. The problem is that we would like to play the 5.1-encoded
audio tracks from our media in as faithful a manner as we can possibly
arrange, with a minimum of extraneous processing. The observed error is
that, beyond PulseAudio’s cantankerous obstreperousness, all the
available playback programs occasionally-through-frequently end up
sending stereo signals instead of 5.1 signals to the smart receiver.</p>
<p>A confounding issue is that the smart receiver has a lot of modes in
which it will take a stereo signal and try to decode it into the 7
channels of speakers, and one mode in which it will take either a stereo
signal or a 5.1 signal and decode it into 7.</p>
<p>There’s actually a lot of information available at most layers of
this stack, so it was not difficult to set the TV to not doing anything
weird and get the receiver to display what it was actually receiving in
realtime. (Thanks, Yamaha.) That made it clear that the Linux box was
sending stereo instead of 5.1. Now all my debugging could go to that set
of layers.</p>
<p>My initial assumption was that PulseAudio didn’t recognize the
capabilities of the output and downgraded to stereo as a
most-reasonable-fallback. <code>pavucontrol</code> told various stories,
including stories about how it knew the full capabilities of the HDMI
outputs, and how audio was being played back via PulseAudio emulating
ALSA. Obviously the first thing to try was to set the software to use
PulseAudio directly. Unfortunately, it said that it was already doing
that.</p>
<p>This is where the bug comes in.</p>
<p>PulseAudio has <code>pavucontrol</code> to do realtime graphical
config changes, including volume adjustments. It takes more config via
files in <code>/etc/pulse/</code> or <code>~/.pulse/</code>.</p>
<p>ALSA has <code>alsamixer</code> to do realtime volume adjustment and
a bit of config, but mostly it depends on a config file which is called
<code>/etc/asound.conf</code> or <code>~/.asoundrc</code>. Yes, that is
a stupid difference. VLC offers built-in configuration, in both an easy
mode and a complete mode, and also a config file located at
<code>~/.config/vlc/vlcrc</code>.</p>
<p>PulseAudio and ALSA do not change any of their config files when a
human adjusts things through the realtime config interfaces. VLC does,
but the displayed information does not use the same nomenclature that
the config files do. Where the realtime config might show you an output
device named “HDMI-1, Intel PCH, 5.1”, that is not a string you can
write into <code>alsa-output-device:</code> in the config file. In
addition, there are things that can be changed in the config file which
are not obviously changeable in the realtime config.</p>
<p>So, the bug: you can get a working config that is not written to a
file and will not work some period of time later – after a program
restart, or after a system reboot, or after PulseAudio crashes because
it hates you.</p>
<p>Part two of the bug: you can write a config value that consistently
takes effect after one of those events, but does not show up in the
realtime config.</p>
<p>The solution for this particular problem has been to disable
PulseAudio entirely, use <code>/etc/asound.conf</code> to pick the HDMI
output as the default output device, and remove several lines in
<code>vlcrc</code> of unknown origin which reassigned channels
badly.</p>
two new Debian installs on Ryzen2020-01-26T12:52:27-05:002020-01-26T12:52:27-05:00-dsr-tag:blog.randomstring.org,2020-01-26:/2020/01/26/two-new-debian-installs-on-ryzen/
<p>One of my kids wanted a new computer badly enough to pay for most of
it, and I have been wanting to upgrade the main house server for a year
or so. Parts for both arrived this week.</p>
<p>One of my kids wanted a new computer badly enough to pay for most of
it, and I have been wanting to upgrade the main house server for a year
or so. Parts for both arrived this week.</p>
<p>Let’s start with the kid’s machine. For some reason, he thinks
esthetics matter to the outside of a computer. That translates into an
awful lot of pain working inside a mini-ITX case, the NZXT H210. On the
other hand, he correctly recognized that previous-generation components
are cost-effective: he selected a Ryzen 2700 (8 cores, 16 threads) and
an X470 motherboard; 16GB of RAM and an AMD RX5700 graphics card.</p>
<p>After the physical pains of getting everything into the case and
plugged in, the software pains were minor. The kernel needed to be
brought in from backports and the firmware pulled from the kernel git
repo. Everything else was a perfectly normal Debian Stable (Buster)
setup.</p>
<p>Over on the house server front, I replaced the 8 year old AMD Athlon
FX-4130 (4 cores, 4MB L1 Cache, 125W) with a Ryzen 3600 (6 cores, 32MB
L1, 65W) and an X570 motherboard. I also swapped case and motherboard
out; or if you prefer, I moved the disks over to a new computer. The
only thing I had to change in the OS was to redetect the motherboard
sensors.</p>
forked-daapd v27 now works well enough for me2019-12-29T15:58:11-05:002019-12-29T15:58:11-05:00-dsr-tag:blog.randomstring.org,2019-12-29:/2019/12/29/forked-daapd-v27-now-works-well-enough-for-me/
<p>forked-daapd is an audio streaming server and webclient for same; it
offers compatibility with:</p>
<p>As of version 27, <a
href="https://ejurgensen.github.io/forked-daapd">forked-daapd</a> works
well enough for my purposes.</p>
<p>forked-daapd is an audio streaming server and webclient for same; it
offers compatibility with:</p>
<ul>
<li>iTunes and Rhythmbox clients</li>
<li>AirPlay speakers, including Shairport</li>
<li>Chromecast</li>
<li>MPD clients</li>
<li>any mp3 stream client, like VLC</li>
<li>Roku Soundbridge</li>
</ul>
<p>Of these, you can no longer buy new Soundbridge hardware, and the
Chromecast Audio is no more, though other Chromecast devices are
supported (for audio streams, not video.)</p>
<p>My primary desire was to get the powered speakers in my bedroom
playing music from the house music server, with some additional
features: some sort of remote control for volume and play/pause; remote
selection of music; not too much physical space. I bought a Chromecast
Audio just before Google decided to stop selling them, and it’s really a
nice device: smaller than a hockey puck, with 2.4GHz wifi, USB power in,
and a choice of volume-controlled 1/8” stereo jack out or TOSLINK
optical, through the same port.</p>
<p>Prior to this release of forked-daapd, I had various problems
controlling the Chromecast Audio:</p>
<ul>
<li>long delays between starting music and actually getting sound out
(sometimes nearly a minute)</li>
<li>audio drop outs</li>
<li>poor volume resolution (too quiet, mostly-okay, and eighteen steps
of too loud)</li>
</ul>
<p>All of those problems seem to be gone now.</p>
<p>In addition, forked-daapd has the ability to read my filesystem
hierarchy rather than consulting its database of songs, which I find to
be an absolute necessity. Many of my tracks date from times or occasions
when embedded track info was missing or wrong, so any music database
which wants to trust the embedded info first is going to be
problematic.</p>
focus on the problem2019-12-19T08:57:09-05:002019-12-19T08:57:09-05:00-dsr-tag:blog.randomstring.org,2019-12-19:/2019/12/19/focus-on-the-problem/<p>The scientific method goes boing.</p>
<ol type="1">
<li>Form a question.</li>
<li>Observe evidence.</li>
<li>Form hypotheses.</li>
<li>Create experiments.</li>
<li>Observe results.</li>
<li>Compare hypotheses.</li>
<li>Be critical.</li>
</ol>
<p>The scientific method runs off the rails in step 2 and explodes into
uncertainty in step 3. It turns out that observing evidence is rarely
easy or straightforward: it’s a great big universe, and we’re all really
puny. And “forming hypotheses” is synonymous with “make guesses” –
potentially educated, informed guesses, but still a creative process
that is likely to baffle AI for decades to come.</p>
<p>That brings us to today’s problem: why does Netflix hate me?</p>
<p>The scientific method goes boing.</p>
<ol type="1">
<li>Form a question.</li>
<li>Observe evidence.</li>
<li>Form hypotheses.</li>
<li>Create experiments.</li>
<li>Observe results.</li>
<li>Compare hypotheses.</li>
<li>Be critical.</li>
</ol>
<p>The scientific method runs off the rails in step 2 and explodes into
uncertainty in step 3. It turns out that observing evidence is rarely
easy or straightforward: it’s a great big universe, and we’re all really
puny. And “forming hypotheses” is synonymous with “make guesses” –
potentially educated, informed guesses, but still a creative process
that is likely to baffle AI for decades to come.</p>
<p>That brings us to today’s problem: why does Netflix hate me?</p>
<p>Netflix leases the right to show video productions according to
geographical restrictions. When rights-holders became aware that IP
addresses don’t necessarily map to geography, they became confused and
upset, but mostly ignored it. When they were informed that proxies and
VPNs could be rented as services, they demanded that Netflix <em>do
something</em>. So Netflix did something: they arbitrarily banned
certain IP ranges.</p>
<p>This is not supposed to be a problem for my household, because we are
in the US and any IPs assigned to us by our ISP will certainly be in the
unbanned ranges for US service. This is true and not part of the
problem.</p>
<p>I have three gigabit-class ISPs offering me service. One is Comcast,
whom I intensely dislike. (So do other people: they kept winning
“America’s Worst Company” awards, which is why they rebranded their
consumer ISP as Xfinity.) One is RCN, who are fine but for some reason
don’t believe that IPv6 is a useful technology for end-users. The last
is Verizon’s FIOS service, which only recently decided that IPv6 is
worthwhile.</p>
<p>I run services at home which need to be accessible to the Internet at
large. Mail, web, various things built on top of web servers like a
wiki, this blog, a ticketing system, an RSS reader… ok, I canned the
ticketing system after it became clear that it wasn’t a useful method of
dealing with household chores. We handle our own DNS resolution, do
ad-blocking, and so forth. It’s good to be up on modern things like
IPv6, so I use Hurricane Electric’s IPv6 tunnelling service to get a
nice static network block. It adds about 6ms of latency to some things
because it terminates in New York City.</p>
<p>For IPv4 addressing, a dynamically-updated DNS name will work.
Outages when the ISP changes my DHCP-granted address tend to be in the
20 second range, and don’t happen very often. It would be great to do
the same for IPv6, except… Namecheap, who does DNS and dynamic DNS for
us, doesn’t do dynamic assignation for AAAA records. I don’t know why.
Maybe they don’t know why: it comes up often enough that they have a
statement about it in exactly the place in their interface you would
look for it.</p>
<p>That’s OK, Hurricane Electric provides static allocations. No
problem.</p>
<p>Except… Netflix. Netflix thinks that Hurricane Electric’s IPv6
service is a proxy used by nefarious foreigners to obtain red-blooded
American entertainment. So if we contact Netflix via IPv6, it errors out
when you try to watch a show, accusing you of fraud and deceit and
failure to wipe your feet at the door.</p>
<p>For most of the client systems in the house, I have a simple
workaround. A DNS query for the Netflix domains is stripped of AAAA
answers, leaving only the IPv4 answers.</p>
<p>ChromeOS is special.</p>
<p>ChromeOS listens to DHCP, accepts the recommended DNS servers… and
then ignores them. It uses Google’s own DNS resolvers at 8.8.8.8 and
8.8.4.4. And those love to return IPv6 AAAA answers.</p>
<p>So: I know what the problem is. I have half a solution. My question
is: How can I transparently (to end users inside the house) provide
access to Netflix, while keeping the static IPv6 allocation from
Hurricane Electric?</p>
<p>I began to formulate answers. I thought about IPv6 NPT (NAT). I
thought about routing. I thought about how much easier this would be if
FIOS and HE would peer BGP with me. I thought about the disasters that
would erupt on a daily basis if FIOS and HE were so foolish. I thought
about IPv6 multihoming.</p>
<p>I thought a lot about IPv6 multihoming. FIOS gives a DHCP-PD range;
HE gives a static allocation. Various sources convinced me that this was
either ludicrously simple or completely impossible. I started drawing
diagrams about source routing and preferences. I kinda like the idea of
IPv6 multihoming.</p>
<p>Then I remembered the advice which is the title of this post. Focus
on the problem, not the hypothetical answers to sub-problems that came
up along the way.</p>
<p>I told my house router to blackhole route 8.8.8.8 and 8.8.4.4. Just
reject them immediately.</p>
<p>The Chrome devices started streaming video from Netflix.</p>
new-to-me laptop2019-11-27T11:31:47-05:002019-11-27T11:31:47-05:00-dsr-tag:blog.randomstring.org,2019-11-27:/2019/11/27/new-to-me-laptop/<p>Work asks that I bring home an Apple laptop so that I maintain some
sort of fluency with the systems that the majority of our employees use.
For the last while this has been a 2011 MacBook Pro with 20GB of RAM and
an SSD. The keyboard finally sputtered its way to an unusable state
(most of the modifier keys,
shift/ctrl/alt/command/option/super/meta/hyper…) were unpredictably
triggering or failing to trigger) and I asked for a replacement.</p>
<p>“Whatever has a functioning escape key, please.”</p>
<p>So they signed out a 2015 MacBookPro to me. It has 8GB of RAM (not
upgradable) and an SSD (ditto).</p>
<p>Work asks that I bring home an Apple laptop so that I maintain some
sort of fluency with the systems that the majority of our employees use.
For the last while this has been a 2011 MacBook Pro with 20GB of RAM and
an SSD. The keyboard finally sputtered its way to an unusable state
(most of the modifier keys,
shift/ctrl/alt/command/option/super/meta/hyper…) were unpredictably
triggering or failing to trigger) and I asked for a replacement.</p>
<p>“Whatever has a functioning escape key, please.”</p>
<p>So they signed out a 2015 MacBookPro to me. It has 8GB of RAM (not
upgradable) and an SSD (ditto).</p>
<p>It also has a screen of about four times the resolution. The
keyboard, as specified, has a real escape key in the right place (albeit
a half-height key) and feels… cheaper than the 2011. Less key travel, a
little mushier, a fair amount louder, more plastic-y. The body of the
new machine is a few millimeters thinner. Perhaps it weighs a little
less.</p>
<p>By generic name, the CPU is the same: “Intel 2.4GHz Core i5”. It’s
driving four times as many pixels but otherwise feels exactly the same
as the older one.</p>
<p>There is no physical ethernet port anymore. There is no optical drive
anymore. I occasionally used both of those features, just often enough
that I will have to find external units.</p>
<p>It really doesn’t feel like much progress for four years.</p>
how to solve a Fermi problem2019-11-08T13:10:54-05:002019-11-08T13:10:54-05:00-dsr-tag:blog.randomstring.org,2019-11-08:/2019/11/08/how-to-solve-a-fermi-problem/<p>A lot of annoying irrelevant interview questions are <a href="https://en.wikipedia.org/wiki/Fermi_problem">Fermi questions</a>.
(Enrico Fermi was a famous nuclear physicist.) A Fermi question is one
where there’s some real answer that you could get by carrying out an
arduous and possibly ridiculous procedure, but making a good guess and
showing your work will be just as good and be much less effort.
Interviewers sometimes like to pose questions of this type “to see how
you think”, but their actual motivation is a combination of finding out
if you are reasonably numerate – and perhaps for the feeling of
superiority they can derive from your failure.</p>
<p>A lot of annoying irrelevant interview questions are <a
href="https://en.wikipedia.org/wiki/Fermi_problem">Fermi questions</a>.
(Enrico Fermi was a famous nuclear physicist.) A Fermi question is one
where there’s some real answer that you could get by carrying out an
arduous and possibly ridiculous procedure, but making a good guess and
showing your work will be just as good and be much less effort.
Interviewers sometimes like to pose questions of this type “to see how
you think”, but their actual motivation is a combination of finding out
if you are reasonably numerate – and perhaps for the feeling of
superiority they can derive from your failure.</p>
<p>Examples of Fermi questions include “How many piano tuners are there
in Chicago?” and the one I’ll tackle here: “How many tennis balls will
fit inside a 747?”</p>
<p>You need to have some background knowledge about tennis balls and
aircraft. If you don’t know that a 747 is a large aircraft, you can’t
solve this problem. If you’ve never seen a tennis ball, you can’t solve
this problem. Does that make you an unfit candidate for a job? If the
job has to do with sports or aircraft, maybe. Otherwise, I don’t think
so.</p>
<p>The solution method for all Fermi questions is the same:</p>
<ul>
<li><p>make extremely reductionist assumptions about the
problem</p></li>
<li><p>write down what you’re going to guess at</p></li>
<li><p>write down the procedure to turn your guessed numbers into an
answer</p></li>
<li><p>guess the numbers, pretending that you have some confidence in
them</p></li>
<li><p>do the math</p></li>
<li><p>explain why you’re probably wrong</p></li>
</ul>
<p>You can do the first four things in any order, or even jumble them up
as they occur to you.</p>
<p>A 747 is a large passenger aircraft. How large? Wikipedia will tell
you, but interviewers generally don’t let you look that up. So we’ll
document our guesses and say that a 747 has a cylindrical body which is
about the length of a football field (300 feet). How wide is it? One
common seating arrangement is three seats, aisle, four seats, aisle,
three seats. Each seat is perhaps 18” across, and the aisle is probably
24” across, maybe even 30”. So that’s 18 x 10 + 2 x 30 = 240” wide, or
20 feet. That’s probably the widest part of the airplane, so we’ll call
it the diameter of the cylinder.</p>
<p>The volume of a cylinder is the area of the circular cross-section
times the length, so we have a radius of 10 feet (half of 20): pi * r ^2
* l: 3.1 * 10 * 10 * 300. That gives us a volume of 90000 cubic
feet.</p>
<p>How big is a tennis ball? I don’t know. I remember that one fits in
my hand and two are a little hard to hold and three is right out, so
I’ll claim that a tennis ball is 3 inches across. Conveniently, that
means that I can pack four across in a foot, and so 4 x 4 x 4 (64) will
fit in a cubic foot. 90000 * 64 gives 360000 + 5400000 = 5760000 tennis
balls.</p>
<p>All of these assumptions are wrong in various ways. A 747 isn’t a
cylinder. It’s probably not exactly 24 feet wide or 300 feet long. It
has lots of internal fittings that just can’t be moved or removed. I
don’t actually know how big a tennis ball is in terms of measurements.
It’s easier to look up the size of a tennis ball than it is to look up
the precise volume of a 747, and there are several sizes and
configurations of Boeing’s jumbo jet anyway.</p>
<p>The business case, though, has to be even further off: why do you
need the tennis balls moved so quickly? How are you going to onload and
offload them on the other side? If you’re thinking ahead, maybe you can
just get standard shipping containers full of tennis balls, which can be
moved by ship (really cheap) and train (cheap) and truck (pretty cheap)
instead of airplane (quite expensive). The industry produces something
like a million tennis balls a day, so this is only a week’s production
or so: enough to get you a discount, not enough to justify building a
new factory. Or is your demand goint to be continuous? Have you
considered what you’ll do if the plane crashes? What are your alternate
supply chains?</p>
systemd to sysvinit: why so slow?2019-11-05T21:58:57-05:002019-11-05T21:58:57-05:00-dsr-tag:blog.randomstring.org,2019-11-05:/2019/11/05/systemd-to-sysvinit-why-so-slow-/<p>If you have a Linux system that was using systemd as its init system,
and you changed it to something else, and now nearly everything is
incredibly slow:</p>
<p>Remove libnss-systemd; check for and remove systemd options from
<code>/etc/nsswitch.conf</code>.</p>
<p>As you will no doubt recall, that config controls the methods that
the system uses for various lookups. Most things are <code>files</code>,
which is to say the system should look in the appropriate config files.
<code>hosts</code> is usually files followed by DNS. If you have
Kerberos or LDAP or some other networked signon system, this is where it
would be configured.</p>
<p>Who knew that systemd wanted control of that, too? Not I.
</p><p>If you have a Linux system that was using systemd as its init system,
and you changed it to something else, and now nearly everything is
incredibly slow:</p>
<p>Remove libnss-systemd; check for and remove systemd options from
<code>/etc/nsswitch.conf</code>.</p>
<p>As you will no doubt recall, that config controls the methods that
the system uses for various lookups. Most things are <code>files</code>,
which is to say the system should look in the appropriate config files.
<code>hosts</code> is usually files followed by DNS. If you have
Kerberos or LDAP or some other networked signon system, this is where it
would be configured.</p>
<p>Who knew that systemd wanted control of that, too? Not I.
</p>
no reply considered harmful2019-10-30T13:15:11-04:002019-10-30T13:15:11-04:00-dsr-tag:blog.randomstring.org,2019-10-30:/2019/10/30/no-reply-considered-harmful/<p>Suppose that you are sending out email to all of your customers,
letting them know about a thing that you are sure they will want to know
about. Then you decide to send it from a fake email address, one named
“no reply” or similar. You have immediately eliminated a route for your
customers to ask you questions about your thing.</p>
<p>What was the point of your announcement if not to generate interest
in the thing? Don’t do that.</p>
<p>Send your announcement from an account that routes into your customer
support ticket system (you do have one, right? if you have more than
five customers, you need a ticketing system) and prepare your customer
support staff with a list of answers to likely questions, and a way for
them to contact the experts on the thing.</p>
<p>Every time you close a method of contact, you lose an opportunity to
talk to your customers. If you don’t want to talk to your customers,
maybe you shouldn’t be sending them email at all.
</p><p>Suppose that you are sending out email to all of your customers,
letting them know about a thing that you are sure they will want to know
about. Then you decide to send it from a fake email address, one named
“no reply” or similar. You have immediately eliminated a route for your
customers to ask you questions about your thing.</p>
<p>What was the point of your announcement if not to generate interest
in the thing? Don’t do that.</p>
<p>Send your announcement from an account that routes into your customer
support ticket system (you do have one, right? if you have more than
five customers, you need a ticketing system) and prepare your customer
support staff with a list of answers to likely questions, and a way for
them to contact the experts on the thing.</p>
<p>Every time you close a method of contact, you lose an opportunity to
talk to your customers. If you don’t want to talk to your customers,
maybe you shouldn’t be sending them email at all.
</p>
new phone, who dis2019-10-29T20:06:22-04:002019-10-29T20:06:22-04:00-dsr-tag:blog.randomstring.org,2019-10-29:/2019/10/29/new-phone-who-dis/The Google Nexus 6P was an excellent phone, until it developed severe
battery issues when it was about a year old. Google did me the courtesy
of replacing it with the Pixel XL, which was a reasonably good phone
until two years in, when it developed moderate battery issues which were
worsening rapidly.<p>The Google Nexus 6P was an excellent phone, until it developed severe
battery issues when it was about a year old. Google did me the courtesy
of replacing it with the Pixel XL, which was a reasonably good phone
until two years in, when it developed moderate battery issues which were
worsening rapidly.</p>
<p>The Google Pixel 4 XL was unveiled last week and… it did not impress
me. For about the same amount of money, I acquired a OnePlus 7Pro – and
a spare charger, and a protective case, and a 24 month
nearly-no-questions-asked warranty. I’ve had it for a few hours now:
this is the first impressions review.</p>
<ol type="1">
<li>Phones are now too big. I am 6’5” tall and have big hands. This
phone is excessively large.</li>
<li>There is effectively no speed difference between state-of-the-art
from 3 or 4 years ago and the current champions.</li>
<li>The curved edges are a gimmick, reducing usability slightly. I would
trade them in an instant for a pair of notification LEDs, one on the
upper left corner and one on the lower right corner.</li>
<li>Charging times, however, have improved. Though some of that is
likely subjective and due to the deteriorating battery of the
Pixel.</li>
<li>If you ship a phone made of glass, it is unconscionable not to put a
protective case in the box. OnePlus supplies such a thing.</li>
<li>The glory of a headphone jack is that you can unplug your music
device and plug in your phone so you can have a private conversation in
a noisy environment. Whoops, no more headphone jacks. Jerks.</li>
<li>I wish Google had imposed a requirement for specific button
positioning on phones. But only a little; I’m sure I will eventually get
used to it.</li>
<li>The automatic transfer between Android phones of package information
is pretty good, but not perfect.</li>
</ol>
<p>My general advice: don’t buy a flagship unless somebody else is
paying for it – and is also paying for insurance.</p>
<p>Not a bad phone. Very pretty.</p>
easy, cheap, good2019-10-06T14:04:01-04:002019-10-06T14:04:01-04:00-dsr-tag:blog.randomstring.org,2019-10-06:/2019/10/06/easy-cheap-good/<p>Centralized facilities are easier to manage. Centralized facilities
are easier to control.</p>
<p>Distributed facilities are harder to manage, harder to control.</p>
<p>Centralized facilities need expensive, difficult redundancies to
maintain function during a partial outage. Distributed facilities need
coordination.</p>
<p>Centralized is cheaper than distributed if you don’t pay for the
things that can make it reliable. </p><p>Centralized facilities are easier to manage. Centralized facilities
are easier to control.</p>
<p>Distributed facilities are harder to manage, harder to control.</p>
<p>Centralized facilities need expensive, difficult redundancies to
maintain function during a partial outage. Distributed facilities need
coordination.</p>
<p>Centralized is cheaper than distributed if you don’t pay for the
things that can make it reliable. </p>
typing is a useful skill2019-09-24T16:31:19-04:002019-09-24T16:31:19-04:00-dsr-tag:blog.randomstring.org,2019-09-24:/2019/09/24/typing-is-a-useful-skill/<p>I was chatting (via work’s internal chat system) to a coworker,
answering a question when the CFO came in and got my attention. I
swivelled my head and greeted her while finishing my response.</p>
<p>“Were you really typing just then?” she inquired.</p>
<p>“Yes, until I dropped my train of thought when you came in.”</p>
<p>I’m not a classical touch-typist; I mostly use six fingers or so, and
I don’t really keep them over the home row – rather, I have two or three
hand positions that I can feel properly, and that’s where I type from.
My speed would probably be improved if I practiced proper touch-typing,
but on the other hand, maybe I would lose my ability to type the arcane
symbols of computer incantations that are not so common in the
mainstream typing systems.</p>
<p>Do learn some form of typing; it’s ever so much more convenient for
getting your thoughts out. </p><p>I was chatting (via work’s internal chat system) to a coworker,
answering a question when the CFO came in and got my attention. I
swivelled my head and greeted her while finishing my response.</p>
<p>“Were you really typing just then?” she inquired.</p>
<p>“Yes, until I dropped my train of thought when you came in.”</p>
<p>I’m not a classical touch-typist; I mostly use six fingers or so, and
I don’t really keep them over the home row – rather, I have two or three
hand positions that I can feel properly, and that’s where I type from.
My speed would probably be improved if I practiced proper touch-typing,
but on the other hand, maybe I would lose my ability to type the arcane
symbols of computer incantations that are not so common in the
mainstream typing systems.</p>
<p>Do learn some form of typing; it’s ever so much more convenient for
getting your thoughts out. </p>
bad cable, no biscuit2019-08-20T07:43:12-04:002019-08-20T07:43:12-04:00-dsr-tag:blog.randomstring.org,2019-08-20:/2019/08/20/bad-cable-no-biscuit/<p>If a previously reliable gigabit connection is suddenly working at
100 Mb/s, you probably have a flaky cable. Replace it. Yes, I know it
hasn’t moved in months or years so there can’t possibly be any
mechanical stress. Kill it with scissors.
</p><p>If a previously reliable gigabit connection is suddenly working at
100 Mb/s, you probably have a flaky cable. Replace it. Yes, I know it
hasn’t moved in months or years so there can’t possibly be any
mechanical stress. Kill it with scissors.
</p>
x11 font substitution2019-08-19T10:01:23-04:002019-08-19T10:01:23-04:00-dsr-tag:blog.randomstring.org,2019-08-19:/2019/08/19/x11-font-substitution/<p>Do you have an X11 application that insists on using a font you
hate?</p>
<p>Change that easily with fontconfig.</p>
<p>This syntax in your <code>.fonts.conf</code> will change the response
for one font into an answer from another:</p>
<pre><code><alias>
<family>Gentium</family>
<prefer>
<family>Tex Gyre Pagella</family>
</prefer>
</alias></code></pre>
<p>Add as many stanzas as you like; then run <code>fc-cache</code> and
restart your application. </p><p>Do you have an X11 application that insists on using a font you
hate?</p>
<p>Change that easily with fontconfig.</p>
<p>This syntax in your <code>.fonts.conf</code> will change the response
for one font into an answer from another:</p>
<pre><code><alias>
<family>Gentium</family>
<prefer>
<family>Tex Gyre Pagella</family>
</prefer>
</alias></code></pre>
<p>Add as many stanzas as you like; then run <code>fc-cache</code> and
restart your application. </p>
lifecycle of a technical blogger2019-08-02T11:09:30-04:002019-08-02T11:09:30-04:00-dsr-tag:blog.randomstring.org,2019-08-02:/2019/08/02/lifecycle-of-a-technical-blogger//785 days ago:/<p>/785 days ago:/</p>
<p>First post. I should tell you a little bit about myself… blah, blah,
blah, so I set up this wordpress account. I plan on updating once a week
or so.</p>
<p>/784 days ago:/</p>
<p>I solved this obscure technical problem with a for-loop in bash. Now,
the syntax always escapes me, so here it is again…</p>
<p>/753 days ago:/</p>
<p>I didn’t realize how expensive WordPress was going to be, so I
switched over to Google’s free blogger service. I’m going to try really
hard to hit my target of one post a week.</p>
<p>/746 days ago:/</p>
<p>OMG you need to stop using Big Bank right now! Here are the details
of the massive breach that I heard about today (h-t to
breakingcatnews.com)…</p>
<p>/731 days ago:/</p>
<p>Google just announced that this service is going away in three
months, so I need to find an alternative. Anybody know something cheap
but reliable?</p>
<p>/652 days ago:/</p>
<p>First post on Medium. Hey guys I tried to transfer over all the
previous entries but it didn’t work, so I’ve got a Ghost instance
running over at…</p>
<p>/629 days ago:/</p>
<p>I realized that Medium is making money with ads that I don’t control,
and frankly they really aren’t good ads, and I already set up Ghost, so
I’m going to move everything over there.</p>
<p>/584 days ago:/</p>
<p>Ghost raised their prices, I’m going to grab a virtual machine and
run my own copy. This will also offer me the opportunity to learn more
about running Linux systems.</p>
<p>/451 days ago:/</p>
<p>I burnt everything to the ground, but I’ve got backups, so I’m going
to start again with a static site generator. It looks like Jekyll is the
way to go.</p>
<p>/355 days ago:/</p>
<p>Jekyll is so inflexible. It only took a day to move everything over
to Octopress.</p>
<p>/354 days ago:/</p>
<p>Octopress is basically unsupported. I don’t know anything about Go,
but it seems like a cool language – I’m going to move over to Hugo, just
as soon as I can figure it out.</p>
<p>/315 days ago:/</p>
<p>Hugo is really fast, but I basically can’t change anything because I
have to reinstall my go environment every time I want to do
anything.</p>
<p>/312 days ago:/</p>
<p>Pelican looks good.</p>
<p>/295 days ago:/</p>
<p>Using a new theme, haven’t decided if I like it yet or not.</p>
<p>/292 days ago:/</p>
<p>Back to the old theme while I write my own.</p>
<p>/258 days ago:/</p>
<p>This is version 0.41 of the new theme. I think it’s ready for
use.</p>
<p>/220 days ago:/</p>
<p>Wrestling with plugins.</p>
<p>/142 days ago:/ Gosh, I haven’t updated this in a while.</p>
spinning disks are still cost-effective2019-07-12T16:33:12-04:002019-07-12T16:33:12-04:00-dsr-tag:blog.randomstring.org,2019-07-12:/2019/07/12/spinning-disks-are-still-cost-effective/<p>This is a reminder that spinning storage is still useful for large
data dumps, media, backups, and other bulky things that you don’t need
to change continuously.</p>
<p>But mostly, it’s cost-effective. The two current sweet spots for
capacity/performance (assuming brand-name, non-sale, 7200RPM SATA3 3.5”
disks) are at 4TB (about $75) and 10TB (about $270).</p>
<p>I also remind you that you want RAID for reliability, but it’s not
backup by itself. </p><p>This is a reminder that spinning storage is still useful for large
data dumps, media, backups, and other bulky things that you don’t need
to change continuously.</p>
<p>But mostly, it’s cost-effective. The two current sweet spots for
capacity/performance (assuming brand-name, non-sale, 7200RPM SATA3 3.5”
disks) are at 4TB (about $75) and 10TB (about $270).</p>
<p>I also remind you that you want RAID for reliability, but it’s not
backup by itself. </p>
sysvinit in debian buster2019-06-25T09:21:53-04:002019-06-25T09:21:53-04:00-dsr-tag:blog.randomstring.org,2019-06-25:/2019/06/25/sysvinit-in-debian-buster/Via Rick Thomas on the Debian Users mailing list:<p>Via Rick Thomas on the Debian Users mailing list:</p>
<hr />
<p>In any case, the solution I came up with is</p>
<pre><code>apt-get --purge install -y sysvinit-core dbus- glib-networking- libgtk-3-0-
apt-get --purge autoremove</code></pre>
<p>Note the trailing minus-signs on dbus- glib-networking- libgtk-3-0-
These packages need to be deleted in the same pass as sysvinit-core is
added.</p>
<hr />
<p>I haven’t had the chance to try this yet, but it certainly looks
reasonable.</p>
<hr />
<p>Later: here’s what you should actually use:</p>
<pre><code>apt install sysvinit-core dbus- elogind</code></pre>
<p>Looks like XFCE4 is not going to work without systemd, though.</p>
<p>From the Debian init-diversity mailing list:</p>
<p>“I just wanted to speed up the backport as much as possible – as-is,
Buster is useless for GUI users.”</p>
<p>So, we’ll need to wait for backports.</p>
<pre><code>apt install sysvinit-core elogind/unstable libelogind0/unstable libelogind0:i386/unstable libpam-elogind/unstable libpam-elogind-compat/experimental</code></pre>
<p>might work, but is unlikely to make you happy long term. Wait for
backports.</p>
intuitive interfaces2019-05-30T16:28:32-04:002019-05-30T16:28:32-04:00-dsr-tag:blog.randomstring.org,2019-05-30:/2019/05/30/intuitive-interfaces/<p>There is no such thing as an intuitive interface (to a computer). All
interfaces are learned, To the extent that they re-use components and
repeat behaviors already learned, some interfaces can be easier to
learn.</p>
<p>Somebody quipped “The only intuitive interface is the nipple; after
that it’s all learned.” It might have been Bruce Ediger. Doesn’t matter
who it was: turns out that humans don’t have much of an intuition for
nipples, either. Breastfeeding techniques need to be learned, too. It’s
always easier to learn something that lots of other people around you
are demonstrating regularly; you also know who to ask for help.</p>
<p>There is no such thing as an intuitive interface (to a computer). All
interfaces are learned, To the extent that they re-use components and
repeat behaviors already learned, some interfaces can be easier to
learn.</p>
<p>Somebody quipped “The only intuitive interface is the nipple; after
that it’s all learned.” It might have been Bruce Ediger. Doesn’t matter
who it was: turns out that humans don’t have much of an intuition for
nipples, either. Breastfeeding techniques need to be learned, too. It’s
always easier to learn something that lots of other people around you
are demonstrating regularly; you also know who to ask for help.</p>
falsehoods non-programmers believe about programming2019-05-29T12:24:18-04:002019-05-29T12:24:18-04:00-dsr-tag:blog.randomstring.org,2019-05-29:/2019/05/29/falsehoods-non-programmers-believe-about-programming/You know how this works, right? These are false statements about what
non-programmers believe about programmers and programming. The proper
response to every single statement is “Not always.”<p>You know how this works, right? These are false statements about what
non-programmers believe about programmers and programming. The proper
response to every single statement is “Not always.”</p>
<ul>
<li>Programming is just a job that anyone can do.</li>
<li>Programming is just a job that anyone who has taken programming
courses can do.</li>
<li>Programming is just typing into a computer.</li>
<li>Programs are hard to write.</li>
<li>Programs are easy to write.</li>
<li>The work is done while typing.</li>
<li>Most programming is done while typing.</li>
<li>Most programming is just translating what the customer needs into
computer language.</li>
<li>Most programming is just knowing the right computer language.</li>
<li>You can write any program in any language.</li>
<li>You have to use the right language for each program.</li>
<li>Programming languages are all very similar to each other, so if you
know one, it’s easy to learn any other.</li>
<li>It’s hard to learn a new language.</li>
<li>It’s easy to learn a new language.</li>
<li>Programming for any operating system is basically the same.</li>
<li>Writing programs that can run on different operating systems is
hard.</li>
<li>Moving programs from one operating system to another is easy.</li>
<li>Writing programs that can run on different computers is hard.</li>
<li>Moving programs from one kind of computer to another is easy.</li>
<li>Programmers are specialists who only work in one sub-sub-field.</li>
<li>Programmers are generalists who can work well on anything.</li>
<li>The length of a program is correlated with how hard it was to
write.</li>
<li>Anyone who knows the problem domain can write down the
specification.</li>
<li>Programmers work best in hierarchical groups.</li>
<li>Programmers work best in flat groups.</li>
<li>Programmers work best in groups.</li>
<li>Programmers work best alone.</li>
<li>Programmers always think very literally.</li>
<li>Programmers can easily fix bugs in other people’s software.</li>
<li>Programmers can easily fix bugs in their own software.</li>
<li>Programmers are good at finding bugs.</li>
<li>Younger programmers are more flexible than older programmers.</li>
<li>Older programmers have more experience than younger
programmers.</li>
<li>Most programming is making new applications.</li>
<li>Most programming is writing new features.</li>
<li>Most programming is fixing typos.</li>
<li>Most programming work is writing software.</li>
<li>Programming languages are hard because they are not close to English
(or your mother language).</li>
<li>Programming languages which are closer to human languages are easier
to use.</li>
<li>The work is done when a program is accepted by the customer.</li>
<li>The work is done when there are no bugs in the program.</li>
<li>Customers can get any change they want in a program that they
use.</li>
<li>Customers can get any change they want in a program that they paid
for.</li>
<li>Customers who pay for software own it.</li>
<li>Customers who pay programmers to write software own the
software.</li>
<li>Programmers who write software own it.</li>
<li>Programmers who write software own the copyright to it.</li>
<li>You always have to pay to use someone else’s software.</li>
<li>You always have to pay to use someone else’s software legally.</li>
<li>All software is owned by someone.</li>
<li>The law is clear about software.</li>
</ul>
the best politics are local politics2019-05-17T10:03:20-04:002019-05-17T10:03:20-04:00-dsr-tag:blog.randomstring.org,2019-05-17:/2019/05/17/the-best-politics-are-local-politics/Let’s keep track of some laws in Massachusetts that should be
changed.<p>Let’s keep track of some laws in Massachusetts that should be
changed.</p>
<hr />
<p>https://malegislature.gov/Laws/SessionLaws/Acts/2018/Chapter228</p>
<p>SECTION 56. Notwithstanding any general or special law to the
contrary, any city or town that has received a grant from the executive
office of housing and economic development or Massachusetts Broadband
Institute for purposes of constructing a municipally owned broadband
network shall have the power and authority: (1) to provide internet
access service to an unserved premises located in an adjacent
municipality; and (2) to accept or acquire an easement or other real
property interest in an adjacent city or town for purposes of
constructing, owning, maintaining and operating infrastructure for
providing internet access service to its own residents or to an unserved
premises located in an adjacent municipality. This section shall not
apply to a municipally owned broadband network that is seeking to
provide broadband service to premises already served by at least 1
broadband network.</p>
<p>Strike that last “This section….” sentence; it kills municipal
broadband competition. Idiots duped by Comcast.</p>
<hr />
<p>https://malegislature.gov/Laws/GeneralLaws/PartIV/TitleI/Chapter269/Section10</p>
<ol start="2" type="a">
<li>Whoever, except as provided by law, carries on his person, or
carries on his person or under his control in a vehicle, any stiletto,
dagger or a device or case which enables a knife with a locking blade to
be drawn at a locked position, any ballistic knife, or any knife with a
detachable blade capable of being propelled by any mechanism, dirk
knife, any knife having a double-edged blade, or a switch knife, or any
knife having an automatic spring release device by which the blade is
released from the handle, having a blade of over one and one-half
inches, or a slung shot, blowgun, blackjack, metallic knuckles or
knuckles of any substance which could be put to the same use with the
same or similar effect as metallic knuckles, nunchaku, zoobow, also
known as klackers or kung fu sticks, or any similar weapon consisting of
two sticks of wood, plastic or metal connected at one end by a length of
rope, chain, wire or leather, a shuriken or any similar pointed starlike
object intended to injure a person when thrown, or any armband, made
with leather which has metallic spikes, points or studs or any similar
device made from any other substance or a cestus or similar material
weighted with metal or other substance and worn on the hand, or a
manrikigusari or similar length of chain having weighted ends; or
whoever, when arrested upon a warrant for an alleged crime, or when
arrested while committing a breach or disturbance of the public peace,
is armed with or has on his person, or has on his person or under his
control in a vehicle, a billy or other dangerous weapon other than those
herein mentioned and those mentioned in paragraph (a), shall be punished
by imprisonment for not less than two and one-half years nor more than
five years in the state prison, or for not less than six months nor more
than two and one-half years in a jail or house of correction, except
that, if the court finds that the defendant has not been previously
convicted of a felony, he may be punished by a fine of not more than
fifty dollars or by imprisonment for not more than two and one-half
years in a jail or house of correction.</li>
</ol>
<p>All of that crap can and should be replaced with:</p>
<ol start="2" type="a">
<li>Whoever, except as provided by law, carries on his person, or
carries under his control in a vehicle a non-firearm weapon with the
intent to use it to commit a crime shall be punished by a fine of [pick
an appropriate amount].</li>
</ol>
<p>The original text was apparently written by someone who had just sat
through a marathon of Shaw Bros. martial-arts flicks while stoned.</p>
low power cpus2019-05-15T16:56:26-04:002019-05-15T16:56:26-04:00-dsr-tag:blog.randomstring.org,2019-05-15:/2019/05/15/low-power-cpus/It seems increasingly unwise to allow an Intel-made CPU to talk to
the outside world. But the NUC-style machines are almost exclusively
Intel. What should we do for a new firewall?<p>It seems increasingly unwise to allow an Intel-made CPU to talk to
the outside world. But the NUC-style machines are almost exclusively
Intel. What should we do for a new firewall?</p>
<p>You’ll recall that I prefer firewalls to run Debian Stable, so that
security updates are available promptly. While there are a few non-Intel
architectures available in Debian, I think of them as being less likely
to stick around; fewer eyeballs on the specific code paths.</p>
<p>So let’s look at AMD’s low end CPUs. First, we discard the CPUs that
can’t be bought new-in-box; second, we ask for either an APU (integrated
graphics on the chip) or integrated graphics on the motherboard.</p>
<ul>
<li><p>The Kabini core line is now dead. You can buy some leftover
Semprons, but they don’t have graphics and the only available new
motherboards are one or more of expensive, have no on-board graphics, or
have no expansion slots.</p></li>
<li><p>The Ryzen line is more promising. There are three new AM4 socket
chips, all with integrated graphics and differing only in clock speed:
the Athlon 200GE, 220GE, and 240GE. The 200GE comes in at a reasonable
$60.</p></li>
</ul>
<p>The cheapest motherboards are, unfortunately, microATX rather than
microITX. The prices aren’t bad, though, starting at $61.</p>
<p>Let’s build a sample system from Newegg parts:</p>
<ul>
<li>$60 Athlon 200GE, 2 cores, 4 threads, 3+GHz.</li>
<li>$66 Asus Prime A320M-K motherboard</li>
<li>$20 4GB RAM</li>
<li>$20 Crucial BX500 2.5” 120GB SSD</li>
<li>$25 Rosewill microATX minitower</li>
<li>$25 300W ATX power supply</li>
<li>$29 2-port gigabit ethernet NIC or $40 4-port gigabit NIC</li>
</ul>
<p>Totalling $245 or $256 for a highly-overachieving 3 or 5 port
router/firewall.</p>
<p>The case is not the smallest, the power supply is not the quietest.
You’ll need to pay more for each of those.</p>
leaving Amazon reviews: a policy2019-04-17T15:16:43-04:002019-04-17T15:16:43-04:00-dsr-tag:blog.randomstring.org,2019-04-17:/2019/04/17/leaving-amazon-reviews-a-policy/<p>I recently ordered a dozen things from Amazon from six vendors. All
the things were pretty technical – ethernet switches, fiber optic
cables, transceivers, things like that. This is normal.</p>
<p>Four of the six vendors asked me to review their products. Two asked
me multiple times over the same order.</p>
<p>Here’s my policy, and I urge you to consider the same one:</p>
<p>I will only leave a review on a commerce site if I have an unusual
experience to report. An unusual experience is either surprisingly good
or exceptionally bad. I won’t give any feedback for a transaction in
which I paid the agreed amount of money, received the product in a
reasonable time, and the product worked as expected.</p>
<p>Adding reviews outside of that policy has two negative effects: it
adds useless noise to the review section, and it tends to inflate
star-system grades.</p>
<p>I recently ordered a dozen things from Amazon from six vendors. All
the things were pretty technical – ethernet switches, fiber optic
cables, transceivers, things like that. This is normal.</p>
<p>Four of the six vendors asked me to review their products. Two asked
me multiple times over the same order.</p>
<p>Here’s my policy, and I urge you to consider the same one:</p>
<p>I will only leave a review on a commerce site if I have an unusual
experience to report. An unusual experience is either surprisingly good
or exceptionally bad. I won’t give any feedback for a transaction in
which I paid the agreed amount of money, received the product in a
reasonable time, and the product worked as expected.</p>
<p>Adding reviews outside of that policy has two negative effects: it
adds useless noise to the review section, and it tends to inflate
star-system grades.</p>
minimum awesome product2019-03-22T08:43:00-04:002019-03-22T08:43:00-04:00-dsr-tag:blog.randomstring.org,2019-03-22:/2019/03/22/minimum-awesome-product/Lots of projects focus on an MVP, a minimum viable product: the least
effort that it takes to make something that someone will pay for. The
idea is that you can use that as a base to incrementally improve the
product into something that people will actually recommend to each
other, and perhaps from there get to a product that everybody wants.<p>Lots of projects focus on an MVP, a minimum viable product: the least
effort that it takes to make something that someone will pay for. The
idea is that you can use that as a base to incrementally improve the
product into something that people will actually recommend to each
other, and perhaps from there get to a product that everybody wants.</p>
<p>I would like to suggest a different goal: the minimum awesome
product. An MAP has one feature which makes it awesome, and everything
else about it is the least that can be done without actively scaring
away potential buyers. An MAP at the smallest price that makes a profit
is better than an MVP, because users will recognize the great feature
and be willing to take a chance on the rest.</p>
<p>The biggest problem with the MAP proposal is that it’s hard to
recognize the difference between an awesome feature and one which just
makes the creator happy. The second biggest problem is probably
featuritis: once you make something awesome in one respect, how can you
possibly bring yourself to do any less on the rest of it?</p>
dominant data formats2019-03-21T08:36:20-04:002019-03-21T08:36:20-04:00-dsr-tag:blog.randomstring.org,2019-03-21:/2019/03/21/dominant-data-formats/Let’s name a thing: dominant data formats.<p>Let’s name a thing: dominant data formats.</p>
<p>A data format is a specification for how to turn information into a
digital encoding that a computer can work with, and of course how to
reverse that back into a human-readable method.</p>
<p>A dominant data format is one that is used to such an extent that
tools for converting it are essential for any successor format, and such
tools will continue to be maintained and universally available for many
years after it is no longer the most popular format, because so much
data was stored in it that you are likely to run into it frequently.</p>
<p>A super-dominant data format is an extremely long-lived dominant
format that becomes the foundation of multiple dominant data
formats.</p>
<p>ASCII is super-dominant. UNICODE UTF-8, at least, is
super-dominant.</p>
<p>RS-232c isn’t a storage format, it’s a data protocol. I think it’s a
dominant data protocol, as is ethernet, as is MIDI.</p>
<p>HTML is dominant.</p>
<p>CSV is dominant, even though it’s terrible.</p>
<p>For a long time, WordPerfect’s file format was dominant. Nobody uses
it, but tools to read and convert it are close to hand.</p>
<p>XML and JSON are probably dominant, but it’s possible that they will
be replaced by some other cross-program interchange format in the blink
of an eye (relatively speaking).</p>
<p>WAV is dominant. MP3 is probably dominant.</p>
<p>ZIP is super-dominant. Tar and gzip are dominant – are they
super-dominant?</p>
<p>EPUB is currently dominant; it’s built on top of UTF8, HTML, and
ZIP.</p>
<p>What’s a non-dominant data format, then? It’s anything which is:</p>
<ul>
<li>only used internally, or</li>
<li>only used by one producer of software, or</li>
<li>only used as an intermediate format, or,</li>
<li>not standardized enough to be re-implemented.</li>
</ul>
<p>What else?</p>
technology marches onwards2019-02-26T13:33:27-05:002019-02-26T13:33:27-05:00-dsr-tag:blog.randomstring.org,2019-02-26:/2019/02/26/technology-marches-onwards/Somehow, without me being consciously aware of it, every device in
the house that I use to play music has become capable of playing
FLAC.<p>Somehow, without me being consciously aware of it, every device in
the house that I use to play music has become capable of playing
FLAC.</p>
<p>(FLAC is the Free Lossless Audio CoDec. A CoDec is a
compressor/decompressor, a method of potentially squeezing lots of data
into less data. Lossless means that the bits you put in one side are
exactly the bits that you get out the other side after you decompress
them. MP3 and most other music and video formats are lossy – the bits
that you get out are an approximation of the bits that you put in. Free
means free to use, copy and modify. This parenthetical has gone on long
enough.)</p>
<p>The den is where the big music and video storage computer is. It has
no problem playing FLAC through the A/V receiver and out the big
speakers.</p>
<p>The living room has a laptop connected to a stereo amp with more
speakers. No problem.</p>
<p>The bedroom has a Google Chromecast Audio (no microphone, they
swear…) connected to powered speakers. Those are all on a single power
bar, so flipping the switch makes the CCA and the speakers ready about
ten seconds later. Chromecast Audio can be told to play audio from the
main music storage computer, and it understands FLAC just fine.</p>
<p>Finally, my tiny MP3 player not only understands FLAC, but a 128GB
microSD card is cheap enough that I can afford to put FLAC in it. (FLAC
is typically a third the size of uncompressed music, rather than the
1/10th size of MP3. Those are the tradeoffs.)</p>
<p>Being an idiot, I did not rip all of our CDs as FLAC; I discarded the
raw data and converted things into 320Kb/s VBR MP3. On the other hand, I
cannot reliably tell the difference between said 320Kb/s MP3 and FLAC on
a random piece of music.</p>
<p>So it’s not really that big a deal.</p>
new tagline2019-02-06T07:12:07-05:002019-02-06T07:12:07-05:00-dsr-tag:blog.randomstring.org,2019-02-06:/2019/02/06/new-tagline/“It seemed reasonable at the time.”<blockquote>
<p>“It seemed reasonable at the time.”</p>
</blockquote>
<p>Well, it did.</p>
it seemed reasonable at the time2019-02-02T08:32:20-05:002019-02-02T08:32:20-05:00-dsr-tag:blog.randomstring.org,2019-02-02:/2019/02/02/it-seemed-reasonable-at-the-time/Everything is a semi-rational reaction to something else.<p>Everything is a semi-rational reaction to something else.</p>
<p>Companies used to own and run their own machines on-premises. But
doing it properly (HVAC, power, raised floors, standardized racks,
management, redundancy, preparedness…) is expensive and not actually
most companies’ core competency. So they moved to colocated datacenters,
where a competent company would take care of the infrastructure for a
fee which would hopefully reflect a discount based on savings from
scale.</p>
<p>But managing generations of servers at colo datacenters takes
manpower for hardware replacement, upgrades, cabling, and generally
doing things right; the customer companies mostly don’t have that as a
business feature but see it as a cost. So managed infrastructure
services came up, where the datacenter company leases you the hardware
(standardized so they can have spares) and racks it for you and puts in
network switches and remote services and gets it to the point where all
you have to do is log in to a console server and install your OS and
start deployment.</p>
<p>But sysadmins who can keep track of security updates and package
dependencies and keep an OS properly organized are relatively expensive,
and what used to be</p>
<p>“well it works on my laptop”</p>
<p>becomes</p>
<p>“well it works in my container”</p>
<p>and the container itself gets shipped out. It’s cheaper not to do
security work, you know. Pay attention, this is a repeating theme and it
will be on the final exam for some of you. It is always cheaper not to
do work up front, until it becomes more expensive to do the work later.
Technical debt is real.</p>
<p>So VM and container accepting services come up, where the datacenter
company now runs a hypervisor and managed storage systems for you, in
exchange for the salary of those sysadmins. The start-up costs can be
much lower, to the point where it really doesn’t make fiscal sense for
any tiny company to do anything themselves except ship their
containers/VMs out and puzzle over IP allocation schemes and
load-balancing services.</p>
<p>It’s a trap, but a delicious one.</p>
<p>So now your company is hooked on the ease and speed and cheapness of
just spinning up another container or VM any time someone expresses a
desire, or even automatically, when you get the bill at the end of the
month and you managed to spend how much? That’s ridiculous. Why are we
getting billed for containers that we don’t even need to run all the
time?</p>
<p>Along comes “serverless”, which is a logical successor of inetd. Yes,
inetd, the very old “internet super-server” which would read a table of
ports and programs, open all the ports, and when a connection came in
would run your program and connect stdin/out to the socket, isn’t that
great?</p>
<p>Serverless is just a management system that spins up your very
restricted single-function program on demand – now it answers an HTTPS
API instead of a raw socket – and does the accounting work to make it
profitable.</p>
<p>Complexity is simultaneously the enemy of correctness and the source
of profit.</p>
how much memory do you need?2019-01-22T10:17:14-05:002019-01-22T10:17:14-05:00-dsr-tag:blog.randomstring.org,2019-01-22:/2019/01/22/how-much-memory-do-you-need-/It’s 2019. How much RAM do you need?<p>It’s 2019. How much RAM do you need?</p>
<p>For a desktop or laptop, it’s fairly easy: everyone needs 8GB to get
general work done. 16GB is suitable for people who are doing heftier
work, and people who need 32GB or more always have a specific reason
that they can articulate and justify.</p>
<p>Servers are different. Servers can be scaled vertically (made or
purchased in heftier configurations) for a ways, but nearly always you
will have a reason to scale horizontally (more machines of the same
calibre) – high availability, or recovery from disaster, or workloads
that are cost-effective to parallelize across machines.</p>
<p>A “house” server might play many roles at once: DNS and DHCP, mail,
SSH gateway, web server, application server, database server, media
archive, backup storage… such a box should have room to grow in whatever
direction is later determined to be necessary, or cheap enough that the
tasks can be easily distributed among many of them. Some people like to
play virtualization games, buying one or two hefty physical machines and
spreading the workload among a handful (or dozens) of virtual machines.
Virtualization eats up memory, though it no longer incurs quite the
level of CPU overhead that it used to require.</p>
<p>If you gravitate to many small servers, it’s reasonable to supply
them with relatively small amounts of RAM: 2GB will handle DNS, DHCP,
routing, firewalling, NTP and other low-intensity services easily – all
at once, even, if you are careful. A media server might want 4GB to
improve caching, but not much more. Database services are comparatively
RAM-hungry, but it all goes to performance improvement – if your demands
are low, you can get by with less. Especially: if you can run your
database off SSD, I can’t think of a home usage that would need much
more RAM than to prevent swapping.</p>
<p>In a business context, throw all of these rules-of-thumb out. Do a
proper evaluation of what you actually intend to run, and then get extra
RAM. Even if it all goes to extra caching, it won’t go to waste.</p>
linux install: HP Envy 13z2018-12-15T19:07:54-05:002018-12-15T19:07:54-05:00-dsr-tag:blog.randomstring.org,2018-12-15:/2018/12/15/linux-install-hp-envy-13z/The HP Envy 13z is a lightweight, reasonably high-performance laptop
with a relatively low price tag - under $600 for the 1080P 13”
touchscreen, flip-hinge to tablet, backlit keyboard, 8GB RAM, 250GB SSD,
Ryzen 2300U four-core system weighing a little over two pounds.<p>The HP Envy 13z is a lightweight, reasonably high-performance laptop
with a relatively low price tag - under $600 for the 1080P 13”
touchscreen, flip-hinge to tablet, backlit keyboard, 8GB RAM, 250GB SSD,
Ryzen 2300U four-core system weighing a little over two pounds.</p>
<p>(Those were the specs.)</p>
<p>It generally compares favorably to a non-Retina MacBook Pro.</p>
<p>Unsurprisingly, it ships with Windows 10 and HP support wants nothing
to do with Linux. Honestly, if they just changed their stock answer away
from hostility to polite indifference, it would be a remarkable
improvement. Running Windows disk management utility produced a 112GB
partition for Linux to use.</p>
<p>Important safety tip: you need to reboot, hit ESC a bunch of times
until the BIOS menu shows up, and go into the BIOS settings to enable
Legacy Boot (and thus turn off Secure Boot). Then you can boot from a
Linux USB installer.</p>
<p>If your chosen distro is not bleeding-edge, you will want a working
USB-ethernet adapter. You’ll need Linux kernel 4.18 or later, a recent
firmware package for an RTL8820be (r8822be is the module name), and a
recent Xorg release for amdgpu. There is currently no support for the
touchscreen, but it looks like that will be supported in the nearish
future. The camera works immediately, as does sound.</p>
<p>It took me about 4.5 hours to go from unboxing to a reasonable
dual-boot. It would be perhaps an hour if I didn’t need to research
anything.</p>
<p>March 2020 update ~~~~~~~~~~~~~~~~~</p>
<p>Upgrading to Debian buster and using the buster-backports kernel:</p>
<p><code>apt install -t buster-backports linux-image-amd64</code></p>
<p>gets you a working touchscreen. At this point, everything on the box
works.</p>
<p>You may want an xrandr alias to rotate the screen 180 degrees for
times that you hinge the screen over into tablet mode.</p>
the difference between peak and sustained usage2018-12-12T15:48:15-05:002018-12-12T15:48:15-05:00-dsr-tag:blog.randomstring.org,2018-12-12:/2018/12/12/the-difference-between-peak-and-sustained-usage/<p>We've had a nominal gigabit fiber connection for more than a year now. Let's take a look at how much of it we've been using.</p>
<p>Luckily, my firewall keeps track for me.</p>
<p>We've had a nominal gigabit fiber connection for more than a year now. Let's take a look at how much of it we've been using.</p>
<p>Luckily, my firewall keeps track for me.</p>
<pre class="literal-block">
$ vnstat -m -i eth3
</pre>
<table border="1" class="docutils">
<colgroup>
<col width="17%" />
<col width="18%" />
<col width="20%" />
<col width="20%" />
<col width="25%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head" colspan="5">month | rx | tx | total | avg. rate</th>
</tr>
</thead>
<tbody valign="top">
<tr><td>Jan '18</td>
<td>476.82 GiB</td>
<td>26.09 GiB</td>
<td>502.91 GiB</td>
<td>1.58 Mbit/s</td>
</tr>
<tr><td>Feb '18</td>
<td>430.73 GiB</td>
<td>30.39 GiB</td>
<td>461.12 GiB</td>
<td>1.60 Mbit/s</td>
</tr>
<tr><td>Mar '18</td>
<td>382.38 GiB</td>
<td>17.60 GiB</td>
<td>399.99 GiB</td>
<td>1.25 Mbit/s</td>
</tr>
<tr><td>Apr '18</td>
<td>452.32 GiB</td>
<td>17.65 GiB</td>
<td>469.97 GiB</td>
<td>1.52 Mbit/s</td>
</tr>
<tr><td>May '18</td>
<td>455.75 GiB</td>
<td>34.72 GiB</td>
<td>490.47 GiB</td>
<td>1.54 Mbit/s</td>
</tr>
<tr><td>Jun '18</td>
<td>522.26 GiB</td>
<td>17.81 GiB</td>
<td>540.07 GiB</td>
<td>1.75 Mbit/s</td>
</tr>
<tr><td>Jul '18</td>
<td>748.34 GiB</td>
<td>144.52 GiB</td>
<td>892.86 GiB</td>
<td>2.80 Mbit/s</td>
</tr>
<tr><td>Aug '18</td>
<td>814.23 GiB</td>
<td>165.32 GiB</td>
<td>979.55 GiB</td>
<td>3.07 Mbit/s</td>
</tr>
<tr><td>Sep '18</td>
<td>631.82 GiB</td>
<td>131.18 GiB</td>
<td>762.99 GiB</td>
<td>2.47 Mbit/s</td>
</tr>
<tr><td>Oct '18</td>
<td>526.85 GiB</td>
<td>79.50 GiB</td>
<td>606.35 GiB</td>
<td>1.90 Mbit/s</td>
</tr>
<tr><td>Nov '18</td>
<td>483.52 GiB</td>
<td>44.77 GiB</td>
<td>528.29 GiB</td>
<td>1.71 Mbit/s</td>
</tr>
<tr><td>Dec '18</td>
<td>258.28 GiB</td>
<td>34.11 GiB</td>
<td>292.39 GiB</td>
<td>2.39 Mbit/s</td>
</tr>
<tr><td colspan="5">estimated | 674.82 GiB | 89.12 GiB | 763.94 GiB | ---</td>
</tr>
</tbody>
</table>
<p>Yes, out of a nominal 1000Mbit/s and a measurable peak 970Mbit/s, we use a sustained... 2. Sometimes 3.</p>
<p>That is, if you smeared our usage out across all 24 hours of each day, that's what we use. I assure you that we would not be happy if we got a 5Mbit/s line. Instantaneous demand is a real thing.</p>
cycle of reincarnation2018-11-17T18:26:59-05:002018-11-17T18:26:59-05:00-dsr-tag:blog.randomstring.org,2018-11-17:/2018/11/17/cycle-of-reincarnation/There’s this notion of a technological cycle of reincarnation, where
an implementation is followed by a logical successor which leads to
another one which carries on down a chain until someone has a bright
idea which looks an awful lot like the original implementation. For
example, it used to be that CPUs did all their math by themselves, then
they outsourced the hard parts to floating point coprocessors, then
those got built in to the main CPU chip again. Graphics subsystems are
particularly prone to the cycle.<p>There’s this notion of a technological cycle of reincarnation, where
an implementation is followed by a logical successor which leads to
another one which carries on down a chain until someone has a bright
idea which looks an awful lot like the original implementation. For
example, it used to be that CPUs did all their math by themselves, then
they outsourced the hard parts to floating point coprocessors, then
those got built in to the main CPU chip again. Graphics subsystems are
particularly prone to the cycle.</p>
<p>It just occurred to me that with the recent trend to enabling
advanced graphics systems for laptops and mini-systems by extending the
PCIe bus out of the chassis via Thunderbolt or USB3.1 or such, it’s time
for someone to take the cycle in a new direction:</p>
<blockquote>
<p>It’s time for monitors to integrate graphics processors.</p>
</blockquote>
<p>Right now you might connect your monitor with VGA, DVI (variants -I
and -D), HDMI (in several generations of backwards compatibility) or
DisplayPort (several generations). And monitors are, relatively
speaking, much cheaper than they used to be. In the 1990s we thought
that $600 was not too high a price to pay for a high-end 16” CRT. Now
$400 will buy you a 40” 4K LCD.</p>
<p>Why not just use Thunderbolt 3 or USB 3.1 or something similar and
sell a video card in the back of the monitor, perfectly matched to that
monitor’s capabilities? You get to push the power supply and cooling
requirements outside of the computer.</p>
search engines extend your brain2018-11-05T14:30:18-05:002018-11-05T14:30:18-05:00-dsr-tag:blog.randomstring.org,2018-11-05:/2018/11/05/search-engines-extend-your-brain/I remember that there are test patterns built into T1 CSU/DSUs, but
not what they are or how to turn them on – if I need to know, I’ll look
it up.<p>I remember that there are test patterns built into T1 CSU/DSUs, but
not what they are or how to turn them on – if I need to know, I’ll look
it up.</p>
<p>I remember that there are three QoS bits in the IPv4 header, but not
where they are. Probably pretty early, because of hardware
implementations.</p>
<p>I remember that lots of people look down on Perl 5’s object system,
but not why. I remember the existence and purpose of lots of Perl
modules, but not the interfaces.</p>
<p>I edit JSON and YAML every few weeks, but I don’t have a conscious
recollection of the rules – they’re prompted by looking at what’s
already there.</p>
<p>I can guesstimate Big-O notation on most chunks of code, but I’ll be
fooled when there’s a function that’s hidden in a library because I
generally don’t have those memorized.</p>
<p>I can tell you the bandwidth of lots of hardware interfaces, and the
relative efficiency of speed and efficiency of storage for a handful of
RAID configurations – the ones that I set up, and the ones that I
avoid.</p>
<p>I know one firewall configuration tool reasonably well, which means
that I look up esoteric bits, and have used so many that I expect to do
common things in all of them with a quick examination of the
language.</p>
<p>I currently know a fair amount about GDPR and why it doesn’t apply to
my company (and how we can assist customers with their GDPR
requirements) and lots about the Massachusetts and Virginia data privacy
law. Very little about PCI compliance, but my point is: if my company
wanted to do card transactions, I can figure out what I will need to
learn to write a good policy and get it implemented in a way that won’t
embarass anyone.</p>
<p>In short: when the job is the same thing over and over again, you
memorize the details. When it’s always something new, you need a broad
overview about what can be done and where to find the details. And
“always something new” is more fun for me.</p>
hyperoptimizing idiots2018-11-02T07:13:51-04:002018-11-02T07:13:51-04:00-dsr-tag:blog.randomstring.org,2018-11-02:/2018/11/02/hyperoptimizing-idiots/<p>Recognize this pattern:</p>
<ul>
<li>Set a goal</li>
<li>Work towards the goal
<ul>
<li>Evaluate progress:</li>
<li>If it didn’t get closer to the goal, try a different approach.</li>
<li>If it got closer to the goal, try improving it.</li>
</ul></li>
<li>Cycle.</li>
</ul>
<p>That seems reasonable, right? It accomplishes what you wanted to do,
possibly in a naive manner.</p>
<p>Okay, let’s look at the serious problems:
</p><p>Recognize this pattern:</p>
<ul>
<li>Set a goal</li>
<li>Work towards the goal
<ul>
<li>Evaluate progress:</li>
<li>If it didn’t get closer to the goal, try a different approach.</li>
<li>If it got closer to the goal, try improving it.</li>
</ul></li>
<li>Cycle.</li>
</ul>
<p>That seems reasonable, right? It accomplishes what you wanted to do,
possibly in a naive manner.</p>
<p>Okay, let’s look at the serious problems:
</p>
<ol type="1">
<li>There’s no halt condition</li>
</ol>
<p>Why would you halt if it’s working? If it isn’t working, something
external will stop you, like running out of money.</p>
<ol start="2" type="1">
<li>There’s no evaluation of the desirability of the goal</li>
</ol>
<p>If the goal is to make more paperclips, you make more paperclips any
way you can. <a
href="http://www.decisionproblem.com/paperclips/index2.html">Memetic
hazard: Paperclip Optimizer</a> Remember, people claim with straight
faces that the only goal of a corporation is to increase value for
stockholders.</p>
<ol start="3" type="1">
<li>There’s no evaluation of the desirability of the methods</li>
</ol>
<p>Any method which achieves the goal more completely is obviously
better than any other method; that’s the fitness function. What about
side-effects? Not mentioned. How about negative externalities
(i.e. poisoning the river, making the city too expensive, destroying
rational argument strategies in favor of emotional strategies)? Not
considered.</p>
<p>The natural counterargument to all of these problems is to say that
of course the real world is more complex and nuanced, and of course they
will all be dealt with appropriately.</p>
<p>And the counter-counterargument that we derive from observing the
world around is: yes, most people and companies will behave – but by no
means all.</p>
<p>When you recognize the pattern, work to incorporate as much
compassion as cleverness.</p>
advice on buying firewall hardware2018-10-22T13:07:34-04:002018-10-22T13:07:34-04:00-dsr-tag:blog.randomstring.org,2018-10-22:/2018/10/22/advice-on-buying-firewall-hardware/<p>Several people have asked me recently what hardware I would buy today
for use as a home firewall.</p>
<ul>
<li><a href="https://www.newegg.com/Product/Product.aspx?Item=9SIACP17CD1223">Partaker
N3050 B5</a>
<ul>
<li>$121</li>
<li>N3050 CPU</li>
<li>no RAM (1 slot DDR3L up to 8GB)</li>
<li>no SSD (room for mSATA + 2.5” SATA disk)</li>
<li>2 x gigE + wifi 802.11 b/g/n</li>
</ul></li>
<li><a href="https://www.newegg.com/Product/Product.aspx?Item=9SIAB0Z7U46306">2GB
DDR3L RAM</a>
<ul>
<li>$15</li>
<li>2GB RAM</li>
</ul></li>
<li><a href="https://www.newegg.com/Product/Product.aspx?Item=N82E16820242470">Kingston
120GB mSATA SSD</a>
<ul>
<li>$40</li>
<li>120GB mSATA SSD</li>
</ul></li>
</ul>
<p>for a total of $176, including shipping. Links were accurate as of
October 22, 2018.</p>
<p>This gets you a tiny box, similar in size to random commercial house
router/firewall/wifi access points, which can run a standard Linux
operating system with a complex firewall running at 1 Gb/s in and out,
more RAM than strictly necessary, and an SSD which is both very large
(and therefore can last a very long time) and boot the system quickly
enough that you can do a reboot without losing TCP sessions.</p>
<p>I would also recommend a medium-sized USB thumb drive to set up as an
emergency booting and backup device. Call it another $15 or so.</p>
<p>Several people have asked me recently what hardware I would buy today
for use as a home firewall.</p>
<ul>
<li><a
href="https://www.newegg.com/Product/Product.aspx?Item=9SIACP17CD1223">Partaker
N3050 B5</a>
<ul>
<li>$121</li>
<li>N3050 CPU</li>
<li>no RAM (1 slot DDR3L up to 8GB)</li>
<li>no SSD (room for mSATA + 2.5” SATA disk)</li>
<li>2 x gigE + wifi 802.11 b/g/n</li>
</ul></li>
<li><a
href="https://www.newegg.com/Product/Product.aspx?Item=9SIAB0Z7U46306">2GB
DDR3L RAM</a>
<ul>
<li>$15</li>
<li>2GB RAM</li>
</ul></li>
<li><a
href="https://www.newegg.com/Product/Product.aspx?Item=N82E16820242470">Kingston
120GB mSATA SSD</a>
<ul>
<li>$40</li>
<li>120GB mSATA SSD</li>
</ul></li>
</ul>
<p>for a total of $176, including shipping. Links were accurate as of
October 22, 2018.</p>
<p>This gets you a tiny box, similar in size to random commercial house
router/firewall/wifi access points, which can run a standard Linux
operating system with a complex firewall running at 1 Gb/s in and out,
more RAM than strictly necessary, and an SSD which is both very large
(and therefore can last a very long time) and boot the system quickly
enough that you can do a reboot without losing TCP sessions.</p>
<p>I would also recommend a medium-sized USB thumb drive to set up as an
emergency booting and backup device. Call it another $15 or so.</p>
FIOS one year later2018-10-20T15:45:10-04:002018-10-20T15:45:10-04:00-dsr-tag:blog.randomstring.org,2018-10-20:/2018/10/20/fios-one-year-later/About a year ago, we switched ISPs from RCN to Verizon. I had no
particular issues with RCN except that their prices went up each year
without providing better service. (It’s true that RCN also fails to
handle IPv6 natively, but Verizon shares that failure.) What’s happened
in that year?<p>About a year ago, we switched ISPs from RCN to Verizon. I had no
particular issues with RCN except that their prices went up each year
without providing better service. (It’s true that RCN also fails to
handle IPv6 natively, but Verizon shares that failure.) What’s happened
in that year?</p>
<ul>
<li><p>Three outages. Two were caused by trucks knocking down the fiber
crossing the road; one by an unspecified problem that was fixed by
rebooting the Optical Network Terminal (i.e. fiber termination device,
which offers ethernet, cable TV and telephone services). The first fiber
outage took a week to be repaired – it was in the middle of a heav
winter storm. The second one took three days.</p></li>
<li><p>No surprises in the bill.</p></li>
<li><p>I have realized that most of the Internet is not expecting, or
does not have, a clear gigabit/second wide path end to end. Very few –
to a first approximation, no – single connections take advantage of that
speed. The bandwidth is generally available, but you need multiple
simultaneous TCP sessions to see it. Latency figures much more strongly
in my perception of the Internet these days.</p></li>
</ul>
<p>We have another year of this service before they start cranking up
the prices as RCN did. I expect that by that time it will be simple
enough to bring RCN back in at reasonable prices. I don’t think there
will be a significant value in paying for a notional gigabit over a
notional 500Mb/s or so, though.</p>
use pull quotes properly2018-10-18T06:48:57-04:002018-10-18T06:48:57-04:00-dsr-tag:blog.randomstring.org,2018-10-18:/2018/10/18/use-pull-quotes-properly/In the distant past, the functions of author, editor and page
designer were separated. The author wrote things; the editor fixed
errors (both objectively and subjectively) and selected choice bits to
highlight; the page designer made things look the way they should. The
editorial intermediary didn’t consult the author much, and gave limited
direction to the page designer.<p>In the distant past, the functions of author, editor and page
designer were separated. The author wrote things; the editor fixed
errors (both objectively and subjectively) and selected choice bits to
highlight; the page designer made things look the way they should. The
editorial intermediary didn’t consult the author much, and gave limited
direction to the page designer.</p>
<blockquote>
<p>Pull quotes appeared where the page designer put them.</p>
</blockquote>
<p>Because the editor could not predict where the pull quote would be
located on the page, it made sense that the quote would not actually be
removed from the text body, but would instead be duplicated as a
stylistic element and remain in context.</p>
<blockquote>
<p>For most web publications, this no longer makes sense.</p>
</blockquote>
<p>For most web publications, this no longer makes sense. The page size
is malleable and the browser will adapt. If you use pull quotes, you can
guarantee that they sit in the text flow replacing the original text,
and you can’t guarantee any other placement. So: don’t repeat
yourself.</p>
<blockquote>
<p>Don’t repeat yourself.</p>
</blockquote>
<p>It breaks your reader’s flow.</p>
all email disclaimers are utterly useless2018-10-10T12:11:29-04:002018-10-10T12:11:29-04:00-dsr-tag:blog.randomstring.org,2018-10-10:/2018/10/10/all-email-disclaimers-are-utterly-useless/All email disclaimers are utterly useless – except, possibly, one
that a lawyer sends you that, on that particular message, reminds you
that you are not in a privileged relationship.<p>All email disclaimers are utterly useless – except, possibly, one
that a lawyer sends you that, on that particular message, reminds you
that you are not in a privileged relationship.</p>
<p>Here’s the proof:</p>
<blockquote>
<p>This message (including any attachment(s) hereto) is confidential and
may also be privileged. It is intended solely for the addressee. If you
are not the intended recipient you are hereby notified that any
disclosure, copying, distribution or taking any action in reliance on
the contents of this information is strictly prohibited and may be
unlawful. If you have received this message in error you are requested
to please notify the sender by email immediately and delete it from your
system. Marlabs is not liable for the improper transmission of this
message nor for any damage sustained as a result of this message. If
verification is required, please request for a hard-copy version.</p>
</blockquote>
<p>I received that on October 10th, 2018, from a company that I had
never heard of before and had no relationship with at all.</p>
<p>Precisely what legal force does the statement “If you are not the
intended recipient you are hereby notified that any disclosure, copying,
distribution or taking any action in reliance on the contents of this
information is strictly prohibited and may be unlawful.” have in real
life? None at all.</p>
<p>Let’s assume that I am an intended recipient. I could forward it to a
colleague. They would not be the intended recipient, and so they would
somehow be bound to ignore it? It’s not IP law. It’s not financial
regulation. Who is forming the contract?</p>
<p>If you believe that a binding contract can be formed by pushing
information at other people, then you agree that you owe me $200 for
reading this sentence. If, on the other hand, you don’t believe that,
you owe it to yourself to avoid using email disclaimers.</p>
<p>Also, please see my <a
href="https://randomstring.org/~dsr/eula.html">EULA</a>.</p>
why computer security is terrible, a partial explanation2018-09-21T09:56:12-04:002018-09-21T09:56:12-04:00-dsr-tag:blog.randomstring.org,2018-09-21:/2018/09/21/why-computer-security-is-terrible-a-partial-explanation/One problem: we have built an immense network of supercomputers that
is essentially a Commons. An abuse of this Commons that would be
ridiculously unprofitable if it had to be carried out by humans – say,
an expected return of one one-hundredth cent per attempt – is highly
attractive to unscrupulous actors who can automate a billion attempts
for an expenditure of a few days or weeks worth of setup and expect a
hundred thousand dollars of return.<p>One problem: we have built an immense network of supercomputers that
is essentially a Commons. An abuse of this Commons that would be
ridiculously unprofitable if it had to be carried out by humans – say,
an expected return of one one-hundredth cent per attempt – is highly
attractive to unscrupulous actors who can automate a billion attempts
for an expenditure of a few days or weeks worth of setup and expect a
hundred thousand dollars of return.</p>
<p>Another problem: there has been little incentive for software
developers to guarantee the security (integrity, privacy,
trustworthiness) of their products, because they face so little cost for
ignoring it. It is usually easier to import a library of functions that
someone else has written than to write your own, and it is always easier
to send out software that is good enough to work than to spend the time
making sure it always works as defined. (We should not be surprised at
this: the hardest work is thinking clearly, and all software is a
reification of decision-making processes.)</p>
<p>Yet another problem: people naturally ascribe everything in the
universe to one of two models: living things, which do things of their
own accord, and non-living things, which are only acted upon by external
forces. Computational devices violate this conceptual border in a very
confusing way. A rock or a windmill always acts the same way when
similar events happen, but a computer is so hideously complex that a
single person cannot hope to build an internal model of how it will work
without either years of study or moving the whole thing into the
conceptual realm of living things. But living things have more sensory
inputs, have evolution-driven instincts, and are assigned different
degrees of trust according to their behavior. Each time a word
processing program obeys our orders to change a font size, move the
margins or merge in a set of addresses and identifiers to produce
customized letters, we increase our trust that it will reliably do what
we tell it to do. Each time it offers a spelling correction, we increase
our estimate that it is helpful and understanding. Those assessments are
horribly misleading when extended to edge cases, and people are very bad
at figuring out where those edge cases are.</p>
<p>Cultural expectations play into this story. We believe that a wallet
will hold money; a wallet can be stolen; we can prevent the theft of the
wallet by hiding it, or by holding on to it firmly, or even by leaving
it at home. When we put money into a bank, the people at the bank take
the money and keep it safe for us; even in the case of a bank robbery,
we expect the government to step in and ensure that all the accounts are
made whole. A software wallet might not have any of these attributes,
yet we will call it a wallet and expect it to act more or less as a
wallet or a bank.</p>
<p>The combination of the three problems leads to the present
situation.</p>
food at my workplace2018-08-28T15:22:15-04:002018-08-28T15:22:15-04:00-dsr-tag:blog.randomstring.org,2018-08-28:/2018/08/28/food-at-my-workplace/I work at a small technology company, recently moved from Cambridge
to Boston. The new landlords were a little surprised that we wanted to
expand the kitchen. This is what we normally supply to our employees and
guests:<p>I work at a small technology company, recently moved from Cambridge
to Boston. The new landlords were a little surprised that we wanted to
expand the kitchen. This is what we normally supply to our employees and
guests:</p>
<p>We have an espresso machine (and will teach you how to use it), a
drip machine, a French press, a coffee grinder, a rotating selection of
coffees including decaf in the freezer, about twenty kinds of tea/herbal
tea/tisanes…</p>
<p>and a refrigerator stocked with skim milk, whole milk, half-and-half,
heavy cream (usually), lemon juice, lime juice, soy and/or almond milk,
a large variety of yogurts, cheeses (usually including very old Cheddars
and an interesting Blue), and flavored sparkling water. Countertop
hot-and-cold filtered water.</p>
<p>In the other fridge are lunch makings of various kinds, suitable for
sandwiches, salads, plates…</p>
<p>In the cabinets, cereals, peanut butter, almond butter, preserves,
six or seven kinds of nuts.</p>
<p>On the counter: spices and seasonings, fresh fruit, fresh breads, and
frequently cakes, chips and/or cookies.</p>
<p>Also, chocolate drawers. It’s all good stuff.</p>
move fast and break things2018-08-19T18:22:44-04:002018-08-19T18:22:44-04:00-dsr-tag:blog.randomstring.org,2018-08-19:/2018/08/19/move-fast-and-break-things/“Move fast and break stuff” is a decent philosophy if and only if the
consequences of breaking stuff are survivable.<p>“Move fast and break stuff” is a decent philosophy if and only if the
consequences of breaking stuff are survivable.</p>
<ul>
<li><p>If breaking stuff means that your website looks weird, that’s
survivable.</p></li>
<li><p>If breaking stuff means that performance sucks for a while,
that’s survivable.</p></li>
<li><p>If breaking stuff causes unavailability during a critical period
of end-user demand, a few incidents might be survivable.</p></li>
<li><p>If breaking stuff causes your company to have a terrible
reputation for privacy, security, or competency, that might not be
survivable.</p></li>
<li><p>If breaking stuff causes your company to divulge financial
information, that might not be survivable.</p></li>
<li><p>If breaking stuff ends up costing your customers any significant
amount of money, that probably will not be survivable.</p></li>
</ul>
<p>The problem is that the philosophy you set for routine activities
will tend to carry over by default. Oh, and it turns out that UI
problems sometimes become major flaws, so even changes that you thought
were perfectly safe can be problematic.</p>
<p>Testing, QA, security and release engineering are not your enemies.
They are features of healthy organizations.</p>
<p>“move fast and break things” is, at its best, a recognition that
innovating is a high-risk activity. Failure of one scheme doesn’t mean
you should stop trying, but it could be a sign that you need to move
slowly and get it right.</p>
how I found jobs2018-08-19T08:24:01-04:002018-08-19T08:24:01-04:00-dsr-tag:blog.randomstring.org,2018-08-19:/2018/08/19/how-i-found-jobs/“Hey, do you want to interview at an ISP? They’re looking for
part-time people who can use UNIX.”<h2 id="first-real-job">First ‘Real’ Job</h2>
<p>“Hey, do you want to interview at an ISP? They’re looking for
part-time people who can use UNIX.”</p>
<p>Lars (pronounced Larsh) lived across the hall from me in the dorm.
Four of us piled into his car, all of us were accepted provisionally as
juniormost UNIX people, and I progressed from “sure, I know what Usenet
is” to being the Usenet news admin, then a general purpose sysadmin, and
eventually to the Director of IT (aka seniormost sysadmin). The
beginning was pure luck.</p>
<h2 id="traditional-approach">Traditional Approach</h2>
<p>I sent my resume off to a hundred or more companies during the
dot-boom, was interviewed three dozen times, and visited Ohio and
Virginia and Boston. I felt an actual connection with BBN in Cambridge,
and they offered me a job which wasn’t quite what I was expecting but
turned out to be a pretty good fit for who I was at the time.</p>
<h2 id="networking">Networking</h2>
<p>I was at the World Science Fiction Convention, ran into some people
whom I had only known online, was adopted into their group in seconds,
went out to dinner several times and near the end of the convention was
told I really had to interview at this company I had never heard of,
Akamai. I did. More pure luck.</p>
<h2 id="more-networking">More Networking</h2>
<p>A friend mentioned that his company was hiring; I sent him my resume.
They apparently liked it enough to bring me in for 24 hours of
interviewing over twelve calendar days. Then they dropped me from their
search without a word.</p>
<h2 id="craigslist-ad">Craigslist Ad</h2>
<p>They put in an ad, I applied. We had a phone screen, an interview
with several people, and then they made an offer. Later this year I will
have been with that empoyer for 15 years.</p>
<h2 id="lessons-learned">Lessons Learned</h2>
<p>Finding a job is pure luck. Getting the job, though, is a combination
of your experience, how you present yourself, and more random factors
beyond your control. If they don’t have a reasonable interview process,
you should assume that they aren’t very good at any other process.</p>
kitchen philosophy2018-08-04T08:43:26-04:002018-08-04T08:43:26-04:00-dsr-tag:blog.randomstring.org,2018-08-04:/2018/08/04/kitchen-philosophy/Gas ranges have the UNIX nature: they are powerful, can be controlled
precisely, and if you only half-know what you are doing, it’s possible
to blow up your house. If you do know what you’re doing, nearly any
problem can be solved by taking it apart and cleaning things or
replacing components.<p>Gas ranges have the UNIX nature: they are powerful, can be controlled
precisely, and if you only half-know what you are doing, it’s possible
to blow up your house. If you do know what you’re doing, nearly any
problem can be solved by taking it apart and cleaning things or
replacing components.</p>
<p>Electric ranges are like Windows: they might eventually do the thing
they’re supposed to do, but it’s hard to control them, there is a
propensity to wildly oversteer, and you really don’t get the same power.
If it breaks in a way that requires you to diagnose what went wrong and
fix a part, it may be cheaper and will certainly be faster to buy a new
one.</p>
<p>Induction ranges are like Macs: there’s a simple control, it’s
reasonably powerful, and if you don’t buy the right hardware it won’t
work at all. Some problems are easy to solve, and others are a result of
the design and you just aren’t allowed to fix them.</p>
amazon kindle fire hd10 microreview2018-07-29T08:02:07-04:002018-07-29T08:02:07-04:00-dsr-tag:blog.randomstring.org,2018-07-29:/2018/07/29/amazon-kindle-fire-hd10-microreview/The Amazon Kindle Fire HD10 (2017) is the high-end tablet of their
line. The hardware is mediocre and the software is quite bad. I do not
recommend you purchase this or any other Fire tablet… unless you have
some very specific requirements.<p>The Amazon Kindle Fire HD10 (2017) is the high-end tablet of their
line. The hardware is mediocre and the software is quite bad. I do not
recommend you purchase this or any other Fire tablet… unless you have
some very specific requirements.</p>
<p>Let’s consider the negatives, first.</p>
<p><em>Bootloader is locked</em></p>
<p>Having a locked bootloader means that you can’t replace the OS with a
sane one. If you could do that, then all other software problems could
be overcome by a slightly technical person. (If you can follow
directions well enough, there are good guides for most systems to walk
you right through the process of installing a sane Android OS.)</p>
<p><em>Hardware is not fast</em></p>
<p>The Fire HD10 has a MediaTek MT8173 CPU, which offers 2 fast cores
and 2 slow cores (for power saving). The fast cores are not as fast as a
2018 phone’s slow cores. This is not a device that can play high-end
games. It is just about suitable for watching HD video.</p>
<p><em>Operating System is owned by Amazon Marketing</em></p>
<p>The marketing divisions of Amazon, Facebook, Google and Microsoft are
descended from the Sirius Cybernetics Corporation’s Marketing Division.
The OS assumes that since you gave Amazon money once in order to buy the
tablet, you must want to give Amazon all your personal information and
buy things exclusively from Amazon in the future. It implements
ridiculous locks to make the process of customizing the tablet as
difficult as possible. For example, Android devices have a replaceable
launcher. That’s the program that runs when you tap the Home button, and
provides access to the other installed applications. FireOS doesn’t want
you to do that, so they half-assed a lock to prevent installing a
different launcher.</p>
<p><em>Rooting is painful</em></p>
<p>On sane Android devices, here is the procedure to get root
privileges:</p>
<ul>
<li>Tap the serial number 7 times to open developer mode.</li>
<li>Set up USB debugging mode.</li>
<li>Reboot to recovery.</li>
<li>Use the USB debugging link to install a superuser package.</li>
<li>Reboot to normal.</li>
</ul>
<p>This one isn’t sane; it’s more like an Apple IOS device, where you
need to look for a hole in the operating system that you can exploit to
temporarily get root privileges so that you can install your superuser
app. If you are thinking that the presence of such a hole means that
other programs can also gain root, you are correct. This just shows the
lack of attention to your security on Amazon’s part.</p>
<p>Considerations which might make this worth buying</p>
<p><em>Price</em></p>
<p>The Fire HD10 (2017) lists at $150 and is frequently on sale for
$120.</p>
<p><em>Screen</em></p>
<p>The 10” screen is 1920x1200, which makes it adequate for my intended
usage. The combination of this price and this screen makes it worth
buying… for me.</p>
<p><em>Rootable</em></p>
<p>The process to root the phone is arduous, but it does exist. I don’t
like having computing devices in my house that someone else owns.</p>
<p><em>microSD slot</em></p>
<p>In addition to a reasonable built-in storage, it has a microSD slot
that can handle a 128GB card, and might be able to handle a 256GB card.
That means you can bring enough local media to keep yourself entertained
for a while.</p>
<p><em>Why I bought it</em></p>
<p>After rooting it, destroying most of the Amazon ecosystem and dashing
the dreams of their marketing division, I plan to load it up with comics
and books to read. Comics demand a fairly large, fairly high-resolution
screen, and they want lots of storage space, but they don’t need much
else. Showing one full page of comics every five to fifty seconds just
isn’t taxing to any CPU that can decode a 1080P video frame 30-60 times
per second.</p>
<p><em>What you should buy</em></p>
<p>If you are non-technical, get an Apple iPad mini, and accept that you
will be shown ads and not have much control over your life. If you want
a general-purpose Android tablet that you can control, the Samsung
Galaxy Tab A 10.1 (2016) is faster, has a similar screen, microSD slot,
and is better built. It’s also more expensive.</p>
<p>If you are want to spend as little money as possible on a
comics-reader, are prepared to figure out that 5.6.2.0 has the Dirty COW
(CVE-2016-5195) vulnerability while 5.6.1.0 does not… sure, go ahead and
buy this. Don’t say I didn’t warn you.</p>
replace procmail with maildrop2018-07-26T15:36:26-04:002018-07-26T15:36:26-04:00-dsr-tag:blog.randomstring.org,2018-07-26:/2018/07/26/replace-procmail-with-maildrop/By all means, replace procmail with maildrop.<p>By all means, replace procmail with maildrop.</p>
<p>If you haven’t read a procmailrc in a few months, it’s so much line
noise and you need to consult the man pages again.</p>
<p>If you haven’t read a maildrop recipe file, well – here’s a nearly
maximum-complexity snippet:</p>
<pre><code> xfilter "/usr/bin/spamc -U /var/lib/spamassassin/socket"
if (/^X-Spam-Status: Yes/)
{
to Maildir/spam/
}
`reformail -D 16000 duplicate.cache`
if ( $RETURNCODE == 0 )
exit
if (/^X-Facebook.*/:h)
to Maildir/facebook/
if (/^Subject: \[Slack\] Notifications.*/:h)
to Maildir/slack/
</code></pre>
<p>You now know how to do 90% of everything you’ll ever want your
mailfilter to do, and debugging it next year will be simple.</p>
a nice improvement in maildrop2018-07-26T14:46:32-04:002018-07-26T14:46:32-04:00-dsr-tag:blog.randomstring.org,2018-07-26:/2018/07/26/a-nice-improvement-in-maildrop/<p>Way back in 2014, I wrote <a href="https://blog.randomstring.org/2014/10/30/two-stage-mail-filtering/">about
my two stage mail filter</a> system. At the time, I had to use a helper
program called <code>deliver-to-maildir</code> in order to get my read
messages correctly delivered as seen, rather than new.</p>
<p>In the intervening time, Sam Varshavchik, the primary programmer of
Courier and maildrop, made some improvements. The really useful one is
this:</p>
<pre><code> if (/^To:.*school@domain.edu/:h)
to "| /usr/local/bin/deliver-to-maildir seen $HOME/Maildir/.school/"</code></pre>
<p>can now be handled like this:</p>
<pre><code> FLAGS="S"
if (/^To:.*school@domain.edu/:h)
to $HOME/Maildir/.school/</code></pre>
<p>Much cleaner, and you can either set FLAGS once at the top of your
mailfilter or inside a scope just before your <code>to</code>
delivery.</p>
<p>Way back in 2014, I wrote <a
href="https://blog.randomstring.org/2014/10/30/two-stage-mail-filtering/">about
my two stage mail filter</a> system. At the time, I had to use a helper
program called <code>deliver-to-maildir</code> in order to get my read
messages correctly delivered as seen, rather than new.</p>
<p>In the intervening time, Sam Varshavchik, the primary programmer of
Courier and maildrop, made some improvements. The really useful one is
this:</p>
<pre><code> if (/^To:.*school@domain.edu/:h)
to "| /usr/local/bin/deliver-to-maildir seen $HOME/Maildir/.school/"</code></pre>
<p>can now be handled like this:</p>
<pre><code> FLAGS="S"
if (/^To:.*school@domain.edu/:h)
to $HOME/Maildir/.school/</code></pre>
<p>Much cleaner, and you can either set FLAGS once at the top of your
mailfilter or inside a scope just before your <code>to</code>
delivery.</p>
commutes are worth money2018-07-12T13:44:01-04:002018-07-12T13:44:01-04:00-dsr-tag:blog.randomstring.org,2018-07-12:/2018/07/12/commutes-are-worth-money/<p>The new office is further away from my house but a shorter commute in
time.</p>
<p>For the last fourteen or so years, my commute has been one of these
variations:</p>
<ul>
<li>Walk to a bus stop, catch a bus for an hour, walk to work. Elapsed
time 1:25.</li>
<li>Walk to a bus stop, catch a bus for an hour, take the Red Line, walk
to work. Elapsed time 1:30. * Be dropped off at a trolley stop, catch a
trolley, change to Red Line, walk to work. Elapsed time 1:05.</li>
<li>Be dropped off at a Red Line stop, take the Red Line, walk to work.
0:55.</li>
</ul>
<p>I can still do the last three of those, adding about 5 minutes for a
further stop on the Red Line. But I now have a new option:</p>
<ul>
<li>Be dropped off at the commuter rail stop, take a train to North
Station, walk to work. 0:43.</li>
</ul>
<p>In addition to being the shortest overall time, it has the benefit of
being the most predictable: a bus or a subway comes when it will, but
the commuter rail trains are scheduled. </p><p>The new office is further away from my house but a shorter commute in
time.</p>
<p>For the last fourteen or so years, my commute has been one of these
variations:</p>
<ul>
<li>Walk to a bus stop, catch a bus for an hour, walk to work. Elapsed
time 1:25.</li>
<li>Walk to a bus stop, catch a bus for an hour, take the Red Line, walk
to work. Elapsed time 1:30. * Be dropped off at a trolley stop, catch a
trolley, change to Red Line, walk to work. Elapsed time 1:05.</li>
<li>Be dropped off at a Red Line stop, take the Red Line, walk to work.
0:55.</li>
</ul>
<p>I can still do the last three of those, adding about 5 minutes for a
further stop on the Red Line. But I now have a new option:</p>
<ul>
<li>Be dropped off at the commuter rail stop, take a train to North
Station, walk to work. 0:43.</li>
</ul>
<p>In addition to being the shortest overall time, it has the benefit of
being the most predictable: a bus or a subway comes when it will, but
the commuter rail trains are scheduled. </p>
zfs is pretty good2018-07-09T09:02:52-04:002018-07-09T09:02:52-04:00-dsr-tag:blog.randomstring.org,2018-07-09:/2018/07/09/zfs-is-pretty-good/Someone on the <code>debian-user</code> list just discovered that
<code>gpt</code> partitioning allows you to put 128 partitions on a
disk. They got really excited at the granularity that would allow. They
weren’t thinking about the exciting maintenance procedures that would
inevitably follow – not enough space here, too much space there, backups
all over the place.<p>Someone on the <code>debian-user</code> list just discovered that
<code>gpt</code> partitioning allows you to put 128 partitions on a
disk. They got really excited at the granularity that would allow. They
weren’t thinking about the exciting maintenance procedures that would
inevitably follow – not enough space here, too much space there, backups
all over the place.</p>
<p>This is the sort of thing that ZFS excels at.</p>
<p>For example, let’s say you have five 1 TB disks, and you have less
than 1TB that you really really want to have safe.</p>
<p>You could set up the following:</p>
<p>mainpool: a zpool composed of 2 mirrored pairs backuppool: a zpool
composed of one disk set up as a mirrored pair with one missing.</p>
<p>This gives you 2TB of space on mainpool and 1TB on backuppool.</p>
<p>Now you create zfs filesystems:</p>
<ul>
<li>mainpool/home
<ul>
<li>/images</li>
<li>/videos</li>
<li>/print</li>
<li>/finance</li>
<li>/temp</li>
</ul></li>
</ul>
<p>You don’t need to configure a particular size on any of these. They
all share the underlying mainpool. It makes sense to turn transparent
compression on for home, finance and temp, but not for images, video and
print.</p>
<p>You set up a cron job to take zfs snapshots of everything in mainpool
once an hour, once a day, and once a week, and another to delete hourly
snaps after 48 hours, delete daily snaps after a week, and delete weekly
snaps after two months.</p>
<p>You then set up a cron job to run a zfs send -> zfs receive from
the more important mainpool filesystems to backuppool once a day or
so.</p>
<p>(All these cron jobs are made even simpler by running the
not-yet-Debian-packaged <a
href="https://github.com/jimsalterjrs/sanoid">syncoid</a> and <a
href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=869845">sanoid</a>
scripts.)</p>
<p>If you run out of space on mainpool, you can add pairs of disks to
it, or upgrade all the disks one at a time, or both.</p>
<p>If you run out of space on backuppool, you can switch to a larger
disk or add disks.</p>
<p>There are, of course, many other options available.</p>
moving2018-06-28T12:35:24-04:002018-06-28T12:35:24-04:00-dsr-tag:blog.randomstring.org,2018-06-28:/2018/06/28/moving/We’re moving the corporate headquarters from Cambridge to Boston.
Rent in Kendall Square is up to Manhattan levels, and despite two rounds
of looking for new places in Cambridge, we need to go over the
bridge.<p>We’re moving the corporate headquarters from Cambridge to Boston.
Rent in Kendall Square is up to Manhattan levels, and despite two rounds
of looking for new places in Cambridge, we need to go over the
bridge.</p>
<p>This is the fifth or sixth move I’ve been part of. When your company
is profitable but not a super-profitable growth giant, having a good
space to work in is difficult, but not difficult enough to make it
impossible. You can’t afford to buy real estate, and you’re not big
enough to make a landlord drool. On the other hand, this is a seven year
lease, and we have full rights to sublet. If we become a big success,
someone will want the space and we won’t lose money on the deal.</p>
<p>We’ve collectively decided that we don’t trust the movers with our
plants. The office plants are all personal property of various
employees, and we’re quite attached to them. My two jade plants were
once a single tiny jade in a 1 quart flower-pot. My mother gave it to me
when I went off to college, and I’ve had it ever since. When the leaves
start getting thin and wrinkly, I water thoroughly – about a quart at a
time per plant, these days – and then they go back to being happy.</p>
<p>This office has been my work home for the last six years. I’ve been
packing things into shipping crates, throwing away junk, recycling paper
– but the lack of jades sitting by the window is a problem. In the space
of a minute, it transformed from being my comfortable workspace to just
another office.</p>
GDPR thingy2018-05-24T16:36:12-04:002018-05-24T16:36:12-04:00-dsr-tag:blog.randomstring.org,2018-05-24:/2018/05/24/gdpr-thingy/<p>This is a personal blog. I run it myself. I own the hardware, I
select the software, it is all properly (open source) licensed. If you
read things here, peachy. If you don’t read, how are you going to
complain?</p>
<p>If you send me comments, I may publish them, unless you tell me not
to.</p>
<p>If you subscribe via RSS, presumably you know how to unsubscribe,
too.</p>
<p>There are no forms, so you can’t submit personal information unless
you email it to me. Oh, what about the search box? That doesn’t send
anything to my machines. That executes a DuckDuckGo search, so deal with
<a href="https://duckduckgo.com">DuckDuckGo</a> if you need to complain
about it.</p>
<p>There, that was fun. If you have a complaint, send it to me. I like
to pretend that I am a reasonable human being.
</p><p>This is a personal blog. I run it myself. I own the hardware, I
select the software, it is all properly (open source) licensed. If you
read things here, peachy. If you don’t read, how are you going to
complain?</p>
<p>If you send me comments, I may publish them, unless you tell me not
to.</p>
<p>If you subscribe via RSS, presumably you know how to unsubscribe,
too.</p>
<p>There are no forms, so you can’t submit personal information unless
you email it to me. Oh, what about the search box? That doesn’t send
anything to my machines. That executes a DuckDuckGo search, so deal with
<a href="https://duckduckgo.com">DuckDuckGo</a> if you need to complain
about it.</p>
<p>There, that was fun. If you have a complaint, send it to me. I like
to pretend that I am a reasonable human being.
</p>
lies, revisited2018-05-17T09:04:24-04:002018-05-17T09:04:24-04:00-dsr-tag:blog.randomstring.org,2018-05-17:/2018/05/17/lies-revisited/<a href="https://blog.randomstring.org/blog/2014/12/13/lies-damned-lies-and-benchmarks/">In
‘Lies, Damned Lies and Benchmarks’ (2014)</a> I wrote about varying
measures of CPU power versus perception of speed, and concluded that
there were no order-of-magnitude differences in affordable CPUs. Three
and a half years later, there ought to be some change in the market.
What’s the best bang-for-the-buck these days?<p><a
href="https://blog.randomstring.org/blog/2014/12/13/lies-damned-lies-and-benchmarks/">In
‘Lies, Damned Lies and Benchmarks’ (2014)</a> I wrote about varying
measures of CPU power versus perception of speed, and concluded that
there were no order-of-magnitude differences in affordable CPUs. Three
and a half years later, there ought to be some change in the market.
What’s the best bang-for-the-buck these days?</p>
<p>I characterized an AMD Athlon 5150 as the low end: x86-64, 4 cores,
2GHz, and for a cost of $50 or so, a single-thread performance index of
804. For the top of the reasonable range, I selected the i3-4470, 2
cores producing a benchmark of 2240 each for $150.</p>
<p>The low end has moved a little. A $50 Intel Pentium G4400 scores
1878, more than twice as fast at the Athlon. You can get slower, cheaper
CPUs soldered into motherboards; the market doesn’t really have a place
for swappable PC-class CPUs under $40. On the other side, you can pay
$140 for an AMD Ryzen 5 1400 (4 cores, each at 1726, plus 4 more
hyperthreads) or a few dollars more for an Intel i3-8300 (4 cores at
2300, no hyperthreading). Essentially, you can get two to three times
the performance for the same price, but only in parallel – the single
thread CPU speed hasn’t changed appreciably.</p>
<p>The cost-no-object fastest single thread CPU is the Intel i7-8700,
which will cost just $350, heat up your system with a reasonable 95W,
and score a charming 2700 on that benchmark. You do get six cores and
hyperthreading, but if you’re going for a parallel workload, you might
be better off paying $25 less for a Ryzen 2700X, 8 cores, 16 threads,
and a score per thread of 2200. Depends on your workload, but it doesn’t
depend that much.</p>
taking names2018-05-15T11:08:32-04:002018-05-15T11:08:32-04:00-dsr-tag:blog.randomstring.org,2018-05-15:/2018/05/15/taking-names/If you have a domain name registered, you need to renew your registration every few years. You can generally ask for a 1-3 year cycle.<p>If you have a domain name registered, you need to renew your registration every few years. You can generally ask for a 1-3 year cycle.</p>
<p>If you like your DNS registrar, there is no need to switch.</p>
<p>Today I received paper mail from a company called iDNS. I'm not a customer. The mail looked an awful lot like a bill.</p>
<blockquote>
"You must renew your domain name to retain exclusive rights to it on the Web, and now is the time to transfer and renew your name from your current Registrar to Internet Domain Name Services. Failure to renew your domain name by the expiration date may result in a loss of your online identity making it difficult for your customers and friends to locate you on the Web."</blockquote>
<p>Sounds scary.</p>
<p>You are probably already guessing that their prices are much higher than a random sampling of other registrars. You would be correct:</p>
<table border="1" class="docutils">
<colgroup>
<col width="24%" />
<col width="22%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">company</th>
<th class="head">1st year</th>
<th class="head">subsequent year</th>
</tr>
</thead>
<tbody valign="top">
<tr><td>Namecheap</td>
<td>$10.98</td>
<td>$10.98</td>
</tr>
<tr><td>1&1</td>
<td>$0.99</td>
<td>14.99</td>
</tr>
<tr><td>iDNS</td>
<td>$45.00</td>
<td>35.00 (on two year plan)</td>
</tr>
</tbody>
</table>
<p>Nice deal, right?</p>
<p>I recommend you avoid doing business with them -- for anything. A company which will try this, I would not trust for anything else.</p>
the game of competing hypotheses2018-04-29T08:58:54-04:002018-04-29T08:58:54-04:00-dsr-tag:blog.randomstring.org,2018-04-29:/2018/04/29/the-game-of-escalating-hypotheses/<p>I haven’t seen this documented before, so I will do so.</p>
<p>Let’s suppose that we are playing the Internet’s favorite interactive
game, Discuss Something. I’m sure you’ve played it. One person makes a
statement, another person decides that they should correct the
statement, and the game is on. Assuming an appropriate medium - Usenet,
an email list, a chat board, Facebook, LiveJournal, the comments section
of a newspaper - other people might join in.</p>
<p>One style of argument is to present evidence, preferably citing
sources, along with a chain of reasonable statements that move from the
evidence to the desired conclusion.</p>
<p>Another style of argument is to present hypotheses that exactly
counter the last evidence of the other side.</p>
<p>In a game of escalating hypotheses, where one side feels bound to
respect evidence and the other gets to make up stories, the side that
makes up stories also gets to make up the story where they win.</p>
<p>I haven’t seen this documented before, so I will do so.</p>
<p>Let’s suppose that we are playing the Internet’s favorite interactive
game, Discuss Something. I’m sure you’ve played it. One person makes a
statement, another person decides that they should correct the
statement, and the game is on. Assuming an appropriate medium - Usenet,
an email list, a chat board, Facebook, LiveJournal, the comments section
of a newspaper - other people might join in.</p>
<p>One style of argument is to present evidence, preferably citing
sources, along with a chain of reasonable statements that move from the
evidence to the desired conclusion.</p>
<p>Another style of argument is to present hypotheses that exactly
counter the last evidence of the other side.</p>
<p>In a game of escalating hypotheses, where one side feels bound to
respect evidence and the other gets to make up stories, the side that
makes up stories also gets to make up the story where they win.</p>
on the spontaneous use of statistics2018-04-14T08:41:07-04:002018-04-14T08:41:07-04:00-dsr-tag:blog.randomstring.org,2018-04-14:/2018/04/14/on-the-spontaneous-use-of-statistics/<p>To be clear:</p>
<ul>
<li><p>If I link or otherwise attribute a source for a statistical
figure, that’s the source that I’m using.</p></li>
<li><p>If I blather off an estimate like <em>87% of all statistics are
made up on the spot</em>, that is almost certainly hyperbole.</p></li>
<li><p>If I show my work on making an estimate, I am reasonably
confident that my logic is consistent and my sources are not absolutely
ridiculous. But it’s an estimate, and you should confirm it
independently before relying on it in any serious
decision-making.</p></li>
</ul>
<p>These are also the rules I expect from random sources on the
Internet. </p><p>To be clear:</p>
<ul>
<li><p>If I link or otherwise attribute a source for a statistical
figure, that’s the source that I’m using.</p></li>
<li><p>If I blather off an estimate like <em>87% of all statistics are
made up on the spot</em>, that is almost certainly hyperbole.</p></li>
<li><p>If I show my work on making an estimate, I am reasonably
confident that my logic is consistent and my sources are not absolutely
ridiculous. But it’s an estimate, and you should confirm it
independently before relying on it in any serious
decision-making.</p></li>
</ul>
<p>These are also the rules I expect from random sources on the
Internet. </p>
engineering management advice2018-04-07T12:02:21-04:002018-04-07T12:02:21-04:00-dsr-tag:blog.randomstring.org,2018-04-07:/2018/04/07/engineering-management-advice/As a manager, you can tell if an engineer is happy with their work if
they are comfortable with giving higher-ups constructive feedback about
issues at hand directly. As an engineer, you can tell if a manager is
actively working for you if you see at least some action performed as a
response to your feedback. When both things happen, management might see
an increase in reported problems during development, but they’ll also
see an increase in resolutions, instead of seeing fewer but critical
issues that go unresolved.<blockquote>
<p>As a manager, you can tell if an engineer is happy with their work if
they are comfortable with giving higher-ups constructive feedback about
issues at hand directly. As an engineer, you can tell if a manager is
actively working for you if you see at least some action performed as a
response to your feedback. When both things happen, management might see
an increase in reported problems during development, but they’ll also
see an increase in resolutions, instead of seeing fewer but critical
issues that go unresolved.</p>
</blockquote>
<p><cite>from <a
href="https://allarsblog.com/2018/03/16/confessions-of-an-unreal-engine-4-engineering-firefighter/">Confessions
of an Unreal 4 Engine Engineering Firefighter</a> </cite></p>
<p>Despite the title, the advice in this article is, I think, much more
widely applicable than mere video game development. You should probably
read it.</p>
<p>(Mere? Video games involve artists, musicians, UX, storytellers, and
above all live and die on the strength of their QA teams. Nothing mere
about it.)</p>
<p>There are useful war stories about financial mismanagement, fraud,
management issues, and a short tale of a company that turned itself
around by listening to the employees.</p>
zfs internal error2018-03-28T13:00:55-04:002018-03-28T13:00:55-04:00-dsr-tag:blog.randomstring.org,2018-03-28:/2018/03/28/zfs-internal-error/Useful tip (for me): any time ZFS emits <em>internal error: Invalid
argument</em>, what it probably means is that the DKMS module and the
userland utilities are different versions.<p>Useful tip (for me): any time ZFS emits <em>internal error: Invalid
argument</em>, what it probably means is that the DKMS module and the
userland utilities are different versions.</p>
<p><code>sudo modinfo zfs|head</code> will tell you what version your
kernel is using; <code>apt show -a zfsutils-linux</code> will tell you
what versions of the user commands are available. Look for a
mismatch.</p>
quote of the day n+1th2018-03-14T13:45:46-04:002018-03-14T13:45:46-04:00-dsr-tag:blog.randomstring.org,2018-03-14:/2018/03/14/quote-of-the-day-n-1th/I had the most satisfying Eureka experience of my career while
attempting to teach flight instructors that praise is more effective
than punishment for promoting skill-learning. When I had finished my
enthusiastic speech, one of the most seasoned instructors in the
audience raised his hand and made his own short speech, which began by
conceding that positive reinforcement might be good for the birds, but
went on to deny that it was optimal for flight cadets. He said, “On many
occasions I have praised flight cadets for clean execution of some
aerobatic maneuver, and in general when they try it again, they do
worse. On the other hand, I have often screamed at cadets for bad
execution, and in general they do better the next time. So please don’t
tell us that reinforcement works and punishment does not, because the
opposite is the case.” This was a joyous moment, in which I understood
an important truth about the world: because we tend to reward others
when they do well and punish them when they do badly, and because there
is regression to the mean, it is part of the human condition that we are
statistically punished for rewarding others and rewarded for punishing
them. I immediately arranged a demonstration in which each participant
tossed two coins at a target behind his back, without any feedback. We
measured the distances from the target and could see that those who had
done best the first time had mostly deteriorated on their second try,
and vice versa. But I knew that this demonstration would not undo the
effects of lifelong exposure to a perverse contingency.<blockquote>
<p>I had the most satisfying Eureka experience of my career while
attempting to teach flight instructors that praise is more effective
than punishment for promoting skill-learning. When I had finished my
enthusiastic speech, one of the most seasoned instructors in the
audience raised his hand and made his own short speech, which began by
conceding that positive reinforcement might be good for the birds, but
went on to deny that it was optimal for flight cadets. He said, “On many
occasions I have praised flight cadets for clean execution of some
aerobatic maneuver, and in general when they try it again, they do
worse. On the other hand, I have often screamed at cadets for bad
execution, and in general they do better the next time. So please don’t
tell us that reinforcement works and punishment does not, because the
opposite is the case.” This was a joyous moment, in which I understood
an important truth about the world: because we tend to reward others
when they do well and punish them when they do badly, and because there
is regression to the mean, it is part of the human condition that we are
statistically punished for rewarding others and rewarded for punishing
them. I immediately arranged a demonstration in which each participant
tossed two coins at a target behind his back, without any feedback. We
measured the distances from the target and could see that those who had
done best the first time had mostly deteriorated on their second try,
and vice versa. But I knew that this demonstration would not undo the
effects of lifelong exposure to a perverse contingency.</p>
</blockquote>
<p><cite> Daniel Kahneman, in <em>Les Prix Nobel. The Nobel Prizes
2002</em></cite></p>
the cost of GPL is not in dollars2018-02-28T15:47:22-05:002018-02-28T15:47:22-05:00-dsr-tag:blog.randomstring.org,2018-02-28:/2018/02/28/the-cost-of-gpl-is-not-in-dollars/<p>The price for using a math library developed by Foobar Corporation is
$10,000 plus 1% of the sale price of your product, or whatever you
negotiate with them.</p>
<p>The price for using a GPL’d math library is that you must license
your source code under the GPL as well.</p>
<p>The price for using an LGPL’d math library is distributing the source
for the library along with your product. If you modify the library
itself, then that falls back to the GPL.</p>
<p>In no case are you getting something for nothing. It’s just that the
cost of using GPL’d software isn’t usually in dollars, but in
contributions of more software. </p><p>The price for using a math library developed by Foobar Corporation is
$10,000 plus 1% of the sale price of your product, or whatever you
negotiate with them.</p>
<p>The price for using a GPL’d math library is that you must license
your source code under the GPL as well.</p>
<p>The price for using an LGPL’d math library is distributing the source
for the library along with your product. If you modify the library
itself, then that falls back to the GPL.</p>
<p>In no case are you getting something for nothing. It’s just that the
cost of using GPL’d software isn’t usually in dollars, but in
contributions of more software. </p>
revisiting Google Fi2018-02-21T11:03:37-05:002018-02-21T11:03:37-05:00-dsr-tag:blog.randomstring.org,2018-02-21:/2018/02/21/revisiting-google-fi/This is the end of my second year as a Google Fi subscriber.<p>This is the end of my second year as a Google Fi subscriber.</p>
<p>TL;DR: I’m keeping this service and I recommend it for people who are
happy with the limited phone selection.</p>
<p><a
href="https://blog.randomstring.org/blog/2017/02/24/i-recommend-google-fi">About
a year ago, I wrote about Fi.</a> This is the update.</p>
<p>Average price per month, exclusive of the phone: $30.24. This
includes unlimited voice calls and texts, and data paid for at the rate
of $10 per GB, accounted for at the megabyte level - one cent per
megabyte.</p>
<p>I have not paid for a new phone in that time, but when I complained
about battery life problems with my Nexus 6P, Google sent me a new Pixel
XL for free. I do not expect an offer like that to be repeated, but I
also don’t expect a phone to die of battery problems when it’s just over
a year old.</p>
<ul>
<li>two years of service: $725.84</li>
<li>phone: $700</li>
</ul>
<p>The cheap phone option right now is the Moto One X4, which is $250.
It appears to be a perfectly good phone.</p>
time is not money2018-01-16T10:58:11-05:002018-01-16T10:58:11-05:00-dsr-tag:blog.randomstring.org,2018-01-16:/2018/01/16/time-is-not-money/Many people like to claim “my time is worth the $/hour I could have
earned”. It’s usually bull.<p>Many people like to claim “my time is worth the $/hour I could have
earned”. It’s usually bull.</p>
<p>If you are paid hourly, it is 95% likely that your hours are set by
your employer, not you. You can’t spend a random extra hour working to
get another $X. If you work on a project basis, you’re going to end up
working for all the hours that the project takes, regardless of whether
that happens now or next week. And if you’re an independent
professional/contractor, like a therapist or a plumber, your limits are
the work that comes in and the work that you’re willing to take – they
have to line up, you can’t decide that Wilson needs to have a drain
unclogged right now or that Sandra needs to talk to you tonight.</p>
<p>If you are paid a salary, it is 98% likely that extra hours spent
working reduce your $/hour, not increase it. Do you have authority to
spend overtime at will? Do you have a bonus that is likely to be
affected by an extra hour of work? Congrats, you’re in that 2% or
so.</p>
<p>I urge people to value their time by the substitutions that they
would be likely to make:</p>
<ul>
<li>sleep. A lot of people would be very happy to get an extra hour of
sleep.</li>
<li>time with family</li>
<li>time without family</li>
<li>hobbies</li>
<li>time with friends</li>
</ul>
<p>Your time is worth the equivalent of what you would do with it
otherwise, and that usually doesn’t have a dollar value. It does still
have value.</p>
books at year end2017-12-27T12:17:07-05:002017-12-27T12:17:07-05:00-dsr-tag:blog.randomstring.org,2017-12-27:/2017/12/27/books-at-year-end/I liked all these books recently.<ul>
<li>Melissa Olson, Nightshades</li>
<li>Harry Connolly, The Twisted Path</li>
<li>Ryk Spoor, Princess Holy Aura</li>
<li>Faith Hunter, Flame in the Dark</li>
<li>Mira Grant, Into The Drowning Deep</li>
<li>Brandon Sanderson, Oathbound</li>
<li>Jim Hines, Terminal Alliance</li>
<li>James Allan Gardner, All Those Explosions Were Someone Else’s
Fault</li>
<li>Sebastian de Castell, Spellslinger</li>
</ul>
<p>I liked all these books recently.</p>
<p><em>Nightshades</em> is the beginning of a new series: FBI vs
vampires. It’s well-written, has a tight plot, and is short. Gore, not
sparkles.</p>
<p><em>The Twisted Path</em> is the rebirth of Connolly’s excellent
Twenty Palaces universe – it was discontinued by the publisher after the
initial three books, but the author has started self-publishing again.
If you like this series, you will be well-pleased by this entry. If you
haven’t read it, here’s what you need to know: there are Lovecraftian
Things – Predators – from other dimensions that are occasionally
summoned to Earth by idiots who think that they can get power or wealth.
The idiots usually can… until the Predators corrupt them or eat them or
take over their bodies and start implementing their own plans. Standing
against the Predators are a few magicians, loosely organized into the
Twenty Palaces Society. None of them are nice people. In fact, they
could best be described as mass-murderers who would prefer not to have
their world eaten. And then there’s our viewpoint character: Ray Lilly,
who is not a nice person, and is not a magician, but has been forced
into serving them – and he would also very much like to not have the
world eaten. Hardboiled urban fantasy.</p>
<p><em>Princess Holy Aura</em>, or, The Ethical Magical Girl. Whoosh:
this is an examination of the Mahō Shōjo subgenre, which is probably
most familiar to you from Sailor Moon. N teenage girls are granted
superpowers by a talking animal in order to defend the Earth from
evildoers. What’s new here? Spoor takes it seriously, starting with the
talking rat deciding that the new Princess Holy Aura avatar should
reside in… a thirty-year old male. Deep discussions of gender,
sexuality, consent, maturity and power dynamics, all while being a
surprisingly entertaining and thunderously loud war story. Extra points:
it’s complete in one volume.</p>
<p><em>Flame in the Dark</em>: book three in the series spun off from
the Jane Yellowrock shapeshifter urban fantasy series. Nell Ingram
continues to develop a backbone while learning to get along in the
modern world. It helps that she seems to be a dryad, or something like
that.</p>
<p><em>Into the Drowning Deep</em> is all about mermaids, with the
typical Mira Grant perspective: let’s take the biology seriously and see
what awful horrors we can derive from that. Not everyone dies.</p>
<p><em>Oathbound</em> is the third slab of the Stormlight Archive
series: do not start here. You get to see the discovery of the Archive.
Also, people and things do amazing and heroic stuff.</p>
<p><em>Terminal Alliance</em> begins a new SF series with a significant
comedic component. After humanity is reduced to feral zombies by a
plague, the space squids zoom in to help us recover. Now the first ship
manned largely by recovered humans goes forth on its big mission, only
to run into serious trouble almost immediately. Will the surviving
janitors save the day? (Yes.)</p>
<p><em>All Those Explosions Were Someone Else’s Fault</em> is a
riotously entertaining comic book in prose form covering the origins of
Kitchener-Waterloo’s regional superhero team and their first few battles
against the Dark.</p>
<p><em>Spellslinger</em> looks like it’s going to be one of those
magical academy stories set in a secondary world, and then subverts it
nicely. To begin with, the protagonist is terribly unsuccessful at
actual magic. For another, he’s going to be killed if he doesn’t
graduate successfully. That sounds like a terrible school – and it is.
But the story is great.</p>
a most important job2017-12-21T18:27:35-05:002017-12-21T18:27:35-05:00-dsr-tag:blog.randomstring.org,2017-12-21:/2017/12/21/a-most-important-job/Your company probably needs a librarian. Maybe more than one.<p>Your company probably needs a librarian. Maybe more than one.</p>
<p>A modern librarian selects, installs, configures and administrates
knowledge management software. They are experts in organizational
methods and search techniques.</p>
<p>A librarian may take in paper documents and convert them to
electronic formats. Everything gets stored, indexed, and made searchable
and retrievable. Wikis are re-organized, old information marked for
review and status updated: is it still correct? reliable? useful?</p>
<p>You have email that concerns a whole team, contracts with history,
agreements with revisions. Librarians control the automation that keeps
track of that for you. You have customer contact databases – a librarian
knows that in addition to names, phone numbers and email addresses, you
need to store the date you entered the contact, the last time anyone
successfully used it, and whether they are current customers. Librarians
are good at establishing criteria for automatic pruning.</p>
<p>Your people send documents around by mail. Librarians can help you
de-duplicate, and also track revision history. Do you have an internal
instant message facility, or chat rooms? Librarians figure out how to
pull the archives in so that you can find the discussion years after you
switched to a different service. They integrate search services so that
you get all the relevant results in formats that you can use. If you
produce animations, videos, audio or music, you already have a librarian
– or everybody is part-librarian, and it isn’t very efficient, is
it?</p>
<p>Your company probably needs a good librarian.</p>
do not drink and sysadmin2017-12-12T12:27:59-05:002017-12-12T12:27:59-05:00-dsr-tag:blog.randomstring.org,2017-12-12:/2017/12/12/do-not-drink-and-sysadmin/neutral restructuring2017-11-23T20:10:02-05:002017-11-23T20:10:02-05:00-dsr-tag:blog.randomstring.org,2017-11-23:/2017/11/23/neutral-restructuring/It’s not enough that Net Neutrality be enforced. That’s just a basic
requirement to keep corporations from completely exploiting their
customers.<p>It’s not enough that Net Neutrality be enforced. That’s just a basic
requirement to keep corporations from completely exploiting their
customers.</p>
<p>What would a good long-term solution look like?</p>
<p>We can look at history. In 1982, the eight-year antitrust suit
against AT&T was ended by the breakup of AT&T into multiple
entities, seven of which had a regional infrastructure and one of which
held on to long-distance, research, and computer hardware and services.
In addition, the de facto monopoly was broken by requiring transport
service to be available at a wholesale rate to any qualified party.</p>
<p>The result was that from 1982 through 1996, the country had real
competition in telecom services of all kinds. Prices dropped, new
services became available, and small companies with good ideas became
medium and large companies.</p>
<p>What could we do similarly? In the vast majority of residential
places of the United States, there are a maximum of four Internet
Service Providers: a cable company with DOCSIS cable modems, a phone
company offering mostly inferior DSL service, and two national satellite
Internet companies, Hughes and Exede, which both provide expensive,
slow, and severely capped data services. In a few places, you can find
competing cable-equivalent services, usually a cable co and Verizon’s
FIOS service. In still fewer, there are two competing cable
companies.</p>
<p>Any improvement in competition is good: in areas where Google
introducted its fiber network service, local cable companies increased
service offerings or lowered prices or both – but only in neighborhoods
where Google was actually providing service.</p>
<p>Let’s consider a structural solution. Some situations are just more
efficient with monopolies: providing electrical power, for instance, or
water. We can tolerate those monopolies by properly regulating them.
Those corporations don’t make the huge margins that Apple and Facebook
do – but they are also guaranteed to have predictable profits, every
year. Utilities are generally well-managed and socially responsible
businesses. Because they go on for decades, they can hire for long
horizons. People can have careers, get meaningful promotions, and
receive pensions after long service.</p>
<p>Let’s make the US Internet into a set of utility companies, providing
data transport services - what Internet engineers call layers 1, 2 and
3. What these companies would not do – the main break-up – is provide
content. No vertical integration. No video-on-demand, no television
programming, no VOIP services, email, web hosting, marketing, whatever:
all the value-added stuff has to be done by third parties who do take on
the risks and reap the rewards of being in a competitive market sitting
on top of stable infrastructure. Larger customers are used to pulling
these services out of bundles and either handling them with internal
infrastructure or paying for expert third parties to perform them;
individual customers are becoming used to multiple provider systems. Do
you use GMail rather than a cable.com email account? Do you subscribe to
Netflix and use it more often than a Video-on-Demand movie service?
That’s what this future would hold out as the normal state of
affairs.</p>
<p>Unlike the water and electrical infrastructure of the country,
standards are still in flux. However, it wouldn’t take much effort to
establish an upgradable infrastructure that could be managed all across
the continent. Some of it would simply be defining standards and
expectations; some of it would require planning for next-generation
infrastructure that we can only dream of having twenty years from now.
But by recognizing these problems today and preparing to solve them, we
will be able to make it work.</p>
wireguard setup2017-11-12T10:42:28-05:002017-11-12T10:42:28-05:00-dsr-tag:blog.randomstring.org,2017-11-12:/2017/11/12/wireguard-setup/<a href="https://www.wireguard.com">Wireguard</a> is a new open
source VPN system being initially developed on Linux. I have two major
use cases for such a thing: site-to-site protection, and backhauling
traffic from a laptop or phone to my house.<p><a href="https://www.wireguard.com">Wireguard</a> is a new open
source VPN system being initially developed on Linux. I have two major
use cases for such a thing: site-to-site protection, and backhauling
traffic from a laptop or phone to my house.</p>
<p>Wireguard’s differentiators:</p>
<ul>
<li><p>Small codebase, because there are very few options. For example,
there is only one key exchange method and only one encryption
method.</p></li>
<li><p>It uses a virtual network interface, <code>wg0</code>, rather
than the exciting and hard to debug policy routing that IPsec usually
wants.</p></li>
<li><p>Very little configuration possible, so very little is
needed.</p></li>
<li><p>Performance is already higher than OpenVPN and IPsec on the same
hardware, and may be getting even faster.</p></li>
<li><p>Currently no built-in key distribution method. The administrator
needs to set up a public key pair for each attached device, and find
some other method of securely moving those around or verifying
them.</p></li>
<li><p>Currently no integration with general network management systems,
though it will be simple to do that.</p></li>
<li><p>Being considered for integration into the Linux kernel, in which
case I expect all distributions to support it.</p></li>
<li><p>As of this writing (November 2017) it is still in active
development, with new releases being made every week or two. If you
don’t feel like keeping up, Wireguard isn’t for you (yet).</p></li>
</ul>
<p>Actual setup on Debian systems is straightforward. There are two
packages available in Unstable: <code>wireguard-tools</code> and
<code>wireguard-dkms</code>. The first supplies the <code>wg</code>
general-purpose tool and <code>wg-quick</code> for
<code>ifup/ifdown</code> style scripts, and the -dkms package supplies
the kernel module. So far I have not seen a required reboot after a new
dkms install.</p>
<p>There is a temptation for most sysadmins (or maybe just me <a
href="#fn1" class="footnote-ref" id="fnref1"
role="doc-noteref"><sup>1</sup></a>) to tweak all the possible knobs
that software supplies. After all, we know that everything ships
insecurely, right?</p>
<p>In the case of Wireguard, this is incorrect. For a given machine,
there are only three bits of required configuration, and one later
consideration.</p>
<ul>
<li><p>You need a private key for your daemon to adopt.</p></li>
<li><p>You need a UDP port for the daemon to listen on.</p></li>
<li><p>You need to decide which <em>internal</em> IP addresses will be
accepted through the interface.</p></li>
<li><p>Later on, apply appropriate firewall rules to the new
<code>wg0</code> interface.</p></li>
</ul>
<p>Now, Wireguard only accepts properly encrypted UDP packets. UDP is
trivially forgeable, so there is no point in trying to apply IP
restrictions to where they can come from. If you want additional
symmetric encryption – in the words of the man page, ‘for post-quantum
resistance’ – a shared key can be added.</p>
<p>An Android port is in progress.</p>
<section class="footnotes footnotes-end-of-document"
role="doc-endnotes">
<hr />
<ol>
<li id="fn1" role="doc-endnote"><p>“Everybody generalizes from one
example. At least, I do.” – Steven Brust<a href="#fnref1"
class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
mac OS X DNS prefers IPv62017-10-28T10:53:32-04:002017-10-28T10:53:32-04:00-dsr-tag:blog.randomstring.org,2017-10-28:/2017/10/28/mac-os-x-dns-prefers-ipv6/If you have a Mac and DNS resolution seems really, really slow –
like, five seconds or more per lookup – check to see if you have an IPv6
address. You probably do.<p>If you have a Mac and DNS resolution seems really, really slow –
like, five seconds or more per lookup – check to see if you have an IPv6
address. You probably do.</p>
<p>Then check to see if you have an IPv6 DNS server listed. I bet you
don’t, or it’s wrong.</p>
<p>Solution: add an IPv6 DNS server to your list.</p>
<ul>
<li><p>Google DNS IPv6: 2001:4860:4860::8888 and 8844</p></li>
<li><p>OpenDNS IPv6: 2620:0:ccc::2 and ccd::2</p></li>
</ul>
switching ISPs2017-10-04T10:53:33-04:002017-10-04T10:53:33-04:00-dsr-tag:blog.randomstring.org,2017-10-04:/2017/10/04/switching-isps/I was a customer of RCN for seven years. The service was fine, in the
really boring way that you want commodity services to be. There were
occasional glitches, and a few months where the internet service was
particularly bad due to our house being at the end of a cable run.<p>I was a customer of RCN for seven years. The service was fine, in the
really boring way that you want commodity services to be. There were
occasional glitches, and a few months where the internet service was
particularly bad due to our house being at the end of a cable run.</p>
<p>The price slowly creeped up.</p>
<p>Last week, the bill read over $180. Clearly time for a change.</p>
<p>I called up RCN before work, and the helpful customer service rep
worked for about 20 minutes to eventually offer me a change of phone
service that would knock $10 off the bill. I asked if the offers for new
customers could be applied to our account. He said no. I pointed out
that (as he had read off a screen at the beginning of the call) we had
been customers for seven years. No? No.</p>
<p>It turns out we live in one of the very few cities in the USA where
there is almost a competitive market for internet services. My house can
get bandwidth from RCN, Verizon FiOS, Comcast, and probably half-
a-dozen less well-known companies.</p>
<p>Verizon let me order service online: phone, some TV channels, and a
“gigabit” internet feed, with actual likely speeds in the 800-950 Mb/s
range. They offered an install date as soon as four days away. And the
price was about $100/month, including taxes and fees and fees that look
like taxes and fees that are just extra profits.</p>
<p>No nightmares ensued.</p>
<p>Now the technical parts, for those inclined:</p>
<p>A single-mode fiber cable is brought into the house through the wall
and connected to a grey telco box. The back half of the box is just a
cable manager to allow the extra fiber to be coiled up nicely. The front
half contains the equivalent of a cable modem: an Optical Network
Terminal, which takes the fiber interface and breaks out gigabit
ethernet, coaxial cable (for TV, carrying mostly clear QAM), and analog
telephone interfaces. On top of the box they put a CyberPower UPS with a
bunch of non-rechargeable? D-cells.</p>
<p>Verizon will mandate the sale of a “router”, which is, technically, a
router, firewall, four port gigabit ethernet switch and two wifi radios
in a box. You need this during the install to accept their legalese,
which of course I did not read. The MAC address is printed on the back
or bottom: I wrote that down.</p>
<p>When the installer left, I configured up a spare gigabit port on my
real firewall router. I set the mac address to be the same as the
VZ-supplied gizmo, set the queue discipline to FQ_CODEL, and asked a
DHCP client to request address and routing info, but not DNS or other
weird things, on that interface. Finally I told the firewall that this
was an external interface, not a trustworthy internal interface, and
moved the ethernet cable from the VZ box to my firewall.</p>
<p>Everything worked smoothly.</p>
<p>My DNS provider can accept changes via a dynamic client, so I set
that up. My IPv6 tunnel provider can do the same - yes, really! - so I
did that. They both worked very well.</p>
<p>I leased a VM to act as a proxy if I needed one for inbound traffic;
doesn’t look too necessary now.</p>
technology maturity2017-09-07T11:28:25-04:002017-09-07T11:28:25-04:00-dsr-tag:blog.randomstring.org,2017-09-07:/2017/09/07/technology-maturity/For any given technology, there will exist at least one point in time
in which people are simultaneously not trusting it for being too new and
unproven, and other people are depending on it in production.<blockquote>
<p>For any given technology, there will exist at least one point in time
in which people are simultaneously not trusting it for being too new and
unproven, and other people are depending on it in production.</p>
</blockquote>
<p><cite> – me </cite></p>
<p>Every decision involves a cost/benefit analysis. Sometimes they are
formal; often they are drastically informally. Either way, people
inevitable leave out costs and benefits that they are not aware of, have
forgotten, or are otherwise invisible.</p>
resiliency2017-09-06T19:14:25-04:002017-09-06T19:14:25-04:00-dsr-tag:blog.randomstring.org,2017-09-06:/2017/09/06/resiliency/The resiliency of a system is proven by its behavior in an
emergency.<p>The resiliency of a system is proven by its behavior in an
emergency.</p>
<p>The design of a system is proven by its daily usability.</p>
naming knives2017-08-10T16:55:22-04:002017-08-10T16:55:22-04:00-dsr-tag:blog.randomstring.org,2017-08-10:/2017/08/10/naming-knives/I collect pocket knives. It’s rare for me to be dressed and not have
a knife in my pocket. Knives are useful tools. I usually find a use for
one three or a dozen times a day.<p>I collect pocket knives. It’s rare for me to be dressed and not have
a knife in my pocket. Knives are useful tools. I usually find a use for
one three or a dozen times a day.</p>
<p>Modern production knife makers (the sort of designer/producer/
manufacturer who turns out a thousand knives of a given design rather
than one or two) have a tendency to give marketing-driven names to their
products. Some of that marketing disturbs me.</p>
<p>Because I always have a knife, it would naturally be the case that if
I were arrested, I would have a knife in my pocket at the time.</p>
<p>These are names of knives that I might refrain from buying simply
because I do not wish to have a jury hear what I had in my pocket:</p>
<ul>
<li>battle hog</li>
<li>viper</li>
<li>shenanigan</li>
<li>brawler</li>
<li>crack-shot</li>
<li>secret ninja</li>
<li>scoundrel</li>
<li>assassin</li>
<li>bedlam</li>
<li>paramilitary</li>
</ul>
<p>On the other hand, I doubt anyone would blink at hearing the
names:</p>
<ul>
<li>scallion</li>
<li>optima</li>
<li>intellect</li>
<li>heritage</li>
<li>civilian</li>
<li>matriarch</li>
<li>amicus</li>
<li>triage</li>
</ul>
<p>There is, of course, no real link between the design of a knife and
the name. Here’s the <a
href="https://www.knifecenter.com/item/SP81GP2/spyderco-c81gp2-paramilitary-2-folding-knife-s30v-satin-plain-blade-black-g10-handles">SpyderCo
Paramilitary 2</a>. It’s a rather innocuous pocket knife, useful for
opening boxes, slicing your sandwich or a thousand other things you
might want to do in ordinary life. I might buy one, except that the name
isn’t great. I understand that the 3rd version of it might simply be
called the “Para 3”.</p>
<p>And here’s the catalog entry for the <a
href="https://spyderco.com/catalog/details/C12G/Civilian-G-10-Black/60">SpyderCo
Civilian</a>. The Civilian is nearly useless for anything except
self-defense (although I have been told that some gardeners like it for
pruning.)</p>
<p>I frequently carry a Delica or Endura. I would rather not buy a
DeathBlade MurderQuick, even if it is appealing to me in every other
way.</p>
the courage of convictions: competition2017-08-10T07:26:59-04:002017-08-10T07:26:59-04:00-dsr-tag:blog.randomstring.org,2017-08-10:/2017/08/10/the-courage-of-convictions-competition/Ken MacLeod writes science fiction. His job to write stories that
entertain us while, perhaps, presenting some interesting ideas. He
doesn’t have to be a prognosticator. Nobody really thinks that the
future of humanity will be to separate into fast-thinking, fast-evolving
AIs in Jovian orbit versus nanotech-equipped paranoid biological humans
in the inner system. That’s just a fun story.<p>Ken MacLeod writes science fiction. His job to write stories that
entertain us while, perhaps, presenting some interesting ideas. He
doesn’t have to be a prognosticator. Nobody really thinks that the
future of humanity will be to separate into fast-thinking, fast-evolving
AIs in Jovian orbit versus nanotech-equipped paranoid biological humans
in the inner system. That’s just a fun story.</p>
<p>One of those interesting ideas is that the natural place of communism
is in bottom-up structures rather than top-down. Families tend to be run
more or less as communes – everyone contributes what they are able to
do, everyone receives benefits that they need. It’s reasonable to run
small businesses on the same principles. So MacLeod has one of his
characters say</p>
<blockquote>
<p>‘He never explained that? Bastard. It’s something him and me figured
out years ago, arguing with that old geezer, whatsisname, Wilde. See,
what we always meant by socialism wasn’t something you forced on people,
it was people organizing themselves as they pleased into co-ops,
collectives, communes, unions. Now look at this place. Look at space,
come to that. It’s crawling with them! And if socialism really is
better, more efficient than capitalism then it can bloody well
<em>compete</em> with capitalism. So we decided, forget all the statist
shit and the violence: the best place for socialism is the closest to a
free market you can get!’ He leaned back and laughed. ‘I had one hell of
a faction-fight over that one!’</p>
</blockquote>
<p>I support this view in the real world: I think that there are
significant advantages to running small businesses as communes or coops,
and that a well-run union is generally a net benefit to society. Now I’m
going to switch gears on you and talk about people who hold sincere
opinions that there are fundamental biological differences between
easily denoted classes of humans that make them better suited for some
occupations and less suited for others.</p>
<p>For short, let’s call them ‘-ists’. Sexists, genderists, racists,
colorists, whateverists. -ists have a few remarkably consistent
patterns: first, they believe that being a member of their preferred
group constitutes a sufficient advantage by itself to entitle them to a
preferred outcome (better education, better job, more wealth, privilege
of being respected…). Second, they believe that not being a member of
their preferred group is a sufficient disadvantage that any non-member
who has attained a preferred outcome should be examined thoroughly,
because they are probably cheating in some way.</p>
<p>Sometimes they are in the news because they are complaining that
their coworkers are not good enough and only some form of cheating can
explain how they got their [educations, jobs, social privileges].</p>
<p>You can probably guess my proposal, now. The -ists should band
together and compete against everyone else on a fair playing field. It’s
very easy to have functionally racist, sexist, whateverist policies in a
business without explicitly announcing the fact. If they are correct
that young white Western European-descended males are fundamentally
better at engineering than everyone else, they should get together and
start an engineering company, which will, by their assumptions,
outcompete everyone else. They’ll have to work against the slight
handicap of hiding their -ist policies from the law, but many companies
already do that. Illegal and (by my standards) unethical? Yup.</p>
<p>My prediction, by the way, is that -ist tendencies tend to cluster in
people who like to blame their failures on external conspiracies rather
than luck or lack of genius and effort. They will be torn apart by
infighting over who is a marginal member of the preferred class well
before they get to making any interesting profits. Cooperation is not
something that they will be good at.</p>
interpretations2017-07-21T12:54:29-04:002017-07-21T12:54:29-04:00-dsr-tag:blog.randomstring.org,2017-07-21:/2017/07/21/interpretations/“Great question” means “I have a prepared answer.”<p>“Great question” means “I have a prepared answer.”</p>
<p>“Good question” means “I have an ambivalent answer.”</p>
<p>“Interesting question” means “That’s controversial, and I may not
want to commit.”</p>
<p>“What an interesting question”, though, means “I didn’t expect to be
asked that and I have no idea.”</p>
you cannot outsource your core competency2017-07-13T18:28:41-04:002017-07-13T18:28:41-04:00-dsr-tag:blog.randomstring.org,2017-07-13:/2017/07/13/you-cannot-outsource-your-core-competency/Let’s suppose you have a really good idea for a business.<p>Let’s suppose you have a really good idea for a business.</p>
<p>Not just “we’re going to be an easy-to-use centralized middleman for
a previously unorganized and possibly unrecognized market” which has
been done enough times that half of your success will be in getting
customers to recognize you and the other half will be in not screwing up
– where was I? – but a really good idea. The sort of thing that could
make your grandkids into spoiled rich parasites who vote Republican.</p>
<p>It’s true, you might not need a lot of money, or people, or resources
– at first. All the really good ventures end up needing all of those
things in order to cope with the demand. And the big thing is people.
You can trade money for an awful lot of other things, but somewhere in
your great idea is a core competency that cannot, by definition, be
outsourced. <strong>If you can outsource it then all you are is an
organizer, and someone else will out-organize you</strong>. Odds are not
in your favor.</p>
<p>Different businesses will be able to outsource different things.
Accounting is popular. Every business needs to keep their books
straight, manage purchasing and payroll and taxes. Hiring an accountancy
firm part-time is usually a good move, because you don’t have enough
business to justify a full time accountant yet but you do have the need.
If you’re successful, you get to reduce your relative cost by hiring an
in-house accounting team to replace a service that needs to cover its
own overhead and profits. Unless your really good idea is about
accounting, in which case you should not outsource it.</p>
<p>Cloud computing is a big deal these days because managing production-
quality computing systems is expensive. Most businesses do not need to
own redundant data centers, and cannot justify the expense. Therefore,
they pay relatively more for a slice of a service run by Google, Amazon,
or some other reputable company. Note that Google and Amazon are in the
business of leasing out computer services because they already had
business requirements to own the data centers and the networks and the
rest of the infrastructure, so expanding that and charging for it is a
good idea – for them. At a surprisingly small scale, AWS and GCE become
much more expensive than doing it well in-house. It could be that your
really good idea requires a level of responsibility or security that a
cloud service cannot readily sell you, in which case you should not
outsource it at all.</p>
<p>If you make a physical product, you might outsource the production,
but you must not outsource the design. What do they call someone who
makes lots of money on an outsourced design? A great marketing and sales
team. What do they call someone who make reasonable profits on that? A
good factory. There are lots of good factories and good marketing and
sales teams around the world. If you can outsource your design, they
don’t need you.</p>
<p>Figure out what makes your product or service much better than
anybody else’s version, and do not outsource that. Every so often,
evaluate whether you are doing well enough that a particular function
will be less expensive or more profitable if you bring it inside.</p>
a general solution to a general problem2017-07-10T18:30:07-04:002017-07-10T18:30:07-04:00-dsr-tag:blog.randomstring.org,2017-07-10:/2017/07/10/a-general-solution-to-a-general-problem/We have a general problem in this country, and I think we could use a
general solution to solve it.<p>We have a general problem in this country, and I think we could use a
general solution to solve it.</p>
<p>Health care, Internet carriers (and the wired and wireless telecom
which is a smaller part of it), electrical and water utilities, banks -
possibly others – should not be for-profit corporations. They have too
much incentive to bleed the citizens that they ostensibly serve. Nor
does a pure charitable foundation work well for this. They tend to be
either moribund or driven by charismatic leaders with a succession
problem.</p>
<p>Let’s create an intermediate category called “tightly regulated
businesses”. (I know, they think that they already are.) A TRB will have
a specific and unusual charter: it cannot diversify holdings, it cannot
purchase competitors who are still solvent, and rather than having a
purpose such as “ensure the best return for investors” it has a target
profit rate of 4%.</p>
<p>(Why 4%? Historically, that’s high enough to be attractive to
long-term investors, but not high enough to be interesting to gamblers.
I’m not committed to it in particular, but I think that it should
certainly be between 2 and 6%.)</p>
<p>If a TRB has excess profits at the end of a fiscal year, they are
distributed to customers as a credit on their next bill. All accounting
is open to public scrutiny. No advantage to competitors will accrue from
this, because all their competitors will also be TRBs.</p>
<p>A TRB’s corporate governance includes a board of directors where 50%
are appointed by stockholders, 30% are senior technical experts in a
related field – engineering, medicine, technology as appropriate – and
20% are appointed by the communities being served. There should be
strict limits against interlocking directorates and revolving-door
systems.</p>
<p>The aim of a TRB program is long-term stability. They provide
necessary services that are most efficiently handled in monopoly or
near-monopoly structures. They serve their customers more than their
shareholders, but they provide an incentive for conservative investors.
They are not exciting, but they should be reliable.</p>
recently read2017-07-08T12:13:27-04:002017-07-08T12:13:27-04:00-dsr-tag:blog.randomstring.org,2017-07-08:/2017/07/08/recently-read/If you wish to be completely unspoiled: I liked every one of these
books, enough to recommend them (or their series) to people whom I think
might like things like that.<ul>
<li><em>The Last Good Man</em>, Linda Nagata</li>
<li><em>In Evil Times</em>, Melinda Snodgrass</li>
<li><em>The Scorpion Rules</em>; <em>The Swan Riders</em>, Erin Bow</li>
<li><em>Kris Longknife: Emissary</em>, Mike Shepherd</li>
<li><em>Kangaroo Too</em>, Curtis Chen</li>
<li><em>Final Girls</em>, Mira Grant</li>
<li><em>Down Among the Sticks and Bones</em>, Seanan McGuire</li>
<li><em>Nothing Left to Lose</em>, Dan Wells</li>
<li><em>To Fire Called</em>, Nathan Lowell</li>
<li><em>White Hot</em>, Ilona Andrews</li>
</ul>
<p>If you wish to be completely unspoiled: I liked every one of these
books, enough to recommend them (or their series) to people whom I think
might like things like that.</p>
<p>After this, my low-spoiler notes on what kind of things they are.</p>
<p><em>The Last Good Man</em> is a near-future military thriller posing
philosophical questions about the ethics of automated weaponry and the
place of private military companies amidst battles on four continents.
It’s also about justice and revenge.</p>
<p><em>In Evil Times</em> is the second book in at least a trilogy and
perhaps a longer series, set in the FTL Imperio de Humanidad, a
moderately nasty aristocracy built on a theme of human superiority and
alien servitude. In the first book, La Infanta Mercedes became the first
female cadet at the space force academy; this book chronicles the middle
decades of her life, before she presumably ascends to the throne.
Youthful idealism gives way to realpolitik and easier paths.</p>
<p><em>The Scorpion Rules</em> and <em>The Swan Riders</em> are the
first and second books set in a 400-year old all-Earth empire ruled by a
handful of AIs that got the keys to an orbital laser grid. Sadly, the
AIs are faster and more observant but not wiser than humans. Their pax
is based on limited self-rule of nations guaranteed by hostages from the
rulers and the threat of laser-glazing cities. (The energy requirements
do not seem to have been calculated well.) Intriguing characters,
though.</p>
<p><em>Kris Longknife: Emissary</em> is the fifteenth book about the
Admiral Princess; this time she’s sent to become ambassador to the
Iteeche. Remember how little is known about the Iteeche? Now we get to
find out. Shepherd is now self-publishing this series, which means about
the same level of publishing and copy editing but a schedule closer to
his natural pace – which seems to be 2-3 books a year instead of one.
Don’t start with this one; it’s a milSF-space-opera popcorn series and
you should get the whole set.</p>
<p><em>Kangaroo Too</em> is the sequel to Chen’s hilariously funny
<em>Waypoint Kangaroo</em>, and it manages to be nearly as good. Not a
trilogy, I think, but a long-running series. It’s multi-planetary
espionage of the Bond variety which takes itself seriously enough to be
worth investing your time.</p>
<p><em>Final Girls</em> by Mira Grant and <em>Down Among the Sticks and
Bones</em> by Seanan McGuire are of course by the same author. Both are
horror novellas; the first in a SFnal horror-movie sense, and the second
in the fantastic multi-dimensional universe of <em>Every Heart A
Doorway</em>. More blood and gore on the SF side of the house, which
would make an excellent movie.</p>
<p><em>Nothing Left to Lose</em> wraps up the six volume series of Dan
Wells’ John Cleaver, a teenage serial killer who restricts himself to
killing demons. Luckily, there are a bunch of demons in that world to
kill.</p>
<p><em>To Fire Called</em> is the second book of the second series about
Ishmael Wong, who is now trying to set up an interstellar transport
company of his own. Unfortunately… spoilers. Lots of spoilers. Lowell
continues to try to solve his characters’ problems non-violently, but
doesn’t quite succeed here.</p>
<p><em>White Hot</em> is the second book of a romance-marketed urban
fantasy / PI-with- psychic powers series. I assume it’s romance-marketed
because that sells better; there’s no particular reason to categorize it
that way otherwise. Good plot twists.</p>
civic failure modes2017-06-24T08:56:30-04:002017-06-24T08:56:30-04:00-dsr-tag:blog.randomstring.org,2017-06-24:/2017/06/24/civic-failure-modes/Suppose that you are unhappy with the way that one of your vendors
does business. You are not a dominant customer; that is, you don’t
account for so much of their sales that they are willing to change their
policies for you. This is the normal situation.<p>Suppose that you are unhappy with the way that one of your vendors
does business. You are not a dominant customer; that is, you don’t
account for so much of their sales that they are willing to change their
policies for you. This is the normal situation.</p>
<p>Welcome to asymmetrical power relationships. Your choices are:</p>
<p>1 avoid that particular business. Eventually you will either find a
competitor that satisfies or you will run out of businesses. There are
many fewer businesses in any particular service than there are potential
customers, so in most cases you will end up unhappy and tired. This is
the failure of Randian libertarianism.</p>
<p>2 spend lots of energy on collective action, finding people who agree
with you and doing something about it together. Eventually you can
demand reasonable accomodations on the parts of businesses in your town,
but it appears that cooperatives and communes and kibbutzim and the like
have a maximum workable size which is much less than the scale necessary
for a modern city. This is the failure of voluntary Marxism.</p>
<p>3 formalize (2) into a government that enforces laws. Eventually the
people who have more wealth will acquire more power, or the people who
have more power will acquire more wealth. Either way, a
self-perpetuating political-economic elite forms. If your government has
a strong civic norm, a base level of distributed power with checks and
balances, it is possible to have a dynamic system that exists for a
fairly long time – two or three centuries, perhaps. The further it skews
out of balance, though, the less stable it will become.</p>
the one true method of email handling2017-06-12T06:36:42-04:002017-06-12T06:36:42-04:00-dsr-tag:blog.randomstring.org,2017-06-12:/2017/06/12/the-one-true-method-of-email-handling/People are overwhelmed with email.<p>People are overwhelmed with email.</p>
<p>In response, they declare email bankruptcy – that means that they
arbitrarily delete their inboxes and hope the problem will magically fix
itself – or adopt strange methodologies.</p>
<p>Here is the one true method of dealing with email. It works. It
requires some setup. It requires some change in your behavior.</p>
<p>Principles:</p>
<ul>
<li><p>Your personal email is private and your work email is not. Your
employer almost certainly has the legal right to read through your work
email. Don’t use it for personal matters, at all. This also saves you
the trouble of telling all your friends your new address when you change
jobs.</p></li>
<li><p>Context is important. Therefore, create folders for friends and
family. It’s possible that you want to automatically file these, but
it’s more important that you save them to a consistent place after you
have read them. (Does your aunt keep forwarding scams? Automatically
file her messages. Perhaps you should talk to her about her
problem.</p></li>
<li><p>You will always have new email. Therefore, turn off any alert
noises, buzzes, vibrations, flashes, notifications, or other devices
trying to get you to respond to routine email.</p></li>
<li><p>Some email actually deserves to wake you up. I can’t tell you
what that will be for you; it is your responsibility to figure out how
to identify it. What I do is set up a second account that I do not use
to send email, don’t sign up for email lists, and don’t tell people
about unless I trust them to wake me up in the middle of the night. That
email account plays annoyingly loud music at me. If you’re lucky, this
isn’t something you need.</p></li>
<li><p>You will always have more low-importance email than you have
high-importance email. (You are the only judge of importance.)
Therefore, you must tell your email system to automatically filter
low-importance email to folders where you will not see it until you
choose to go looking for it.</p></li>
<li><p>You must adhere to your own schedule. Therefore, set aside time
in that schedule to read through the folders that pertain to what you
are doing. If you don’t read a folder, it means it’s not important to
you.</p></li>
<li><p>Context is important. Therefore, every email list that you have
signed up for needs to go to its own folder, automatically, before you
see it. If you want to read it, you need to make the decision to go look
at that folder and read it in the context of other messages from that
mailing list. What should end up in your inbox? Messages from humans, to
you, that you need to see. When you’re done,</p></li>
<li><p>If it’s more than 2 months old, it is less important. Therefore
your computer must have a second tier of folders that are automatically
archived versions of the primary folders. You can pick another age, but
two months works for me: this month, plus the context of last
month.</p></li>
<li><p>History is important. Therefore, learn to use the search
functions effectively to get at the meat of those archive
folders.</p></li>
<li><p>Spam happens. Therefore you will tell your computer to
automatically shunt spam to its own folder. About once a week (or once a
month, depending on how trusting you are) you should review this folder
for mistakes.</p></li>
<li><p>Change happens. Sign up for work email lists with your work
email. Sign up for professional email lists with a personal email
account. You will leave your employer someday, but your professional
reputation should accrue to you.</p></li>
<li><p>Change happens. New email lists, new acquaintances, fading
interest, new topics, whatever. At least once a year, go through your
mail sorting rules and figure out what needs to change.</p></li>
</ul>
towards a sustainable software policy2017-06-11T11:41:00-04:002017-06-11T11:41:00-04:00-dsr-tag:blog.randomstring.org,2017-06-11:/2017/06/11/towards-a-sustainable-software-policy/Definitions:<p>Definitions:</p>
<ul>
<li><p>A <em>policy</em> is an organization’s stated objectives and
methods for accomplishing a goal.</p></li>
<li><p><em>Sustainable</em> means a model of a system that easily fits
into a person’s head and can be used as an accurate prediction of how
another person accomplished a goal.</p></li>
</ul>
<p>So a sustainable software policy is a set of objectives and methods
for accomplishing software lifecycle management that can be easily
documented, understood, and consistently applied with a minimum of
surprise.</p>
<p>I find it most desirable to reduce cognitive burdens and risks of
manual error by automating every policy mechanism that can be so
automated. That means that once a human decides what a machine is
supposed to do, properly stating and committing that decision causes the
rest of the setup, configuration and expected process execution to take
place.</p>
<p>(See <a href="%7Bfilename%7D/a-musical-analogy.md">A Musical
Analogy</a>, in particular “Systems administration is conducting an
orchestra of computers.”)</p>
<p>In that analogy, programs are musical scores; computers are players;
classic ‘hands on’ systems administrators are composers; devops is
choreography for automated systems administrators. A software policy,
then, addresses the way that we write that choreography. Once you know
the policy, you can figure out how the choreography for a particular
symphony should go. Because this is moving towards engineering rather
than towards art, it is possible and desirable to critique the
choreography on how close it comes to being a consonant expression of
the policy as well as the fundamental criterion of how well the system
accomplishes the goals.</p>
<p>That is, quality matters.</p>
<p>to be continued…</p>
mutt pattern for threads containing new messages2017-05-22T14:17:45-04:002017-05-22T14:17:45-04:00-dsr-tag:blog.randomstring.org,2017-05-22:/2017/05/22/mutt-pattern-for-threads-containing-new-messages/I was about to ask the mutt-users mailing list a question, when it
occurred to me that I should really google it first. Indeed, my question
had been answered about 3 years previously. And it’s really useful.<p>I was about to ask the mutt-users mailing list a question, when it
occurred to me that I should really google it first. Indeed, my question
had been answered about 3 years previously. And it’s really useful.</p>
<pre><code> # .n : limit to only threads with New messages
macro index .n "l~(~N)\n"</code></pre>
quoting myself2017-05-20T08:44:15-04:002017-05-20T08:44:15-04:00-dsr-tag:blog.randomstring.org,2017-05-20:/2017/05/20/quoting-myself/<strong>Non-fiction</strong> is an assertion of hope, not a statement
of accuracy.<blockquote>
<p><strong>Non-fiction</strong> is an assertion of hope, not a statement
of accuracy.</p>
</blockquote>
<p><cite>me</cite></p>
monocultures are efficient and fragile2017-05-15T19:10:12-04:002017-05-15T19:10:12-04:00-dsr-tag:blog.randomstring.org,2017-05-15:/2017/05/15/monocultures-are-efficient-and-fragile/In farming, monoculture is the practice of raising a single crop over
and over again. You can figure out exactly what fertilizers it needs,
how much water, and predict your yield accurately, year after year.<p>In farming, monoculture is the practice of raising a single crop over
and over again. You can figure out exactly what fertilizers it needs,
how much water, and predict your yield accurately, year after year.</p>
<p>Then, one year, a blight or a virus or a bacterium or a weevil comes
along and eats everything. If you had planted four kinds of crops, you
would have lost 25% of this year – bad, but potentially survivable. 100%
is rarely survivable. In order to make sure the blight is gone, you may
need to burn your fields to the ground. That will stop them, unless of
course one of your neighbors didn’t do a perfect job of burning it
out.</p>
<p>Let’s switch topics. Herd immunity is the effect that protects
individuals who haven’t been vaccinated against a particular disease, by
a very simple process: anyone who is immune can’t pass the disease on.
So if a nice large portion of the herd is immune, many of the folks who
are vulnerable will not get the disease because nobody gives it to them
in the first place.</p>
<p>Most companies use a single operating system for all their desktop
computing needs. Mostly they use Microsoft Windows. They only have to
support one operating system, so they can get efficiencies in help desks
and services. It’s so pervasive that you usually don’t even have to
teach people how to use it, although you often need to teach them
specific applications to get their job done.</p>
<p>Then, one year, ransomware comes along.</p>
<p>The companies that built up their immune systems are hoping for herd
immunity to limit the spread of the disease. It turns out that many of
them don’t have quite the robust immune systems that they thought they
had.</p>
<p>The companies that are running other operating systems – Mac OS,
Linux, other kinds of UNIX, whatever – are not participating in the
giant monoculture farms. They are completely immune to the problems that
the monoculture faces.</p>
<p>Instead, they had to pay for people who could set up and administer
the strange systems that aren’t Windows. Those people command higher
salaries than Windows admins and helpdesk folks. On the other hand, they
also tend to handle more systems at a time than the Windows specialists
do, because they have been working with automation tools that have only
been recently introduced on the Windows side.</p>
<p>It’s really hard to change things that people are used to. That
doesn’t mean it isn’t worthwhile, just that you have to account for all
sorts of profits and costs to make a good decision.</p>
philosophy as expressed in an MP3 player2017-05-10T10:31:46-04:002017-05-10T10:31:46-04:00-dsr-tag:blog.randomstring.org,2017-05-10:/2017/05/10/philosophy-as-expressed-in-an-mp3-player/I have a Sansa Clip+. It’s an MP3 player. Remember those?<p>I have a Sansa Clip+. It’s an MP3 player. Remember those?</p>
<p>Physically, it is about the size of a matchbox. Not the tiny model
cars, which were always too big for their namesakes, but the actual
give-away advertising matchboxes, made of sturdy cardboard with a
friction strip on one side. It’s a little larger than that because of
the spring-loaded clip on the back. I didn’t realize how much the clip
contributed to the usefulness of the device until it broke. Turns out
that without the clip, you have to find a pocket or hold it in your
hand. Not good.</p>
<p>It has extremely standard ports. It has a USB mini-B port, on which
it can be recharged (14-15 hours of playback per charge, not too shabby)
or you can manipulate the data it stores. It uses the USB mass-storage
protocol, so Windows, Macs, Linux and random other machines can read and
write to it easily.</p>
<p>There’s a 1/8” stereo headphone jack. That’s the linear descendant of
the 19th century switchboard operator’s plug, entirely recognizable and
usable by a technologically advanced person from 1878. Wikipedia says
it’s the oldest electrical plug standard still in use.</p>
<p>The side with the USB port has physical volume buttons, up and down.
The side with the headphone jack has a slot for a MicroSD card.
Officially, it’s only good up to 32 GB. In actual fact, a 128GB
MicroSDHC (not SDXC) card will work quite nicely.</p>
<p>On top there is a power button; hold it down long enough not to be
deemed accidental, and the machine will change power states.</p>
<p>The front face has a tiny display and six buttons. 4 arranged at
cardinal points, one in the center (which means Yes, or OK) and one off
to the side which changes modes. Because it is slightly assymmetric,
your fingers can find the buttons and puzzle out which one does what
without needing your eyes to see it. (And it’s not a touchscreen.)</p>
<p>If you leave it with the original firmware, there are several
annoying issues. First, it can take many seconds or even minutes to boot
up. Second, it plays everything 1% too fast, and thus at 1% too high a
pitch. Third, it’s not very customizable. Installing the <a
href="http://www.rockbox.org">Rockbox firmware</a> solves all three of
those problems.</p>
<p>So: it’s small, does one job really well, lasts a long time, has a
high capacity, and is customizable. All of this while being
standards-compliant in three different interfaces. In a sense, this is a
peak expression of my technical philosophy: do the things that are known
to work well; put them together in ways that make sense. Innovate where
you need to, and not where you don’t.</p>
<p>Clearly I love it, and other people do too: used Sansa Clip+ players
sell for as much or more than the original list price.</p>
unix philosophy2017-04-04T12:19:39-04:002017-04-04T12:19:39-04:00-dsr-tag:blog.randomstring.org,2017-04-04:/2017/04/04/unix-philosophy/The essence of the UNIX philosophy is not “make small utilities that
can be fitted together with pipes” but to assume that at any moment, a
user might decide to be a developer or a sysadmin and should have the
tools to do that.<p>The essence of the UNIX philosophy is not “make small utilities that
can be fitted together with pipes” but to assume that at any moment, a
user might decide to be a developer or a sysadmin and should have the
tools to do that.</p>
<p>The problems of UNIX generally come from assuming either that users
are never devs and sysadmins, or that all users are devs and
sysadmins.</p>
a 2 line bash prompt2017-04-02T10:34:15-04:002017-04-02T10:34:15-04:00-dsr-tag:blog.randomstring.org,2017-04-02:/2017/04/02/a-2-line-bash-prompt/Back in the DOS era of personal computing, the default prompt was the
letter name of the current drive, followed by a colon and a
<code>></code>. So <code>A:></code> or <code>C:></code> if you
were wealthy enough to afford a hard disk. DOS really had only one shell
for a great many years: <code>COMMAND.COM</code>.<p>Back in the DOS era of personal computing, the default prompt was the
letter name of the current drive, followed by a colon and a
<code>></code>. So <code>A:></code> or <code>C:></code> if you
were wealthy enough to afford a hard disk. DOS really had only one shell
for a great many years: <code>COMMAND.COM</code>.</p>
<p>When it became possible to customize your shell prompt, people
started putting their current path in the prompt. And starting in the
time of EGA it became possible to use a denser text mode than 80x25:
80x43. VGA brought 80x50, 80x60, and weird tiny-text modes like 132x43
and 132x50. Typical people spent $400 on a 13 or 14 inch 4:3 monitor.
Enthusiasts spent $1000 on a 16 or 17 inch monitor, and so they could
usually make out the differenc between an O and a 0.</p>
<p>The default bash prompt is an obvious holdover from such times.
Remember, if you fire up a terminal under X11, it will default to
80x25.</p>
<p><code>bash4.2$</code></p>
<p>or if your distribution did the most obvious customization:</p>
<p><code>user@host:/cwd$</code></p>
<p>which is actually pretty good. It supplies all the necessary
information, and does so in a way which is useful to cut and paste into
commands like <code>rsync</code>, <code>scp</code> or whatever.</p>
<p>It could be made more convenient, though, if you put it on two lines
instead of one. Right now, cutting and pasting means carefully lining up
the whole thing and avoiding copying a command you may have started to
type, and certainly carefully omitting the $ or # separator.</p>
<p>So set PS1 to <code>\u@\h:\w\n$</code> to obtain that convenience.
The whole first line is your user, host and path, and your commands
start on the second line.</p>
<p>If you want to spiff it up with color, I recommend a reverse color
combination for the path: white on blue, for example, is nicely readable
whether you prefer a generally black terminal or a generally white
terminal. Filling out the rest of the line with the same or a
complementary background color can help you spot your last command in a
long scrollback.</p>
<p>For more ideas, consult the <a
href="http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/">bash prompt
HOWTO</a></p>
<hr />
<p><strong>Comment</strong> on June 24 from Kartik Agaram:</p>
<p><em>One extra trick I use is to drop the ‘$’ from the second line so
I can start commands from column 0. That way I can copy commands more
easily (without needing special characters in the prompt) and get clean
indentation for multi-line commands. Which encourages me to write more
multi-line commands.</em></p>
nobody wants backups2017-03-13T10:13:20-04:002017-03-13T10:13:20-04:00-dsr-tag:blog.randomstring.org,2017-03-13:/2017/03/13/nobody-wants-backups/Nobody wants backups. Everybody wants restores.<p>Nobody wants backups. Everybody wants restores.</p>
<p>The questions are:</p>
<ul>
<li><p>what sort of disaster are you trying to recover from</p></li>
<li><p>how often do you expect each to happen</p></li>
<li><p>how much time are you willing to take recovering</p></li>
<li><p>how much are you willing to spend</p></li>
</ul>
<p>Let’s take a few common scenarios.</p>
<p>First: a house full of personal use machines, plus a server. We
expect files to go missing or be accidentally deleted fairly often, and
we want it to be easy and cheap to recover from that.</p>
<p>The general answer for that is to store files on a networked
filesystem of some sort - NFS, SMB, sshfs, whatever - which resides on
the server and is snapshotted every so often. Tools for snapshotting
include LVM (not recommended), rsnapshot, and btrfs and zfs. Anything
with a user-accessible snapshot method is good here - sysadmins don’t
need to be involved in every oops.</p>
<p>Second: we have the same setup, but we would also like to make it
reasonably easy to restore a whole machine when we have an accident with
the hard disk.</p>
<p>For that, we need image backups over the network to the server. We
won’t want to snapshot these, just keep the most recent good image.
Testing these every so often is necessary.</p>
<p>Third scenario: running a service that makes you money. For this, we
want to be up all the time. We can spend a lot more money on this,
because we expect to make money from it.</p>
<p>The solutions here involve high availability: multiple machines,
possibly in multiple locations, handling the same service in a
coordinated fashion. Users need to be automatically directed to a
working instance, and we need a monitoring system to tell us when a
machine is down, because if the HA system is working we will not get
user complaints.</p>
still not interested in cybercoders2017-03-09T14:05:12-05:002017-03-09T14:05:12-05:00-dsr-tag:blog.randomstring.org,2017-03-09:/2017/03/09/still-not-interested-in-cybercoders/You might recall way back when I wrote <a href="https://blog.randomstring.org/blog/2016/05/20/not-interested-in-cybercoders/">not
interested in cybercoders</a>. That was not quite a year ago.<p>You might recall way back when I wrote <a
href="https://blog.randomstring.org/blog/2016/05/20/not-interested-in-cybercoders/">not
interested in cybercoders</a>. That was not quite a year ago.</p>
<p>It appears that cybercoders hasn’t got the message, though. When it
became clear to me that three of their recruiters were all going to try
spamming me at once, I wrote them a little letter of introduction and
asked them to talk amongst themselves, rather than bothering me.</p>
<p>We’ll see. There’s always a new recruiter, desperate to prove that
they aren’t like all the others, just like all the others.</p>
tracing calls2017-02-28T11:09:17-05:002017-02-28T11:09:17-05:00-dsr-tag:blog.randomstring.org,2017-02-28:/2017/02/28/tracing-calls/Nobody likes you when you’re 23 / And are still more amused by prank
phone calls / What the hell is caller ID?<blockquote>
<p>Nobody likes you when you’re 23 / And are still more amused by prank
phone calls / What the hell is caller ID?</p>
</blockquote>
<p><cite>Blink-182, “What’s My Age Again?”, 1992</cite></p>
<p>You probably already know that Caller ID is useful, and that it can
be faked. If you want to know how it works and how it fails, read
on.</p>
<p>Once upon a time (prior to 1980-2, when AT&T was broken up),
everything was simple. All calls in the United States, to a first
approximation, were handled by AT&T or one of its daughter
companies. They kept track of who called whom by number, date, time
started and time stopped. Your bill would arrive in the middle of the
month after the calls were made, and everything would have a cost
assigned. Costs for long distance were quite high, and costs for
cross-oceanic calls were sky-high.</p>
<p>The 1980 <em>MCI v Illinois Bell</em> decision started the breakup of
AT&T, which was finalized in <em>United States v AT&T</em>
1974-1982. After that, each of the possible local telephone companies
had to come to arrangements to bill each of the possible long distance
companies and vice versa.</p>
<p>Prior to 1987, there were no Caller ID systems, either. You picked up
the phone when it rang or let your answering machine or fancy voice-mail
service handle it. If people told you who they were and what their
number was, you now knew it. Otherwise, you wouldn’t find out until the
bill arrived – assuming you could find the particular call in the
haystack.</p>
<p>That led to the problem of “cramming”. Cramming emerged when the FCC
decided to stop enforcing rules on billing and collection in 1986.
Overnight, companies sprang up to supply services that could be billed
to your telephone number. The obvious ones were 1-900 numbers, where the
mere fact of calling enables a high pass-through charge. Not so obvious,
but even more harmful: anyone who knew your telephone number could pass
it to a telco and claim that you had signed up for a service at $Z per
month. The GAO reported that some vendors had simply copied chunks of
telephone directories and started billing for nonexistent and unordered
services.</p>
<p>The good news, such as it is, is that cramming requires an
identifiable endpoint to receive the money. You can track them down,
eventually.</p>
<p>That’s not the case for random telephone calls, and has led to the
spam problem that we have today. Here’s why:</p>
<p>There is no central database of names and numbers.</p>
<p>What’s missing? Names. Every receiving telco is responsible for
deciding what name, if any, goes with the number that is sent.</p>
<p>When a call originates, the first switch in the path sets up the
calling record, and sends along the number that will be billed, the
number that is calling and the number to be called. That first switch
used to always belong to a telco. It could cost an awful lot of money,
require an expert to program it, and be fed only from expensive fixed
circuits.</p>
<p>Now it can belong to anybody, including a person sitting at home with
a consumer Internet connection and a $10 Raspberry Pi running Asterisk
PBX software. The interconnection to the PBX can happen at tens of
thousands of VOIP service providers all across the world. It doesn’t
cost more to ship your voice call over the Internet to another country
and then use a local VOIP provide – it costs less. Much less.</p>
<p>As a result, it become economically feasible to hire lots of English-
speaking people in a call center in an economically disadvantaged part
of the world and have them talk to random phone numbers in the US in the
hopes of convincing some poor grandmother to give up her credit-card
number or access to her computer. The Caller ID information is simply
forged. The billing number is established with the VOIP account, and as
soon as the VOIP company kills the account for fraud, it is all set up
again with another one - or the same one, under a new name. It’s not
like physical lines need to be installed. Data can be bounced through
relays in several data centers, defeating an IP lookup to blacklist bad
actors.</p>
I recommend Google Fi2017-02-24T09:36:06-05:002017-02-24T09:36:06-05:00-dsr-tag:blog.randomstring.org,2017-02-24:/2017/02/24/i-recommend-google-fi/This completes a year of using Google Fi for cell service. Fi is a
meta-provider which uses both Sprint and T-Mobile for underlying cell
service. The downside is that you must buy a phone from Google, and
there are only 3 options. They are very nice options, though, if you
don’t need an iPhone.<p>This completes a year of using Google Fi for cell service. Fi is a
meta-provider which uses both Sprint and T-Mobile for underlying cell
service. The downside is that you must buy a phone from Google, and
there are only 3 options. They are very nice options, though, if you
don’t need an iPhone.</p>
<p>(Other perks: they bill automatically; they charge you $20 for base
phone service and $10 per GB of data; they properly fractionate that
down to a unit of 10 MB.</p>
<p>They include a thing called Google Assistant, which looks for wifi
networks in your area, and connects to them if it recognizes them. Then
- this is key - it sets up a VPN back to Google, because it doesn’t
trust the generic wifi network. If you don’t have a VPN service, this is
pretty good. It coexists with other VPN services, too. I have one for
work and one for home.</p>
<p>The total cost included $700 for the top-end phone, plus an average
monthly cost of 31.50, for a total of $1078.</p>
<p>I have good wifi at home (I should know, I maintain it) and at the
office (I should know, I maintain it). Fi is happy to switch to wifi for
calls and data, so I basically only consume billable data while in
transit or otherwise travelling. If you are out on the road all the
time, this may not make sense for you.</p>
<p>The cost of my Sprint service in 2015 was $1054, but that does not
include the cost of the phone, which was an additional $300, spread over
two years. I <a
href="https://blog.randomstring.org/blog/2016/03/16/how-can-you-listen-with-those-bananas-in-your-ears/">wrote
about Sprint previously</a></p>
<p>I’m planning on keeping Fi service, and in the next year I expect the
bill to look much like this year’s – which is to say I’ll pay about $380
for the year of service, and nothing new for the phone.</p>
<p>For two years of service and the hardware cost:</p>
<p>Sprint: $300 + $1054 + $1054 = $2408</p>
<p>Fi: $700 + $380 + $380 = $1460</p>
<p>Looks like a pretty good deal. I recommend it.</p>
pandoc for the win2017-02-18T11:09:49-05:002017-02-18T11:09:49-05:00-dsr-tag:blog.randomstring.org,2017-02-18:/2017/02/18/pandoc-for-the-win/If you are faced with any sort of text formatting conversion problem,
you should probably start with <a href="http://pandoc.org">pandoc</a> to
solve it.<p>If you are faced with any sort of text formatting conversion problem,
you should probably start with <a href="http://pandoc.org">pandoc</a> to
solve it.</p>
<p>Suppose you have a portion of a website that you would like to turn
into an ebook.</p>
<ol type="1">
<li><p>Use <code>wget -nc -nd -v -r -l1 $URL</code> to retrieve it.
<code>-r</code> sets up recursion, and <code>-l1</code> limits it to one
level deep. You might need more than that.</p></li>
<li><p>Use a <code>for</code> loop and
<code>pandoc -f html -t markdown $infile -o $infile.txt</code> to strip
out CSS, JavaScript and other crap.</p></li>
<li><p>Assemble your ebook with
<code>pandoc $file1 $file2 $file3... -t epub -o $ebook.epub</code></p></li>
</ol>
<p>Et voila.</p>
<p>There are lots of other options, including the ability to add your
own CSS, table of contents, cover image… It’s really quite nice.</p>
slapping at gnats2017-01-22T09:38:07-05:002017-01-22T09:38:07-05:00-dsr-tag:blog.randomstring.org,2017-01-22:/2017/01/22/slapping-at-gnats/Attackers change their behavior, so we have to change in
response.<p>Attackers change their behavior, so we have to change in
response.</p>
<p>Way back in the olden days, someone with evil intent would ping your
IP address to make sure it was up, run nmap to figure out which of four
or five exploitable services were available, and then pound their fist
against the door repeatedly with different usernames and passwords until
they got bored or found a way in.</p>
<p>Ah, those were the days.</p>
<p>Now a botnet works in phases: one segment compiles a list of IP
addresses that respond on the right ports; another group sends a single
attack to each host on the list. They evade rate-limiters by mimicking a
distributed denial of service attack, only much slower.</p>
<p>I used to run a response system which would note several failed
logins from a particular IP address and add a firewall rule to ban it.
After a while it would remove the rule.</p>
<p>Then I changed to a two-part system: a few attempts would incur a
temporary ban, but more attempts over a longer period of time would ban
the source for a very long time indeed.</p>
<p>I have now instituted a third part: some attempts are going straight
from a single try to the permaban list. Among other things, trying to
log in to my ssh or IMAP services with the username <code>root</code>
will get this response.</p>
<p>There are 4 billion IPv4 addresses out there, and a dismaying
fraction of them appear to be owned by botnets.</p>
revisiting a new firewall2017-01-13T11:07:47-05:002017-01-13T11:07:47-05:00-dsr-tag:blog.randomstring.org,2017-01-13:/2017/01/13/revisiting-a-new-firewall/A few years ago I wrote <a href="https://blog.randomstring.org/2014/11/09/a-new-firewall/">about my
new firewall</a> Let’s look at what I’ve learned since then.<p>A few years ago I wrote <a
href="https://blog.randomstring.org/2014/11/09/a-new-firewall/">about my
new firewall</a> Let’s look at what I’ve learned since then.</p>
<p>First, you should know that I’m very pleased with the firewall. It
continues to function smoothly. Debian upgraded from 7 to 8 without a
hitch. I added a few new software features:</p>
<ul>
<li>TINC and OpenVPN servers</li>
<li>replaced a full BIND DNS with Unbound (and BIND running behind it on
another server)</li>
<li>monitoring software</li>
<li>an IPv6 tunnel</li>
</ul>
<p>The CPU is basically idle all of the time. It has four cores; it’s
possible that two have never been woken up. We call that future-proofing
:)</p>
<p>I’ve got five gigabit ports, but only three of them are in use, and
if I needed to, two ports would be sufficient.</p>
<p>There’s 4GB of RAM. Really, it could handle everything it does now on
512MB, and 1 GB would be plenty of room.</p>
<p>The SSD is a big win, though. A complete reboot cycle takes less than
30 seconds, which means that TCP sessions don’t have to drop. I also
have a tiny USB thumbdrive (thumbnail drive?) that takes a complete
backup once a week or when I change something interesting.</p>
<p>Given all that, would I do it differently today?</p>
<p>I think I’d buy different hardware. The mini-ITX case is a little
large – but it was cheap, and the cooling is excellent. I might buy
something like this <a
href="http://www.newegg.com/Product/Product.aspx?Item=9SIA1N842C5186">ZOTAC
ZBOX C Series CI323</a> NUC-style computer. It doesn’t have any PCI-E
slots, but the other specs are on point:</p>
<ul>
<li>Celeron N3150, 4 cores at 1.6GHz</li>
<li>up to 8GB RAM</li>
<li>2x gigabit ethernet ports</li>
<li>802.11ac wireless</li>
<li>1x 2.5” SATA slot</li>
<li>3 x USB 3.0 Ports, 2 x USB 2.0 Ports</li>
</ul>
<p>all for $150. Add some RAM and a 2.5” SSD, and it should be a very
useful router for under $250, sipping power and taking up about the same
space as a random “home router” box.</p>
modern cpus2016-12-16T14:02:55-05:002016-12-16T14:02:55-05:00-dsr-tag:blog.randomstring.org,2016-12-16:/2016/12/16/modern-cpus/The fate of a modern desktop CPU is to sleep for hours on end, up
until the point that it is called to leap into action for a few seconds.
Later, it will be pushed to the limits of thermal overload for quite a
few minutes or hours, along with a GPU valiantly straining to produce
triangles that will look like an explosion.<p>The fate of a modern desktop CPU is to sleep for hours on end, up
until the point that it is called to leap into action for a few seconds.
Later, it will be pushed to the limits of thermal overload for quite a
few minutes or hours, along with a GPU valiantly straining to produce
triangles that will look like an explosion.</p>
<p>The fate of a modern phone or laptop CPU is similar.</p>
<p>The fate of a modern server CPU is to be run flat-out from birth to
death, calculating cycles and epicycles and layers of onions and
shifting the workloads from core to core, balancing fiercely.</p>
Nintendo's contactless brushpass and dead drops2016-11-30T10:56:01-05:002016-11-30T10:56:01-05:00-dsr-tag:blog.randomstring.org,2016-11-30:/2016/11/30/nintendos-contactless-brushpass-and-dead-drops/Nintendo’s 3DS pocket-sized game system includes “Streetpass”, a
method of sharing your high scores, Mii avatars and other game
information with random strangers who also have 3DS systems. That
includes the levels designed by Super Mario Maker, which are a few
megabytes apiece.<p>Nintendo’s 3DS pocket-sized game system includes “Streetpass”, a
method of sharing your high scores, Mii avatars and other game
information with random strangers who also have 3DS systems. That
includes the levels designed by Super Mario Maker, which are a few
megabytes apiece.</p>
<p>The swap happens anonymously and automatically whenever two 3DS
systems (which both have to have the feature turned on) are near to each
other. The range is around 80 feet, depending on local wifi
conditions.</p>
<p>Don’t worry if you can’t make your rendezvous; Nintendo helpfully set
up 29,000 “Nintendo Zone” wifi stations that can store your
steganographic content for you.</p>
IOT security: the key and the castle2016-11-22T12:20:18-05:002016-11-22T12:20:18-05:00-dsr-tag:blog.randomstring.org,2016-11-22:/2016/11/22/iot-security-the-key-and-the-castle/People just don’t take security seriously, because security is hard
to understand and hard to implement and hard to maintain. We need a new
way of “doing” security, and I’ve got an idea. Let’s go back to the
notion of skeuomorphism: we use pictorial representations of real-world
objects to represent similar functions in a graphical user interface.
The floppy disk icon that means <code>save</code>, the little printer
that means <code>print</code> and the iconic handset that looks nothing
like a modern telephone that means <code>call</code> are all examples of
skeuomorphic design.<p>People just don’t take security seriously, because security is hard
to understand and hard to implement and hard to maintain. We need a new
way of “doing” security, and I’ve got an idea. Let’s go back to the
notion of skeuomorphism: we use pictorial representations of real-world
objects to represent similar functions in a graphical user interface.
The floppy disk icon that means <code>save</code>, the little printer
that means <code>print</code> and the iconic handset that looks nothing
like a modern telephone that means <code>call</code> are all examples of
skeuomorphic design.</p>
<p>Your home is your castle, so let’s put a 3D-printed case on a
specialized IOT gateway device that looks like a Castle. On top, a slot
for a nice large physical key. About the size of a small TV remote
control would be good.</p>
<p>In order to attach a new IOT Thing to your network, you need to lock
it to your house with the Key. Plug the Thing in (or charge it, or
whatever) and bring the Key over to the Thing. The Key has a little blue
hollow circle LED lit up.</p>
<p>Maybe the Thing has a keyhole icon printed on it somewhere; possibly
a button needs to be pushed. When the Thing and the Key have talked to
each other, the blue LED hollow circle winks off, and a green LED dot
turns on.</p>
<p>Take the Key back to the Castle and put it in the slot. The green
light blinks off.</p>
<p>What just happened?</p>
<p>The Key contained configuration information for your Castle network.
An IP address, a one-time code to establish wifi authentication, an
encryption password to talk to the Castle. When you brought the Key over
to unlock your Thing, that information was sent to the Thing via a very
short range wireless communication system. In return, the Key received
requests from the Thing:</p>
<ul>
<li>it would like to receive connections from certain network ranges on
certain ports,</li>
<li>it would like to contact a particular domain name on a specific
port</li>
<li>it expects about so much traffic on average,</li>
<li>and about so much traffic on a bursty, short-term basis</li>
<li>it will send about so much traffic on average</li>
<li>it would like to talk to other devices in your Castle with certain
protocols and capabilities</li>
</ul>
<p>and those requests were communicated to the Castle when you brought
the key back to it.</p>
<p>Now the Thing can talk to the Castle, over an encrypted connection.
All communication needs to happen via the Castle, which will decide
whether or not the Thing can talk to anything else. The requests that
the Thing made are not changeable over the air; you’ll need to walk the
Key around again if you want them to change.</p>
<p>Now, the Castle will need to have a user interface to manage all
these connections. It should probably have two representations: a text
config file system for nerds and automation folks, and a web-based,
graphical system for everybody else. Either way, changes are not
actually made on the Castle until a physical button is pressed to commit
those changes.</p>
<p>In a very real sense, your home is your Castle.</p>
how to name your software product2016-11-22T08:09:50-05:002016-11-22T08:09:50-05:00-dsr-tag:blog.randomstring.org,2016-11-22:/2016/11/22/how-to-name-your-software-product/Alternate method<ol type="1">
<li>Look up unrelated technology names from 10+ years ago. Make a
list.</li>
<li>Sort the list by an arbitrary criterion.</li>
<li>Pick the name third from the top.</li>
</ol>
<p>Alternate method</p>
<ol type="1">
<li>Make a list of common English words that are 6 or fewer letters
long.</li>
<li>Google each of those words. Make a note of their relative
popularity.</li>
<li>Pick the name third from the top.</li>
</ol>
<p>Alternate alternate method</p>
<ol type="1">
<li>Flip a coin.</li>
<li>On <code>Heads</code>, choose the first method.</li>
<li>On <code>Tails</code>, choose the second method.</li>
<li>Change the spelling of the name in a way which is confusing to
native English speakers.</li>
</ol>
fight2016-11-09T15:18:41-05:002016-11-09T15:18:41-05:00-dsr-tag:blog.randomstring.org,2016-11-09:/2016/11/09/fight/Why I am not moving to Canada (although I quite like Canada and many
Canadians):<p>Why I am not moving to Canada (although I quite like Canada and many
Canadians):</p>
<p>because the people of my country need me to help defend them. And I
am not much of a hero, but I will try.</p>
make the tweak, test the tweak, stop2016-11-03T12:01:05-04:002016-11-03T12:01:05-04:00-dsr-tag:blog.randomstring.org,2016-11-03:/2016/11/03/make-the-tweak-test-the-tweak-stop/This may count as advice to myself more than anything else, but since
I’ve given it repeatedly, I might as well write it down.<p>This may count as advice to myself more than anything else, but since
I’ve given it repeatedly, I might as well write it down.</p>
<p>A “tweak” is a change to how a program looks or functions which is
very small. It might be defined as the smallest change which could
result in a noticeable change in form or function.</p>
<p>Every so often, you (I!) will notice something that doesn’t quite
work right. Or it works, but not as wonderfully as it could. We live in
an open-source world, so you may have the power to tweak it so that it
works better, or looks better.</p>
<ul>
<li>Go ahead and make the tweak.</li>
</ul>
<p>Do that as soon as convenient after you feel the itch. If it’s really
a tweak, it won’t take very long. The <a
href="http://xkcd.com/1205">XKCD about saving time applies.</a></p>
<ul>
<li>Test the tweak.</li>
</ul>
<p>If you didn’t test to make sure that the tweak (a) works (b) doesn’t
screw something else up, you might as well not have tweaked.</p>
<ul>
<li>Stop.</li>
</ul>
<p>Once you have made a tweak successfully, you will nearly inevitably
notice something else that could be tweaked. Don’t do it. Your technical
intuition was probably good about the worthiness of the first change; it
is now intoxicated by the heady fumes of success and cannot be trusted.
Wait until it really starts to bug you. In the meantime, get something
else accomplished.</p>
technical escalation2016-10-30T13:31:58-04:002016-10-30T13:31:58-04:00-dsr-tag:blog.randomstring.org,2016-10-30:/2016/10/30/technical-escalation/The purpose of an advertisement is to plant the idea in your head
that you need or want some thing that can be purchased.<p>The purpose of an advertisement is to plant the idea in your head
that you need or want some thing that can be purchased.</p>
<p>Having lived in such a society for a few decades, my now-instinctive
reaction to a successful advertisement is to assume that I might want a
thing, but I am unlikely to want the particular thing being advertised.
It’s a skepticism born of repeated disappointments. The Chocolate
Frosted Sugar Bombs taste like sweet cardboard, and eating four boxes to
get the coupons to send away with $24 results in a propellor beanie
which is notable for its lack of thrust, or indeed motion, or at least
motion unrelated to the incessant twitching derived from the sugar rush.
(Thanks, Bill Watterson.) There are entire catalogs which specialize in
items that can be carefully described to sound a whole lot better than
they actually are. In the 1980s there was one which liked to sell $700
PCs for $1100, on sale from $2499 (original list price, as of three
years ago) and bundled with $5000 in free software.</p>
<p>These days I am nudged towards things. Massdrop offers me a tiny
class-D stereo amplifier for $70. Is it worth it? I google amazon. There
are a bunch of similar amps, offering identical features, at prices
ranging from $20 less (but in need of a DC power supply, about $15) to
$30 more (including a power supply and a Bluetooth audio input.) How
good are these things, really? I get a spec sheet for the chip and
discover that the nominal 50W per channel is really 40W per channel into
real speakers, and suffers a huge 10% distortion… but at 30W per
channel, it’s basically non-existent distortion. The specs are, in fact,
nearly fabulous if you never push the volume knob too high.</p>
<p>But at $100 you can get an actual, new, (2 years in a warehouse, but
full original warranty) Yamaha stereo amp. It’s much bigger and less
efficient, but Yamaha consistently makes good-sounding equipment. The
Yamaha guarantees 100W per channel with the same lack of distortion that
the no-name amp can only get up to 30W. If you push the volume up all
the way, in fact, Yamaha tells you that you can get 140 W with the same
10% distortion on the no-name’s 40W. Clean power isn’t everything, but
is a very large portion of an amplifier’s job.</p>
<p>Note that I have now talked myself up from $70 to $100. Well, $110.
It’s not exactly a doubling in price, but once you add a $25 Bluetooth
input, I’m pretty much there. Now I need to consult my will-power to see
how much I want this versus money in my pocket.</p>
<p>I guess advertising works… but not necessarily on behalf of the one
doing the advertising.</p>
ran out of cards2016-10-26T19:25:32-04:002016-10-26T19:25:32-04:00-dsr-tag:blog.randomstring.org,2016-10-26:/2016/10/26/ran-out-of-cards/I ran out of business cards a few weeks ago, and forgot to order
more. Surely there’s another box around here? Yes, of course there was –
left over from three headquarters moves ago.<p>I ran out of business cards a few weeks ago, and forgot to order
more. Surely there’s another box around here? Yes, of course there was –
left over from three headquarters moves ago.</p>
<p>And tomorrow I’m going to a conference.</p>
<p>Well, business cards are a waste of good trees. Let’s be modern.
IRDA? No, nobody has infrared ports on their PDAs. We have smartphones
with cameras… and everyone has a barcode reader that understands QR.
Great, I can generate a QR code and show people that. Just link to an
appropriate web page.</p>
<p>Well, I’ll just write something up quickly, it doesn’t have to be
complex.</p>
<p>Eww. That looks terrible. Nowhere near as good as my blog. The blog,
which I spent a few hours tweaking for readability and usability. Hey,
Pelican has pages as well as posts, right? Yes, it does.</p>
<p>So there’s a contact page with a reasonable photo of me, so people
can remember who it was that they talked to, and current info, and a
link to this blog. Generate the QR code, get a nice photo widget for my
phone to display it… and I’m set.</p>
<p>No more business cards needed.</p>
<p>We’ll see how that works.</p>
infosec is simple2016-09-29T13:04:57-04:002016-09-29T13:04:57-04:00-dsr-tag:blog.randomstring.org,2016-09-29:/2016/09/29/infosec-is-simple/Information security (infosec) is very simple and very hard.<p>Information security (infosec) is very simple and very hard.</p>
<p>Infosec is simple: there are only three steps:</p>
<ol type="1">
<li>Figure out how you are giving information to people.</li>
<li>In each case, evaluate whether you want to do that.</li>
<li>Stop giving information to people who you don’t want to have
it.</li>
</ol>
<p>Actual implementation of each of these steps is extremely
difficult.</p>
<p>Suppose a customer calls you up on the phone and talks to you about
their account. How are you giving information to people?</p>
<p>Obviously you are giving information to the customer.</p>
<p>Did you remember that you are giving information to your phone
company? Calling number, called number, time started, duration of call.
That’s not much information, but you’d probably like to keep it private.
Telephone companies have a duty of care to keep that confidential…
right? Sort of. They can give it to the government. They can use it in
providing the service. And they can use it for any purpose that you
consented to… and you consented to them using it for all sorts of thing,
remember? It was a checkbox on the third page of the form that you
signed up with six years ago. It said something about sharing. Sharing
is good.</p>
<p>Also, the NSA is recording all of your calls. Don’t worry, machine
transcription to text isn’t “listening” and letting them go through
isn’t “intercepting” so the NSA will cheerily tell you that they are not
intercepting or listening to your calls. Text is easier to search,
anyway.</p>
<p>Your calls are recorded for quality assurance purposes… also as
evidence in the possible lawsuit. If it’s entertaining enough, someone
may copy it and share it.</p>
<p>If any part of your call passed through the Internet, anybody who had
access to your data can reconstruct the phone call, Doesn’t matter if
you encrypt it – taking the arrival times of the raw data <a
href="https://www.cs.jhu.edu/~cwright/oakland08.pdf">is enough (pdf
link).</a></p>
<p>If your call went to voice mail, perhaps you got an email with the
body of message already transcribed? It might have been transcribed by a
third- party service with no particular privacy policy. It might have
been transcribed by very low-paid workers in another country.</p>
<p>I assure you we have not exhausted the possibilities of figuring out
who has access to your phone calls. And that’s step one.</p>
<p>Then there’s email.</p>
<p>And file transfer.</p>
<p>And so on.</p>
the commonweal2016-09-26T19:53:18-04:002016-09-26T19:53:18-04:00-dsr-tag:blog.randomstring.org,2016-09-26:/2016/09/26/the-commonweal/There are, to date, three books in Graydon Saunders’ Commonweal
universe. They are not a trilogy, though they involve overlapping sets
of characters in more or less linear timeflow – so it’s a series.
<em>The March North</em>, <em>A Succession of Bad Days</em>, and
<em>Safely You Deliver</em> are available on Google and Kobo and
probably Smashwords as DRM-free ebooks. Minor spoilers for details and
word usage follow – not plot.<p>There are, to date, three books in Graydon Saunders’ Commonweal
universe. They are not a trilogy, though they involve overlapping sets
of characters in more or less linear timeflow – so it’s a series.
<em>The March North</em>, <em>A Succession of Bad Days</em>, and
<em>Safely You Deliver</em> are available on Google and Kobo and
probably Smashwords as DRM-free ebooks. Minor spoilers for details and
word usage follow – not plot.</p>
<p>There is magic, and Saunders takes it seriously: somewhere about
150,000 years or so of magic has completely overturned the geography,
geology and ecology of the planet. In the Bad Old Days – everything
prior to about 500 years ago, and everything outside of the Commonweal
since – patterns repeat. A person discovers they have magical Talent and
either kills themself learning about it or kills a bunch of friends and
family accidentally. They seize power, set themselves up as a magical
dictator, and then fall to any of the obvious perils: trying to conquer
a land with a stronger magical dictator; experiments in immortality gone
awry; or, of course, rebellion.</p>
<p>Somewhere during their rise or consolidation these jerks tend to try
to build supersoldiers, slave workers, purpose-bred animals and/or
magically-enhanced plants. As soon as the creation ends, evolution takes
over… Weeding is a dangerous occupation.</p>
<p>The Commonweal has managed about 500 years now through a lot of luck
followed by hard work. The luck centered around the discovery of a
magical ritual called a <em>focus</em>, in which a bunch of low-level
magic users – almost anyone, really – come together to temporarily pool
their magic. Of great import: they must all truly be willing to work
together. Of equally great import: they are stronger together than their
additive sum.</p>
<p>The hard work that followed involved the establishment of laws
centering around enforced equality – none shall gain more than ten times
any other – and an absolute ban on magicians as rulers. The peace is
enforced by the Shape of Peace, a magical construct that embodies the
Commonweal’s constitution, and The Line, the professional core of an
otherwise volunteer military force. The Line is highly regulated and
completely forbidden from conquering – defense only.</p>
<p>By all means, start reading with <em>The March North</em>, which
tells the tale of The Line’s detection of and defense against an
invading army, and then learn more about civilian life in the next two
books. But be warned: Saunders likes packing several meanings into a
sentence, and the characters’ tendency to use ungendered pronouns is
highly significant – gendered pronouns do exist, but they always
indicate a special interest.</p>
<p>Good stories, great characters, amazingly well-thought-out setting. I
recommend them.</p>
secrets of mutt2016-09-26T11:08:29-04:002016-09-26T11:08:29-04:00-dsr-tag:blog.randomstring.org,2016-09-26:/2016/09/26/secrets-of-mutt/<a href="http://www.mutt.org">mutt</a> is a mail user agent, like
Thunderbird or GMail. Unlike GMail, it is not tied to a specific mail
service, and unlike Thunderbird, mutt does not have a graphical
point-and-click interface. mutt runs inside a terminal (like xterm,
iterm or just about anything that you can use ssh in).<p><a href="http://www.mutt.org">mutt</a> is a mail user agent, like
Thunderbird or GMail. Unlike GMail, it is not tied to a specific mail
service, and unlike Thunderbird, mutt does not have a graphical
point-and-click interface. mutt runs inside a terminal (like xterm,
iterm or just about anything that you can use ssh in).</p>
<p>If that was your first introduction to mutt, you should probably look
at the main site and read some tutorials before deciding if it will be
useful to you. If, on the other hand, you have played around with mutt
but not become a complete convert, this entry will hopefully illuminate
some of the reasons to use mutt as your primary mail interface.</p>
<p>The most powerful mutt mechanism is the <a
href="http://www.mutt.org/doc/manual/#patterns">pattern</a> which is a
way of specifying what messages you want to see (_l_imit), or do
something to (_t_ag).</p>
<p>Suppose you want to see only the messages from your friend Phyllicia,
who uses a gmail account and a university account.
<code>l~fphyllicia<enter></code> will limit your view to messages
from Phyllicia. (Obvious next question: how do you go back to seeing all
the messages in the folder? Limit to “.”, a pattern that matches
everything. <code>l.</code> )</p>
<p>Now you want to save all the messages from Phyllicia to their own
folder. Tag those messages: <code>T~fphyllicia</code> and then use the
semicolon prefix to indicate that your next action applies to all tagged
messages: <code>;s</code> will bring up the save options. Similarly, you
can <code>;d</code> to delete all tagged messages.</p>
<p>You can also hand-tag messages one at a time with <code>t</code> and
untag them the same way, or use a pattern to untag messages with
<code><ctrl>t</code>.</p>
<p>An extremely common workflow is to _l_imit your messages to some set
that makes sense to you, reply, delete or archive them as appropriate,
and then reset the limit back <code>l.</code> to everything. Unless you
are very careful with your tagging patterns, it’s a good idea to start
by using a limit with that pattern, checking that those are the right
messages, and then tagging them – mutt will remember the last pattern
that you used and offer it up when you tap <code>T</code>.</p>
<p>Some patterns are useful enough to justify turning them into macros.
The <code>.muttrc</code> file happily accepts definitions:</p>
<p>Limit to only new messages: <code>macro index .n "l~N\n"</code></p>
<p>Limit to messages received in the last day:
<code>macro index .t "l~d<1d\n"</code></p>
<p>Limit to messages received yesterday:
<code>macro index .y "l~d<2d ~d>1d\n"</code></p>
<p>Limit to messages <em>not</em> from my coworkers:
<code>macro index .w "l!~fworkplace.com\n"</code></p>
<p>To use these, I just type <code>.n</code> or <code>.w</code> and so
forth.</p>
<p>And this one has become standard for me:
<code>folder-hook . push '<limit>((~N|~O)!~D)|(~d<1d!~Q)<enter>'</code></p>
<p>Each time I change to a new folder, the folder-hook executes and
gives me an initial view limited to messages which are New,
Old-but-not-read, or are recent and I replied to them. If you can’t
bring yourself to adopt Zero Inbox or similar fads, this is a great way
of getting a concise overview of what’s important.</p>
<p>Patterns. They’re really the best argument that mutt has.</p>
printer advice2016-09-19T08:45:43-04:002016-09-19T08:45:43-04:00-dsr-tag:blog.randomstring.org,2016-09-19:/2016/09/19/printer-advice/Fall must be the season of printer buying, as people start up
printers that they haven’t used all summer and discover that the $70
printer now needs $80 of ink. This is my advice for ordinary people, as
of Fall 2016:<p>Fall must be the season of printer buying, as people start up
printers that they haven’t used all summer and discover that the $70
printer now needs $80 of ink. This is my advice for ordinary people, as
of Fall 2016:</p>
<p>For black-and-white printing: Buy a Brother laser printer with the
following features:</p>
<ul>
<li>BRScript3 (aka PostScript)</li>
<li>a physical Ethernet port</li>
<li>duplexing (the ability to print on both sides automatically)</li>
</ul>
<p>Having an ethernet port used to be signified by tacking an N at the
end of the model name. They seem to have stopped that, so you need to
actually look for it. W, for wireless, isn’t good enough, although it
will probably work.</p>
<p>Duplexing is signified with a D at the end of the model name.</p>
<p>You can get one in the $100-150 range. Toner is $30-70 and lasts for
years, not months, and handles many thousands of pages.</p>
<hr />
<p>For color printing: Try not to buy a color printer. Color inkjets are
cheap and ubiquitous and awful. The cost per page is awful. If you
occasionally like to print out some photos, you will have a much better
experience sending them to CostCo or Shutterfly or pretty much any other
service. They have much better printers than you can afford, and if you
aren’t printing at least once a week – and you probably aren’t – they
will be cheaper, too.</p>
<hr />
<p>For college students: don’t buy a printer. Most professors will take
assignments via email; if they insist on printed copies, learn to leave
enough time between finishing and due date to get everything printed via
the campus printing service.</p>
ten x2016-09-01T18:19:50-04:002016-09-01T18:19:50-04:00-dsr-tag:blog.randomstring.org,2016-09-01:/2016/09/01/ten-x/In <em>Peopleware</em>, DeMarco and Lister write:<p>In <em>Peopleware</em>, DeMarco and Lister write:</p>
<ul>
<li>Count on the best people outperforming the worst by about 10:1.</li>
<li>Count on the best performer being about 2.5 times better than the
median performer.</li>
<li>Count on the half that are better-than-median performers outdoing
the other half by more than 2:1.</li>
</ul>
<p>What nearly everyone who has read that remembers is the
following:</p>
<ul>
<li>The best people outperform the average by 10x.</li>
</ul>
<p>Spot a difference?</p>
trusted, not necessarily trustworthy2016-08-30T11:01:45-04:002016-08-30T11:01:45-04:00-dsr-tag:blog.randomstring.org,2016-08-30:/2016/08/30/trust/In security nomenclature, “trusted system” or “trusted device” does
not mean the ordinary usage. It does not mean “we think this system is
trustworthy”.<p>In security nomenclature, “trusted system” or “trusted device” does
not mean the ordinary usage. It does not mean “we think this system is
trustworthy”.</p>
<p>It means “we have no choice but to trust this system”.</p>
<p>The two are not even remotely synonymous, and the difference has
probably been literally fatal.</p>
<p>“Trustworthy” implies:</p>
<ul>
<li>reliability: it always works or clearly reports an error</li>
<li>integrity: it does what it says it does</li>
<li>authenticity: it is the thing you think it is</li>
</ul>
<p>“Trusted” means that it is, in practice, the thing being relied
on.</p>
<p>Many trusted systems appear to be trustworthy, but are not. In order
to be trustworthy, a system needs to be tested and maintained.</p>
enthusiasm and frustration2016-08-19T11:14:33-04:002016-08-19T11:14:33-04:00-dsr-tag:blog.randomstring.org,2016-08-19:/2016/08/19/enthusiasm-and-frustration/Enthusiasm is having someone ask you for a favor and immediately
knowing that you can do that even better than they are imagining.<p>Enthusiasm is having someone ask you for a favor and immediately
knowing that you can do that even better than they are imagining.</p>
<p>Frustration is having someone ask you for a favor and immediately
knowing that they don’t know that what they want is somewhere between
improbable and impossible.</p>
<p>Competence is asking them questions about what they really want, and
offering them workable solutions.</p>
Debian backports pinning2016-08-17T11:39:13-04:002016-08-17T11:39:13-04:00-dsr-tag:blog.randomstring.org,2016-08-17:/2016/08/17/debian-backports-pinning/Let us suppose that you are running Debian stable, but there are some
packages that you would like from the backports archive. However, you
don’t want all backports replacements to be brought in.<p>Let us suppose that you are running Debian stable, but there are some
packages that you would like from the backports archive. However, you
don’t want all backports replacements to be brought in.</p>
<p>In <code>etc/apt/sources.list.d/backposts.list</code> add the
backports repo. As I write this, Jessie is stable, so:</p>
<pre><code>deb http://http.debian.net/debian jessie-backports main contrib non-free</code></pre>
<p>Note that the source lists must end with <code>.list</code> or they
will be ignored.</p>
<p>In <code>etc/apt/preferences.d/priorities</code>:</p>
<pre><code>Package: *
Pin: release a=jessie
Pin-Priority: 900
Package: *
Pin: release a=jessie-backports
Pin-Priority: 50</code></pre>
<p>and run <code>apt-get update</code></p>
<p>There are magic levels for the numbers in the priority field. They
are explained, at length, in <code>man apt_preferences</code>. The
highlights:</p>
<ul>
<li><pre><code> P >= 1000
causes a version to be installed even if this constitutes a
downgrade of the package</code></pre></li>
<li><pre><code> 990 <= P < 1000
causes a version to be installed even if it does not come from the
target release, unless the installed version is more recent</code></pre></li>
<li><pre><code> 500 <= P < 990
causes a version to be installed unless there is a version
available belonging to the target release or the installed version
is more recent</code></pre></li>
<li><pre><code> 100 <= P < 500
causes a version to be installed unless there is a version
available belonging to some other distribution or the installed
version is more recent</code></pre></li>
<li><pre><code> 0 < P < 100
causes a version to be installed only if there is no installed
version of the package</code></pre></li>
<li><pre><code> P < 0
prevents the version from being installed</code></pre></li>
</ul>
<p>Now, to install a single backported package,
<code>apt-get install packagename/jessie-backports</code>, and to
install a backported package plus any dependencies which are also
backported, use <code>apt-get -t jessie-backports packagename</code></p>
getting the last word in2016-08-12T11:19:49-04:002016-08-12T11:19:49-04:00-dsr-tag:blog.randomstring.org,2016-08-12:/2016/08/12/getting-the-last-word-in/The value of getting the last word in is rarely positive.<p>The value of getting the last word in is rarely positive.</p>
<p>I have engaged in a number of email threads which roughly follow this
pattern:</p>
<p>POI (Person on the Internet): Technical thing, technical-political
thing, wrong technical thing.</p>
<p>Me: Actually wrong technical thing is wrong; have you tried right
technical thing?</p>
<p>POI: Right technical thing works; technical-political thing.</p>
<p>At this point I have the option of continuing the conversation… but
note that I have not been asked a question. Nobody has been asked a
question, really.</p>
<p>It’s a good point to stop – especially if I disagree with
technical-political thing.</p>
optimizing for the wrong thing2016-08-11T15:33:16-04:002016-08-11T15:33:16-04:00-dsr-tag:blog.randomstring.org,2016-08-11:/2016/08/11/optimizing-for-the-wrong-thing/I just read about Seagate’s forthcoming 60TB SSD and Toshiba’s 100TB
SSD.<p>I just read about Seagate’s forthcoming 60TB SSD and Toshiba’s 100TB
SSD.</p>
<p>Gee, that’s a lot of storage. For now. (Review again in ten years,
when you have a pair of 100TB solid-state disks in RAID1 on your
desktop.)</p>
<p>Supposing that they have up-to-the-minute <a
href="https://en.wikipedia.org/wiki/Serial_Attached_SCSI#Characteristics">SAS
4 controllers</a> they can be filled at 2.4GB per second, or a little
over 7 hours.</p>
<p>In a typical 2U 12-slot chassis, you’ll run either mirroring (50%
capacity) or 3-parity RAID6 (75% capacity). Mirroring is better for
recovery and random access, multiparity RAID is better for disk
price/capacity optimization. These disks are expensive and natively
fast, so the multiparity RAID is probably good enough even for weird
random access scenarios.</p>
<p>It still costs $24,000 for the disks to put in your $3-10K
server.</p>
<p>You’ve got a lot of data there. How long do you suppose it will take
to find the thing you’re looking for in a haystack that size?</p>
<p>Doubtless there are businesses that need this, and more that will
need it, but also there will be a bunch of these sold to people who just
want the biggest fastest shiniest ‘best’.</p>
swiftly, he said2016-08-06T20:34:59-04:002016-08-06T20:34:59-04:00-dsr-tag:blog.randomstring.org,2016-08-06:/2016/08/06/swiftly-he-said/“And that’s… six close parentheses,” Tom lisped.<p>“And that’s… six close parentheses,” Tom lisped.</p>
<p>“I’m not going to use Smalltalk,” Tom objected.</p>
<p>“Damn it all and each component part!” Tom recursed.</p>
<p>“I put all 3 billion transistors on the chip myself,” Tom
fabricated.</p>
<p>“A loop is a loop is a loop…” Tom reiterated.</p>
<p>“Just look at this NIC!” Tom marvelled.</p>
<p>“So I tried a regular expression,” Tom said problematically.</p>
<p>“I’ve got six GPUs in this 2U case,” Tom said heatedly.</p>
<p>“I just set up a new firewall,” Tom dropped.</p>
<p>“Then we just gather up all the intermediate results,” Tom said
reductively.</p>
books: to be read2016-08-05T11:40:10-04:002016-08-05T11:40:10-04:00-dsr-tag:blog.randomstring.org,2016-08-05:/2016/08/05/books-to-be-read/It is an unusual day when I have more than two or three books lined
up on the infamous (and, indeed, largely virtual) To Be Read Shelf.<p>It is an unusual day when I have more than two or three books lined
up on the infamous (and, indeed, largely virtual) To Be Read Shelf.</p>
<p>This is such a day.</p>
<p>Waiting for me to read them:</p>
<p><em>Full of Briars</em>, Seanan McGuire. A novelette about a side
character in October Daye’s household</p>
<p><em>Nightshades</em>, Melissa Olson. FBI/vampires, I understand.</p>
<p><em>Waypoint Kangaroo</em>, Curtis Chen. Superspy with a pouch.</p>
<p><em>The Interminables</em>, Paige Orwin. They Fight Crime in a
magical future?</p>
<p><em>A Window into Time</em>, Peter F Hamilton. Perfect memory… from
someone else’s head.</p>
<p>We shall see. I am hopeful.</p>
do they teach recruiters to be aggressive?2016-07-15T11:23:06-04:002016-07-15T11:23:06-04:00-dsr-tag:blog.randomstring.org,2016-07-15:/2016/07/15/another-recruiter-not-to-use/“Lindsey” from W– called me at the office. That’s fine. She said that
she saw our posting for a junior systems administrator and she thought
she had the perfect candidate.<p>“Lindsey” from W– called me at the office. That’s fine. She said that
she saw our posting for a junior systems administrator and she thought
she had the perfect candidate.</p>
<p>I stopped her and told her that, unfortunately for her, we had made
an offer and it had been accepted.</p>
<p>“Aww.”</p>
<p>She tried to tell me about her candidate anyway. I stopped her
again.</p>
<p>“I did say that we had made an offer and it was accepted. Are you
trying to get me to rescind the offer? What sort of horribly unethical
person do you think I am?”</p>
<p>She asserted that wasn’t what she had in mind. Did we have any other
openings? What was the size of our team? Which recruiter had shown us
our successful candidate? Are we growing?</p>
<p>After a bunch of non-committal answers on my part, it became clear
that she was prepared to dig forever.</p>
<p>“I have been trying to politely indicate to you that we don’t have
this position open, we are happy with our choice, we don’t have any
other positions at this time: but you don’t seem to have been getting
that message, so I will state it outright: you should stop wasting your
time with me and go on to do something more productive.”</p>
<p>She continued to argue with me on the basis that I had never worked
with her before* and should give her a chance.</p>
<p>I pointed out that the purpose of a company, such as W–, is to form
an overall reputation that can be extended to all the employees. This is
the third or fourth unsatisfactory discussion with W– that I’ve had. She
suggested that she would prefer to talk to someone who wasn’t so rude,
and wished me a good day. I wished the same for her.</p>
the problem with broadwayhd2016-07-05T13:09:23-04:002016-07-05T13:09:23-04:00-dsr-tag:blog.randomstring.org,2016-07-05:/2016/07/05/the-problem-with-broadwayhd/Broadway, like Hollywood, has a problem. “They” – there are about
forty Broadway theaters, 31 of which are owned by three companies, 3 of
which are run by non-profits – produce an expensive entertainment
service which draws tourists but utterly fails at clearing the potential
market. That is, they could sell a lot more tickets if they could make
it more convenient for people who won’t or can’t travel to
Manhattan.<p>Broadway, like Hollywood, has a problem. “They” – there are about
forty Broadway theaters, 31 of which are owned by three companies, 3 of
which are run by non-profits – produce an expensive entertainment
service which draws tourists but utterly fails at clearing the potential
market. That is, they could sell a lot more tickets if they could make
it more convenient for people who won’t or can’t travel to
Manhattan.</p>
<p>There are a number of options. The classic method is to mount a
touring production, in which actors and props and sets travel from large
city to large city for limited engagements. This is profitable but
amazingly expensive, and while it increases the audience share to those
able to visit those large cities on those particular dates, it’s still
not all that efficient. Another option is to establish a second, third
or fourth site – Chicago, LA and London’s West End are the usual choices
– which helps a little. There is little to distinguish these “Broadway”
shows from local productions, just a big budget and perhaps some of the
original cast.</p>
<p>If a play or musical is unusually successful, it may be turned into a
movie. This requires about the same investment as any other movie, and
moves the whole problem into Hollywood’s domain.</p>
<p>But for the very minor cost of a camera crew and cinematographer, an
actual Broadway performance can be recorded. All media is digital these
days, and so there are several options for distribution:</p>
<ul>
<li>Simulcast (or record, edit and send) to digital movie theaters</li>
<li>Make and sell discs</li>
<li>Streaming video / video on demand services</li>
</ul>
<p>Simulcasting has been tried several times, Interestingly,
London-originated productions are much more open to it than
US-originals. Presumably the extra cost of a trans-Atlantic ticket is
considered a sufficient barrier to entry.</p>
<p>In the last two years, BroadwayHD was formed as a for-profit company
to do NetFlix- style streaming plus special live-streaming events.
They’ve just managed to do two productions: Old Hats, an off-Broadway
revival with the original duo of Bill Irwin and David Shiner, and from
the Roundabout Theater Company, She Loves Me. Notably, both of these
productions had firm (and near) close dates when they were
live-streamed. Broadway is extremely jealous.</p>
<p>The process of actually signing up for, paying and watching a
BroadwayHD stream is horrendously complex. Despite everyone uninstalling
Flash due to the horrendous security problems, the supported browser
viewing method is Flash-based. Officially there is HTML5 video support
on Android and iPhone devices, but that doesn’t really exist – instead
there is a link to an app which has very, very poor ratings. I didn’t
install it.</p>
<p>There is the possibility of going through AppleTV or Roku. We tried
Roku, and it worked – but it only worked after we subscribed for a year
of service. The one-month option did not work, and the one-showing
option did not work. I think BroadwayHD is currently charging us for all
three, however.</p>
<p>So: video quality: high. Audio quality: acceptably good. Cost: awful,
until you think of it as being the cost of one Broadway ticket split
among the four of us, with no trip to NYC required. Then it becomes more
bearable. User experience: very bad.</p>
<p>Hopefully that will improve. Hopefully the number of shows available
will improve, as well – it’s currently very very very low. One, really,
plus a lot of filler content.</p>
recently read books2016-06-19T15:57:48-04:002016-06-19T15:57:48-04:00-dsr-tag:blog.randomstring.org,2016-06-19:/2016/06/19/recently-read-books/O’Malley follows up the tight-single-viewpoint <em>The Rook</em> with
a multiple viewpoint political/espionage/action fantasy about the secret
UK agency in charge of supernatural defense and its negotiations with
the Belgian Scientific Brotherhood of Scientists, their traditional
enemy. Sorcerors versus mad scientists, basically, with some
terrifically funny scenes and a good bit of action.<ul>
<li>Daniel O’Malley: Stiletto (Rook volume 2)</li>
<li>Matthew Phillion: The Indestructibles (and volumes 2, 3, 4)</li>
<li>Stephen King: On Writing</li>
<li>Derek Landy: Demon Road (and Desolation)</li>
<li>Jay Posey: Outriders</li>
<li>Ken MacLeod: Dissidence</li>
<li>Mishell Baker: Borderline</li>
</ul>
<p>O’Malley follows up the tight-single-viewpoint <em>The Rook</em> with
a multiple viewpoint political/espionage/action fantasy about the secret
UK agency in charge of supernatural defense and its negotiations with
the Belgian Scientific Brotherhood of Scientists, their traditional
enemy. Sorcerors versus mad scientists, basically, with some
terrifically funny scenes and a good bit of action.</p>
<p>I’m not entirely sure why Matthew Phillion isn’t a respected
comic-book writer, but he has certainly employed that talent in the four
Indestructibles novels. He builds a team of superpowered youngsters in a
world where there clearly have been and will be supers – but there is a
distinct lack of them at the beginning of the story.</p>
<p>Stephen King wrote a bunch of books. Most of them have sold pretty
well. <em>On Writing</em> is about half autobiographical vignettes and
half writing advice.</p>
<p>Landy’s <em>Demon Road</em> trilogy is two-thirds done, and I’m
looking forward to the conclusion. The first book managed to twist the
expected plot four or five times; the second book built on it nicely.
Will it all wrap up properly in the end?</p>
<p>I haven’t met a Ken MacLeod book that I didn’t like; this one begins
a trilogy which blends simulation universes and military action in a
nicely subversive beginning – but it feels more like part one of a
three-volume story than a book entire unto itself. As usual, MacLeod
expects the reader to have done their homework but uses standard
nomenclature so that Wikipedia and Google are useful reference
sources.</p>
<p>Jay Posey’s first novel is a mid-future (thriving solar colonies,
lots of commercial space travel) thriller which dips its toes into
Clancy-flavored MilSF. It effectively changes subgenre expectations
three times, delivering a reasonable wrap-up but clearly beginning a
series.</p>
<p><em>Borderline</em> is Mishell Baker’s first novel, and I admit that
I picked it up largely because of the blurb from Seanan McGuire on the
cover. I will certainly pick up Baker’s next novel on the strength of
this work. Perhaps you have wondered if your fantasy novel’s hero is in
need of psychiatric care? Violence, theft, maniacal focus on a single
goal, paranoia, perhaps delusions of grandeur? In <em>Borderline</em>,
the protagonist definitely and explicitly has borderline personality
disorder. She’s also missing a leg below the knee, and wonders if she’s
missing her ability to tell reality from fantasy when she gets recruited
for a very special organization.</p>
security strategies2016-06-07T12:56:18-04:002016-06-07T12:56:18-04:00-dsr-tag:blog.randomstring.org,2016-06-07:/2016/06/07/security-strategies/These are the basic strategies for securing what you care about. I
will make certain assumptions: you are living in the early 21st century;
you are living in a highly connected information state; you are not
intent on committing crime, and therefore have no reason to spend an
outsized portion of your wealth on security; you are not a particularly
attractive target.<p>These are the basic strategies for securing what you care about. I
will make certain assumptions: you are living in the early 21st century;
you are living in a highly connected information state; you are not
intent on committing crime, and therefore have no reason to spend an
outsized portion of your wealth on security; you are not a particularly
attractive target.</p>
<p>An “individual attack” is an attack against you in specific, with
some degree of research being focussed on you.</p>
<p>An “organized mass attack” is an attack originating from an
organization that does not focus on you in particular but is systematic
and pervasive. Policies, regulations and laws can be organized mass
attacks.</p>
<p>An “automated attack” is an opportunistic attack executed by
computers against any visible target.</p>
<ol type="1">
<li>Hope. They say that hope is not a strategy, but it is. Hope is the
default strategy for most people, most of the time. “If I am not much
different from my neighbors,” they think, “then I have a low chance of
being singled out for attack.” Historically, hope is successful for most
people, most of the time, and is absolutely no use for the people who
are actually attacked. Hope is the cheapest strategy, if successful. It
is a very expensive failure. Hope is overwhelmed by any individual
attack, organized mass attacks, and automated attacks.</li>
<li>Hide. You can try to remove your footprints and live in a hole.
Serious hiding requires disconnection from your friends, community and
society. The disconnection is costly in social terms, and that can lead
to economic and psychological damage. Hiding involves avoiding
institutions which collect and store data, including banking and credit
cards, store loyalty cards, and restricts your use of many services and
commercial transactions. Hiding does not require a large investment of
money, but requires careful attention to detail and many non-default
lifestyle choices. If it fails, hiding provides very little protection
over hope. Hiding is vulnerable to individual attacks and is of variable
use against mass organized attacks and automated attacks.<br />
</li>
<li>Barricade. You can build walls. Carefully inspect what comes in and
what you send out. Choices range from simple walls to defense in depth.
Firewalls, adblockers, script blockers and physical privacy walls are
all examples of barricades. You can accept certain connections and not
others, judging each one on value versus risk. Barricade requires
investment in both money and attention. A wall which fails does not
necessarily open all the other avenues of attack. Well-maintained
barricade systems offer resistance to individual attacks, and lots of
resistance to automated attacks. Mass organized attacks may work around
them.</li>
<li>Chaff. You can spread disinformation, trying to reduce the value of
attacking any individual target by flooding the space with fake targets.
Chaff is rarely used as a primary defense, but it is frequently part of
a campaign of hope or hiding. Chaff usually does not cost much money,
but some time is needed to execute various campaigns. A neglected chaff
strategy is indistinguishable from hope. Hope has a low cost of entry
and a low expectation of success.</li>
<li>Counterattack. Difficult and risky.</li>
</ol>
not interested in cybercoders2016-05-20T09:35:09-04:002016-05-20T09:35:09-04:00-dsr-tag:blog.randomstring.org,2016-05-20:/2016/05/20/not-interested-in-cybercoders/When the contents of a recruiter’s mail message are semantically
equivalent to that of the classic 419 scam – “I have this thing that
doesn’t belong to me, let me get it to you and we can share in the
profit” – you should take that as a hint that they are unredeemably
corrupt.<p>When the contents of a recruiter’s mail message are semantically
equivalent to that of the classic 419 scam – “I have this thing that
doesn’t belong to me, let me get it to you and we can share in the
profit” – you should take that as a hint that they are unredeemably
corrupt.</p>
<p>Yeah, really. Here’s what an ostensible CyberCoders employee sent
me:</p>
<pre><code>I'm simply looking to make you aware of a great candidate that's currently interviewing at your competitor, BUT has expressed greater interest in joining a team like yours.
If you're interested in seeing his resume, please shoot me a quick reply and I'll get that over to you by EOD!</code></pre>
<p>Let’s see. He has no idea who I am or what company I work for. He has
no idea of what our competition is. And he strokes my ego by saying that
this unnamed, probably non-existent candidate (candidate for what?
developer? sysadmin? heavy metal drummer?) wants to work for us.</p>
<p>Jerk.</p>
<p>That’s why I don’t work with CyberCoders, and I recommend that you
stay away from them, too.</p>
quote of the day2016-05-19T13:08:08-04:002016-05-19T13:08:08-04:00-dsr-tag:blog.randomstring.org,2016-05-19:/2016/05/19/quote-of-the-day/When I was younger, I dreamed of something like this. Voice control
for my home! A Star Trek computer that I can interact with
conversationally! I just say what I want and it happens! Now, I just see
an internet-connected microphone in a software black box which I can
only interpret as a giant frickin’ security liability.<blockquote>
<p>When I was younger, I dreamed of something like this. Voice control
for my home! A Star Trek computer that I can interact with
conversationally! I just say what I want and it happens! Now, I just see
an internet-connected microphone in a software black box which I can
only interpret as a giant frickin’ security liability.</p>
</blockquote>
<p><cite>“cheald” at <a
href="https://news.ycombinator.com/item?id=11723652">Hacker
News</a></cite></p>
i have an idea2016-05-16T15:12:44-04:002016-05-16T15:12:44-04:00-dsr-tag:blog.randomstring.org,2016-05-16:/2016/05/16/i-have-an-idea/Send me things to review, and I promise to give them honest negative
feedback.<p>Send me things to review, and I promise to give them honest negative
feedback.</p>
<p>Nothing positive. No gushing. The best you can hope for is “I tried
this for a week, and there’s not much wrong with it.”</p>
<p>Honest negativity, though. Is your manual badly written? I will say
so. Is the battery life awful? Does it cost too much for what it does?
Does it tend to catch on fire when power is applied?</p>
<p>I feel reasonably well qualified to say negative things about
computing equipment that can be powered with 120VAC, audio systems,
consumer electronics, video projection systems, board games, books –
especially SF, mystery, thrillers, biographies and cookbooks – kitchen
appliances and tools, useless desktop tools, and furniture.</p>
<p>Talk to me in person first if you want me to say negative things
about larger items, like vehicles or buildings.</p>
the difference between a trivial project and a serious project2016-05-13T05:17:25-04:002016-05-13T05:17:25-04:00-dsr-tag:blog.randomstring.org,2016-05-13:/2016/05/13/the-difference-between-a-trivial-project-and-a-serious-project/The major difference between a trivial project and a serious project
is that on a serious project, maintenance and improvements take much,
much longer than the initial development phase.<p>The major difference between a trivial project and a serious project
is that on a serious project, maintenance and improvements take much,
much longer than the initial development phase.</p>
<p>The other difference is that a trivial project can become serious,
but a serious project never becomes trivial – it gets abandoned.</p>
<p>I’ll tell you a story about <code>errorwatch</code>.</p>
<p>Something over ten years ago, it became obvious that there were lots
of programs in our system that kicked off according to what time it was
– classic “cron jobs”, so-named because the cron daemon is the master
program that schedules them to run. There were programs that ran every
few minutes, some which ran a few times per day, or once a day, or at
the beginning or end of a month.</p>
<p>If they ran perfectly, nobody was concerned. But if they encountered
any problem, we needed to know about that. Options for notifying us
included log files, console output, or email. Almost every program left
a log file behind, and the problems usually came to some email address.
Not always the same email address, mind you.</p>
<p>So I wrote a trivial program called <code>errorwatch</code>. It was
very simple: the cron daemon called errorwatch and had errorwatch run
the real program. <code>errorwatch</code> had options for where to write
the log file, which would include a time stamp, what email address to
notify in case of a failure, and a potentially different email address
to notify in case of success. Then I added one more option, to make a
successful run “quiet” and not send the whole log.</p>
<p>You can guess where this is going, right?</p>
<p>Over the years, <code>errorwatch</code> got the following useful
features:</p>
<ul>
<li>an “extremelyquiet” mode, which does not send email at all for a
success</li>
<li>a timer, which declares a program to be a failure if it has not
returned in a specified period of time</li>
<li>an extra message to include in the email body</li>
<li>a way to change the subject of the email</li>
<li>a complete listing of options and example usage</li>
<li>a way to turn a success into a “warning” – not a failure – if a
certain string is found in the output of the program</li>
<li>a way to specify that string</li>
<li>an option to not run the program, not create the log file, but just
tell the user what it would do if the debug option were not present</li>
<li>a verbose mode which gave the user a lot of detail on what
<code>errorwatch</code> was doing</li>
<li>a way to turn a success into a failure if a certain string is found
in the output of the program</li>
<li>a way to turn a success into a failure if a certain string cannot be
found in the output of the program</li>
</ul>
<p>On average, <code>errorwatch</code> gained one new feature a
year.</p>
<p>And at this point, a senior programmer suggested that
<code>errorwatch</code> needed a proper testing module. It is still
under 400 lines long, and about one-third of that is comments and
documentation and such.</p>
<p>But it is no longer a trivial project.</p>
new eyes catch bugs2016-04-15T10:00:49-04:002016-04-15T10:00:49-04:00-dsr-tag:blog.randomstring.org,2016-04-15:/2016/04/15/new-eyes-catch-bugs/The best way to solve any problem is – no, I lie, there is no single
best way to solve all problems.<p>The best way to solve any problem is – no, I lie, there is no single
best way to solve all problems.</p>
<p>But I often find that there is great value in this approach.</p>
<ul>
<li>Stop. No, really, stop working on it. It may take a while.</li>
<li>Pretend that you are starting analysis of the problem from the
beginning.</li>
<li>Read through the current process. Not what you thought was the
process, not what the documentation says, but the code that is actually
in effect.</li>
<li>Understand what the people who wrote the process were trying to
accomplish.</li>
<li>Build your mental model of the process.</li>
<li>Read through the process again. At every step, ask: is this
necessary? Is this worded correctly?</li>
<li>When you find something that is not necessary, remove it. Even if it
looks clever. Especially if it looks clever.</li>
<li>Test the new process, which is less clever and may do less than the
old process.</li>
</ul>
<p>In today’s application of the approach, I noted a well-commented
optimization that was, in fact, completely pessimizing.</p>
once upon a time2016-04-11T09:55:57-04:002016-04-11T09:55:57-04:00-dsr-tag:blog.randomstring.org,2016-04-11:/2016/04/11/once-upon-a-time/Once upon a time there were programmers.<p>Once upon a time there were programmers.</p>
<p>Then there were systems programmers and application programmers.
Systems programmers wrote operating systems and utilities for them. App
programmers wrote apps. There was a lot of crossover.</p>
<p>Then there were operators, systems programmers and application
programmers. Operator was a junior position who did physical things
(mount tapes, plug in cables) and ran commands to do things on the
systems. They usually moved up to being…</p>
<p>Systems administrators, who did some programming in service to the
systems, but not too much. The more senior a sysadmin was, the more time
they spent programming and the less time they spent doing physical
things… unless they wanted to do that.</p>
<p>Sysadmins started to specialize. People who configured switches and
routers and talked to telephone companies became “network engineers”.
People who spent time working on firewalls and security policies and
thinking about that became “security engineers”. Junior people who read
scripts to end users became the helpdesk. And so forth.</p>
<p>Then we noticed that a bunch of people were doing things manually
when they should be automated. This was especially bad in places where
there were no senior sysadmins or systems programmers. But we did have
the internet, and senior sysadmins got together and started writing
tools to make their lives easier: infrastructure automation.</p>
<p>You probably know the story from there, but I’ll wrap up with one
more important point: you know how when writing a business application
you need to have a subject matter expert who actually knows what they
are doing? Operations is exactly the same way. All the automation in the
world won’t help you if you don’t have someone around who knows what
they are doing. Some people can outsource this to “the cloud”, but not
everyone.</p>
containers need dependency management2016-04-07T16:03:11-04:002016-04-07T16:03:11-04:00-dsr-tag:blog.randomstring.org,2016-04-07:/2016/04/07/containers-need-dependency-management/You can deploy an operating system, use the package manager to
install software, use a configuration management system to… manage
configurations… and you can do so to a piece of hardware or a virtual
machine.<p>You can deploy an operating system, use the package manager to
install software, use a configuration management system to… manage
configurations… and you can do so to a piece of hardware or a virtual
machine.</p>
<p>It’s really tempting to clone the VM, file off the serial numbers and
use it again. That might be OK.</p>
<p>Containers spin up faster than VMs, and once you have a container
image, well, it’s just jumping up and down telling you that you should
copy it and send it off to a thousand happy servers to run on each of
them. And that could be OK…</p>
<p>Then someone has the nifty idea that they will offer you their
application all nicely bundled up inside a container image. All the
dependencies are sealed inside! They just work! Even if they conflict
with something else on your base system or in another container!</p>
<p>And that’s just wrong. Don’t do that.</p>
<p>Because the container image that they offer you does not tell your
system how to re-create it, and it hides all the dependencies away
inside. All the dependencies are there, of course. And when your
HTML-to-PDF printer uses a fat lot of code from six projects to do the
job, you will have no idea that it is using the flawed regexp lib that
gives root control for a buffer overflow.</p>
<p>Do not deploy images that you don’t understand, do not deploy images
that you cannot recreate, and most of all, beg your container system to
establish a notification system so that you have a bare chance of
staying ahead of the wolves.</p>
best general advice2016-03-28T15:17:34-04:002016-03-28T15:17:34-04:00-dsr-tag:blog.randomstring.org,2016-03-28:/2016/03/28/best-general-advice/when you find yourself in a hole, stop digging<blockquote>
<p>when you find yourself in a hole, stop digging</p>
</blockquote>
<p>I don’t know who originally said that. <a
href="https://en.wikipedia.org/wiki/Law_of_holes">Wikipedia says</a> it
might be Will Rogers.</p>
<p>It’s good advice, and the worst part about it is recognizing when you
are, in fact, in a hole.</p>
the tiniest tools are sometimes worthwhile2016-03-17T10:07:52-04:002016-03-17T10:07:52-04:00-dsr-tag:blog.randomstring.org,2016-03-17:/2016/03/17/the-tiniest-tools-are-sometimes-worthwhile/At $WORK we use TUTTLE, the Tiny Utility Toolkit for Tweaking Large
Environments. Tuttle is a system administrator’s configuration
management tool designed for the particular situations we faced. It
shares a name with a plumber in BRAZIL, the Terry Gilliam movie. If we
were starting from scratch today, we wouldn’t write our own – we would
use Chef or Puppet or Ansible or whatever. It is usually better to have
a large community supporting you.<p>At $WORK we use TUTTLE, the Tiny Utility Toolkit for Tweaking Large
Environments. Tuttle is a system administrator’s configuration
management tool designed for the particular situations we faced. It
shares a name with a plumber in BRAZIL, the Terry Gilliam movie. If we
were starting from scratch today, we wouldn’t write our own – we would
use Chef or Puppet or Ansible or whatever. It is usually better to have
a large community supporting you.</p>
<p>One of the interesting ideas of tuttle is that a machine may be
designated to run an “environment” – a group of related services – but
we may not want them to actually be running. So by designating that
environment as disabled, all the daemons, cron-jobs, configurations and
so forth will be present, but will not run. There are a pair of
commands, unironically named <code>enable</code> and
<code>disable</code>, which will switch an environment between states on
the instant machine.</p>
<p>Obviously tuttle needs to keep track of this state locally. Until
this morning, though, nobody had ever thought that they needed to query
this state. The usual working plan is to disable an environment only on
very odd and infrequent occasions, and then to enable it immediately
afterwards. This failed in precisely the way you would think, obvious in
retrospect: someone disabled an environment and then forgot to re-enable
it.</p>
<p>So I wrote <code>show-disabled</code>, a three line shell script
which now sits among the other tuttle tools. Because it does not emit
any output when there is nothing disabled, I think I will put it in a
cron-job to run just before humans go home for the day. When it catches
something, that will be useful.</p>
how can you listen with those bananas in your ears?2016-03-16T11:12:46-04:002016-03-16T11:12:46-04:00-dsr-tag:blog.randomstring.org,2016-03-16:/2016/03/16/how-can-you-listen-with-those-bananas-in-your-ears/I dropped Sprint as my cell service company in order to go to an
option I perceived as being generally cheaper and more reliable. As a
bonus it turns out that they actually have customer service, unlike
Sprint.<p>I dropped Sprint as my cell service company in order to go to an
option I perceived as being generally cheaper and more reliable. As a
bonus it turns out that they actually have customer service, unlike
Sprint.</p>
<p>As soon as I dropped Sprint, they started sending me marketing
messages about how much they would do for me to retain me as a customer.
Have you ever had a bad relationship end, where your ex is certain that
they can win you back with superficial gestures that indicate that they
will certainly go back to abusing you as soon as they are sure you are
theirs again?</p>
<p>Just like that.</p>
<p>“Please don’t go!”</p>
<p>“You have 14 days to change your mind! Have you seen our new
network?”</p>
<p>“We will give you $300 to come back to us!”</p>
<p>Uh-huh.</p>
<p>Today they ask me to fill out a survey with the subject line “Tell us
what we could have done better”. Here are the questions they asked
me:</p>
<ol type="1">
<li>What is your age?</li>
<li>Do you have cell phone service?</li>
<li>Who provides your cell service?</li>
</ol>
<p>The first question is unskippable and provides no option for “I don’t
want to tell you.” So I lied.</p>
<p>Where were the questions designed to find out what they could have
done differently? Not in this survey.</p>
<blockquote>
<p>Sprint: We Can’t Hear You, We Have Bananas In Our Ears.</p>
</blockquote>
<p>The Sprint logo does look like a fanned-out bunch of bananas, doesn’t
it?</p>
developing technical intuition2016-03-13T12:48:06-04:002016-03-13T12:48:06-04:00-dsr-tag:blog.randomstring.org,2016-03-13:/2016/03/13/developing-technical-intuition/When you don’t know how to do anything, everything is hard.<p>When you don’t know how to do anything, everything is hard.</p>
<p>When you don’t know what is possible, everything is impossible.</p>
<p>Other people show you how to do small jobs, easy jobs. They say that
the jobs are easy and small, but they start out hard and difficult,
because there is no underlying pattern. You just do them. Learn by rote.
When event A happens, follow checklist 3.</p>
<p>You read the documentation. You ask questions. There is an underlying
pattern, but it wasn’t what you were expecting. You learn the pattern,
you ask questions, and you discover that you have a model inside your
head. The model of a complex system is less complete than the system
itself, but you know that pushing on it in these ways produces those
changes.</p>
<p>You move along. You learn another system, read new documentation,
build models in your head. When you know which questions you’ll need to
ask as soon as you hear a description of the system, you have graduated
into competence.</p>
<p>More systems, more models, and now you know how to do lots of
things.</p>
<p>Some things are still hard, but that’s because they involve
organizing lots of sub-tasks, making sure all the parts are available to
build the scaffold around the site where you will build the system. You
have a model in your head before the system is built.</p>
<p>Now you have a theory of models. You can consider a possible result –
a failure, let’s say – and describe some of the prerequsites which would
cause that. You can think about causes and figure out some of the
effects without having to try them out.</p>
<p>You make systems which work in ways that have worked for you in the
past. You put more of your effort into designing the systems so that
fixing the inevitable problems becomes easier. Investing the effort at
the beginning saves embarrassment later on. You know that many things
are possible – and you avoid doing things which are complex if you can
avoid it, because simple is easier to think about then complex, and so
simple is easier to fix than complex.</p>
<p>People will ask you to build things by telling you what they want the
system to do, and you will have heard this enough times that you will
stop them, and ask what results they want from the system. You will hear
about new methods, and you will learn some of them because they seem to
be more efficient. You will discard some of them because they solve
problems that you do not have. And you will laugh at some of them
because the designers of that system designed badly.</p>
<p>You will have discovered that you have reasoning skills, experience,
judgement, and taste.</p>
<p>But there’s always something more to learn.</p>
who are we connecting to?2016-03-07T15:56:41-05:002016-03-07T15:56:41-05:00-dsr-tag:blog.randomstring.org,2016-03-07:/2016/03/07/who-are-we-connecting-to-/Let us suppose that you have a firewall set up in the traditional
manner: an interface to the inside, one to the outside, perhaps some NAT
for the IPv4 masquerading and straightforward firewalling for the IPv6.
(v6 is not on the menu for today, do not worry.) There is a default deny
for incoming NEW (SYN) packets, a default accept for related inbound
packets, specific services are whitelisted (HTTPS? DNS? IMAPS? SSH, of
course). And you default-accept outbound packets, because it is too much
of a pain to do a default deny and then go through every outbound
connection ever.<p>Let us suppose that you have a firewall set up in the traditional
manner: an interface to the inside, one to the outside, perhaps some NAT
for the IPv4 masquerading and straightforward firewalling for the IPv6.
(v6 is not on the menu for today, do not worry.) There is a default deny
for incoming NEW (SYN) packets, a default accept for related inbound
packets, specific services are whitelisted (HTTPS? DNS? IMAPS? SSH, of
course). And you default-accept outbound packets, because it is too much
of a pain to do a default deny and then go through every outbound
connection ever.</p>
<p>What are you sending out, though? What are you connecting to? If you
feel paranoid enough, you capture your outbound traffic and pretty soon
you need extra terabyte drives for your logs.</p>
<p>Go into your iptables rules set and find where you allow outbound
traffic, probably something like this:</p>
<pre><code>iptables -A FORWARD -i $INSIDE -j ACCEPT</code></pre>
<p>Before that line, we can log the packets that start new
connections:</p>
<pre><code>iptables -A FORWARD -i $INSIDE -m state --state NEW -j LOG --log-level 4 --log-prefix 'NEW-OUTBOUND '
</code></pre>
<p>There is a space inside the log prefix quoted string, because it is a
very literal prefix.</p>
<p>Go over to your syslog configuration and copy
<code>kernel.warn</code> messages – that would be what our log rule will
emit – to a useful file, perhaps
<code>/var/log/iptables-newoutbound.log</code>,</p>
<p>Reload your syslogd, reload your iptables rules. Take a look at the
logfile and make sure it has some content.</p>
<p>Let it sit for a while. I would recommend 24 hours or more, depending
on what you think normal behavior is on your network. If you are at a
business, you might want to run a Friday through Monday sweep, assuming
this is not a holiday weekend. At home, any typical weekday might do, or
a weekend day if everyone is in the house.</p>
<p>Comment out the iptables line and reload the rules again.</p>
<p>Time for some rude log analysis. Our tools will be <code>awk</code>,
<code>grep</code>, <code>sort</code>, <code>wc</code> and
<code>uniq</code>.</p>
<p>Run <code>wc -l</code> on your logfile. Now you know the total number
of connections you captured. <code>head</code> will show you the first
few lines. Figure out which fields (spaces are field delimiters) are
interesting to you. You can print them out by piping your file
through</p>
<pre><code>awk '{ print $1" "$12" "$13" "$16 }'
</code></pre>
<p><code>$1</code> is the first field. You print spaces in quotes
because <code>awk</code> is very literal, too.</p>
<pre><code>Mar 5 14:59:59 gw kernel: [158144.383443] NEW-OUTBOUND IN=eth1 OUT=eth4 MAC=a0:37:9f:01:9a:91:d2:3d:73:93:33:1a:0c:01 SRC=192.168.0.102 DST=69.171.239.11 LEN=79 TOS=0x00 PREC=0x00 TTL=63 ID=52128 PROTO=UDP SPT=36268 DPT=53 LEN=59</code></pre>
<p>A typical line will start out with a date and time stamp, the
hostname, an indication that is a kernel message, another,
high-resolution timestamp, and then the log prefix you had
configured.</p>
<p>Then we get: inbound interface, outbound interface, MAC addresses;
source IP, destination IP, length, TOS field, PREC, time to live, ID,
protocol, source port, destination port, and finally protocol-relevant
information like TCP window number, flags, or payload length.</p>
<p>That is a lot.</p>
<p>Things which I usually think are interesting: the source IP, the
destination IP, the destination port, and the protocol type. For
example, the packet logged above is UDP port 53, which is DNS. We made a
request to 69.171.239.11, which is a nameserver owned by Facebook.</p>
<p>We can separate out various protocols into their own files. To get
them out of <code>var/log/iptables-newoutbound.log</code>, we can do a
two-step dance:</p>
<pre><code>grep DPT=53 /var/log/iptables-newoutbound.log > iptdns
grep -v DPT=53 /var/log/iptables-newoutbound.log > ipt-dns</code></pre>
<p>The first file contains only the DNS entries. The second files
contains everything else, which we will continue to break down:</p>
<pre><code>grep DPT=123 ipt-dns > iptntp
grep -v DPT=123 ipt-dns > ipt-dns-ntp</code></pre>
<p>NTP is common. Our new files contain the NTP connections in
<code>iptntp</code> and things which are neither DNS nor NTP in
<code>ipt-dns-ntp</code>.</p>
<p>We can get HTTP and HTTPS out, too:</p>
<pre><code>grep DPT=80 ipt-dns-ntp > ipthttp
grep -v DPT=80 ipt-dns-ntp > ipt-dns-ntp-http
grep DPT=443 ipt-dns-ntp-http > ipthttps
grep -v DPT=443 ipt-dns-ntp-http > ipt-dns-ntp-http-https</code></pre>
<p>If you add SSH (DPT=22) and anything else you use a lot – SMTP
(DPT=25, 467 and 587), IMAP (143 and 993) you should discover that you
have relatively few lines left.</p>
<p>Run <code>wc -l ipt*</code> to see the relative frequencies.</p>
<p>Eventually you will get all the common protocols separated – really,
I would expect only a few more than this – and have some leftovers.</p>
<p>You can sort them and see how many duplicates you have:</p>
<p><code>sort ipt-dns-ntp-http-https-smtp-imap-ssh |uniq -c > mess.counted</code></p>
<p>Did you know that <code>uniq -c</code> takes a sorted file and
outputs the number of times each line appears, followed by a single copy
of the line? I only saw that option a few weeks ago.</p>
<p>Grovelling through <code>mess.counted</code> will inevitably come up
with some things you do not recognize. You can look for protocols in
<code>/etc/services</code> or by plugging it into a helpful site such as
<a href="http://www.speedguide.net/port.php?port=22">SpeedGuide</a>.
<code>whois</code> can tell you who owns a particular IP, which is often
of use.</p>
<p>And then, when you finally decide that there is no good reason for
one of your machines to have reached out to that odd machine on that
weird port, you can write a new <code>iptables</code> rules to drop
those packets. I recommend that you watch carefully for a few days –
nobody will be pleased if you cannot revert the change swiftly so that
they can play their game again.</p>
Let's Encrypt works for me2016-03-01T07:10:44-05:002016-03-01T07:10:44-05:00-dsr-tag:blog.randomstring.org,2016-03-01:/2016/03/01/lets-encrypt-works-for-me/The free SSL certificates available through <a href="https://www.letsencrypt.org">Lets Encrypt</a> are working quite
well here. You may recall I last spoke of that project in the future
tense, <a href="https://blog.randomstring.org/2015/05/22/server-security-certificate-semi-pro-tips/">back
in May.</a><p>The free SSL certificates available through <a
href="https://www.letsencrypt.org">Lets Encrypt</a> are working quite
well here. You may recall I last spoke of that project in the future
tense, <a
href="https://blog.randomstring.org/2015/05/22/server-security-certificate-semi-pro-tips/">back
in May.</a></p>
<p>I have a cron job which runs at the beginning of each month to
regenerate all the certs that we are currently using; this gives me two
months to discover and fix any problems that might occur.</p>
<p>It would be nice if LE had a better story about explicitly renewing
rather than reissuing certificates and forgetting about the old ones. I
understand that they are working on that.</p>
<p>LE also has an annoying habit of sending email every month warning
that certificates are about to expire. This is, of course, related to
their renewal problem.</p>
<p>This is, of course, a classic DevOps problem: once you have an
automated system, you discover the flaws in your monitoring of that
system. I’m sure they will fix it.</p>
questions for packaging systems2016-02-27T14:01:58-05:002016-02-27T14:01:58-05:00-dsr-tag:blog.randomstring.org,2016-02-27:/2016/02/27/questions-for-packaging-systems/First, some history. Then, some questions largely of interest to
system administrators.<p>First, some history. Then, some questions largely of interest to
system administrators.</p>
<p>Once upon a time [UNIX] software distribution was simple. Your
operating system came as a huge blob over which you had no control.
Sometimes there would be updates. Sometimes the update would require a
reinstall, sometimes not. Additional software came in similar blobs,
“managed” in a similar way.</p>
<p>For a while, you needed to compile anything you wanted yourself.
Figuring out dependencies was hard, so people adopted makefiles and then
autoconf. Autoconf could figure out what sort of system you were
running, adapt to various inconsistencies and then even figure out what
libraries you were missing. Building a nontrivial system was, well,
nontrivial. If you were missing a key feature, you would need to stop
and build something else, which might in turn require an update or
hopelessly disable some feature in another system that you were quite
fond of.</p>
<p>Automating this mess was a good idea, so people did that. The BSD
Ports system, among others, was a huge library of source code stubs that
declared dependencies and could download code and compile it for you.
The Packages system then arose: software which declared dependencies and
was already compiled.</p>
<p>(Over in Windows Land, you had a single operating system with just a
bare handful of versions, so every software installation process had
relatively simple assumptions about what was available and what would
have to be provided. 22 high-density floppies? Everyone greeted the
arrival of CDs as a lifesaver.)</p>
<p>Modern packaging systems need to be able to answer the following
questions convincingly:</p>
<ul>
<li>Is the software integrity intact?</li>
</ul>
<p>Are the bits that I asked for the bits that I received? Did the
download happen over an encrypted link? Can I verify the integrity
pre-install and post-install? Manually and automatically?</p>
<ul>
<li>Is there an automated system for updates?</li>
</ul>
<p>Can I get a timely notification of an update? Is the notification
protected against fraud? Can I install packages without answering
questions interactively? Can I install updates automatically? Can I
prevent one or more updates while letting others go through?</p>
<ul>
<li>Are dependencies automatically tracked and installed?</li>
</ul>
<p>Is there a clear difference between required dependencies and
suggested add-ons? Can I set a preference to automatically install all
the suggestions? If a suggested package install fails, does it abort the
install or upgrade of the requested package?</p>
<ul>
<li>Are included component libraries tracked?</li>
</ul>
<p>If you have a statically linked or co-packaged library – that is, a
dependency built in to the same package – is there visibility into that
from the outside? Can it be tracked for security or feature updates like
the main package?</p>
<ul>
<li>Is the responsibility for packaging and updates defined?</li>
</ul>
<p>Does your development team overlap with your security team? Do they
know their responsibilities? Are they documented and visible to the end
user?</p>
<ul>
<li>Are the tools for creating and maintaining repositories available
and well documented?</li>
</ul>
<p>Can I create a secure mirror of the upstream repos? Can I create a
local cache? Can I create and advertise a third-party repo for
distribution to other users? Can I create a local repo just for my own
use? Is the source of a package clear to the end-user before
installation? After installation? Can my packages conflict with upstream
packages and replace them? Can I selectively set priorities per-package?
Per-repo?</p>
more bandwidth, please2016-02-26T14:57:13-05:002016-02-26T14:57:13-05:00-dsr-tag:blog.randomstring.org,2016-02-26:/2016/02/26/more-bandwidth-please/Is there an upper bound to the amount of bandwidth that people will
demand?<p>Is there an upper bound to the amount of bandwidth that people will
demand?</p>
<p>First, a brief history of my personal bandwidth consumption.</p>
<p>I was lucky enough to be born into the beginning of the age of
bandwidth, with computers being available in elementary schools and
telephone modems just emerging into consumer usage. My first modem was a
2400 baud Zoom with no special features. When I used it, nobody else in
my family could use our one telephone line. We did not have an answering
machine, but that would not have worked, and voice mail was not a thing
that could be ordered for any sort of reasonable cost.</p>
<p>I can read faster than 2400 bits per second.</p>
<p>When I went away to college, I lived in the first dorm on campus to
have ten megabit ethernet in every room. It was very forward thinking:
there were two jacks in every room.</p>
<p>In my second apartment in Boston, I got one of the first cable
modems. It was a big ugly grey box with a lot of heat-radiating fins on
it, and I frequently managed 10 megabits through it.</p>
<p>Nowadays my “cheap” cable modem service at home is 50Mb/s down, 5Mb/s
up, and it feels reasonably quick. Delays are more often caused by the
older clients connected to our 802.11 g/n wireless network.</p>
<p>What is the most bandwidth a human could want?</p>
<p>To a first approximation (that means I am wildly guessing), I would
say that full immersive, uncompressed sensory data for 5 senses at a
resolution approximating the perceptible limits of humans is a good
proxy for maximum data usage. How much is that?</p>
<ul>
<li>Visual data</li>
</ul>
<p>A field of view about 180 degrees wide, 135 degrees high, 1 arc
minute in minimum pixel size, and updated 100 times per second… twice,
to account for full stereography, and using 48 bits of color.</p>
<pre><code>180 * 135 * 60 * 60 * 100 * 48 = 419904000000,
420 billion bits per second.</code></pre>
<ul>
<li>Audio data</li>
</ul>
<p>Human ears can be fooled relatively easily. Simplest is binaural
stereo, in which only two point signals are needed. Sample at 48KHz, 16
bits deep, and we get</p>
<pre><code>48000 * 16 * 2 = 1536000
a mere pittance compared to visual bandwidth.</code></pre>
<ul>
<li>Haptic data</li>
</ul>
<p>Fingertips have a tactile resolution of about 1mm, If we overestimate
that such resolution applies all over the body, that a body has 2 square
meters of skin, and that the necessary bit depth is around 8 and the
refresh rate is about 100Hz, we get</p>
<pre><code>1 * 2000000 * 8 * 100 = 1600000000</code></pre>
<p>quite an impressive 1.6 Gbs dedicated to touch and warmth.</p>
<ul>
<li>Osmic data</li>
</ul>
<p>Taste and smell are going to be extremely difficult to estimate, but
we should try. There are five or six taste sensor types – we will say
ten – with a range of 8 bits or less, and the number of individually
sensible scent components is unknown. Estimates that I have seen range
from 5000 to a trillion. Let us guess at 16 million scents, which will
fit conveniently in 24 bits. How fast can we register a change in taste
or smell? It takes longer than a tenth of a second, so we can say 10
Hz.</p>
<pre><code>( 24 * 10 + 10 * 8 ) * 10 = 3200</code></pre>
<p>Almost insignificant in quantity.</p>
<p>Putting it all together, a human might demand 422 billion bits per
second.</p>
<p>At the time of writing, such speeds are approximately equivalent to
the full bandwidth of a $20,000 top-of-rack ethernet switch… which is to
say, engineering will be fun, but physics itself does not say nay.</p>
quote of note iii2016-02-09T09:28:46-05:002016-02-09T09:28:46-05:00-dsr-tag:blog.randomstring.org,2016-02-09:/2016/02/09/quote-of-note-iii/But every day the balance shifts: computers get faster, but
developers don’t get smarter, so a language that sacrifices performance
for ease of development becomes a better choice.<blockquote>
<p>But every day the balance shifts: computers get faster, but
developers don’t get smarter, so a language that sacrifices performance
for ease of development becomes a better choice.</p>
</blockquote>
<p><cite>lmm writing in <a
href="https://news.ycombinator.com/item?id=11065062">a comment on Hacker
News</a></cite></p>
quote of note ii2016-02-05T15:02:31-05:002016-02-05T15:02:31-05:00-dsr-tag:blog.randomstring.org,2016-02-05:/2016/02/05/quote-of-note-ii/Most people, who own and drive automobiles, learn by their second car
that life time operation cost can be higher than purchase cost, so their
shopping around needs to find one with good gas mileage, good
warranties, good service, few break downs, etc. Most people never learn
that about computing.<blockquote>
<p>Most people, who own and drive automobiles, learn by their second car
that life time operation cost can be higher than purchase cost, so their
shopping around needs to find one with good gas mileage, good
warranties, good service, few break downs, etc. Most people never learn
that about computing.</p>
</blockquote>
<p><cite>Alister Macintyre in <a
href="https://catless.ncl.ac.uk/Risks/29.24.html">comp.risks vol
29.24</a> </cite></p>
the ops in devops means operations2016-02-05T08:41:17-05:002016-02-05T08:41:17-05:00-dsr-tag:blog.randomstring.org,2016-02-05:/2016/02/05/the-ops-in-devops-means-operations/Lots of people will give you guff about “devops” and how it means
that you no longer need people to run your business infrastructure
because it is all a simple matter of programming.<p>Lots of people will give you guff about “devops” and how it means
that you no longer need people to run your business infrastructure
because it is all a simple matter of programming.</p>
<p>I cannot emphasize enough how wrong this is.</p>
<p>What devops does is apply the lessons learned in software development
to the processes of running computer infrastructure. As a direct result,
you can improve your processes by minimizing human involvement in the
execution of processes. What you cannot do is improve your processes
without knowing what those processes are, how they are executed, and
what might go wrong.</p>
<p>Ask any developer: can you solve a business problem without
understanding it? No, you cannot. Programming is the expression of
decision-making in a formal automation. You cannot make (good, or even
reasonable) decisions without understanding the process.</p>
<p>The naive devops-uber-alles view concentrates on building an MVP, a
minimum viable product, and then elaborating on it in customer-desired
ways. The ops part is relegated solely to deployment, the process of
getting the application running on one or more servers.</p>
<p>Here is what operations brings to the table:</p>
<ul>
<li>statistics collection</li>
<li>systems monitoring</li>
<li>alerting of humans based on the above</li>
<li>load balancing</li>
<li>strategic deployment decisions (e.g. multiple vendors, geographic
distribution)</li>
<li>backup and restore decisions and methods</li>
<li>security policy</li>
<li>security implementation</li>
<li>security testing</li>
</ul>
<p>In modern development, it is considered good to write tests to ensure
that the code you write does the right thing. In modern devops, you need
to implement runtime tests to assure yourself that the computers you are
running on are still behaving as you desire.</p>
what to do in a giant duck emergency2016-02-01T10:44:57-05:002016-02-01T10:44:57-05:00-dsr-tag:blog.randomstring.org,2016-02-01:/2016/02/01/what-to-do-in-a-giant-duck-emergency/Everyone should know what to do in an emergency. Start training your
kids when they can walk and talk. It does no good to scare them
senseless: do not dwell on particulars.<p>Everyone should know what to do in an emergency. Start training your
kids when they can walk and talk. It does no good to scare them
senseless: do not dwell on particulars.</p>
<p>I advocate the Giant Duck Emergency Preparedness System.</p>
<p>Why giant ducks? Why not? They have the distinct advantage of not
currently being real. (They used to be real. If you have a budding
paleontologist in your family, you could tell them about <a
href="https://en.wikipedia.org/wiki/Bullockornis">Bullockornis</a>, the
Demon Duck of Doom.) (Or not.)</p>
<p>In any situation, the same advice applies:</p>
<ol type="1">
<li>Get out of danger.</li>
<li>Get help.</li>
<li>Help other people, as long as it does not put you back into
danger.</li>
</ol>
<p>This works for fires, floods, earthquakes, traffic accidents, bar
fights, riots, medical emergencies, or people being mean to each other,
among other situations.</p>
<p>Step one should be self-evident: get out of danger. Frequently this
involves telling other people about the danger: “There is a fire in the
kitchen!” can be shouted on your way out.</p>
<p>Step two is harder than it looks. You cannot just shout for help and
expect people to respond appropriately. If you have a phone, call 911
(or 119, or 111, or whatever the local emergency services shortcut is).
Be prepared to give them some details: What is happening, Where it is
happening, Which services need to respond.</p>
<p>Step three can be scary, especially for people who are not used to
having to function in an emergency. (In a well run society, that is most
of us, most of the time.) Step three is to help other people – and not
to put ourselves back into danger. If you run back into a burning
building to save someone, it is all too likely that the firefighters who
arrive a minute later will need to save two people instead of one.
Staying outside and being able to give firefighters needed information –
who is inside, where they are likely to be – will be much more
useful.</p>
quote of note2016-01-27T18:32:13-05:002016-01-27T18:32:13-05:00-dsr-tag:blog.randomstring.org,2016-01-27:/2016/01/27/quote-of-note/1 The DOCUMENTATION is my guide; I shall not wonder. 2 It maketh me
to understand the necessary concepts; It leadeth me through the
installation process. 3 It reassureth me; It leadeth me on the happy
path for my desired objectives. 4 Yea, though I work through the
advanced configuration menus, I will fear no failures, for thou art with
me Thy FAQ and thy troubleshooting they comfort me. 5 Thou providest
examples to me in the context of mine use cases. Thou explainest my
expected outcomes. My results are perfect. 6 Surely good performance and
stability will persist throughout the system life And it will run within
the parameters of the DOCUMENTATION forever.<blockquote>
<p>1 The DOCUMENTATION is my guide; I shall not wonder. 2 It maketh me
to understand the necessary concepts; It leadeth me through the
installation process. 3 It reassureth me; It leadeth me on the happy
path for my desired objectives. 4 Yea, though I work through the
advanced configuration menus, I will fear no failures, for thou art with
me Thy FAQ and thy troubleshooting they comfort me. 5 Thou providest
examples to me in the context of mine use cases. Thou explainest my
expected outcomes. My results are perfect. 6 Surely good performance and
stability will persist throughout the system life And it will run within
the parameters of the DOCUMENTATION forever.</p>
</blockquote>
<p><cite>author: <em>Abi Sutherland</em> at <a
href="http://nielsenhayden.com/makinglight/archives/016428.html">Making
Light</a> </cite></p>
<p>Possibly one in a continuing series. Possibly not.</p>
the life of a sysadmin is intense2016-01-27T15:19:06-05:002016-01-27T15:19:06-05:00-dsr-tag:blog.randomstring.org,2016-01-27:/2016/01/27/the-life-of-a-sysadmin-is-intense/Today I have used the following skills to debug and fix problems:<p>Today I have used the following skills to debug and fix problems:</p>
<ul>
<li>firewalls</li>
<li>SMTP mail</li>
<li>DNS</li>
<li>ICMP</li>
<li>KVM virtual machines</li>
<li>Postfix config</li>
<li>Apache config</li>
<li>MySQL database administration</li>
<li>Debian-specific systems administration</li>
<li>hardware diagnosis</li>
<li>hardware RAID config</li>
<li>ext3/4 filesystem options</li>
<li>dump and restore. Yes, really.</li>
<li>Perl</li>
<li>Ruby</li>
<li>Chef recipes and templates</li>
<li>and probably a bunch of things I forgot.</li>
</ul>
<p>(Edit: while writing this I was thinking that at least I hadn’t had
to debug the phone system. Nope. Add Asterisk and SIP to the list.)</p>
reflections on black mirrors2016-01-23T16:34:59-05:002016-01-23T16:34:59-05:00-dsr-tag:blog.randomstring.org,2016-01-23:/2016/01/23/reflections-on-black-mirrors/My first cellphone was insanely expensive: the phone was expensive,
the airtime was expensive, and the voice quality was awful. It was large
and heavy and needed to be plugged in about every other day, even if I
had not used it. My workplace bought it and issued it for me and I was
stupid enough to accept it as a 24/7 leash.<p>My first cellphone was insanely expensive: the phone was expensive,
the airtime was expensive, and the voice quality was awful. It was large
and heavy and needed to be plugged in about every other day, even if I
had not used it. My workplace bought it and issued it for me and I was
stupid enough to accept it as a 24/7 leash.</p>
<p>My second cellphone was probably insanely expensive, but work paid
for all of it and I never even saw the bills. The voice quality was OK
and it still wanted to be recharged every day or two but it only weighed
a few ounces, maybe five or six, and it fit in my pocket instead of
demanding a bag on my belt. On average I probably used it once a
week.</p>
<p>There are a succession of phones in the late 1990s that I really do
not recall clearly. Candybars, flips, CDMA, GSM, all moderately
expensive but deemed worthwhile business expenses.</p>
<p>Then I got my first smartphone: a Handspring Treo 600. This was a
PalmOS PDA that could also make phone calls and very slowly run a web
browser. The screen was in color, but only 160x160. Icons are larger
than that these days. It turns out that this is technically large enough
to be used as an ereader, although not comfortably.</p>
<p>Next was a Danger Sidekick 2, notable for having a transflective LCD
screen that pivoted out of the body up above a surprisingly useful
keyboard, the ability to glow a notification LCD in a dozen colors, and
the first useful SSH client I had ever used on a handheld device. I hear
the Deaf community loved it for the low cost data plan, great keyboard
and excellent multi-channel AIM chat client.</p>
<p>Naturally, Danger was purchased by Microsoft and burnt to the
ground.</p>
<p>It seems possible to me that I reversed the order of the Treo and the
Sidekick.</p>
<p>We now enter the era of the black mirror devices, starting with the
original Motorola Droid, an upgradeable, unlocked Android device with a
slide-out keyboard, 256MB of RAM, a micro SD slot, and enough battery
power to get through most days. I decided I liked Android quite a lot.
All my subsequent phones have been Android. Now, pay attention: at this
point, Google had not introduced the Nexus program, and the Droid was
effectively a Google-supported flagship.</p>
<p>I held on to the Droid until there was a clearly improved successor:
the Google (Samsung) Galaxy Nexus. 720P AMOLED screen, overclockable TI
ARM processor, and an astounding 1GB of RAM. All of those features were
great for the time, and are in fact still pretty good. The fatal flaw of
the Galaxy Nexus was battery life. Even with the extra-cost high
capacity battery, underclocked/undervolted CPU and the brightness
dimmed, 4 hours of screen-on time was the best that could be hoped for
in a day.</p>
<p>My most recent phone is an LG G2, brother to the Nexus 5. The G2 had
the best available battery life: I occasionally got 9 hours of screen-on
time, and usually picked it up at 6:30AM and put it back down at 10:30PM
with a good 30% remaining. CPU was fine, screen was adequate (1080P LCD,
large and crisp) and I was very much satisfied with it… until about a
week ago, when the touchscreen digitizer started to break down. I got
more than two years out of it, but not by much.</p>
<p>It is now time for me to think about a new phone. I had hoped to put
off the necessity until the springtime, when the Snapdragon 820 CPU
would be available in a bunch of phones, but I cannot wait that
long.</p>
do not do this2016-01-15T13:16:57-05:002016-01-15T13:16:57-05:00-dsr-tag:blog.randomstring.org,2016-01-15:/2016/01/15/do-not-do-this/Do not do this:<p>Do not do this:</p>
<ol type="1">
<li>Reduce the number of people working for you in order to save
money.</li>
<li>Induce extra stress in the current staff, leading to:</li>
<li>Lower efficiency of current staff</li>
<li>Hire consultant or offshore group to achieve target production</li>
<li>Reduce productivity across the entire company, at a theoretically
lower cost.</li>
</ol>
<p>Instead, figure out how to improve the efficiency of the current
staff.</p>
<p>That’s hard, you say? If it was easy, they wouldn’t need you to solve
the problems, would they?</p>
<p>Protip: if you can automate something, that increases efficiency for
everyone who touches that thing.</p>
<p><a href="https://xkcd.com/1205/">There is an ObXkcd</a></p>
comments2016-01-10T17:39:07-05:002016-01-10T17:39:07-05:00-dsr-tag:blog.randomstring.org,2016-01-10:/2016/01/10/comments/Why don’t I have comments on this blog?<p>Why don’t I have comments on this blog?</p>
<p>Short answer: People (not you, probably) are jerks.</p>
<p>Longer answer:</p>
<p>Do you hate spam? I hate spam. And not only is email spam intensely
irritating, but blog-comment-spam is too. If I had comments enabled on
this blog, I would have to spend more time moderating them (removing the
spam, censoring the angry) than I find worthwhile.</p>
<p>I could outsource this, in part, to some other service, like Disqus
or Discourse. However, I’m not fond of Disqus, which is a third-party
service that makes money from advertising. Discourse is acceptable, but
setting it up is a big project. Then securing it would be a big project.
Then keeping it secure would be a big project.</p>
<p>Instead, feel free to email me. There is a link at the bottom of each
page which invites you to send email. Real email, not some weird
web-form that drops your message into a database so vast it could engulf
Sweden without stretching. Go ahead, write to me. If you are a decent
human being, or can simulate one in email, I will probably write
back.</p>
it might be workflow2016-01-10T14:50:35-05:002016-01-10T14:50:35-05:00-dsr-tag:blog.randomstring.org,2016-01-10:/2016/01/10/it-might-be-workflow/After whining on my blog about not updating my blog (please nominate
this for the <em>Early 21st Century Problems Only A Certain Small Group
of People Can Have Award</em>) I decided that maybe I was totally
wrong.<p>After whining on my blog about not updating my blog (please nominate
this for the <em>Early 21st Century Problems Only A Certain Small Group
of People Can Have Award</em>) I decided that maybe I was totally
wrong.</p>
<p>I played around with Pelican themes, picked something reasonably
sedate with very little color, added my tao icon (for my main server,
named tao since time immemorial or at least a decade or so), and started
mucking with configuration bits in Python to get the tags working. Turns
out the category system does not do what I want at all, but tags are
peachy.</p>
<p>Then I added user friendly features to the Makefile. Please nominate
that sentence for another prize. Automatic population of headers, less
fussy filenames, let the computer do what computers are good at sort of
thing.</p>
<p>Finally I cut a step out of the deployment process and made it about
forty times faster.</p>
<p>Will it work? Will I write more blog entries, now that I have futzed
with the mechanics enough?</p>
<p>Maybe?</p>
why don't I blog more?2016-01-09T10:29:11-05:002016-01-09T10:29:11-05:00-dsr-tag:blog.randomstring.org,2016-01-09:/2016/01/09/why-dont-i-blog-more/For a while, I thought that the major obstacle to blogging is
workflow. If only it was effortless! So I used Ghost for a bit, where
you just need to go to the right URL, write your title, write your text,
then press publish and see how it looks.<p>For a while, I thought that the major obstacle to blogging is
workflow. If only it was effortless! So I used Ghost for a bit, where
you just need to go to the right URL, write your title, write your text,
then press publish and see how it looks.</p>
<p>Then I thought that Ghost was too inefficient, running a server
process all the time. So I switched to Octopress. This was relatively
easy because Octopress and Ghost both use markdown as the base page
language, almost plain-text. Then I moved from Octopress to Pelican for
some reason, probably involving the perceived pace of development.</p>
<p>For Octopress or Pelican, the workflow is very similar. cd to the
right directory, <code>make</code> a new post with a title, write your
text, and when you save it, <code>make</code> the publishing command and
see how it looks.</p>
<p>That really is not very different from Ghost, except that one happens
in a browser and the other happens in a shell. I always have both
browsers and shells available… unless I’m using a phone or tablet, where
I could have a shell but the keyboard is so awful I’m unlikely to want
to use it.</p>
<p>The workflow is not the problem. What is?</p>
<ul>
<li>perhaps it is a lack of ideas?</li>
<li>a lack of time?</li>
<li>a lack of interest?</li>
<li>being so damn busy with everything else in my life that the ideas
don’t flow, the time isn’t available, and so the interesting ideas are
not forming?</li>
</ul>
<p>Yeah, that’s it.</p>
a musical analogy2015-11-23T11:23:11-05:002015-11-23T11:23:11-05:00-dsr-tag:blog.randomstring.org,2015-11-23:/2015/11/23/a-musical-analogy/This morning Itzhak Perlman was on NPR. He said <a class="footnote-ref" href="#fn1" id="fnref1" role="doc-noteref"><sup>1</sup></a> “If
you say someone 8, 9, 10 years old loves to practice, I would say to you
either someone is lying, or there’s something wrong with them.”<p>This morning Itzhak Perlman was on NPR. He said <a href="#fn1"
class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a> “If
you say someone 8, 9, 10 years old loves to practice, I would say to you
either someone is lying, or there’s something wrong with them.”</p>
<p>That’s why I’m not a musician. Practicing bores me. And it is
absolutely necessary to get better, so that you can perform, which is
the goal of any musician. Oh, and I hate crowds and the concept of
performing is not something I find appealing.</p>
<p>Playing music is an inhuman task. It involves learning to read a
notation, then translate that into specific motions and breathing and so
forth, all of which has to be done with extreme precision and accuracy
and timing. I expect that people who have gained these skills like
having them, but the amount of time necessary to invest to gain them is
all out of proportion for the reward I would get.</p>
<p>People like to say that programming computers is like music, and they
are right and they are wrong. Computers are instruments… but they are
also the players of the instruments. Programming a computer is not like
being a musician. You do not have to hit keys in the right sequence and
the right timing, you do not have to be perfect. Programming a computer
is like writing music, being a composer. You take an idea in your head
and you turn it into instructions - via a programming language, a
notation - for the players to perform.</p>
<p>I am not much of a composer-programmer. I have never written a
symphony. Instead, I write little ditties that express one theme. They
get the job done.</p>
<p>What I mostly do, in fact, is conduct. Systems administration is
conducting an orchestra of computers. You take music programs written by
other people, and arrange them to be played by the computers you have,
and then you practice with them to get the effect you desire.
Conducting, though, is too much like a performance. You need to have
good timing. You need to understand the whole system and do the right
things at the right time – conducting is a form of dance. Dancers use
their bodies as instruments…</p>
<p>I avoid conducting whenever possible. Instead, I write and test out
choreography for conductors that works with the music written by
composers to get a performance out of the players.</p>
<p>Or, if you prefer, we use DevOps techniques to automate our system
administration tasks in order to get software to run on computer
networks.</p>
<section class="footnotes footnotes-end-of-document"
role="doc-endnotes">
<hr />
<ol>
<li id="fn1" role="doc-endnote"><p><a
href="http://www.npr.org/sections/deceptivecadence/2015/11/23/456781573/my-goal-is-to-not-be-bored-by-what-i-do-itzhak-perlman-at-70">At
NPR</a> – sadly, the quote is not in the transcripted portion.<a
href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
observations on the speed of cats2015-11-19T14:02:40-05:002015-11-19T14:02:40-05:00-dsr-tag:blog.randomstring.org,2015-11-19:/2015/11/19/observations-on-the-speed-of-cats/It has long been known that horses move in distinct foot-patterns
which govern the speed at which they move. Based on my observations of
cats, I note similar patterns.<p>It has long been known that horses move in distinct foot-patterns
which govern the speed at which they move. Based on my observations of
cats, I note similar patterns.</p>
<ul>
<li><p>Standstill. Speed: none. Frequency: rare. Notes: cats rarely
stand still. They prefer to lie down, sit, sprawl, or meatloaf.</p></li>
<li><p>Stalk. Speed: very slow, interrupted. Frequency: rare. Notes:
this is not the initial stage of a pursuit, but the penultimate stage of
a capture.</p></li>
<li><p>Saunter. Speed: slow, fluid. Frequency: extremely common. Notes:
sauntering is the normal movement speed of a cat who is moving. May be
accompanied by tail swishing, quirking, or flagging.</p></li>
<li><p>Trot. Speed: moderate. Frequency: uncommon. Notes: trotting
inevitably means that the cat has somewhere it needs to be, and it is
not there yet. It will be.</p></li>
<li><p>Skedaddle. Speed: very fast. Frequency: rare. Notes: Either for
attack or defensive maneuvers, skedaddling attains the maximum cat
velocity available without external propulsion (i.e. gravity, motor
vehicles, rockets).</p></li>
</ul>
books books books2015-11-17T07:49:45-05:002015-11-17T07:49:45-05:00-dsr-tag:blog.randomstring.org,2015-11-17:/2015/11/17/books-books-books/Let’s count the number of ways this will please James Nicoll:
<em>Saturn Run</em> is set within the Solar System; features two
different reaction engine systems which are integral to the plot; has no
fusion reactors; features reasonable percentages of women with
agency.<ul>
<li><em>Saturn Run</em>, John Sandford and Ctein</li>
<li><em>The Promise</em>, Robert Crais</li>
<li><em>Root of Unity</em> (Russell’s Attic #3), S.L. Huang</li>
<li><em>Unrelenting</em> (Kris Longknife #13), Mike Shepherd</li>
<li><em>Going Dark</em> (The Red #3), Linda Nagata</li>
<li><em>Manners & Mutiny</em>, Gail Carriger</li>
<li><em>Silver on the Road</em>, Laura Anne Gilman</li>
</ul>
<p>Let’s count the number of ways this will please James Nicoll:
<em>Saturn Run</em> is set within the Solar System; features two
different reaction engine systems which are integral to the plot; has no
fusion reactors; features reasonable percentages of women with
agency.</p>
<p>It also has a junior-high obsession with sex, fiendish (but not
inscrutable, and not universally fiendish) Chinese antagonists, and a
super-spy-soldier who is not only rich, not only good-looking, but also
is irresistable to women and discovers a starship decellerating towards
Saturn.</p>
<p>All in all, several hard-SF writers would have been very pleased if
they could call this one their own.</p>
<p>Depending on how you look at it, <em>The Promise</em> is the
fourteenth novel featuring Elvis Cole, improbably lucky LA PI; the third
novel featuring Joe Pike, improbably uncommunicative
super-soldier-tinker-spy; or the second novel featuring Scott James and
Maggie, heartwarming PTSD victims and canine killing machine. As in most
Crais novels, you should suspect the female hiring the PI immediately.
Also features Jon Stone, whom I now have tagged in my head as “Guy
Fieri, mercenary killing machine edition”. Not really a good place to
start with any of these characters, but it has a plot and you can dance
to it.</p>
<p>Speaking of not a good place to start, <em>Root of Unity</em>. Go
back and read the first two, assuming you like the idea of a superhero
with a shadowy past who claims that the ability to do math really fast
is her only superpower. I count superhuman levels of gymnastics,
reactions, tactical sense, most of her senses, and probably luck. Ends
with a clear direction for the next novel.</p>
<p>Oh, hey, another not-a-good-place-to-start is <em>Unrelenting</em>,
which is the thirteenth book of Kris Longknife, Space Princess! and
Unstoppable Military Tactical Strategist Captain. You like that sort of
thing? Shepherd does that kind of thing fairly well on an annual
November deadline.</p>
<p>And <em>Going Dark</em> is the conclusion to the latest Linda Nagata
trilogy. AI, cybernetics, politics, military actions, drones, near-space
travel, addiction, money… this is the new cyberpunk, well executed.</p>
<p>Changing directions for the last two books: <em>Manners &
Mutiny</em> is the final book (I think) of the YA Victorian-era
magical-steampunk pentalogy. As always, a comedy of manners punctuated
by action. Werewolves, vampires, clanking mechanical servants, strange
rays and mad scientists are all defeated by ingenious teenage girls.</p>
<p>Finally for this installment of What -dsr- is Reading, another
standalone novel: <em>Silver On The Road</em>. The subgenre is Weird
West: 1825 - 1885 or so, Western America, with major magical elements. I
did not expect to like this half so much as I did. Our heroine escapes
indenture to the devil, only to return to work for him voluntarily. It
works out well.</p>
the small print is never in your favor2015-10-23T00:00:00-04:002015-10-23T00:00:00-04:00-dsr-tag:blog.randomstring.org,2015-10-23:/2015/10/23/the-small-print-is-never-in-your-favor/Let us suppose that you, like approximately <a class="footnote-ref" href="#fn1" id="fnref1" role="doc-noteref"><sup>1</sup></a> 75%
of the US population, have a cellphone. And let us suppose that you use
one of the big 4 wireless companies, Verizon, AT&T, Sprint and
T-Mobile. VZW is expensive but has the most geographical coverage. T is
a little less expensive and has almost as good coverage. SPR and TMO
have good urban coverage, good highway coverage, not necessarily so
great in rural areas, and are usually cheaper or have other compelling
reasons for you to use them.<p>Let us suppose that you, like approximately <a href="#fn1"
class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a> 75%
of the US population, have a cellphone. And let us suppose that you use
one of the big 4 wireless companies, Verizon, AT&T, Sprint and
T-Mobile. VZW is expensive but has the most geographical coverage. T is
a little less expensive and has almost as good coverage. SPR and TMO
have good urban coverage, good highway coverage, not necessarily so
great in rural areas, and are usually cheaper or have other compelling
reasons for you to use them.</p>
<p>A year or two ago marked the transition from a classic era of
pricing, in which your monthly cost was your monthly cost (modulo
excessive usage charges - who can forget that Verizon can’t <a
href="#fn2" class="footnote-ref" id="fnref2"
role="doc-noteref"><sup>2</sup></a> do math?) including the costs of
some number of minutes, some number of text messages, some amount of
data, and of course the phone that you had picked out. The differences
in phone pricing were largely covered by an initial charge, and all the
rest was included as a standard hidden cost. If you ended your contract
earlier than 24 months, you had to pay an ETF, an early termination fee,
which was often $300 or more. This covered the residual cost of your
phone, and usually a big profit on top.</p>
<p>The new paradigm is that you pay for your phone service each month,
and then you have the choice of buying your phone at the beginning ($75
- 1000) or paying an upfront fee ($0 - 300) and leasing/buying it over
24 months with a monthly payment ($6 - 45). It’s flexible! You pay less
up front, if you want! And there are no more ETFs.</p>
<p>Why are there no more ETFs? Because the lease/buy contract does not
end simply because you are no longer getting service from the telco. Oh
no. You stop paying for service, yes. You no longer receive service. You
do not stop paying for the phone, because that is a separate
contract.</p>
<p>Typically you are on the hook for the rest of the lease payments, and
then you are done.</p>
<p>Sprint, however, has found a new way to be evil.</p>
<p>Sprint just sent me an ad for their latest, not-so-greatest phone. If
you were to buy it outright, they want $700. If you lease it from them,
they want $20 a month for 24 months: $480.</p>
<p>Here is the new fine print.</p>
<pre><code>Early termination of lease/service: Remaining lease payments will be
due immediately, and requires device return or payment of purchase
option device price in lease.</code></pre>
<p>Huh. So you pay all the lease payments no matter what, even if you
return the device immediately. That’s not a lease. If I lease an
apartment for 24 months, and in month 16 I break the lease and my
landlord agrees to let me out of it, I don’t pay 8 months of rent while
I’m not in the apartment. If I had to do that, I wouldn’t call that
terminating the lease. I would call it, specifically, <em>not</em>
terminating the lease.</p>
<p>OK. And what is the third option?</p>
<pre><code>Upon completion of 24 mo. term, customer can continue to pay
monthly lease amount, purchase or return the device.</code></pre>
<p>Yes, if you don’t notice, Sprint will continue billing you $20/month
forever.</p>
<p>Charming behavior. I bet the other telcos do it, too.</p>
<section class="footnotes footnotes-end-of-document"
role="doc-endnotes">
<hr />
<ol>
<li id="fn1" role="doc-endnote"><p><a
href="https://www.comscore.com/Insights/Market-Rankings/comScore-Reports-January-2015-US-Smartphone-Subscriber-Market-Share">Comscore
Reports Jan 2015</a><a href="#fnref1" class="footnote-back"
role="doc-backlink">↩︎</a></p></li>
<li id="fn2" role="doc-endnote"><p><a
href="http://verizonmath.blogspot.com/">Verizon Math Blogspot</a><a
href="#fnref2" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
how is a tech recruiter different from a used car salesman?2015-10-05T09:52:58-04:002015-10-05T09:52:58-04:00-dsr-tag:blog.randomstring.org,2015-10-05:/2015/10/05/how-is-a-tech-recruiter-different-from-a-used-car-salesman-/Telephone: I’m here! I’m here! Pay attention!<p>Telephone: I’m here! I’m here! Pay attention!</p>
<p>Me: $workplace, $myname here.</p>
<p>Technical Recruiter: Hi! I’m $name from Workbridge Associates, and
I’m specializing in placing DevOps engineers in the Boston area. Let me
tell you about a guy I have. He’s at $company right now, and he writes
Chef cookbooks for JBoss in their AWS environments. He’s also got
several other great qualifications. Are you hiring right now?</p>
<p>Me: Let me ask you one question: what’s the difference between JBoss
and AWS?</p>
<p>Technical Recruiter: [pause] Uh, I don’t know.</p>
<p>Me: Then we’re not hiring right now.</p>
<p>Very long pause. I hear chit-chat in the background.</p>
<p>Not Very Technical Recruiter: AWS is a web service… and… jayboss is a
web framework.</p>
<p>Me: We’re not hiring from you right now. Bye.</p>
<p>Telephone: click</p>
<p>This is a true story, and it happened just a few minutes ago. Minor
changes have been made to protect the clueless and innocent.</p>
<p>(To answer the title question: you expect a used car salesman to be
able to drive a car. Technical recruiters don’t even know what they’re
talking about.)</p>
the no-falls bike riding method2015-09-20T00:00:00-04:002015-09-20T00:00:00-04:00-dsr-tag:blog.randomstring.org,2015-09-20:/2015/09/20/the-no-falls-bike-riding-method/My older son has balance and coordination issues. At the beginning of
summer, we bought him a bicycle – and one for his brother, and one for
his mother, and we were going to fix up mine. Were. Probably still will,
at some point with just a few days of good riding left in the year.<p>My older son has balance and coordination issues. At the beginning of
summer, we bought him a bicycle – and one for his brother, and one for
his mother, and we were going to fix up mine. Were. Probably still will,
at some point with just a few days of good riding left in the year.</p>
<p>This summer was, frequently, too hot to be outside. Many of the other
days I spent at work. Nevertheless, we got in a few days of riding
practice, and I hit upon a method which seems to work well.</p>
<p>He fears falling down and getting hurt. Reasonable. So we lowered the
seat on the bicycle all the way down. He practiced getting on the bike,
and scooting his way along with his feet.</p>
<p>Turns out that bicycles are difficult interfaces. Among the things
you need to do - simultaneously:</p>
<ul>
<li>steer by pushing or pulling the handlebars</li>
<li>keep yourself upright by pushing against the handlebars</li>
<li>get your feet up on the pedals</li>
<li>have enough speed to maintain stability</li>
<li>balance left and right</li>
<li>watch where you are going</li>
<li>avoid obstacles and traffic</li>
<li>adapt to changing road conditions</li>
<li>obey traffic regulations</li>
<li>apply brakes as necessary</li>
</ul>
<p>…that leaves out actually navigating to where you might want to
go.</p>
<p>It is vitally important that you not overload the new rider with all
of these distractions, even though all of them will be absolutely
necessary.</p>
<p>So he scoots, and he scoots. Up and down the driveway. Then I get him
to glide, just a bit - feet up for a meter. Sometimes two meters.</p>
<p>Do not do this all at once. Make progress. Review lessons before you
start again. Take many days. Stop when either one of you is tired.</p>
<p>Above all else: do not fall. Nothing kills the desire to learn like
pain; nothing inspires like partial success. When we started, he wore
knee pads, elbow pads and a rigid wrist-brace/glove. After a few days of
not falling, we dropped the knee pads. Then the elbow pads. Then the
braces. We will add back in thin riding gloves and a helmet soon.</p>
<p>Back and forth. Individual elements, one at a time, building on the
last: steering for balance is the most important. No, stopping safely is
the most important. Build the trust that you can always put your feet
down and not fall off.</p>
<p>Braking - rear first, then gentle squeezes of the front. Brakes are
analog, not digital. This is not intuitive to a kid raised on video
games.</p>
<p>Getting the first foot up on the pedals is easy. Getting it back down
to the ground safely needs to be tried several times. I held the bike
steady and upright while he did that.</p>
<p>Practice, practice, practice. Stop when you get tired.</p>
<p>Find a flattish practice area without traffic. The cul de sac across
the main road turned out to be the right choice for us. After
innumerable attempts at pedaling, followed by one stroke, followed by
two strokes and stop-in-a-panic - he took off</p>
<p>and did not stop</p>
<p>just went around the bend</p>
<p>and shouted his glee.</p>
non-lethal anti-drone defenses2015-09-11T12:13:12-04:002015-09-11T12:13:12-04:00-dsr-tag:blog.randomstring.org,2015-09-11:/2015/09/11/non-lethal-anti-drone-defenses/<p>Let us suppose, dear reader, that you are worried about small drone
aircraft – copters, quad and hex and so forth - espying on your private
activities. This is not as completely unreasonable a fear now as it was
a few years ago. A realtime first-person-view drone can be as small as
your hand and still manage 10 minutes of hovering and scooting
about.</p>
<p>Let us also suppose that you are not the sort of maniac who is
willing to shoot a deadly projectile at a rapidly moving small target in
a populated area. If you are that sort of maniac, please move to an
unpopulated area immediately, and put up big signs at your property
border. “I am an armed idiot” might be suitable phrasing.</p>
<p>Let us suppose, dear reader, that you are worried about small drone
aircraft – copters, quad and hex and so forth - espying on your private
activities. This is not as completely unreasonable a fear now as it was
a few years ago. A realtime first-person-view drone can be as small as
your hand and still manage 10 minutes of hovering and scooting
about.</p>
<p>Let us also suppose that you are not the sort of maniac who is
willing to shoot a deadly projectile at a rapidly moving small target in
a populated area. If you are that sort of maniac, please move to an
unpopulated area immediately, and put up big signs at your property
border. “I am an armed idiot” might be suitable phrasing.</p>
<p>So, what are the characteristics of a suitable solution? We want to
stop a device which is small, fast, unpredictable, and lightweight. It
is guided by a human (likely to remain true for the next 20 years, when
AI will replace us) who has an OK field of view straight ahead and down
a little.</p>
<ul>
<li>we could use an energy weapon</li>
</ul>
<p>Archimedean solar reflectors would be cool, but aiming is a problem,
as is the availability of sunlight. Lasers are great, except that their
focal distance causes them to have somewhat excessive ranges. Blinding
an aircraft pilot by accident is not a great outcome.</p>
<p>It would be nice to use a jammer to remove the video and perhaps
control interfaces linking the drone to the pilot. Sadly, the FCC frowns
on jamming. This is a tactic that the military could use, perhaps.</p>
<ul>
<li>we could use a projectile weapon</li>
</ul>
<p>Yes, let’s throw something really fast at the drone. Bullets are out.
Anything resembling a bullet is also out - shot from a shotgun, marbles
from slingshots, rocks from slings, arrows and bolts from bows. These
all share the problem of continuing to be dangerous after they miss the
target. We’d like to avoid that.</p>
<p>And we will miss. We will miss a lot, because we are not going to be
practicing every day, and we probably will not want to buy a thousand
drones to let us go target shooting…</p>
<ul>
<li>we could use lots of projectiles</li>
</ul>
<p>It would be nice, but not a firearm. We want the projectiles to
become non-dangerous if they hit something we did not mean to destroy.
Maybe rock salt in a shotgun? Apparently the range is awfully small.
Something else that breaks up over distance, but retains enough energy
to swat a drone 40 or 50 feet up… something like water.</p>
<p>A garden hose does not have the pressure we need – well, not the
pressure as such, but what a pump engineer calls “head” – the vertical
distance that the pump can raise the water stream. Your garden hose is
probably good for about the height of your house. Not good enough.</p>
<p>How about pressure washers? You get a tank, a compressor, and a hose
with a nozzle tip on it. Some of the high-end pressure washers come with
their own gasoline engines. They cost from a few hundred to a couple of
thousand dollars. And all of them seem to assume that you can stick your
nozzle right up within a foot or two of your target. That might
work.</p>
<p>What you really want though, is something more like a fire hose, with
a fire pump to push a lot of water high into the air.</p>
<p>Turns out they sell them on ebay. The low end systems are designed
for protecting your home – that would be exactly what you want. $600 on
up to the thousands. Easy to aim. Non-lethal. Death on drones.</p>
really good books2015-09-07T08:18:38-04:002015-09-07T08:18:38-04:00-dsr-tag:blog.randomstring.org,2015-09-07:/2015/09/07/really-good-books/<ul>
<li>Linda Nagata - Red: The Trials</li>
<li>Michael Swanwick - Chasing the Phoenix</li>
<li>Terry Pratchett - The Shepherd’s Crown</li>
<li>Seanan McGuire - A Red Rose Chain</li>
<li>Zen Cho - Sorceror to the Crown</li>
<li>Fran Wilde - Updraft</li>
</ul>
<ul>
<li>Linda Nagata - Red: The Trials</li>
<li>Michael Swanwick - Chasing the Phoenix</li>
<li>Terry Pratchett - The Shepherd’s Crown</li>
<li>Seanan McGuire - A Red Rose Chain</li>
<li>Zen Cho - Sorceror to the Crown</li>
<li>Fran Wilde - Updraft</li>
</ul>
<p>A well-written action scene in print is much better in all respects
<a href="#fn1" class="footnote-ref" id="fnref1"
role="doc-noteref"><sup>1</sup></a> than the equivalent scene in a
movie. Linda Nagata has a flair for writing such scenes, and even
better, she populates them with sympathetic characters and strings them
together into good stories. The Red: The Trials is the middle volume of
her near-future cyberpunk-descended milSF trilogy. It does not read like
a middle book, though, ending on satisfactory emotional notes in much
the same way as First Light. Still, I’m looking forward to the last book
in just a few months.</p>
<p>Aubrey Darger and Sir Blackthorpe Ravenscairn de Plus Precieux - or,
Darger and Surplus, the notorious con-men - have merrily laid waste to
London, ruined the Russias, and lived well on the wealth of others. In
Chasing the Phoenix, they attempt the assault of China. Since this is
the post-Collapse future, China is a hundred kingdoms and a hundred
thousand villages, more or less ripe for their picking. It would be meet
for them to encounter Master Li and Number Ten Ox, but alas they are a
thousand years too late. Instead they find themselves advisors to the
Hidden Emperor, who intends to re-unite China and marry the Phoenix
Bride. Shenanigans ensue.</p>
<p>Terry Pratchett’s final novel, the forty-first of the Discworld,
begins with the final days of Granny Weatherwax and ends with progress
being made. In between, there’s lots of work for a witch. If you haven’t
read the series, you have a lot to discover. If you have, then it’s time
to say goodbye to old friends.</p>
<p>Now, Pratchett’s fae folk are nasty pieces of work - and so are the
villains of Seanan McGuire’s faerie novels. There are lots of reasonable
elves to oppose them, though, including series heroine October Daye.
Toby’s perpetual willingness to get involved on the side of what she
perceives to be Right, and hang the consequences (or the King, if that’s
what is called for) plays out in a more mature way than previous
installments. Is this the end? Nay, four more books have already been
ordered by the publisher.</p>
<p>More faeries - mostly, if not completely, evil - in Zen Cho’s
Sorceror to the Crown, a Victorian urban fantasy with modern
subversions. The Sorceror Royal is a manumitted slave, adopted of the
previous Sorceror Royal, and widely suspected of having murdered him and
his familiar. A chance encounter with a plucky Anglo-Indian orphan leads
to the complete overturning of magical society. Warning: contains
witticisms and fops.</p>
<p>And last for today: Fran Wilde’s debut novel Updraft, in which
invisible giant sky-squid menace the hang-gliding inhabitants of living
bone towers far above an impenetrable cloudscape. I have no idea how
their ecology or economy works, but the story is a fine thing.</p>
<section class="footnotes footnotes-end-of-document"
role="doc-endnotes">
<hr />
<ol>
<li id="fn1" role="doc-endnote"><p> I omit the dimension of sound. A
soundtrack and foley can supply information and excitement that do not
spontaneously appear in my head. Sometimes it’s better.<a href="#fnref1"
class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
Cotap is evil2015-07-29T00:00:00-04:002015-07-29T00:00:00-04:00-dsr-tag:blog.randomstring.org,2015-07-29:/2015/07/29/cotap-is-evil/<p>So I get this forwarded from one of our employees:</p>
<pre><code>-------- Forwarded Message --------
Subject: You've been added as a contact on Cotap
Date: Wed, 29 Jul 2015 13:00:00 +0000
From: Connections <connections@cotap-mail.com>
To: person <person@company.com> </code></pre>
<p>So I get this forwarded from one of our employees:</p>
<pre><code>-------- Forwarded Message --------
Subject: You've been added as a contact on Cotap
Date: Wed, 29 Jul 2015 13:00:00 +0000
From: Connections <connections@cotap-mail.com>
To: person <person@company.com> </code></pre>
<pre><code>See who you know on Cotap
Cotap
<https://www.cotap.com/?utm_source=email&utm_medium=logo&utm_campaign=email>
Cotap is a secure texting app for teams.
View the COMPANY directory.
Get Started
Are you using WhatsApp, GroupMe, or iMessage to text your coworkers? See
why <https://www.cotap.com/blog/whatsapp-for-work-is-nsfw/> Cotap is
better for work.
Sent by Cotap
<https://www.cotap.com/?utm_source=email&utm_medium=footer&utm_campaign=email>
| 55 New Montgomery Street #888 | San Francisco, CA 94105
Unsubscribe
<https://www.cotap.com/unsubscribed/?address=person%40company.com> |
Privacy Policy <https://www.cotap.com/legal/privacy/></code></pre>
<p>The places where is says “person” had the employee’s email username,
the places where I put “company”, it had the company name.</p>
<p>It certainly looks like we signed up for Cotap and let them send out
an invitation, doesn’t it?</p>
<p>We didn’t.</p>
<p>I strongly suggest that you not use Cotap. If they’ll send deceptive
spam, they can’t be trusted for anything. Certainly not your company’s
security.</p>
books that don't stink2015-07-24T00:00:00-04:002015-07-24T00:00:00-04:00-dsr-tag:blog.randomstring.org,2015-07-24:/2015/07/24/books-that-dont-stink/<ul>
<li>Patrick Lee, <em>Signal</em></li>
<li>Ernest Cline, <em>Armada</em></li>
<li>Max Gladstone, <em>First Last Snow</em></li>
<li>Dan Wells, <em>The Devil’s Only Friend</em></li>
</ul>
<p>Quality is strange. By quality we mean a difference that we can sense
but not count, something continuous and analog rather than discrete and
digital. It does not directly map into happiness. Quality carries
connotations of both the singular taste and the popular fashion. It
places different items together in categories that may not easily be
described.</p>
<p>Today’s books share the quality of being, in my opinion, books that
don’t stink. This is not a very high bar…</p>
<ul>
<li>Patrick Lee, <em>Signal</em></li>
<li>Ernest Cline, <em>Armada</em></li>
<li>Max Gladstone, <em>First Last Snow</em></li>
<li>Dan Wells, <em>The Devil’s Only Friend</em></li>
</ul>
<p>Quality is strange. By quality we mean a difference that we can sense
but not count, something continuous and analog rather than discrete and
digital. It does not directly map into happiness. Quality carries
connotations of both the singular taste and the popular fashion. It
places different items together in categories that may not easily be
described.</p>
<p>Today’s books share the quality of being, in my opinion, books that
don’t stink. This is not a very high bar…</p>
<p><em>Signal</em> is Patrick Lee’s fifth novel, his second in the
presumably continuing adventures of Sam Dryden: action hero. Sam does
not seek out adventures; rather, they come to him. In <em>Runner</em>,
adventure came in the form of a teenaged girl being chased along the
boardwalk (he hides her, then runs with her). The instant adventure
appears as a woman with an odd electronic box. Now, Lee’s first book
turned out to be the first part of a trilogy, a story satisfyingly
wrapped up in that initial volume and then revealed to be an integral
part of a much, much larger tale. I am wondering if something like that
is going on here, as Sam encounters a science-fictional plot device
which is not related to that of his previous novel. The coincidence, it
is too much. Something must be going on. In the meantime, there is
action both physical and cerebral. I found it entertaining.</p>
<p>Ernest Cline’s second novel, <em>Armada</em>, proves that his
obsession with geek trivia was not a one-time affair. Unfortunately, the
plot here is highly derivative of The Last Starfighter, Ender’s Game,
and other stalwarts of the genre in which humanity is saved by an
awkward teenager with a single special gift. The fun is in playing
spot-the-reference, if you think that’s fun. I usually do.</p>
<p><em>First Last Snow</em> is the first book of the Craft Sequence by
internal chronology. It visits the city of Dresediel Lex, which is
somewhere between the New York of RENT and the Paris of LES MISERABLES.
The focus is on three characters whom we have seen before (will see
later): Elayne, a Craftsperson (magician/lawyer) of some reknown; The
King in Red, a Craftsperson who has transcended death, flesh, and
humanity; and Temoc, last Eagle Knight, priest of the old gods and
father-in-fact to Caleb and father-in-spirit to the working class people
of Skittersill Square. The triangle is unstable. Peace talks commence,
are concluded… and get complicated.</p>
<p>There has long been a division among literary fans as to whether
books should be read in their publication order or their internal order.
<em>First Last Snow</em> is, I think, not a compelling story without the
support of the reader’s knowledge of what will come to pass. Read the
Craft Sequence in publication order.</p>
<p>Dan Wells’ <em>The Devil’s Only Friend</em> is the fourth book
narrated by John Wayne Cleaver, a man destined to be a serial killer. It
turns out that there are literal demons walking the earth – this is only
a bit of a spoiler for the first book – and John exercises his
aggressive tendencies by hunting the demons down. That’s all the
description you should need to figure out whether these books will
appeal to you: they are competently written, tell self-contained
stories, and are full of violence and gore.</p>
Neal Stephenson's new book stinks2015-05-26T00:00:00-04:002015-05-26T00:00:00-04:00-dsr-tag:blog.randomstring.org,2015-05-26:/2015/05/26/neal-stephensons-new-book-stinks/<p>Stephenson’s editor didn’t. The result is the worst book with
Stephenson’s name on it. </p><p>Stephenson’s editor didn’t. The result is the worst book with
Stephenson’s name on it. </p>
<p>The first 2/3 of this weighty tome (I assume – mine came encoded as a
very large number) is a series of technical infodumps on space
technology of the early to mid 21st century, with a framing plot that
destroys the Earth and more than 99.9999% of all living things in the
Solar System over the course of three years. There are a couple of
characters in there who recur often enough to keep their names straight.
Most characters die or disappear quickly enough that job titles would do
just as well. I didn’t find any of the characters particularly
sympathetic. Perhaps you have seen a slushpile book in which a
first-time author has worked out the entire history of their fictional
universe, and tries to tell that to you with the names of fifty
legendary characters that you should definitely remember? This is like
that. If the parts of Anathem and Dune that you really enjoyed were the
glossaries and appendices, you might get more out of the first section
than I did.</p>
<p>Then Stephenson skips 5000 years. The “Seven Eves” of the title are
the seven surviving fertile human females at the end of part 1; their
descendants, about 3 billion strong, are the subject of the second and
far more interesting part of the book. It’s still not great: it is
mostly a semi-utopian travelogue novel, where a viewpoint character
visits many named places on the map and talks to people who come from
the other named places. (Yes, there’s a map with named places on
it.)</p>
<p>Had I been the editor, and strong enough to say no to a heavyweight
best-seller, I would have cut the entire first section and started off
with the second section. SF readers are used to picking up clues about a
fictional world, and doing so is actually fun for most people. This… not
so much.</p>
server security certificate semi-pro tips2015-05-22T00:00:00-04:002015-05-22T00:00:00-04:00-dsr-tag:blog.randomstring.org,2015-05-22:/2015/05/22/server-security-certificate-semi-pro-tips/<p>Unless you have a good reason not to do so, the services you run on
your server should be encrypted. For the last few years, and probably
the next few, that means you need a security certificate, commonly
called an SSL cert, even though we just stopped using SSL in favor of
TLS, which is exactly the same but slightly more advanced.</p>
<p>(You don’t run a server? OK, the services that you access should be
encrypted. It’s the moral equivalent of sending letters in sealed
envelopes instead of postcards: you do it even when it doesn’t matter
much, because that way you don’t accidentally forget and send a hundred
dollars to your friend by taping it to a postcard. The rest of this post
is for people running servers – mostly, people who run one or two
servers as a hobby or small business. I expect the professionals to
already know all this.)</p>
<p>(But some don’t.)</p>
<p></p><p>Unless you have a good reason not to do so, the services you run on
your server should be encrypted. For the last few years, and probably
the next few, that means you need a security certificate, commonly
called an SSL cert, even though we just stopped using SSL in favor of
TLS, which is exactly the same but slightly more advanced.</p>
<p>(You don’t run a server? OK, the services that you access should be
encrypted. It’s the moral equivalent of sending letters in sealed
envelopes instead of postcards: you do it even when it doesn’t matter
much, because that way you don’t accidentally forget and send a hundred
dollars to your friend by taping it to a postcard. The rest of this post
is for people running servers – mostly, people who run one or two
servers as a hobby or small business. I expect the professionals to
already know all this.)</p>
<p>(But some don’t.)</p>
<p></p>
<p>Sometime in the next few months, you’ll be able to get a
domain-validated SSL certificate for free from <a
href="http://letsencrypt.org">Let’s Encrypt</a>. “Domain-validated”
means that the only security check that was performed is that the
issuing authority – the CA, Certificate Authority – confirmed that the
domain name verified by the certificate is used by the requestor. Some
people say “is controlled by the requestor”, but what it mostly means is
that you can receive email addressed to
<code>postmaster@yourdomain.com</code>. Let’s Encrypt will have a
slightly more complicated (and automated) scheme, but it won’t be more
traceable than that.</p>
<p>If you aren’t running a significant business from your server, Let’s
Encrypt certificates are going to be your first choice. Unfortunately,
they aren’t available quite yet. What should you do in the mean
time?</p>
<p>If your budget is strictly limited, go over to <a
href="http://www.startssl.com">StartSSL</a> and register for a free 1
year certificate. You’ll have to jump through some hoops, but you will
get a certificate trusted by all major browsers, and you shouldn’t have
to deal with them again. Let’s Encrypt should be up in the course of the
next year.</p>
<p>Let’s say you have a small but non-zero budget, and StartSSL is out
for some reason – say, you have already dealt with them and they don’t
want to help you out any more. For nine bucks you can get a Comodo
PositiveSSL cert from any number of resellers. I recommend you use <a
href="https://www.namecheap.com">NameCheap</a>, partially because
they’re cheap for most of their products, and partially because I have
found them to be very reliable and pretty quick. And unlike StartSSL,
their website works on weekends.</p>
<p>Presumably you’re going to want to secure
<code>www.yourdomain.com</code>, or what have you. Here’s my advice:
apply for <code>yourdomain.com</code> instead, assuming that you own it.
Comodo will automatically extend the certificate that they give you to
cover <code>www.yourdomain.com</code> as well.</p>
<p>If you’ve done all that, good. Make sure your operating system and
server software are running the latest available versions, and read up
on current threats. You can run a test at <a
href="http://www.ssllabs.com">SSL Labs</a> to get a really complete
evaluation of how you’re doing – there’s no reason why you can’t score
an A or A+ if you read their HowTo docs.</p>
optimizing the wrong thing2015-05-01T00:00:00-04:002015-05-01T00:00:00-04:00-dsr-tag:blog.randomstring.org,2015-05-01:/2015/05/01/optimizing-the-wrong-thing/<p>“Premature optimization is the root of all evil.” – Donald Knuth, in
“Structured Programming With Go To Statements”, 1974.</p>
<p>That was more than 40 years ago.</p>
<p>You think we’d have learned that lesson by now.</p>
<p>“Premature optimization is the root of all evil.” – Donald Knuth, in
“Structured Programming With Go To Statements”, 1974.</p>
<p>That was more than 40 years ago.</p>
<p>You think we’d have learned that lesson by now.</p>
<p>Of course we have not.</p>
<p>Now, I am prone to a certain technological conservatism. Things that
work are better than things that do not work. New is not better; old is
not worse. Making small changes in something that works is better than
starting over from scratch. At some point this must break down, because
we know that making small changes to a project eventually leads to a
project which hasn’t been designed, but is instead a random assortment
of ideas that seemed good at the time, a crazed patchwork.</p>
<p>Deciding where that line is, is highly political.</p>
in which I talk about a smartphone2015-03-30T00:00:00-04:002015-03-30T00:00:00-04:00-dsr-tag:blog.randomstring.org,2015-03-30:/2015/03/30/in-which-i-talk-about-a-smartphone/<p>I’ve had an LG G2 for about two years now. There are lots of new
flagship Android phones coming out now. Is it time to change?</p>
<p>I’ve had an LG G2 for about two years now. There are lots of new
flagship Android phones coming out now. Is it time to change?</p>
<p>No.</p>
<p>I need a device which can reliably make and take calls. For some
reason my house is located in a dead zone for all the major carriers
except Sprint. Move 400 meters in any direction and they all work well.
I get decent LTE coverage, too.</p>
<p>I need a large screen, but the device must be small enough to be
comfortably used one-handed. The G2’s rear volume/power buttons help
with that.</p>
<p>I want a high resolution screen – but it turns out I can’t see any
better than the G2’s 424 ppi screen anyway. 1920x1080 and 5.2”.</p>
<p>It should be fast – looks like none of the most recent flagships are
significantly faster than the Snapdragon 800 in the G2.</p>
<p>I want battery life. The G2 has the best battery life of any
smartphone I’ve ever used: I routinely pick it up at 6:30AM and put it
down to recharge at 11PM with about 20% remaining. I have a battery
grapher here that says that on average I have the screen on for 6 hours
a day, and that my record is just over 11 hours of screen on time. I’m
pretty sure that was a weekend when I was using it as a book reader.</p>
<p>The slightly modified OS it’s running – SuperG2 KitKat – is
incredibly stable. I’ve had uptimes of 500+ hours between reboots, and I
can’t recall the last time it rebooted spontaneously.</p>
<p>Finally, I didn’t buy insurance on this phone and I’m glad. Insurance
would want a $100 deductible, and cost about $8/month. I can get a
new-in-box G2 for about $250, or a used one for under $200.</p>
<p>LG’s chosen successor, the G3, doesn’t seem to improve on any of
these points. The G4 will probably be out in August. We’ll see how it
goes. In the meantime, the Samsung Galaxy S6 and the HTC One M9 look
like very nice phones – but they offer no extra value to me over the
G2.</p>
political correctness2015-02-17T00:00:00-05:002015-02-17T00:00:00-05:00-dsr-tag:blog.randomstring.org,2015-02-17:/2015/02/17/political-correctness/<p>If you deride something as “politically correct”, best make sure it
is in fact a case of political correctness, rather than simple
politeness.</p>
<p>Making fun of someone for being polite points to a deficiency in the
accuser. </p><p>If you deride something as “politically correct”, best make sure it
is in fact a case of political correctness, rather than simple
politeness.</p>
<p>Making fun of someone for being polite points to a deficiency in the
accuser. </p>
more SF/F, some very good indeed.2015-01-21T00:00:00-05:002015-01-21T00:00:00-05:00-dsr-tag:blog.randomstring.org,2015-01-21:/2015/01/21/more-sff-some-very-good-indeed/<p>Recently read:</p>
<ul>
<li><p>The Great Way (The Way Into Chaos, The Way Into Magic, The Way
Into Darkness), by Harry Connolly</p></li>
<li><p>The Genome, by Sergei Lukyanenko</p></li>
</ul>
<p>Brief reviews follow. </p><p>Recently read:</p>
<ul>
<li><p>The Great Way (The Way Into Chaos, The Way Into Magic, The Way
Into Darkness), by Harry Connolly</p></li>
<li><p>The Genome, by Sergei Lukyanenko</p></li>
</ul>
<p>Brief reviews follow. </p>
<p>Do not be fooled by the packaging into three files or physical
objects: The Great Way is a single book, and reviewing less than the
complete thing does it less than it deserves. And The Great Way deserves
a lot. Despite the thousand-plus pages, it is tightly written. The plot
concerns the destruction of the Peradaini Empire as it is invaded by
nasty purple-furred monsters sent, presumably, by the elf-like Evening
People. The Evening People had previously divulged a dozen or so magical
spells to their allied humans; the reason for the assault is
unclear.</p>
<p>Connolly’s genius is in asking “how would a conventional epic fantasy
novel go here?” and then doing something original at each turn. His
viewpoint characters are not a young hero and a clever princess, but an
middle-aged senior royal guard and a clever hostage-girl who might,
technically, be a princess. They do not lead a rearguard action,
followed by convincing once-allies to band together and defeat the
forces of evil; the empire is destroyed most thoroughly and it soon
becomes clear that the survival of humanity on the entire planet is at
stake.</p>
<p>All questions are answered, all threads are tied up, with remarkable
internal consistency and a gleeful sense of wonder.</p>
<p>Go buy it at <a href="http://www.harryjconnolly.com/">his
website</a></p>
<p>The Genome is also a single-book story, but it’s a combination of
space opera and locked-room (spaceship in transit) mystery. The
background universe seems to be deeper than strictly required for one
book, and deeper than the characters. Indeed, that might be Lukyanenko’s
point: the spaceships and the government and the planets are all
well-rounded, but the people all seem to have their destinies
established by the genetic engineering that makes them hyper-competent
at particular occupations.</p>
<p>Available via the usual commercial places.</p>
IPv6 is relatively easy2015-01-15T00:00:00-05:002015-01-15T00:00:00-05:00-dsr-tag:blog.randomstring.org,2015-01-15:/2015/01/15/ipv6-is-relatively-easy/<p>It turns out that if your firewall is a full Linux box, adding IPv6
is relatively easy. I suspect that the main barrier to consumer adoption
is the prevalence of crappy home routers.<br/>
</p><p>It turns out that if your firewall is a full Linux box, adding IPv6
is relatively easy. I suspect that the main barrier to consumer adoption
is the prevalence of crappy home routers.<br />
</p>
<p>There are several free IPv6 tunnel services out there if you aren’t
among the blessed with ISP support. I’m not. SIXXS seems to be designed
to be resistant to abuse, whereas Hurricane Electric wants you to
succeed. I’ve run SIXXS tunnels before, but HE was a much smoother
process.</p>
<p>Checklist:</p>
<ul>
<li>get an address <a
href="http://www.tunnelbroker.net">assigned</a></li>
<li>configure it on your router</li>
<li>install radvd on your router</li>
<li>set up an ip6tables firewall</li>
<li>on each Linux client, add “iface eth0 inet6 auto” or similar. You
won’t need further config…</li>
<li>if you are running a server, check each service to see if you have
IPv6 compatibility turned on. On Debian, if something seems not to be
working after you’ve touched the appropriate config, check /etc/default
for a “-4” or similar.</li>
<li>on Mac clients, check Network Preferences=>Advanced=>TCP/IP
and look for an IPv6 autoconfiguration to turn on.</li>
<li>create AAAA address records for servers you want to have reachable
from the outside world.</li>
</ul>
<p>Note that IPv6 address autoconfig (SLAAC) will always return the same
address for a given MAC. If you change a NIC, you can either force the
MAC to be the same as the old one, or update your DNS. (If you don’t run
any services at all from that machine, you might not care.)</p>
<p>Finally, you’ll want to go back and adjust your ip6tables firewall to
allow the various services you’ve just tested.</p>
what I've been reading2014-12-19T00:00:00-05:002014-12-19T00:00:00-05:00-dsr-tag:blog.randomstring.org,2014-12-19:/2014/12/19/what-ive-been-reading/<p>Every so often I keep track of what I’m reading; sometimes this lasts
as long as a year before I get out of the habit.</p>
<p>I generally don’t comment on business and tech titles, because they
tend to have a narrow audience. What I read for pleasure: SF, fantasy,
horror, biography, and to some degree politics. I try to avoid major
spoilers, but I’m not always successful.</p>
<p></p><p>Every so often I keep track of what I’m reading; sometimes this lasts
as long as a year before I get out of the habit.</p>
<p>I generally don’t comment on business and tech titles, because they
tend to have a narrow audience. What I read for pleasure: SF, fantasy,
horror, biography, and to some degree politics. I try to avoid major
spoilers, but I’m not always successful.</p>
<p> * We Were Gods, End Game: Alex
Feinman</p>
<ul>
<li><p>Ra: Sam Hughes</p></li>
<li><p>Paradigms Lost: Ryk Spoor</p></li>
<li><p>Symbiont: Mira Grant (Seanan McGuire)</p></li>
</ul>
<p><em>We Were Gods</em> and <em>End Game</em> are a near-future duology
in which Luke Green discovers his former boss at a gaming startup has an
Evil Plan to take over the world. Naturally, this can’t be allowed.</p>
<p>Confession: I bounced off of WWG several times, largely because the
protagonist is an unsympathetic ass. There’s a long tradition of the
snarky first-person narrator, tough-as-nails exterior and soft squishy
center. There are various protagonists who would be horrible people to
know in real life, but it’s fun reading about their adventures. Luke
Green is a jerk unaware of his own failings, and that made it really
hard for me to get into the story. I kept reading solely because he kept
doing cool things.</p>
<p>And he does do cool things. The pass-the-ball timing attack (you’ll
know it when you see it) may be the best ever portrayal of hacking VR as
magic. The science all feels (and may actually be) plausible. Better
yet, the characters all feel plausible: these are people I’ve met,
nearly, and there’s not an idiot among them.</p>
<p>Available from <a
href="https://www.smashwords.com/books/view/396337">Smashwords</a> , <a
href="http://www.lulu.com/shop/alex-feinman/we-were-gods/paperback/product-21452562.html">Lulu</a>
and <a
href="http://www.amazon.com/We-Were-Gods-Alex-Feinman/dp/1304791912">Amazon</a>
in paperback and ebook. I hear there’s an omnibus of both of them coming
out in the early part of 2015.</p>
<p><em>Ra</em> is a novel written as a web serial from September 2011
through December 2014 – yes, it’s finished now – and as such suffered
from the problem that once the author made a mistake in public, he had
to deal with it in public as well. If it was good enough for
Dickens…</p>
<p>Anyway. In 1970 or so, magic is discovered. This makes a lot of
people very unhappy. Most are unhappy because their world-view is based
on science, and they now need to fit non-supernatural explanations to
these events. Naturally, research leads to academics, and academics
means degree programs. <em>Ra</em> starts off as the story of Laura
Ferno, Ph.D candidate in Applied Thaumic Engineering with an eye towards
harnessing magic to build spacecraft, and her sister Natalie who is an
academic on the theoretical side of magic. One night Laura is mugged,
she defends herself with magic spells, and before you know it ten
chapters have gone by and the fate of the world hangs in the balance.
Writing is such an assymetrical sport: it takes three years to write a
novel that you’ll want to consume utterly in a weekend.</p>
<p>Available as HTML and epub at <a
href="https://www.qntm.org/ra">qntm</a></p>
<p><em>Paradigms Lost</em> is a rework of Spoor’s earlier <em>Digital
Knight</em>. Again, the boundary of science fiction and fantasy is
tugged at (distorted, mangled, shredded, chewed on by a cat) as a
somewhat nerdy private investigator discovers vampires, werewolves, and
other things that eat you at night have some basis in fact. There’s a
degree of ultra-competence about Jason Wood and his main squeeze Sylvia
Stake (Wood’n’Stake, hey?) that is simultaneously comforting and
annoying. Is it high literature? No. Is it good, solid storytelling of
the sort that people have enjoyed for a century or more? Absolutely.</p>
<p>ebook at <a
href="http://www.baenebooks.com/p-2526-paradigms-lost.aspx">Baen</a> ,
trade paperback at Amazon, B&N and <a
href="http://www.indiebound.org/book/9781476736938">IndieBound</a></p>
<p><em>Symbiont</em> is the second book of a trilogy started in
<em>Parasite</em>; the third book is not yet out. It’s well-done horror
about genetically engineered tapeworms, and I think that’s enough of a
description to make you either want to read it or avoid it.</p>
<p>Available in many forms via <a
href="http://www.symbogen.net/">Symbogen</a></p>
lies, damned lies and benchmarks2014-12-13T00:00:00-05:002014-12-13T00:00:00-05:00-dsr-tag:blog.randomstring.org,2014-12-13:/2014/12/13/lies-damned-lies-and-benchmarks/<p>Rule of thumb: if you have a working computer, you shouldn't replace it
with one that's less than twice as fast.</p>
<p>If Moore's Law held true, then that means you can spend the same amount
every 24 months and double your speed. Turns out, Moore's Law isn't true.
Kinda. Sorta.</p>
<p>Rule of thumb: if you have a working computer, you shouldn't replace it
with one that's less than twice as fast.</p>
<p>If Moore's Law held true, then that means you can spend the same amount
every 24 months and double your speed. Turns out, Moore's Law isn't true.
Kinda. Sorta.</p>
<p>OK, so <a class="reference external" href="https://en.wikipedia.org/wiki/Moore%27s_law">Moore's Law</a> applies
to chip density, not megahertz or any other measure of performance, and it's
an observation, not a real law. There are periods of fluctuation, and the
point at which it is economical to produce CPUs is always 1-3 years behind
the design phase. Right now commercial feature size is around 22 nanometers;
if you could believe Intel and IBM and AMD in 2010, 14 nm fabs should have
started producing commercial chips this year. They haven't.</p>
<p>So let's go to a benchmark: the PassMark Single Thread CPU Benchmark. See all
those caps? That means they won't tell you quite what they're doing, but you
can compare scores. Not knowing what PassMark is actually doing is
problematic for comparing things that are very different from each other, but
here we are going to end up being within an order of magnitude from top to
bottom anyway.</p>
<p>Here are some sample CPUs, and their reported scores, number of cores, and
a naive extrapolation (approximately multiplying cores by single-thread
score, to represent a sort of ideal parallelized performance):</p>
<table border="1" class="docutils">
<colgroup>
<col width="47%" />
<col width="19%" />
<col width="19%" />
<col width="16%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">CPU</th>
<th class="head">Score</th>
<th class="head">#cores</th>
<th class="head">S*n</th>
</tr>
</thead>
<tbody valign="top">
<tr><td>AMD 5350</td>
<td>804</td>
<td>4</td>
<td>3200</td>
</tr>
<tr><td>AMD Athlon X4 640</td>
<td>878</td>
<td>4</td>
<td>3500</td>
</tr>
<tr><td>Intel Core 2 E6600</td>
<td>920</td>
<td>2</td>
<td>1800</td>
</tr>
<tr><td>AMD FX-4130</td>
<td>1269</td>
<td>4</td>
<td>5000</td>
</tr>
<tr><td>Intel Core i3-3225</td>
<td>1786</td>
<td>2</td>
<td>3600</td>
</tr>
<tr><td>Intel Core i5-2500</td>
<td>1896</td>
<td>4</td>
<td>7600</td>
</tr>
<tr><td>Intel Pentium G3258</td>
<td>2179</td>
<td>2</td>
<td>4300</td>
</tr>
<tr><td>Intel Core i3-4770</td>
<td>2240</td>
<td>2</td>
<td>4500</td>
</tr>
</tbody>
</table>
<p>You may notice that all of these are cheap-ish desktop CPUs. I don't
play games on these machines, and I especially don't play 3D games.
The 5350 is in fact marketed as one step up from an embedded system (and
I'm using it in my new firewall); the i3 series is supposed to be Intel's
basic business desktop. Not one of them has ever been the top-of-the-line.</p>
<p>So, in everyday use, does either the score or the score*#cpus represent
how fast the machines feel? There's a factor of 3, almost, in single thread
scores, and a factor of 6 in the parallel scores.</p>
<p>Kinda, sorta, not really.</p>
<p>I don't run complex calculations for the sake of doing the math. I push
a lot of pixels, but only in 2 dimensions, which barely counts these days.
And the truth is, I don't really feel the difference in CPU speed between
the E6600 and the i5, both of which I use as desktops on a daily basis.</p>
<p>In fact, I don't really notice any CPU differences. Here's what I notice:</p>
<ul class="simple">
<li>the difference between machines with just enough RAM and loads of RAM</li>
<li>the difference between machines with SSDs and spinning disks</li>
</ul>
<p>That's it. Want a fast machine for cheap? Take a low-end CPU, add lots of
RAM (16GB and up) and get a reliable SSD. Back it up automatically every
night. You can build it yourself for about $450 or so, maybe less.</p>
<p>For what it's worth, PassMark says that the best single-thread cpu on the
planet tops out at 2535, which is a little more than 3x the performance
of chips so cheap you can barely buy them anymore. And remember that the
Pentium G3258, at 2179, is only $60 or so. That looks pretty promising.</p>
on being sick2014-12-11T00:00:00-05:002014-12-11T00:00:00-05:00-dsr-tag:blog.randomstring.org,2014-12-11:/2014/12/11/on-being-sick/<p>I’m sick. Symptoms check: it’s flu. Yes, I had the flu shot this
season. That’s life.</p>
<p>The worst part, though, is that I have 5-10 minutes bursts of energy,
during which I must restrain myself from announcing that I am All
Better, should go back to work immediately, and everything Will Be
Fine.</p>
<p>Shortly after that I’m flat on my back again, unable to lift anything
heavier than a light book. </p><p>I’m sick. Symptoms check: it’s flu. Yes, I had the flu shot this
season. That’s life.</p>
<p>The worst part, though, is that I have 5-10 minutes bursts of energy,
during which I must restrain myself from announcing that I am All
Better, should go back to work immediately, and everything Will Be
Fine.</p>
<p>Shortly after that I’m flat on my back again, unable to lift anything
heavier than a light book. </p>
RIP Boing Boing (1995-2013)2014-12-04T00:00:00-05:002014-12-04T00:00:00-05:00-dsr-tag:blog.randomstring.org,2014-12-04:/2014/12/04/rip-boing-boing-1995-2013/<p>Boing Boing is dead to me. I’m not sure when I first noticed, but I
think it was last year some time. I consciously started ignoring it
about two months ago, and nothing happened.</p>
<p>Boing Boing is dead to me. I’m not sure when I first noticed, but I
think it was last year some time. I consciously started ignoring it
about two months ago, and nothing happened.</p>
<p>I have had an RSS aggregator - <a href="https://tt-rss.org">Tiny
RSS</a> - set up since Google Reader announced it was going under. BB
was the first thing to be displayed every morning, at the top of the
list, for years. And slowly BB has become both annoying and
irrelevant.</p>
<p>Let’s tackle annoying, first: the ads. The advertorials. The
unlabeled advertorials that adopt the voice of a BB editor but are
unsigned. It’s one thing to have opinions and preferences, another thing
to have your opinions and preferences up for sale… and really annoying
to put them up for sale and then not even own up to it.</p>
<p>Second, the podcasts. I’m not a podcast person. People talking are
too slow. They usually haven’t thought through their words. It’s
inefficient, which is the exact opposite of what I’m looking for.</p>
<p>Third, the page-view splitting. Want a link to a source? Only after
you click through. Fairly often, there’s only one or two sentences of
new information on the referenced page. Sometimes, there’s nothing.</p>
<p>Fourth, the repeats. I’m probably overreacting, but it feels to me
that most mornings bring a doubled article because the BB editors reach
into a submission queue and pull out a link without any sort of lock
process. Elementary tools, Watsons.</p>
<p>And now for the irrelevancies: I get better coverage of the topics
I’m interested in from other sources: <a
href="http://www.techdirt.com">TechDirt</a>, <a
href="https://www.consumerist.com">The Consumerist</a>, <a
href="http://www.schneier.com">Bruce Schneier</a>, <a
href="http://www.brothers-brick.com">The Brothers Brick</a> – heck,
everybody else on my RSS feed. BB hasn’t had useful commentary from
anybody except Cory Doctorow in years, and mostly he puts that in his
Guardian column these days, and then links to it.</p>
<p>So. Bye-bye, Boing Boing. It was a nice eighteen or nineteen years,
and maybe you’ll reinvent yourself as something useful to me in another
five years or so. I’ll check in, but not too often.</p>
easy vs complete: system stats2014-11-22T00:00:00-05:002014-11-22T00:00:00-05:00-dsr-tag:blog.randomstring.org,2014-11-22:/2014/11/22/easy-vs-complete-system-stats/<p>If you are the sort of person who wants to know about the performance
of one or more computers, you should know that lots of people share your
desires. As a result, there are many software packages that do one or
more of gathering information, storing it, graphing it, displaying the
graphs, and perhaps generating alerts based on the information
received.</p>
<p>Most of the time, though, you can skip researching all those and go
directly to small, medium or large.</p>
<p>If you are the sort of person who wants to know about the performance
of one or more computers, you should know that lots of people share your
desires. As a result, there are many software packages that do one or
more of gathering information, storing it, graphing it, displaying the
graphs, and perhaps generating alerts based on the information
received.</p>
<p>Most of the time, though, you can skip researching all those and go
directly to small, medium or large.</p>
<p>The small option is <a href="http://munin-monitoring.org">munin</a>.
It’s small enough that if you have just one machine, it’s reasonable to
install munin. Config on the master node takes just a few minutes;
config on the client nodes is usually non-existent unless you have funky
DNS. You get pretty graphs with some history, the ability to group by
nodes or services, and you can look at a live <a
href="http://demo.munin-monitoring.org">demo.</a></p>
<p>What don’t you get? If you have a non-UNIX client, you need SNMP
support. There’s no Windows support other than SNMP, though Mac OS X can
be either a master or client. Finally, there’s not much history or
precise statistics – munin tells you more about trends and where you
should be looking for problems.</p>
<p>The medium option is <a
href="http://www.observium.org">observium</a>. Observium only does SNMP,
no client-side, which makes it extremely easy to add a new client node –
just tell Observium the IP or name and anything odd about the SNMP
access configuration. On the other hand, you don’t set up individual
SNMP checks – Observium will try <em>everything</em> it knows about, and
Observium knows a lot about SNMP. There’s graphing and grouping and a
fancier, more interactive web control panel than munin. It looks like
Observium will add monitoring/alerting capabilities soon, though I
haven’t tried them out yet. Also, observium really wants to run on its
own FQDN – if you don’t run DNS, munin is really a better choice for
you.</p>
<p>The large option, for people with really complex or large-scale
needs, is a combination of <a
href="http://www.collectd.org">collectd</a> and <a
href="http://graphite.readthedocs.org">graphite</a>. Collectd acts as
the client, graphite charts the results, and there are options for
storing all the history, writing your own queries, and everything else
that you might want to do. The basic tradeoff is that you will need to
invest time in learning the systems and writing your configuration
carefully; in return, you can scale to horrendous numbers of systems and
sort through exact numbers in search of patterns completely beyond the
grasp of lesser systems.</p>
the real problem with systemd2014-11-18T00:00:00-05:002014-11-18T00:00:00-05:00-dsr-tag:blog.randomstring.org,2014-11-18:/2014/11/18/the-real-problem-with-systemd/<p>Let’s quote a Debian Developer, who I will not name:</p>
<p>“Oh, and by the way, systemd bloody works on my system. I can’t even
remember when I switched to it. It Just Worked.”</p>
<p>The problem with systemd is that he’s got one system, not five
hundred, and he somehow thinks that makes it a representative
sample.</p>
<p>I don’t have any such confidence. </p><p>Let’s quote a Debian Developer, who I will not name:</p>
<p>“Oh, and by the way, systemd bloody works on my system. I can’t even
remember when I switched to it. It Just Worked.”</p>
<p>The problem with systemd is that he’s got one system, not five
hundred, and he somehow thinks that makes it a representative
sample.</p>
<p>I don’t have any such confidence. </p>
want ads for technical jobs2014-11-15T00:00:00-05:002014-11-15T00:00:00-05:00-dsr-tag:blog.randomstring.org,2014-11-15:/2014/11/15/want-ads-for-technical-jobs/<p>HOT hot HOT startup needs Rock Star dev! Only apply if U R THE BEST!
Work hard/play hard! 120 hour weeks but we have kegs in the break room
and four subwoofers in the game room! Just like college but no classes,
except Java classes, amirite?</p>
<p>No, thanks.</p>
<p>Demanding a rockstar is a sign that you don’t know how to accomplish
your goals and you want Superman to bail you out.</p>
<p>What does a good employment ad look like?
</p><p>HOT hot HOT startup needs Rock Star dev! Only apply if U R THE BEST!
Work hard/play hard! 120 hour weeks but we have kegs in the break room
and four subwoofers in the game room! Just like college but no classes,
except Java classes, amirite?</p>
<p>No, thanks.</p>
<p>Demanding a rockstar is a sign that you don’t know how to accomplish
your goals and you want Superman to bail you out.</p>
<p>What does a good employment ad look like?
</p>
<p>I workshopped my last employment ad through the <a
href="http://www.lopsa.org">LOPSA</a> (League of Professional Systems
Administrators) mailing list; I think it was improved immensely. People
told me what their actual desires are:</p>
<ul>
<li>Above all else, clarity</li>
<li>A description of what the company does</li>
<li>A description of the actual duties of the advertised position</li>
<li>A description of the likely future of the position or the career
path of a person working in that position</li>
<li>Office hours, on-call hours, weekend hours</li>
<li>Skills that are actually needed</li>
<li>Lists of technologies actually in use</li>
<li>Goals of the group</li>
<li>Professional development opportunities</li>
</ul>
<p>And what they don’t want to see:</p>
<ul>
<li>Rockstar/Ninja/Pirate/Robots!</li>
<li>Descriptions of how lush the HQ or breakrooms are</li>
<li>“Marketing speak” about what the company or group does</li>
<li>Anything that comes across as pretentious, self-aggrandizing or
insincere</li>
</ul>
<p>It shouldn’t come as a surprise that people prefer to be treated as
mature adults, rather than as boisterous teenagers.</p>
when moving isn't moving so much2014-11-14T00:00:00-05:002014-11-14T00:00:00-05:00-dsr-tag:blog.randomstring.org,2014-11-14:/2014/11/14/when-moving-isnt-moving-so-much/<p>I’ve been in charge of IT at my employer for the last eleven years,
and that means I’ve been in charge of moving the infrastructure of HQ
four times. (Cambridge office space is a vicious market.) In that time
we lost no employees because of the moves.</p>
<p>I attribute this to a few simple things.</p>
<p>I’ve been in charge of IT at my employer for the last eleven years,
and that means I’ve been in charge of moving the infrastructure of HQ
four times. (Cambridge office space is a vicious market.) In that time
we lost no employees because of the moves.</p>
<p>I attribute this to a few simple things.</p>
<p>First, there is an understanding that the company’s moves are
dictated by the market. We seem to have a knack for picking spaces that
will be much more valuable when our lease is up. In two cases, Microsoft
has decided that the building we were in was perfect for them. If MS
decides that they want to occupy a large chunk (or all) of a building,
nobody smaller than Google can afford to counterbid.</p>
<p>Second, there is an understanding that the company will stay near the
Red Line, somewhere north of South Station and possibly as far out as
Alewife. In practice we’ve moved between Harvard, Central and Kendall. I
think the best was at 1 Cambridge Center, which is built on top of the
Kendall Square T station. MS has that now. They had a new exterior
elevator built in an inconvenient location in order to have private
elevator service…</p>
<p>Third, we haven’t been victims of <a
href="http://www.joelonsoftware.com/articles/OfficeNewYork.html">Whyte’s
Rule</a> – corporate headquarters always move to minimize the CEO’s
commute. Our president lives in Cambridge, and sometimes his commute
gets a little longer and sometimes a little shorter.</p>
<p>To sum up, you can keep your employees happy even with frequent moves
if you are consistent, open, and keep to the same general area.</p>
a new firewall2014-11-09T00:00:00-05:002014-11-09T00:00:00-05:00-dsr-tag:blog.randomstring.org,2014-11-09:/2014/11/09/a-new-firewall/<p>I decided that my next firewall would not be a home wifi router
thing, even running OpenWRT – I wanted something that I knew I could
upgrade and configure to handle whatever comes down the pipe next.</p>
<p>And I wanted it to be fast.</p>
<p>And I wanted it to be cheap.</p>
<p>I decided that my next firewall would not be a home wifi router
thing, even running OpenWRT – I wanted something that I knew I could
upgrade and configure to handle whatever comes down the pipe next.</p>
<p>And I wanted it to be fast.</p>
<p>And I wanted it to be cheap.</p>
<p>After appropriate research, I sadly discarded the idea of getting a
Ubiquiti EdgeRouter Lite. It’s cheap – $99 – and fast – wirespeed
gigabit routing on three ports – but the OS it runs is almost but not
quite a supported release. While based on Debian, it lags a major
version behind and there is no community-supported toolchain to build it
yourself.</p>
<p>(If that changes, it would be a great option for most people. And if
you aren’t horrified by these lacks, it might be good for you now.)</p>
<p><em>edit from the future, mid-2015: Ubiquiti is also violating the
GPL. That should concern you, too.</em></p>
<p>I thought about buying a PCengines micro PC. They’re reasonably cheap
if you assemble them yourself, and can run a standard Linux. Power draw
is pretty low, 5-15W. While searching NewEgg, I discovered that the
high-end of that range is available from a motherboard manufacturer as
an almost-complete unit: <a
href="http://www.newegg.com/Product/Product.aspx?Item=N82E16856107110&cm_re=t40e-_-56-107-110-_-Product">Jetway
G-T40E barebone PC</a> for $220. I almost got that. Two ethernet ports
and WiFi on the motherboard, in a nice small case.</p>
<p>Turns out that the successor to AMD’s T40 is a relatively new chip
called the Athlon 5150 or 5350, depending on speed. And NewEgg had a
sale bundle: buy a 5350, an MSI AM1I motherboard, and a miniITX case for
$118, about $40 off the regular price of all three. The miniITX case had
excellent reviews, takes a standard ATX power supply, and even came with
a thermally-regulated 120mm fan in front.</p>
<p>So I got that, a 64GB SSD, and a power supply. I had several 2GB RAM
sticks lying around, and 4 GB is certainly enough for a firewall. Intel
gigabit NICs run $20-30 apiece. All together, I got a modern
small-but-not-tiny machine for about $220.</p>
<p>But how fast does it boot? About 3 seconds for BIOS initialization, a
5 second delay for GRUB to see if a human wants to stop the boot, and
then 4.3 seconds to a login prompt, an additional 3 seconds for the
ethernet to be up and happy. Call it 15 seconds from cold.</p>
<p>Debian Wheezy, 7.7, x86-64 architecture, 4GB RAM, that’s a CPU with a
maximum TDP of 25W and an idle around 5W.</p>
two stage mail filtering2014-10-30T00:00:00-04:002014-10-30T00:00:00-04:00-dsr-tag:blog.randomstring.org,2014-10-30:/2014/10/30/two-stage-mail-filtering/<p>Sure, you have a system which automatically filters incoming mail
into appropriate folders – most of these are for mailing lists, a few
from specific companies or people – but you still have mail that comes
in to your inbox specifically because you want to see it and deal with
it.</p>
<p>After you’ve read it and done something about it, you want to archive
it, because storage is cheap and more reliable than your memory. Do you
throw it all in a pile? </p><p>Sure, you have a system which automatically filters incoming mail
into appropriate folders – most of these are for mailing lists, a few
from specific companies or people – but you still have mail that comes
in to your inbox specifically because you want to see it and deal with
it.</p>
<p>After you’ve read it and done something about it, you want to archive
it, because storage is cheap and more reliable than your memory. Do you
throw it all in a pile? </p>
<p>Some people do throw it all in a pile, and trust to their full-text
indexer (<code>mairix</code>, <code>mu</code>, <code>notmuch</code>…) to
find it for them later. If you don’t have a full-text search system, any
of the three I just mentioned are a good idea.</p>
<p>Even if you do have that set up, sometimes you just want to browse.
It sure would be nice if you could do that without sucking in 120,000
messages to find the ones about credit cards, right? And the obvious
answer is that you save messages to folders rather than dumping them in
one pile.</p>
<p>Let’s do that automatically, with a second stage mail filter. Since I
use <code>maildrop</code> as my incoming filter, I’ll use it for my
archive filter as well. If you like <code>procmail</code>, use that. Any
filter that can use a non-default rules file will work.</p>
<p>In an incoming mail filter, you often filter on List-Id,
Mailing-List, Sender and other specialized headers. So far I’ve found
that those aren’t very useful for an archive filter. Mail that you want
in your inbox doesn’t come from a mailing list. Most matches will be on
From: or To:.</p>
<p>Start with a new file. Maildrop defaults to
<code>$home/.mailfilter</code>, so we’ll write
<code>$home/.mailfilter-archive</code>:</p>
<pre><code> if (/^From:.*root@.*localdomain/:h)
to "| /usr/local/bin/deliver-to-maildir seen $HOME/Maildir/.system/"
if (/^From:.*@retailer.com/:h)
to "| /usr/local/bin/deliver-to-maildir seen $HOME/Maildir/.commerce/"
if (/^To:.*school@domain.edu/:h)
to "| /usr/local/bin/deliver-to-maildir seen $HOME/Maildir/.school/"
if (/^To:.*family@localdomain/:h)
to "| /usr/local/bin/deliver-to-maildir seen $HOME/Maildir/.family/"
#default
to "| /usr/local/bin/deliver-to-maildir seen $HOME/Maildir/.archive/"
</code></pre>
<p><code>deliver-to-maildir</code> is courtesy of <a
href="http://www.tropic.org.uk/~edward/homepage/deliver-to-maildir/deliver-to-maildir">Edward
Speyer</a> – I’m using it specifically because of the ability to specify
that the mail goes in the <code>Maildir/cur</code> directory, rather
than <code>new</code> which is what a naive use of <code>to</code> or
<code>cc</code> would do.</p>
<p>Next, we need to be able to summon this filter from
<code>mutt</code>. In your <code>.muttrc</code>:</p>
<pre><code>macro index Z "<enter-command>unset wait_key\n<pipe-message>maildrop $HOME/.mailfilter-archive<return><delete-message><enter-command>set wait_key\n"</code></pre>
<p>I specify the scope of the macro as index because it’s most useful
when you have finished dealing with a message – I suppose that the pager
might be a useful additional scope. <code>Z</code> becomes the key to
automatically file a message after you’re done with it; if the filter
doesn’t know where to put it, the default at the end kicks in and drops
in a big archive pile, which is not worse than before.</p>
<ul>
<li>2019 edit: deliver-to-maildir is defunct, but fear not: there’s an
even better way to do this. See <a
href="https://blog.randomstring.org/2018/07/26/a-nice-improvement-in-maildrop/">the
updated article</a></li>
</ul>
removing systemd from a Debian jessie system2014-10-14T00:00:00-04:002014-10-14T00:00:00-04:00-dsr-tag:blog.randomstring.org,2014-10-14:/2014/10/14/removing-systemd-from-a-debian-jessie-system/<p>Let’s say you install a new Debian system using the Jessie release,
which will become the next stable release in a few months. And let’s say
that you would prefer not to be enmeshed in systemd.</p>
<p>Too bad.</p>
<p>However, you can remove it. </p><p>Let’s say you install a new Debian system using the Jessie release,
which will become the next stable release in a few months. And let’s say
that you would prefer not to be enmeshed in systemd.</p>
<p>Too bad.</p>
<p>However, you can remove it. </p>
<p>Here’s how:</p>
<pre><code># apt-get install sysv-rc sysvinit-core sysvinit-utils
# apt-get purge systemd libpam-systemd systemd-sysv
# echo udev_log=\"err\" >> /etc/udev/udev.conf
# update-initramfs -k all -u
# shutdown -r now</code></pre>
<p>For my sample KVM virtual machine, 1 cpu core and 512MB allocated on
a reasonably idle i5-2500 desktop:</p>
<ul>
<li>boot time on a default install: 1.33s<br />
</li>
<li>boot time on a sysvinit without the udev.conf change: 32.18s<br />
</li>
<li>boot time on a sysvinit with the change: 1.37s</li>
</ul>
neuroethics in the era of advanced consciousness technologies2014-10-04T00:00:00-04:002014-10-04T00:00:00-04:00-dsr-tag:blog.randomstring.org,2014-10-04:/2014/10/04/neuroethics-in-the-era-of-advanced-consciousness-technologies/<p>Questions from <a href="http://ahistoryofthefuture.org/">A History of
the Future</a> – object 96, from 2066.</p>
<p><em>Answers from my snap judgement.</em></p>
<p>In your own time, please answer five out of the ten questions
below.</p>
<p>1 Alice makes a full backup, indistinguishable from her own
personality and capable of operating independently. Who owns this
backup? Does the status of ownership change if:</p>
<p>Questions from <a href="http://ahistoryofthefuture.org/">A History of
the Future</a> – object 96, from 2066.</p>
<p><em>Answers from my snap judgement.</em></p>
<p>In your own time, please answer five out of the ten questions
below.</p>
<p>1 Alice makes a full backup, indistinguishable from her own
personality and capable of operating independently. Who owns this
backup? Does the status of ownership change if:</p>
<p><em>Base answer: Alice is the parent of the backup, and owes it the
duties that a parent owes to a child. As Alice-2 is presumptively an
adult of the same capabilities as Alice, Alice’s duty may be limited to
providing a viable running environment and initial funds or other
resources to sustain Alice-2 for a culturally/legally defined period of
time.</em></p>
<ol type="a">
<li>the backup has never been run</li>
</ol>
<p><em>In this case, the backup is akin to a child not yet born, and so
Alice may abort the backup up until the time that it is run; after that,
deleting it is murder. (Stopping the consciousness with its consent is
acceptable; without consent it is assault.)</em></p>
<ol start="2" type="a">
<li>following the backup snapshot, Alice undergoes a significant
psychological discontinuity (e.g. amnesia, major desire modification,
neurodegenerative disease, etc.)</li>
</ol>
<p><em>No change in status.</em></p>
<p>2 Bob fissions, creating an identical clone (Bob2). Shortly
afterwards, Bob is discovered to have committed a crime, pre-fission.
Who should be held responsible for this crime? Both Bob-prime and Bob2,
or just Bob-prime?</p>
<p><em>Both Bob-prime and Bob-2 are held responsible, as the aim of
justice is rehabilitation.</em></p>
<p>3 Cheung signs a contract. Some time later, she performs personality
reconstruction. Is Cheung still bound to that contract? Does the nature
of the contract, or the result of the contract, have any relevance?</p>
<p><em>A test must be devised to distinguish Cheung from a child
(backup, clone) of Cheung. A child would not be held to the same
contract. If Cheung is merely the much later self of Cheung, she is
still bound. There are also questions of consent to the personality
reconstruction.</em></p>
<p>4 Davinder signs a living will stating that if he develops a
neurodegenerative disease, he should be euthanised. When this occurs
many years later, the ‘much later self’ (MLS) of Davinder argues that
circumstances have changed and the living will that his previous self
signed should no longer apply. Who is correct?</p>
<p><em>A living will can always be rescinded or changed by the instance
of the consciousness to which it is being applied, so long as it is
running in a reasonably undegraded state.</em></p>
<p>For extra marks: If a backup of Davinder was made at the time of
signing, should the MLS of Davinder be able to sue it for distress
caused?</p>
<p><em>No. The backup did not cause the distress, Davinder-prime,
predecessor to them both, did that.</em></p>
<p>5 Should backups be provided by society? How often should these
backups be offered?</p>
<p><em>To the extent that society can afford to provide quiescent
backups, they should be made available to all citizens. No one should be
forced to have a backup, or to expend resources on a backup that they
did not choose to start.</em></p>
<p>6 Enrique decides to undergo an experimental narrative injection
therapy. The narrative that wove together and gave coherence to his
experiences is modified with original insights in order to improve his
view of his own life. After the therapy, he decides he is unhappy with
the change. Will reversing the therapy restore him to his original
self?</p>
<p><em>Probably not.</em></p>
<p>7 To what extent should someone consider the wellbeing of their ‘much
later self’ (MLS) when undergoing desire modification that could benefit
like-minded people who may share a greater degree of similarity to their
present identity than their MLS?</p>
<p><em>Individual consciousnesses do not owe a duty to their MLS; this
follows from suicide being legal.</em></p>
<p>8 Faith is a minor. Her religion prohibits her from creating a
backup. Her parents are killed in an accident, and she is critically
injured. Her remaining legal guardian wants to perform a backup on
Faith. What should happen?</p>
<p><em>If her legal guardian was appointed by Faith’s parents, the
backup is permitted. Otherwise, Faith may be consulted as to her wishes,
if possible. If she cannot indicate a desire, no backup can be
performed.</em></p>
<p>9 Glory is a Rovane-type group mind that meets the conditions of
ethical personhood and agency. Glory comprises 245 individuals, but that
total may increase or decrease over time. Under what conditions should
Glory be considered to have become a different person or to have ‘died’?
How do these conditions differ from those applying to non-group
minds?</p>
<p><em>A Rovane-type group mind is not a singular entity, but a
collective belief residing in a number of persons. Since each person may
join or leave Glory at any time, Glory must be defined by the
belief-subscription-network. Continuity of the belief-network is all
that matters, just as an individual consciousness naturally evolves into
a MLS.</em></p>
<p>10 Henry is a self-identified fictive otherkin. He wants to
permanently remap his personality and senses onto a My Daring Dragon
gaming character. What criteria would you use to assess the seriousness
of his request?</p>
<p><em>Seriousness is not an issue. If Henry has passed requirements for
full citizen rights, Henry may remap his body or mind as he
desires.</em></p>
amateur IT2014-09-27T00:00:00-04:002014-09-27T00:00:00-04:00-dsr-tag:blog.randomstring.org,2014-09-27:/2014/09/27/amateur-it/<p>This is tagged as a ramble for a reason. I have a coherent point
lurking in here somewhere, but it hasn’t surfaced yet.</p>
<p>Here in the middle of the twenty-teens, people and businesses seem to
think that information is valuable. Address books, social networks,
commercial transactions, financial records, web bookmarks and ebook
bookmarks: the loss of some of these is more keenly felt than others,
but they are all worth something beyond the tiny value of the disk space
that they occupy. If that data is worth something, then it makes sense
to spend some amount less than that to protect it.</p>
<p>How much?</p>
<p>This is tagged as a ramble for a reason. I have a coherent point
lurking in here somewhere, but it hasn’t surfaced yet.</p>
<p>Here in the middle of the twenty-teens, people and businesses seem to
think that information is valuable. Address books, social networks,
commercial transactions, financial records, web bookmarks and ebook
bookmarks: the loss of some of these is more keenly felt than others,
but they are all worth something beyond the tiny value of the disk space
that they occupy. If that data is worth something, then it makes sense
to spend some amount less than that to protect it.</p>
<p>How much?</p>
<p>Well, it depends. (I should get that on a t-shirt.) First, there’s a
difference between the violation of privacy and the loss of access. If
everyone can see your photos, that’s one thing, and having them all
deleted permanently is the other.</p>
<p>Then there’s a scope issue. Your data isn’t always yours. Say you’re
a social-science researcher who needs to keep the identity of
participants in a survey secret. Suppose you have a mailing list for
your poker buddies, and you happen to live in one of the twenty-odd
states in which social gambling is illegal. (Or it’s legal in your
state, but not in your friend’s state across the river.) In both of
those cases, and many others, the value of “your” data isn’t the same as
the value to you.</p>
<p>The value of data to you is the sum of the costs you would have to
pay to address the consequences of the data’s loss or revelation.</p>
<p>These consequences can be unknowably vast. That’s not helpful,
because it leads to multiplying an infinite value by an infinitesimal
likelihood and getting any number you want. The consequences of
revealing the passwords to your financial accounts approximate your
entire net worth; the consequence of losing those passwords is probably
a few hours of your life spent in talking to customer service workers.
What’s the cost of revealing your Facebook password? (And are you sure
it isn’t the same as any other password?)</p>
<p>The good news is that to protect against the loss of data (access,
not privacy) there are effective, simple, and reasonably cheap methods.
All of them boil down to the same two parts: make copies in different
places. A good rule of thumb is to have three copies: the one you use,
the one that is nearby but not in use, and then one which is far
away.</p>
<p>When was the last time you made a backup of all your data? Do you
even know how? I don’t. I only know how to make copies of the things
that are on my computers and a few of the things that are in cloud
services. Don’t let the best be the enemy of the good: make backups. The
best backups are exact copies of everything. The worst backups are the
ones that you’ve never done, and the next worst are the ones that you
didn’t spot-check.</p>
<p>At this point you might be thinking that you’ve taken reasonable
precautions and nobody can blame you if they don’t work out, because,
after all, data security is not your job. (Unless it is, of course.)</p>
<p>Do you do your own plumbing? Do you re-wire your electrical systems?
The expected standard of competency is plunging a toilet or replacing a
dead bulb; for anything more complex, you call a professional and pay
more money than you’d like, but much less than the potential costs of
doing it yourself and failing.</p>
<p>One of the standards for being a competent adult is that you should
recognize when you are in a hole. Then you can stop digging and ask for
help.</p>
<p>But computers are cruelly seductive: you can do so much with them
without actually understanding what’s going on inside that it is a
natural mistake to believe that you know more than you do. A person who
is truly incompetent is likely to believe that they have extensive
abilities. In the other direction, people who are perfectly competent in
other areas of life often view computers as mysterious and
incomprehensible systems which cannot possibly be managed without
wizardly expertise.</p>
<p>There is nothing quite so irksome as a person who is capable of
learning but does not, unless it is a person who has not learned and
thinks that they have.</p>
fail2ban and the repeat offender2014-09-25T00:00:00-04:002014-09-25T00:00:00-04:00-dsr-tag:blog.randomstring.org,2014-09-25:/2014/09/25/fail2ban-and-the-repeat-offender/<p>An IP address does not identify a person. It does not reliably
identify a computer. It does identify an organization, but that’s rather
nebulous.</p>
<p>But in the short term, when someone on the internet is poking at your
systems and trying to get in – and that’s happening right now, to you,
and to everyone else – the source IP address does represent something.
Think of it as a temporary alias for a bad guy.</p>
<p>An IP address does not identify a person. It does not reliably
identify a computer. It does identify an organization, but that’s rather
nebulous.</p>
<p>But in the short term, when someone on the internet is poking at your
systems and trying to get in – and that’s happening right now, to you,
and to everyone else – the source IP address does represent something.
Think of it as a temporary alias for a bad guy.</p>
<p><a
href="http://www.fail2ban.org/wiki/index.php/Main_Page">fail2ban</a> –
is a daemon that watches your logs for failed attempts to get in. Then
it inserts firewall rules to block those IP addresses for a short period
of time, usually minutes to days. It’s complex (bad) and depends on
regexps, which are easy to screw up.</p>
<p><img src="http://imgs.xkcd.com/comics/perl_problems.png"
alt="Now you have two problems" /> from <a
href="http://xkcd.com/1171/">XKCD #1171</a></p>
<p>For certain situations, fail2ban is an approximation of the best that
can be done. What situations? Well, if you have a network service that
you want to offer to the public at large, or to specific people but you
can’t nail down the IP addresses they will be coming from, and you also
want to avoid letting Mallory guess your passwords by brute force.</p>
<p>You might also consider using fail2ban if you have a well-secured
service like ssh with required key authentication, and you just want to
make the automatic harassment attempts stop. (It would be nice if sshd
came with an option to signal a client that only keys are allowed, but
that would probably signal other things that would harm the net as a
whole.)</p>
<p>In any case, fail2ban is short-term. What do you do for an IP address
that comes and knocks on all your doors and windows persistently?</p>
<p>(If you’re me, you write an email to the organization that controls
the IP address in question. Most ISPs will listen to complaints with log
excerpts. Those that won’t, I stop telling them.)</p>
<p>There is a <a
href="http://stuffphilwrites.com/2013/03/permanently-ban-repeat-offenders-fail2ban/">simple
config for fail2ban</a> that searches through your logs for repeat
offenders and institutes a longer ban. You don’t want to replace your
short-term bans with this, it’s a supplement.</p>
<p>I’m not sure a one year ban is a great idea, even for an IP address
that gets banned 21 times, but a month to three months seems
plausible.</p>
<p>There’s also mass IP banning, in which you decide that there’s nobody
in Vietnam or Thailand or Austria or whatever who will legitimately
access your service, so you whack everything coming from IPs registered
to that country. It’s not a very friendly thing to do, but you might
have justfications. Beware if you ever travel to those places, though –
you will probably not remember that you blocked them until it’s too late
to log in and carve an exception for yourself.</p>
shellshock explanations2014-09-25T00:00:00-04:002014-09-25T00:00:00-04:00-dsr-tag:blog.randomstring.org,2014-09-25:/2014/09/25/shellshock-explanations/<p>Today or tomorrow you’re going to start hearing about “ShellShock”, a
vulnerability in approximately all UNIX, Linux, and Mac OS X systems,
and probably a few Windows systems.</p>
<p>Is it a big deal? Yes, definitely.</p>
<p><em>edited later that day</em></p>
<p>Today or tomorrow you’re going to start hearing about “ShellShock”, a
vulnerability in approximately all UNIX, Linux, and Mac OS X systems,
and probably a few Windows systems.</p>
<p>Is it a big deal? Yes, definitely.</p>
<p><em>edited later that day</em></p>
<p>Is it something that you can do anything about as an end user? A
little, which you should do, but it won’t help much. (Apply security
updates in the next few days; you should be doing this all the time, but
even more so now.)</p>
<p>Should you worry about it beyond that? To the extent that you aren’t
a sysadmin, no. To the extent that you’re my father, run:</p>
<pre><code>sudo apt-get update
sudo apt-get upgrade</code></pre>
<p>Now the technical part, which I will attempt to make both
non-technical and mostly correct.</p>
<p>You know that UNIX people use command-line interfaces all the time.
Those are the long lines of green text that hackers type in movies.
Those are real, though most of the things that hackers do in movies with
command lines can’t actually be done. Command-line interfaces are called
shells, because they form a thin layer between your fingers and the
important stuff underneath.</p>
<p>One of the most popular programs for managing those command-line
interfaces is called bash, the Bourne-Again Shell. Yes, it’s a pun on
the name of a previous version. bash has been in use for over 25 years,
and people keep adding features to it and turning it into a complete
programming environment (albeit a very primitive and generally
uncomfortable programming environment).</p>
<p>It was recently discovered that an attacker can pass some specially
formatted data to the bash shell which, wrongly, bash will decide is a
valid command. Normally we wouldn’t worry very much about this, because
you need to be an authorized user of a system before you get access to a
bash command-line.</p>
<p>However, bash is very widely used as a sort of glue in between other
programs; it’s very fast and easy to do that, and although “everyone
knows” that you should replace it with a more permanent method, somehow
that doesn’t happen until there’s a performance problem. Then you’ll
often find that calling up bash isn’t very fast, just convenient. So
lots of places in many systems just do the convenient thing. Web
servers. Network tools. Infrastructure where it’s more important to get
things working right now than anything else.</p>
<p>And as a result of that convenience, we now have methods for evil
people to run code on our systems – mostly in places that we haven’t
looked at in a long time.</p>
<p>Fixes were issued yesterday for many systems, and more will come in
today, but it also looks like the first fix may not have been complete,
and a second one is being tested.</p>
<p>EDIT: by 1900 Eastern, a second patch has been generally agreed on
and released for general distribution. The problem now reduces to the
all too familiar race of finding and patching computers that are running
bash.</p>
first post2014-09-24T00:00:00-04:002014-09-24T00:00:00-04:00-dsr-tag:blog.randomstring.org,2014-09-24:/2014/09/24/first-post/Once upon a time there was a machine that tied strings together…<p>Once upon a time there was a machine that tied strings together…</p>
<!-- more -->
<p>random strings.</p>