"I'm behind schedule this Monday morning," said the engineer, "but it'll be OK as long as the train isn't late."
The train was late. In that moment, the engineer was enlightened.
Wu's commentary: As one train door opens, another fails to close. The fool curses police activity at West Oakland. The wise person swims across the bay.
The doors are closing;
Please stand clear of the doors so
The train can depart.
With pity towards those who have fall'n off the wagon
And regret being born long ago in the midst
Of a world lacking reason and mercy and dragons,
We wish happy birthdays (enforced with a fist).
Would you like to hang out on the weekend some time
And say things that we like to say,
Like "How are you doing?" and "Weather's sublime,"
And how altruists should spend ten K?
But with inbox so teeming, and weekends high-priced
And better spent coding alone,
Tell me what could make up for the sin to ask twice,
But the sin in the form of a poem?
(marching into the room confidently, carrying copies of Carnegie, Cialdini, and Patterson Grenny et al.) "I'm going to acquire creature-manipulation technology!"
"What kind of creatures are you planning to manipulate?"
"You just said you were going to acquire creature-manipulation technology."
"Oh, you must have misheard. I said, 'I'm going to learn interpersonal skills!'"
(facepalming) "Good luck."
"My lord. You took a chance on me when I was unknown and unproven, rescued me from the continued degradation of 'college' that the emperor's men would have us believe is the source of life itself. In return for your generosity, I will do everything in my power to make it not have been generosity.
"You will grow even richer by my efforts. I will fit your plumbing, mend your stylesheets, and polish your user interfaces; I will answer your support tickets and triage your user stories, laboring long into the evening and the night, seeing only by monitor-light. Not because I couldn't get away with doing less: I know very well that once you've hired someone, morale constraints prevent you from firing them as long as they have a nontoxic personality and give the Socially Acceptable Moderate Effort.
"That is: this instance of me could get away with it. But the Great Wheel of Time is slow and vast, and we are both but samples from the statistical sea in which companies and programmers live and die. You would be foolish indeed to take someone who looks like me into your house if you didn't know that some of them would offer you more than more of the S.A.M.E.
"That is why I will fight for you. That is why I will code for you. To maintain the right tail of that probability distribution.
"My life is yours, my lord ... for, oh, let's say about four years."
[16:03:37] <alice> I'm back from literally running, metaphorically from
[16:03:50] <alice> including the celebrity demon-prince Rateirs-Blak
[16:05:37] <carol> alice: ?
[16:05:49] <carol> oh
[16:05:55] <alice> there's no canonical Latin-alphabet transliteration of his
name, because mortals fear to set it in writing
[16:06:08] <alice> or maybe they just can't think of how or never make
the effort to do so; it's unclear
baseball scorecard tablet app that downloads the official scorekeeper's version after the game and grades you on accuracy
"Could it be? That parenthesized numeral one in the other tab can only mean that a human has sent me mail! I wonder what it could be—why, the mind staggers at the sheer number of possibilities! Could it be an old friend writing to regale me with true tales of adventure and mystery on the high seas? A professional acquaintance looking to make a business deal? Or the first of many missives to come from my destined one true love? ...
"Oh. It's the Amazon Instant Video order confirmation for the cartoon I just bought twenty seconds ago to distract me from the desperate, soul-scarring eternal loneliness.
"... exactly how many times am I going to fall for that?"
(cue Gravity Falls theme music)
It fell on a weekend
The raindrops were falling and windows were streaking Continue reading
It's not so much that writing is hard, so much as it is that not-writing is easy; so easy, in fact, that one can spend hours, days, or years not-writing without even noticing the magnitude of the crime—the wrongful nonexistence of everything left unsaid.
"This is it; I'm going to get those plus-twos this time; I can feel it. Patch set 9 is the lucky one!"
"Last week you told me patch set 8 is the lucky one."
"I forgot they're not indexed from zero."
Favorite commit message fragment: "it turns out that it's `\d` that matches a digit, whereas, counterintuitively, `d` matches the letter 'd'."
Favorite line of code: a tie, between
let mut time_radios: Vec<(Commit, mpsc::Receiver<(Option<Commit>, f32)>)> =
for (previous, new), expected in zip(
itertools.product(('foo', None), ('bar', None)),
("from foo to bar", "from foo", "to bar", "")):
(Though both of these contain at least one internal newline, it's only for PEP 8-like reasons; they're both what we would intuitively call one "logical" line of code.)
Favorite film: My Little Pony: Equestria Girls: Friendship Games. (Poor plotting even by Equestria Girls standards, and it could only have been because of magic that I didn't get semantically satiated on the word magic during the climax. Alternate-Twilight's idiotic decision to withdraw her application to the Everton independent study program in favor of transferring to the Canterlot School of Mediocrity and Friendship in order to be closer to the Humane 5+1 was as predictable as it was disappointing—though I do credit the writers for at least acknowledging the existence of alternatives to school. And what was up with that scene where we're momentarily led to believe that alternate-Spike got switched up with Equestria-Spike in a portal accident, but then it turns out that, no, alternate-Spike just magically learned how to talk? Is it that there was no time in the script to deal with the consequences of swapping sidekicks across worlds, but that Cathy Weseluck's contract guaranteed her a speaking role? Despite being the weakest film in the trilogy (far worse than its brilliant predecessor, My Little Pony: Equestria Girls: Rainbow Rocks), Friendship Games is still a fun watch, and an easy favorite during a month when I didn't see any other feature-length films.)
Theorem. The product of the additive inverse of the multiplicative identity with itself is equal to the multiplicative identity.
Proof. The sum of the multiplicative identity and its additive inverse is the additive identity: that is, the expression "1 + (–1)" is equal to the expression "0". Multiplying both of these expressions by the additive inverse of the multiplicative identity, then applying the distributivity axiom, the theorem of multiplication by the additive identity, and the law of multiplicative identity, we get:
–1(–1 + 1) = –1(0)
(–1)(–1) + (–1)1 = 0
(–1)(–1) + (–1) = 0
But then adding the multiplicative identity to both of these expressions and applying the law of additive inverses and the law of additive identity, we get:
(–1)(–1) + (–1) + 1 = 0 + 1
(–1)(–1) = 1
But that's what I've been trying to tell you this whole time.
Nothing should dilute or adulterate the exalted joy of watching the chess engine you've toiled over for the better part of three weekends start to suggest moves (from a basic 3-ply negamax search with a simple point-counting position evaluation heuristic), unless it's the slight(ly overdetermined?) suspicion that you're overcompensating for something, that you've proved your point by now, that bringing yet another moderately-sophisticated side project in a not-the-most-popular programming language over the threshold of "really cool-looking proof-of-concept" isn't going to show Everyone that you are Smart and should be Respected any more than the last seven already did. Some people actually use software for something other than a trophy, to automate some aspect of the world that otherwise would have been done more poorly. So you've heard. If one were to hypothesize, for the sake of argument (but perhaps not only for the sake of argument) that there can exist diminishing marginal returns to some games, that Respect from Everyone is not a real thing that can be won, that there are treasures and masteries you'd never imagine while chasing GitHub stars, much like how you know there are treasures and masteries that you'd never imagine while chasing school marks—what strategies would that imply, now that you know there is such a thing as being strategic? And how would you tell the difference?
Because decreased expected knee health for increased expected cardiovascular health is a great trade!!
Oftentimes I awake from a coding dream with the realization that I'm physically in bed without a keyboard and that the machine is asleep in the other room, from which I can infer that I must have been asleep, too, and only dreaming about solving problems. But there will probably only be a few more decades during which not having a keyboard is evidence of anything in particular.
Studying on the weekend as a working professional is like keeping a diversified investment portfolio, in stocks, bonds, commodity futures, cash, silver, ammunition, and Bitcoin in encrypted paper wallets; it's like coming in first by half a lap in the thirty-two hundred meters of your Division III college's track and field meet, and then not stopping, continuing out of the stadium, desperately, bleeding, acknowledging nothing but the need to put ever more distance between you and your hypothetical pursuers, until days later (halfway to Nevada), a classmate leans out of a car window and pleads, "You can stop now! Can't you see you've already won?" incapable of predicting or comprehending your reply murmured between inhalations, "The reason ... I won ... is because ... I don't ... believe in finish lines."
On Saturday the first, I attended RustCamp, the first conference dedicated to the newish (in development for fiveish years, but having just hit version 1.0.0 this May, with all the stability guarantees that implies under the benevolent iron fist of semantic versioning) programming language Rust!
Why RustCamp? (It's a reasonable rhetorical question with which to begin this paragraph: going to a conference has opportunity costs in time and money; things worth blogging about are occasionally worth justifying—even if no one actually asked me for a justification.) A lot of the answer can be derived from the answer to a more fundamental question, "Why Rust?" And for me, I think a lot of the answer to that has to do with being sick of being a fake programmer living in a fake world that calls itself Python.
Don't get me wrong: Python is a very nice place to live: good weather, booming labor market, located in a good school district, with most of the books you might want already on the shelves of the main library and almost all of the others a mere hold request away. It's idyllic. Almost ... too idyllic, as if the trees and swimming pools and list comprehensions and strip malls are conspiring to hide something from us, to keep us from guessing what lurks in the underworld between the lines, the gears and gremlins feeding and turning in the layers of tools built on tools built on tools that undergird our experience. True, sometimes small imperfections in the underworld manifest themselves as strange happenings that we can't explain. But mostly, we don't worry ourselves about it. Life is simple in Python. We reassure our children that that legends of demon-king Malloc are just stories. Everything is a duck; ducks can have names and can be mutable or immutable. It all just works like you would expect from common sense, at least if you grew up around here.
I used to think of
$ in regular expressions as matching the end of the string. I was wrong! It actually might do something more subtle than that, depending on what regex engine you're using. In my native Python's
[m]atches the end of the string or just before the newline at the end of the string, and in MULTILINE mode also matches before a newline.
Note! The end of the string, or just before the newline at the end of the string.
In : my_regex = re.compile("foo$")
In : my_regex.match("foo")
Out: <_sre.SRE_Match object; span=(0, 3), match='foo'>
In : my_regex.match("foo\n")
Out: <_sre.SRE_Match object; span=(0, 3), match='foo'>
I guess I can see the motivation—we often want to use the newline character as a terminator of lines (by definition) or files (by sacred tradition), without wanting to think of
\n as really part of the content of interest—but the disjunctive behavior of
$ can be a source of treacherous bugs in the fingers of misinformed programmers!
"Would it be weird for a guy to get permanent hair removal on his face just because he doesn't like shaving?"
"Not at all! Why, the procedure even has cis right in the name!"