Design Patterns

It is sometimes suggested by well-meaning language enthusiasts that "My language is complete and powerful, so design patterns don't apply here!" Sadly, they are incorrect.

Design patterns happen in every language. The "Gang of Four" Design Patterns book just collected the ones observed in Smalltalk, and ported them to C++, later rewrites to Java, etc. These are not recipes to blindly follow, but examples meant to show you how to find and regularize the ones in your code.

It's somewhat difficult to see them unless you've read Christopher Alexander's books, and written a lot of programs in some language, and specifically looked for the places where you repeat a structure for livability's sake. Just as it's hard for an architect to make a path where people will want it, unless they first observe how people live and get around that space, and then convert the ad-hoc trails people follow into paths.

Smalltalk is an extremely expressive language (it failed in the market because every ST program is IDE-specific), it has closures, allows you to very trivially make new control structures; it doesn't need a hack like macros because the entire language is that freeform. And this is where the GoF authors observed these paths being made by themselves and other developers, not just in limited BDSM languages like Java.

So, a little light reading:

Harry Potter Contains Actual Curses and Spells, Says Local Idiot

"These books present magic as both good and evil,
which is not true, but in fact a clever deception.
The curses and spells used in the books are actual curses and spells;
which when read by a human being risk conjuring evil spirits
into the presence of the person reading the text"
—Dan Reehil, soi-disant "reverend"

This is a thing an adult Human, supposedly in charge of "educating" children, wrote in the 21st Century. This person actually believes that magic and evil spirits exist, that a series of children's books actually let you violate physics and produce effects with no cause by waving around a stick and saying some Latin doggerel. Which is at least consistent if stupid, since Catholic doctrine is that saying Latin doggerel over wheat crackers and wine turns them into manflesh and blood. If his lunatic premise was correct, we would be in the middle of a magical apocalypse the likes of which the Book of Revelation would say is "too much, man". Any child in this idiot's care is being misinformed and mentally abused.

Stop treating this nonsense as if it's a valid opinion. End religion. Ban the Bible, or at least replace it with Asimov's Guide to the Bible. Read more fantasy novels with the understanding that they're fiction.

What I'm Reading: Space Prison, by Tom Godwin

More commonly known for his short story "The Cold Equations", which has been infuriating people who think life is fair and kind for 65 years, he wrote a number of other novels and short stories. I've read this probably 20-30 years ago, but not as a single piece since then.

Spoilers ahead, go read the book, it's VERY short, a novella by modern standards.

Earth is being blockaded by an alien empire called the Gern, a colony ship of 8000 is sent to a newly-discovered planet Athena with rich resources which can be used to make weapons protecting Earth. They're defeated and half the population are set down on an inhospitable high-gravity planet Ragnarok, the other half taken as slaves to Athena to work for the Gern.

The Gern (derived from Hugo Gernsback?) caricature is, uh, problematic:

"The were big, dark men, with powerful, bulging muscles. They surveyed her and the room with a quick sweep of eyes that were like glittering obsidian, their mouths thin, cruel slashes in the flat, brutal planes of their faces."
… (much later) …
"Narth, like all the Gerns, was different from what they had expected. It was true the Gerns had strode into their town with an attempt at arrogance but they were harmless in appearance, soft of face and belly, and the snarling of the red-faced Narth was like the bluster of a cornered scavenger-rodent."

Well. And none of the Earth people are described in any racial way, except one Germanic psychopath.

As for the Humans, most of the "rejects" left on Ragnarok die in the first few days and are whittled down over years to 49, before the new generations acclimated to the gravity and atmosphere, harsh conditions, and carnivorous diet increase back up to 6000+ over another 200 years, which requires a rather high birth rate and low death rate; I don't think it's quite plausible.

It's notable that the first viewpoint character is a woman. She doesn't last long, and after that few women even get to speak, only one about anything except babies, and most of them die young. The final state of the Ragnarok barbarians is a totalitarian tribal society where women and children hide in caves, men go fight; the women are physically and mentally competent, as shown in one animal fight scene late in the book, but not consulted in war.

The transmission of knowledge, in a handful of books somehow written and preserved by these not-quite-paleolithic barbarians, is exceedingly implausible. They make technical and scientific leaps which would be extraordinary in societies of billions, let alone a few thousand. Meanwhile neither Earth nor the Gern make any technical progress in the 200 year course of the book, allowing ancient written knowledge of their blasters and ship systems to help 10th generation barbarians.

I'm not going to criticize a book from the '50s for having FTL drives and communications, but I roll my eyes at it anyway, especially when they propose building spaceships and FTL communicators with stone knives & prowler-skins, as it were.

Native life of Ragnarok consists of: Prowlers (wolf/big cat type hunters), Unicorns (psychotic bison with one horn), Wood Goats, a few species of small and large scavengers, and Mockers (telepathic squirrels), and plants not dissimilar to Earth. It's not much of an ecosystem, and is never explained sufficiently. To some extent, Godwin didn't understand the ecological energy pyramid. I have an untested, almost unsupported hypothesis that the erratic orbits of Ragnarok and its suns may be a post-apocalyptic situation, where these are the few survivors of a more complex ecosystem; that would help explain the intelligence of the few survivors.

They have a series of strong male leaders, willing and able to execute anyone who doesn't share everything with the group, are incorruptible, and single-minded on survival and the long-term ideal of defeating the Gerns. This is, to be blunt, maybe the least plausible thing. I can buy one or two such leaders, but getting a third is beyond impossible. Humans fuck everything up with politics and religion, there's no way they wouldn't.

The barbarians do make good use of all their resources, despite an almost total lack of metals on the planet. And yet at no point are cannibalism or hierarchical resource distribution discussed, which are the usual Human solutions to extremely tight resources. The Aztecs would be very disappointed in Ragnarok.

The rapidity of them adapting to spaceship technology and developing a new tactic against an ancient spacefaring empire is very unlikely; ridiculous, even.

And here's the thing, most of this I can criticize as unrealistic. But the idea of a Hell world breeding up super-soldiers who then seize power from the civilized and establishing their own Empire, that's an idea that appears in many other places.

Historically, the Spartans tried to make this work, despite being in one of the most fertile and pleasant places on Earth, and did make superior warriors… at a cost of crippling their economy and culture, and eventually twice being defeated by coalitions of everyone else in the region who hated them for it.

Germanic barbarians lived in much more difficult environments and had more meat-heavy diets than the Romans, and were physically more powerful; but that generally didn't help them win wars against civilized people until Rome started collapsing for internal reasons (maybe lead pipes, but just as much the abandonment of military traditions by filthy ignorant Christians).

The Zulu Empire rose with Shaka Zulu and his Spartan-like ideals, and almost immediate collapse after his murder by his idiot brother. South Africa ranges from Hell world to some of the most fertile places on Earth, so there wasn't an environmental pressure, only one strong leader.

So the reality of this idea does not work.

In Dune, obviously, with both the Fremen and Sardaukar. The Fremen women, unlike the Ragnarok barbarians, fight like the men do, and Leto II's Fish Speakers, descended from both Fremen and Sardaukar, are all women. Herbert revisits this in The Dosadi Experiment, though the Dosadi survivors are more politically treacherous than superhumanly dangerous.

Harry Harrison's Deathworld series has easily the most dangerous planet, vaguely habitable but every form of life trying to kill invaders, but the successful colonists adapt to the environment, rather than trying to fight and control it.

I honestly don't know how to rate this. It's a very enjoyable read, but there are so many cultural, literary, political, ecological, and technical things I object to that it shouldn't pass.

★★☆☆☆ / ★★★★☆ depending on how I think about it.

There's a sequel, The Barbarians, which I'll likely read soon, and see if that addresses anything or makes it worse.

What I'm Reading: Lord of the Fantastic: Stories in Honor of Roger Zelazny

"I took it with equanimity, however: I've long known that fortune's a whore and life itself a kind of stupid muddle. I am not a religious man. Far from it. I hold, if anything, a belief which I believe was once ascribed to the Gnostic: that Satan won out over God, not the other way around, and the Dark Prince runs things in the dismal and disastrous way that suits his nature. I knew that everything was just chance and bad luck, in a universe in which things were stacked against us and even our ruling deity hated us."
—Robert Sheckley, "The Eryx"

Great little anthology, Walter Jon Williams' "Lethe" in particular hits a Zelazny note (not the first time; his Ace Double "Elegy for Angels and Dogs" sequel to Zelazny's "The Graveyard Heart" is fantastic), "The Eryx" is the kind of wiseass story Sheckley told in all his work, with a little Zelazny mysticism. Some of these are more poetic fantasy than I'm really into, but that was also Zelazny's thing.

  • Lethe, by Walter Jon Williams
  • The Story Roger Never Told, by Jack Williamson
  • The Somehow Not Yet Dead, by Nina Kiriki Hoffman
  • Calling Pittsburgh, by Steven Brust
  • If I Take the Wings of Morning, by Katharine Eliska Kimbriel
  • Ki'rin and the Blue and White Tiger, by Jane M. Lindskold
  • The Eryx, by Robert Sheckley
  • Southern Discomfort, by Jack C. Haldeman II
  • Suicide Kings, by John J. Miller
  • Changing of the Guard, by Robert Wayne McCoy and Thomas F. Monteleone
  • The Flying Dutchman, by John Varley
  • Ninekiller and the Neterw, by William Sanders
  • Call Me Titan, by Robert Silverberg
  • The Outling, by Andre Norton
  • Arroyo De Oro, by Pati Nagle
  • Back in "The Real World", by Bradley H. Sinor
  • Mad Jack, by Jennifer Roberson
  • Movers and Shakers, by Paul Dellinger
  • The Halfway House at the Heart of Darkness, by William Browning Spencer
  • Only the End of the World Again, by Neil Gaiman
  • Slow Symphonies of Mass and Time, by Gregory Benford
  • Asgard Unlimited, by Michael A. Stackpole
  • Wherefore the Rest Is Silence, by Gerald Hausman

What I'm Reading: Perihelion Summer by Greg Egan

Here's your light summer reading!

Cosmic catastrophe, in this case a close fly-by of a black hole Taraxippus, has long-term consequences for Earth's climate, and people on a rickety fish-farming ship try to survive and make the best use of it.

It's hard not to directly compare this to Neal Stephenson's SevenEves, which was terrible: That had ludicrously bad physics (hint: planets in collisions don't work like concrete hit by bullets, but more like water balloons), then ludicrously bad planning, then ludicrously bad genetics leading into full-on magical fairy tales. But what it also reminds me of is Neal Stephenson's Zodiac, an excellent book from back when he could write a tight story about science and then let an editor edit the manuscript.

Perihelion Summer, on the other hand, is written by someone who can do math and science. So the means of tracking the black hole makes sense, the physics of the catastrophe make sense.

It's also mercifully short, though that sometimes comes at a cost. The initial crew of the Mandjet (one of the ancient Egyptian names for the ship of the Sun) is small, but poorly described; and having both Arun and Aaron in the crew is a little confusing. Egan's never been strong at dialogue, does his characterization through actions and scientific discovery, which needs more page count. The action moves forward in time rapidly, letting us deal with the consequences now rather than in hundreds of pages.

Matt said, “Let me start by saying that if we end up in prison, I promise to install ceiling insulation and double glazing in all of your cells.”

The coming apocalypse and the migrations necessary to survive, are what this is all about. Part of this is Egan's perspective in the Southern hemisphere, which already has a terrible temperature gradient and Australia's genocidal immigration policies; if that gets worse, billions die. And not entirely off-page like so many other catastrophe books.

“But however vast the fleet, however crowded the decks and holds of every fleeing vessel, they would always be outnumbered by the ones they’d left behind.”

The American solution to some of the problems isn't the Southern solution, which changes the tone quite a few times.

The ending's a bit abrupt. I'm still very pleased with it.

★★★★★

Functional Thinking Books

AI Just-So Stories

Couldn't remember a story reference, so collecting a few of these to make finding them again easier.

How to Read a Peter F. Hamilton Book

There's a new PFH book, Salvation, I'd like to get to reading. Before that, I have a tsundoku in iBooks. So now's the time to read the Dreaming Void trilogy; these are sequels of sorts to Pandora's Star (excellent book about a really horrible alien, read long ago), and Judas Unchained (remember less than nothing about it; did I even read it? Maybe I was drinking a lot).

But there comes the rub: You can't just read a PFH doorstop. No, you need to study it, and take notes like a college class, because the concept of focusing on one protagonist and telling a linear story isn't his thing. If it was hard to write, it should be hard to read, is his philosophy.

At 17% through The Dreaming Void, I have the following notes (in Apple Notes so I can edit them anywhere); probably SPOILER, but a good example of my process. For dead tree books I made longer notes on everyone, with page refs, but since you can search iBooks there's no need anymore.

Dreaming Void

Places, Reality

Centurion Station: Near the Void
Ellezelin: Living Dream planet, Makkathran2 city.
Arevalo: Central Commonwealth planet, Higher. Daroca city.
Far Away: Base of the Starflyer
Lytham: Central world far from Earth
Oronsay: External world 100LY from Central
Fandola:

Places, Void

Querencia: Void planet
Makkathran: Main city
Ashwell: Smaller city

Species

Human: Higher, Advancer, Natural
Prime, Starflyer: Mind-controlling aliens
Anomine: Trapped the Prime
Golant: Humanoid
Ticoth: Predators, herds of prey
Suline: Aquatic
Ethox: ?
Forleene: ?
Kandra: ?
Jadradesh: ?
Raiel: Ancient, discovered the Void
Ocisen: BEM. Opposed to Pilgrimage
Hancher: Protected by Humans, enemies of Ocisen

Groups

Commonwealth:
ANA: "Advanced Neural Activity", mind pool of dead Highers
Free Market:
External:

People, Reality

Ozzie & Nigel: wormhole inventors
Inigo: First Dreamer
LionWalker Eyre: director of Centurion Station
Aaron: Blank on Makkathran2
Ethan: Conservator of Living Dream
Lady, Bad News: ?
Chief Cleric Phelim: Ethan's secretary
Corrie-Lyn: Inigo's former lover
Marius: ANA representative
Troblum: Starflyer fanboy, Higher
Mykala: 
Eoin: 
Yehudi: 
Kazimir Burnelli: First Admiral
Delivery Man:
Justine Burnelli: ANA representative
Gore Burnelli: ANA, old boss
Nelson Sheldon: ANA, security, Gore's co-conspirator
Araminta: Waitress, Niks, Colwyn City

People, Void

Waterwalker: Entered the Void
Skylord: ?
Akeem: Eggshaper
Edeard: Eggshaper apprentice
Salrana: Priestess

What I'm Reading: Software/Wetware by Rudy Rucker

I must've read Software on release in 1982 or in the next year; heavy stuff for a 12- or 13-year-old little mutant Mark. I've reread it a number of times since, and got more out of it each time. This time, it's notable how short and fast it is for so much information.

I guess I should mention, since some people are neurotic about this, there's a lot of sex, drugs, nudity, more sex, really weird drugs, cannibalism, and bodily functions. Also a lot of violence, but the people who are most neurotic about harmless, consensual sex or drugs seem to think murdering people is fine, respectable behavior. This is why you Humans freak me out and repulse me.

Software (1982): Cobb Anderson goes from crusty old drunk to immediately going along with ("waving") the Boppers' (AI robots he created and then freed from Asimovian slavery) plan to immortalize some Humans by the messiest process possible. Sta-Hi Mooney's given very short shrift here, much of what I remember of him actually comes from the next book.

The Bopper architecture and programming are discussed in depth, and the Little Boppers' war on the Big Boppers (centralization instead of anarchy) is surprisingly, pointedly relevant to current reality for a 36-year-old book. Since the book is set in 2020, and Cobb made the Boppers for Lunar mining, uh, we're WAY fucking behind on space and robotics in our shitty timeline.

The religion Personetics is super obvious as a scam, and yet Humans really fall for Dianetics (in my OMNI rereads, Dianetics is advertising every issue with this faux-serious tone), or for that matter any religion, which are all just scams to take your money and control you. And then everything goes sideways, lack of backup systems and over-controlling middle management ruin everything. Fin.
★★★★★

Wetware (1988): I read this just going into college to fuck my brain up. Probably haven't read the whole thing since then, skimmed it in parts. The first half following Sta-Hi, er, "Stahn" Mooney and a number of boppers in a city stolen from the boppers on the Moon, is great. FANtastic, full of weird drugs, sex, murders, people with rats in their heads. The Boppers are desperate and vindictive here, war and evolution pushing them to the edge.

Second arc about Della and her new "son" on Earth is annoying, weird, and… As Cobb says, "Della's parents are jerks, I'll tell you that much. What kind of couple is named Jason and Amy?" Cousin Willy Taze screwing around (sometimes literally) with AIs is the only redeeming part of this entire shitty set of chapters. The Gimmie (easily the best name ever for the Federal government) reacts only with murder and fear, like usual. While I mostly agree with the principles of "Manchile's Thang!", the free love equality cult, I dislike every part of the delivery.

Third arc back on the Moon, and the end of the Boppers, seems a little formulaic crime drama for a while, until it gets into what price Stahn's willing to pay for revenge and to recover his wife in any form. The weapon used is interesting; as our chips get more complex, side attacks like that look more practical. The moldies and Happy Cloak's return are all friendly and heroic here, which is… not how it'll be in later books.
★★★★☆

The first book is under 180 pages, and it flew past in a couple days; it's dense but fast, a lightspeed bullet to shatter your brain. Second's just over 200, feels much longer, and took me a couple starts; most of the good parts in 5 days, but then after the second arc I paused a couple weeks. Freeware is 300. Realware is another 315. And I recall these aren't any less dense. May need some lighter fare first.