qntm's Blog, page 2

November 20, 2021

Ratchets in software development

Blog » So there's a thing we use at work which I call a ratchet.
In our codebase, there are "patterns" which we used to use all the time, but we decided to stop using them, but removing all of the existing instances at once is too much work. We want to remove all of these instances eventually, and in the meantime we want to make absolutely sure that they don't proliferate via copy-and-paste. So what we have is a ratchet, a script which runs at source code linting time and counts all of these "pattern" instances across the codebase. If the script counts too many instances, it raises an error, explaining why we don't want more of that "pattern". If it counts too few, it also raises an error, this time congratulating you and prompting you to lower the expected number.
This script is intentionally extremely simple. The expected numbers are hard-coded in the script itself. The "patterns" for which it scans our code are not advanced, abstract Gang of Four-style software design patterns but plain ...
2 likes ·   •  0 comments  •  flag
Share on Twitter
Published on November 20, 2021 18:40

June 25, 2021

There are hardcover editions too!

Blog » So, Amazon's Kindle Direct Publishing has been offering on-demand paperback printing services for some time... but it appears that an on-demand hardcover printing service is now in beta. And I was invited into that beta. And so, there are now hardcover editions of all of my books!

Click through to each book's dedicated page for purchase links in hardcover (and paperback and ebook):


There Is No Antimemetics Division
Ra
Fine Structure
Ed


These editions are 15.8cm wide and 23.5cm tall, with varying thickness. Ra in particular is a beast in this format. The page counts are about the same as the paperback editions.





Once again, this demanded some extensions of the original cover artwork, because the cover now has to wrap around the edge of the hard and partially cover the interior... the less said about that nonsense, the better...





The first version of Ed in hardcover was a little comical - I misjudged the font sizes so it came out looking like a large p...
4 likes ·   •  0 comments  •  flag
Share on Twitter
Published on June 25, 2021 08:46

April 4, 2021

Yes, there are paperback editions

Blog » It suddenly occurs to me that not everybody who follows Things Of Interest also follows me on Twitter, or even follows follows my dedicated book announcements account. That being the case, you may not be aware that there are now paperback editions of my books!

Click through to each book's dedicated page for purchase links:


There Is No Antimemetics Division
Ra
Fine Structure
Ed


These paperback editions are provided using Amazon's print-on-demand service. This is my first foray into paper editions for any of my books so producing actual printable manuscripts, and then carefully examining proofs, was an interesting new experience for me. The source for all four books was originally HTML, which took significant effort to convert to something which Amazon would consume (Microsoft Word or PDF). I had to develop some desktop publishing chops, and much of the special formatting in these books had to be redone from scratch. I also had to return to each of my cover artists and a...
2 likes ·   •  1 comment  •  flag
Share on Twitter
Published on April 04, 2021 12:21

February 6, 2021

Deus Ex Ultimate Run walkthrough

Blog » Conditions for the ultimate Deus Ex run are:


Do not carry or use inventory items. In particular:

No weapons.
No augmentations.
No lockpicks or multitools.


No skills upgrades. In particular:

No hacking.


Never use a door code or a computer login without acquiring it legitimately.
Spend no money.
Use no bioelectricity. That is:

No flashlight.
Never use a repairbot or at any time recharge your bioelectricity.


And naturally, "Realistic" difficulty setting.


Obviously, all three endings should be achieved. For numerous reasons, this is not a non-lethal run.

These are the conditions for the famed "Alginon run". Although fully captured on video, this run is long (4 hours 25 minutes 53 seconds altogether), involving some very cautious strategies, and the game audio has been lost. Unfortunately, this makes keeping track of Alginon's strategy difficult, particularly when individual techniques span multiple...
 •  0 comments  •  flag
Share on Twitter
Published on February 06, 2021 12:25

November 29, 2020

Save the code or save the tests?

Blog » A while back during a training session at work, our instructor pitched us a hypothetical question:


Your data centre is on fire, and all your application code is on one drive, and all your tests are on the other drive, and you can only rescue one. What do you do?

Save the application code.
Save the tests.



More recently, out of curiosity, I pitched the same question as a poll on Twitter. On Twitter, roughly 80% of respondents said that they would save the application code and 20% said they would save the tests.
People gave differing reasons for their decisions. Predictably, many respondents said to let it all burn, and some people attempted to justify that choice by asserting that they had backups. But "let it all burn" wasn't one of the provided options and these responses didn't show up in the results, so we can safely ignore those opinions for now.
Most of the remaining respondents seemed to make decisions based on their own assumptions about how detailed and specifi...
 •  0 comments  •  flag
Share on Twitter
Published on November 29, 2020 10:35

June 28, 2020

It's probably time to stop recommending Clean Code

Blog » It may not be possible for us to ever reach empirical definitions of "good code" or "clean code", which means that any one person's opinion about another person's opinions about "clean code" are necessarily highly subjective. I cannot review Robert C. Martin's 2008 book Clean Code from your perspective, only mine.

That said, the major problem I have with Clean Code is that a lot of the example code in the book is just dreadful.

*

In chapter 3, "Functions", Martin gives a variety of advice for writing functions well. Probably the strongest single piece of advice in this chapter is that functions should not mix levels of abstraction; they should not perform both high-level and low-level tasks, because this is confusing and muddles the function's responsibility. There's other valid stuff in this chapter: Martin says that function names should be descriptive, and consistent, and should be verb phrases, and should be chosen carefully. He says that functions should do exactly one th...
 •  0 comments  •  flag
Share on Twitter
Published on June 28, 2020 11:28

January 3, 2020

Refactoring The Rise Of Skywalker

Blog » As a first draft there are a variety of fairly simple, fixable problems with this movie and a few major core problems which we're going to have to discuss at greater length. You're an experienced writer at this stage, so you know what the editorial red pen is like, so let's just get right into it. We'll cover the simple stuff first.

*

D-O doesn't do anything, scrap it. It just wastes screen time. That's an easy edit.

Finn says he has something to tell Rey but gets cut off. We never find out what it was. So how about this: edit those lines out completely and forget about it.

Palpatine wants Rey to become a vessel for him in the conclusion of the movie, so the line at the beginning where he tells Kylo Ren to kill her should probably be cut.

This whole subplot with Hux being a spy, exposed by Pryde, killed and replaced by Pryde is pointless. Axe the spy subplot, axe the Pryde character and give all his lines back to Hux. Figure out another way for our heroes to evade execut...
 •  0 comments  •  flag
Share on Twitter
Published on January 03, 2020 16:06

January 2, 2020

cripes does anybody remember Google People

Blog »

cripes does anybody remember Google People— qntm (@qntm) 21 August 2019

it existed for like fifteen minutes between Orkut but before Google+, and had the wildest features like your profile image had to be smiling. "No, wider," it would say. Sometimes it would just accept a frowning image and modify it to be smiling— qntm (@qntm) 21 August 2019

Sometimes it would fill in personal details automatically? Hair colour, occupation. The weirdest one was date of birth because it was always really close to being accurate, but off by a few days— qntm (@qntm) 21 August 2019

and suggest familial relationships with other users you'd never heard of before. "We think this person: is your father"— qntm (@qntm) 21 August 2019

they did this thing where if you gave it access to your emails it would scan them and figure out which of your contacts had died, and then silently create profiles for themthese...
 •  0 comments  •  flag
Share on Twitter
Published on January 02, 2020 05:30

August 11, 2018

Based On A Twitter Thread About Worldbuilding

Blog » A picture is worth a thousand words, so let's start like this:

[draws a big circle]

This is the fictional universe which you created. It should have solid fundamentals and internal consistency. You should be able to answer most sensible questions about it.

[draws a much smaller circle inside it]

Your story will only cover this bit.

*

By "you" I mean "me". You can write whatever, however the heck you like. But I've found this approach to work for me.

Why do we worldbuild?

I can think of two major answers to this question. One is consistency.

In most cases it's desirable to avoid genuine contradictions wherever possible in a story. Direct contradictions (a character's eye colour changes from one chapter to the next) are relatively avoidable. What's harder to avoid are the contradictions which arise if the audience just asks "Why?" a few times.

When an audience is nicely engaged with a story, some of that audience, the curious ones, will start asking follow-up questions which l...
 •  0 comments  •  flag
Share on Twitter
Published on August 11, 2018 17:12

December 19, 2017

Stomp on the mystery box

Blog » First, go and watch The Force Awakens and The Last Jedi.

J. J. Abrams has this storytelling device which he uses, which he calls a "mystery box". Me just telling you those two words, and then pausing for a little while as you think about all of the works of J. J. Abrams you've ever seen, might be enough for you to work out what a "mystery box" is all by yourself.

The basic idea, upon which he elaborates in this TED talk, is that you, the writer of the story, construct an elaborate mystery which causes the audience to ask questions. You construct figurative or, quite commonly, real impenetrable barriers in the story — an opaque "box" — and don't show what's inside the box, and then you make it really important to know what's inside the box. A few great examples are:


the locked hatch in the first season of Lost
the purpose of the works of Milo Rambaldi in Alias
Rey's parentage in The Force Awakens
Snoke's identity and origins in The Force Awakens


Having constructed this mys...
 •  0 comments  •  flag
Share on Twitter
Published on December 19, 2017 13:01

qntm's Blog

qntm
Follow qntm's blog with rss.