GUI Error Handler for PyQt 5.x

When I was developing programs with PyGTK, one of my favourite little things to include to make life better for users was a drop-in helper named which adds a GUI traceback handler for uncaught exceptions.

Well, I finally got around to porting it to PyQt 5.x for one of my more recent projects, and I’ve named it (what else?)

The original was under “The license is whatever you want.” terms, so, out of respect of the original author’s intentions, I’m releasing the port into the public domain rather than putting it under a permissive license (eg. MIT) like I usually would for a something like this (simple, and I want everyone to use it).

I’ve also done a lot of refactoring to make it more maintainable.

Admittedly, there’s still a little more I’d like to do, and it doesn’t have any automated tests yet, but manual testing seems to give it a clean bill of health and I added a fallback so that, if the most complicated code does contain a bug and that bug triggers an exception, it’ll fall back to a more primitive exception-formatting mechanism (plus a traceback for the more advanced code) rather than failing entirely.

Finally (and, from a user’s perspective, most importantly), I took the liberty of splitting out the old email-based option for one-click reporting of bugs into a callback so you can swap in something more modern (eg. like an HTTP POST) if you so choose.

The code contains a working if __name__ == '__main__' example which can be switched between no callback and localhost-based e-mail reporting just by swapping some comments, so it should be pretty self-explanatory. Enjoy. 🙂

Posted in Geek Stuff | Leave a comment

GIMP Plugin to Automate Setting up to Colorize Manga Pages

I’ve been making a push lately to try to get things cleaned up around here, and I came across an old GIMP plugin I slapped together when I decided to try my hand at colorizing manga pages.

The approach you take will depend on whether you’re dealing with line art (blacks stay black and white regions becomes color) or photo-like grayscale (whites stay white and black becomes color).

I won’t go into too much detail on the approach for photo-style images, but a common technique suggested in tutorials is to set a layer to the “Screen” blending mode and place it above the original image. You can then paint into it to change the hue and saturation of the pixels while leaving their intensity alone.

For line art, where you want the blacks to stay black, but fill in the white and half-toned regions with good-looking color, the technique I learned involves applying “Color to Alpha” to the source image, then painting under it. The blacks stay black, anti-aliased edges blend cleanly, and halftones Just Work™ as you paint in the colors.

…but setting up to do it “correctly” (ie. non-destructively, so you can easily go back and correct oversights) gets tedious when you have to do it for more than a page or two.

This GIMP plugin will set up all the layers necessary so that you can just start selecting regions and filling in colors as you please. Just install it, restart GIMP, and choose “Start Colorizing…” from the Image menu.

I also attempted to eliminate as many sources of annoyance as I could while using it:

  • The plugin will automatically switch the image to RGB mode if it started as Grayscale or Indexed color.
  • The plugin automatically runs “Color to Alpha” on the line art, then sets up a Colors layer beneath it. (This is
  • The original image is kept, unmodified, hidden under an all-white background layer as an alternative target for selection-defining operations which don’t like transparency.
  • All layers except Colors start out locked to minimize the chance that I’ll wind up having to undo some edits because I wound up modifying the wrong layer without noticing.
  • A half-opacity “Fluids” layer is added so that fluid colorizing good enough for all the cases I ran into is as simple as painting some pure white on top of your existing color.
  • A separate “Blush Lines” layer is provided and a decent default red is provided in the “Blush Lines Color” layer using the Screen-based approach. Just cut-paste the blush lines into it and they’ll turn red.
  • For adding a soft glow to the blush, just select the blush lines, grow and feather the selection as appropriate (I think I feathered to 20 pixels back in the day), and then bucket-fill the “Blush Lines Color” into the “Blush Glow” layer.

Windows users will have to look up where to put it, but, on Linux, I installed it at
~/.gimp-2.8/plug-ins/ It shouldn’t do anything platform-specific though.

The script is up on GitHub Gist if the embed doesn’t work.

Posted in Geek Stuff | Leave a comment

Fanfiction – Harry Potter and The Iron Lady

For today’s fic, a little something I found because someone else thought I already knew it. Thanks a bunch, Aura Of The Dawn.

Harry Potter and The Iron Lady by mugglesftw

This is a story that had such potential for me to love it, and has a ton of excellent writing… but then messes it up because the author didn’t see what was trying to develop.

The plot starts simply. Suppose Ron Weasley’s squib uncle decided to join the military instead of becoming an accountant, and a chance encounter gave Margaret Thatcher’s frustration at Voldemort’s first reign of terror an outlet. She founds the “Committee of Magical Affairs” (or “Maggie Works” as its members originally from the military take to calling it) and things progress from there. They quickly discover Harry Potter’s situation and one of their members offers to adopt him, since he and his wife had been wanting a second child but the risk of complications in childbirth might kill her.

Up until Quirrelmort is forced to act early during Harry’s first year at Hogwarts, this works beautifully and it has two major aspects which make it especially unusual and satisfying for me.

First, it’s a story that goes above and beyond to make characters interesting. For example, Professor McGonagall’s obsession with quidditch is fleshed out with appropriate bits of flavour text. We also get to see this little treat during a snowball fight:

“We should just surrender,” Hermione said, shivering slightly in the cold .
“The Irish never surrender!” Seamus bellowed, managing to hit Fred with a snowball before he was beaten back under a deluge of icy missiles.
“But we’re not Irish!” Hermione said, dragging Seamus back to safety.
“Speak for yourself!” Neville yelled as he began digging in the snow to form a new barricade and switching to an Irish lilt. “Me mum’s maiden name was Murphy!”
“I knew there was a reason I loved you Neville!” Seamus sputtered, wiping the snow off his face.

Snape is probably the most interesting case of this, because he’s believably cast as a character you can like, without him having met Harry before he comes to Hogwarts, and without Harry having a terrible home life.

He’s still acerbic and self-interested, but didn’t let his hatred of James Potter blind him from seeing the true nature of this Harry who insists on going by his adoptive parents’ family name rather than Potter.

Likewise, when he manages to suss out the little conspiracy that Harry’s a part of, he sees a potential “third option” which won’t leave him trapped between an insane madman and a barmy old fool. It’s all done in a believable way and his loyalty to Lily’s memory over either of his supposed masters is done in a way which feels much more satisfyingly realistic than in canon, where the focus on Harry’s perception of him really crippled Rowling’s ability to develop him as a character.

The second thing this first act does well is that it’s a story explicitly focused on merging the two worlds.

Harry’s adoptive father, being an SAS member and part of the Maggie Works has raised him as most fanfic authors would expect a properly on-the-side-of-good Dumbledore to. He had a good childhood, but he was given martial arts lessons from a young age, as well as carefully supervised shooting training, and he was given ready access to superhero comics likely to give him the right outlook on his abilities.

As a result, by the time Harry is told that he’s adopted at age 8, and that he’s a wizard, they’ve developed mechanisms for hardening electronics against magical interference and Harry winds up seeing his abilities with an appropriately childish but responsible view: Like superheroes such as SpiderMan, he’s an ordinary person with special abilities and it’s his responsibility to use them to help others.

However, that isn’t at the front of your mind when you’re reading the story. (Which is a good thing because I’m rather tired of “super Harry” stories.) More time is spent on Harry either changing people’s minds or provoking people by like Draco Malfoy by threatening their flawed worldview, and his interactions with his friends.

Examples of that include introducing Ron and his siblings to non-magical entertainment like Tetris on Game Boy when they visit and Harry asking his parents to owl over his book on the Apollo missions, which causes a stir with Draco and rekindles Fred and George’s childhood obsession with space.

He also integrates Hermione into the group early, when Ron sees her use a knockback jinx against Draco and his goons on the Hogwarts Express, and befriends Neville Longbottom. I’m not sure what the magic ingredient is, but I find the resulting “golden four, not golden trio” dynamic that develops to be both quite satisfying and oddly unique.

The story puts a lot of effort into being familiar to canon, yet original… something both rare and the mark of an author who has skill in spades. From the troll being defeated by confusing it with repeated uses of Scourgify until Snape arrives, to McGonagall and Snape successfully pressuring Dumbledore to deal with Quirrelmort early and Harry’s friends being present for the drama while Harry is elsewhere and unconscious, the events leading up to Chapter 17 really do feel like a plausible alternative series of dominoes that could have fallen, given the small change at the beginning.

I’d also like to mention a few other details I have yet to see anywhere else:

First, the antagonistic relationship between Harry and Sirius. I think this is the first time I’ve ever read a decent fic where they’re at odds because Sirius refuses to accept that Harry sees two muggles as his real parents to the point where he changed his name.

Second, showing a werewolf’s first full moon from their perspective. (I won’t say who, because it’d be a spoiler.)

Third, this brilliantly creative little quote:

Ginny just shrugged. “Who knows? Luna knows all kinds of things that she probably shouldn’t, because her father doesn’t really monitor what she says or does. Do you know, he put her in muggle school for a few weeks, then forgot about it and my dad had to send in the obliviators everyone because they thought a child was missing?”

(Why is it that the typos always seem to prefer to show up in the most quotable bits?)

Broadly speaking, when it comes to the good parts, I’ve read various stories which incorporate the elements it uses, but none as satisfying. All the others either don’t go far enough, or implement them in too crude a manner.

The problems start to mount around chapter 15 when Quirrelmort is forced to make a break for it… and kills three named characters.

Don’t get me wrong. I’m not one of those people who is categorically against killing off named characters… but it just feels shallow and sloppy. From this point on, the story gets worse, then better, then much worse, because “upping the drama” crowds out everything that made the chapters before so special.

It also doesn’t help that the author seems to fundamentally misunderstand the nature of the Harry Potter setting. Rowling worked very hard to leave things like religion in the HP setting up to the reader’s imagination, with the few elements that one would associate with religion being a self-neutralizing mish-mash of secular contemporary elements and things you’d expect to keep pagan beliefs alive. (eg. Ron Weasley saying “Happy Christmas, Harry” and being focused on the presents rather than talking about Yule, while things like ghosts and the Deathly Hallows suggest that, if anyone’s right, it was the pagans.)

Most good fanfiction authors (and even the mediocre ones) either preserve that feel or build a suitably canon-compatible conception of “wizarding paganism”. This story, on the other hand, is clearly written by a Christian who didn’t stop to think about whether the elements of their faith would be compatible with the elements shown in canon.

For example, chapter 18 feels like a phoned-in Christmas special of sub-standard writing quality and, aside from the Weasleys using “Merry Christmas” multiple times and acting as if they were at some kind of non-magical vernacular cram session while off-camera, they also talk about “praying for” people… something that lends a distinctively “American Christian” feel to these British members of a minority who were canonically persecuted by Christians. (See “Witch Burnings”)

Yes, the latter half of the chapter is spent with muggles who are probably Anglicans, but they’re still saying “Merry Christmas” rather than “Happy Christmas” like muggle Brits do and, given that things like the bible are never mentioned in HP canon, which does depict Christmas, it still feels gratuitous and unnecessary and contributes to making the chapter feel out of place. My advice is to just skip it. You won’t be missing anything important as far as I can tell.

(To be honest, the overall writing quality of chapter 18 compared to earlier chapters with similar elements sort of reminds me of the difference between Rick Cook’s The Wiz Biz and its sequels. He wrote something great, but then didn’t properly understand what made it so special, so the sequels feel like cheap cargo cult copies, matching the superficial details of their successful predecessor, but without the deeper underpinnings which made it work.)

Now, the good thing is that the Christian stuff is shoehorned in and the story wouldn’t feel like it’s missing anything if you were to copy the text into your favourite word processor and delete all mentions of God, the church, and prayer. The bad thing is that, if you don’t, there is a really problematic bit where the author arbitrarily adds holy water to the list of things that can destroy a horcrux, but then writes it out for being known to strip away a wizard’s magic and, thus, kill them.

I could write an entire blog post about how fundamentally broken an idea that is in the Harry Potter setting, but, in the name of brevity, I’ll just say that it reminds me of a particularly sick and twisted piece of rhetoric from American Christians that basically says “If you use God’s power to murder someone, you’ll go to heaven. If you use magic not of God to heal someone, you’ve earned eternal damnation.” (That is, that even the most sick and depraved things are moral if God says so, but power not from God will damn you no matter how virtuous a use you put it to.)

I’m also worried about how the author presents a conclusion Dumbledore and company have jumped to that Harry gave up The Potter Family Magic™ and made Neville the Boy Who Lived when he took on his adopted family’s name. It’s bad enough that unbreakable vows exist in Harry Potter canon (where there’s ceremony and some degree of knowledge that you’re making a consequential decision) without doubling down on what makes them a problem. I’ll admit that it’s possible that Dumbledore and friends are mistaken and grasping at straws, but the way reminders of it are paced makes it feel more like foreshadowing. Leave this “names have power that you can use to hang yourself without realizing it” stuff to settings like The Dresden Files which are supposed to be inherently dark. (Especially when it’s such a stupid idea to imply that all canon Harry had to do to achieve being “just Harry” like he wanted was to literally cast off the Potter name at the horrendous cost of “becoming ‘just Harry'”.)

However, fundamentally, the problem with the story is that it has three phases: Great, Good, and Mediocre… in that order.

After Quirrelmort makes a break for it, the story just isn’t the same. The parts which showed the most promise (like the battle of ideas between Harry and Draco, the Weasley Twins’ interest in rocketry, and introducing Harry’s friends to the muggle things they’ve been missing out on) get crowded out, some parts (eg. chapter 22) feel rushed, and the plot swings in a direction that I’ve already read a million times before and grown tired of.

Then, near the end, it kicks out into open war against the Voldemort-infiltrated ministry and muggle Britain’s emergency broadcast provisions are used to shatter the Statute of Secrecy.

I will have to admit, despite not being the “Military, F*** Yeah” type, I did find it satisfying to see the incredibly rare twist of having open conflict break out between a secret branch of the British muggle military and aurors sent by the Voldemort-infiltrated Ministry of Magic. However, while it is satisfying in the moment to see the muggle side uses their emergency broadcast provisions to shatter the Statute of Secrecy, I’ve yet to see a fic which survives such a drastic change. Given that the final author’s note makes it clear that the sequel will be even more different, I’m not sure if it would interest me but, if I do decide to read it, I don’t have high hopes. Even before you include the implications of all-out world war, chapter 52 is already feeling far too similar to various other fics I read and found wanting. (Mostly male power fantasies with horribly simplistic views of human nature and the causes of our social problems which enable the hero to become a benevolent dictator.)

When you break from canon that drastically, you “cut the umbilical cord”. Just counting the ones that are either pure Harry Potter or have it as the primary story in a crossover, I’ve read over a thousand of these fics and only one of them readily comes to mind as being written with the requisite skill to pull that off and survive. (The Pureblood Pretense series)

That said, I can at least try to analyze the problem, and it seems to stem from three issues: First, it’s just plain difficult (possibly impossible) to properly prepare readers for such a drastic shift in the kind of story that’s being told. Second, when you have a story that’s had this kind of character focus, it’s like threading a needle to acknowledge something of such a massive scope as the outbreak of a world war while still maintaining a healthy character focus, and this didn’t feel like it pulled that off. Finally, Harry Potter fanfiction is almost universally written around a worldview that works in pure fantasy and some kinds of science fiction, but is unacceptably simplistic when applied to a contemporary setting where history and personal experience make it abundantly clear how complex human society is.

The story would have flowed much more naturally if chapter 52 had been omitted and the relevant details were fed to the reader slowly, as they were made known to Harry and company. Heck, the best solution would have been to follow the slow-burn progression in the Queen Who Fell To Earth series. It’d have allowed what worked so beautifully about the pre-Quirrelmort chapters to continue to shine.

I think the biggest thing the story does get right is the amount of time and effort spent on characters and ideas who/which were present in canon, but could have been developed more. I didn’t notice many technical errors, but there are a few. The most consistent one seems to be using “Mrs.” to address or refer to characters like Nymphadora Tonks when “Ms.” seems to have been intended.

Overall, I think I have to give it a 3.7 out of 5 (0.7 on a more intuitive scale from -2 to +2). The early stuff is at least a 4.5 out of 5, chapter 18 is a 2.5 out of 5, what follows is more of a 4.0 out of 5, and the breakout of hostilities at the end is a 3.5 at best.

(While the early stuff has a spark and uniqueness, the drama which takes the forefront following Quirrelmort’s break lacks that spark and isn’t particularly novel, regardless of how well-executed it is.)

If it weren’t so easy to edit out the out-of-place religious stuff without leaving any traces that something had been removed, I’d have rated it even lower.

Posted in Geek Stuff | Leave a comment

Novel – Eon

UPDATE 2019-05-18: I found some other notes I’d lost under a pile of other TODOs and have revised this again with more critiques of specific details.

Branching out, I thought I’d share my thoughts on some non-fan fiction I’ve been reading:

Eon by Greg Bear

While it may seem ironic (If you’re not familiar with leanings of the user base) I was actually introduced to this novel in the comments to a My Little Pony crossover named The Long Trot. (A sadly far-too-incomplete crossover with Pratchett and Baxter’s The Long Earth, which has also been added to my “to read” list.)

The basic plot is that, in the year 2000, in a timeline where the Soviet Union never fell (the book was written in 1985), an asteroid appears from a flash of light in the outer solar system and manoeuvres itself into orbit. When we go up to investigate it, we find that it’s been hollowed out into multiple chambers, containing two abandoned cities, machinery to keep it habitable… and a rearmost chamber that stretches on into infinity. A pocket universe unto itself. (later revealed to be known as “The Way”)

As a teaser, I’ll quote the ending of the fourth chapter, given that none of this is a spoiler, being summarized on the back-cover synopsis:

The Stanford professor, six years before, had been wrong. Someone besides extraterrestials and gods could appreciate her work. She now knew why she had been brought up from Vandenberg, carried to the Stone by shuttle and OTV.

The asteroid was longer on the inside than it was on the outside.

The seventh chamber went on forever.

The main character who the story initially follows, and the subject of that quote, is Patricia Luisa Vasquez, a physicist who’s brought in on the top-secret project to study “The Stone” after it’s discovered that it came from a possible future in which Russia touched off a nuclear world war… and, if not prevented, it’s only weeks away.

That said, I don’t want you to think that it’s some kind of political thriller. The story’s central focus is very much one of mystery, focused heavily on the question of what the infinite seventh chamber is and how it was built, with a chapter every so often switching to the perspective of a character from the civilization that built the Stone who is secretly investigating the main cast.

It actually reminds me of my experiences playing the PC game adaptation of Arthur C. Clarke’s Rendezvous with Rama, then moving on to reading Rama Revealed (the last in the series) at my high school library.

My biggest problem with the story is that it gave me a strong sense of being slow to start. While it wasn’t as bad as Tau Zero by Poul Anderson (which felt like a soap opera in space for almost the entire story, but I didn’t care about the characters), the first act felt dull to me. It wasn’t until the later acts (specifically, starting with Chapter 21) that things started to pick up and shift from focusing on characters I didn’t care enough about to actually exploring The Way and the futuristic humans who live in a city far down its length.

I would really have preferred something more like Larry Niven’s Ringworld or Jules Verne’s Journey to the Center of the Earth, where the primary focus is on exploring this wondrous place they’ve discovered or, at the very least, a synopsis which warned me that it would spend so much focus on the mundane aspects of things for so long. (Properly representative synopses are, sadly, a greatly under-appreciated skill. When I read David Brin’s Sundiver, I glossed through pretty much the entire book before I realized that the politics were actually the focus of the plot, rather than just a slow start to the plot I actually wanted to read about the mystery of the “sun-ghosts”.)

That said, around the same time that it started to pick up, it also seemed to get a little more philosophical (or at least more focused on the philosophical elements) and that made it more enjoyable in the vein I was intended to be enjoying it via, as opposed to the one I’d expected… so it’s still not clear to me whether the story was focused on things I didn’t care about or just a slow-starter regardless of who’s reading it. Given that I also found the action-related elements more engaging after chapter 21 and the exploratory elements picked up too, I’m leaning toward “this story just took far too long to wind up”.

In support of that assessment, I found chapter 57 boring in a “throwback to the first act” sort of way, but chapter 58 had some philosophical elements which made me wish the whole story had more of a philosophical bent.

It wouldn’t surprise me if I draw some flak for saying this about such a lauded author, but I get the impression that Greg Bear needed a more assertive editor. Someone who could hold him to that principle of “Make an accurate first impression.” (Which many authors have stated in the more prone-to-misinterpretation form, “Start right into the action.”) As-is, the first twenty chapters feel so different (and so much less engaging) that it’s almost like it was meant to be two different books. (Similar to how Anne McCaffrey’s Pern series has at least half a dozen different novels following different people at the same momentous time.)

To be honest, it reminds me of the behaviour I had to be trained out of as a kid, where I’d try to front-load every ancillary detail before I’d given the listener a reason to care in order to try to dump my entire mindstate into the other person’s head before I started my “pitch”. Because there was no relevance given when they were initially introduced, later chapters left me engaged enough to appreciate the significance of various questions being raised, and I knew I’d been given the answers to them, but I didn’t care enough to go back and refresh my memory of what they were now that I knew they were relevant after all.

I also think that it doesn’t age as well as it could have, given what a classic idea it is. The most glaring example of that is details like the names of the factions among the future humans (Geshels and Naderites). I was born the same year this book was written and I only have a very vague idea of who Ralph Nader is and what made him important. That will only get worse as time passes. (However, the commentary on how China might overtake NATO and the Soviet Union in a couple of generations is prescient.)

It’s similar to how, in the 20th Anniversary Edition of William Gibson’s Neuromancer, he says that his one regret was mentioning the sound of typewriter keys or how the part of some works of fanfiction that has aged the most glaringly is to mention MySpace. One can never be sure how well something will age until after its time has passed, so we should strive to not tempt fate in our cultural references. (A good rule of thumb is to speak in generalities and fictional names. “Social network” rather than “MySpace”, for example.)

Not aging well may also be part of the problem with the synopsis. It mentions a war breaking out on Earth as a result, but it didn’t really hit me that such a war would involve a nuclear exchange, so the synopsis seemed underwhelming. That could just be because it was written in 1985, before the Cold War ended, and I’m reading it in 2019.

Now for specific things Bear got right. I could be wrong, but it seemed that the story only started to switch between the different facets and factions of the story within chapters (rather than at the chapter breaks) when things started to come to a head. I found that to be a very clever way to manage the pacing.

I also found it very satisfying that, in the end, The Way becomes self-sustaining and I wish the creative world-building from chapter 62 could have been more prevalent earlier on.

That said, maybe it’s just me, but I can’t help but dwell on the bittersweet elements of the climactic ending (starting in chapter 64). I know there are poetic parallels between The Death and the changes to The Way, but, for me, what’s lost with The Way sours the sense of hope for the future. (For all that I hate change I didn’t initiate, I’d certainly be a Geshel. I’ve always been the type who sees films like Hayao Miyazaki’s Castle in the Sky as not having a proper happy ending because they imply that the ancient lost tech was destroyed beyond studying and, if the scientists and researchers in the setting are going to re-create it, they’ll have to do it from scratch.)

Still, the title drop in epilogue 3 does help to make the ending satisfying. I didn’t watch Babylon 5 as a kid, but it reminds me of a synopsis I read of the ending to it. (To the point where I wonder if J. Michael Straczynski might have read Eon and was drawing a little inspiration from it.)

That said, epilogue 4 left too much of a “sequel hook” feeling. There’s nothing wrong with a sequel hook, but this one left things feeling unresolved in a way that reminds me more of Diana Wynne Jones’s decision to not include epilogues in Dark Lord of Derkholm and Year of the Griffin or, as I’ll blog about in the near future, John Scalzi’s Redshirts.

(It’s a little snide, but it left with the urge to say “Maybe if you didn’t take so long getting everything set up, you’d have had time to give us a properly satisfying ending.”)

All in all, it lives up to the claims of it being a sci-fi classic, but with a disappointing lean toward Mark Twain’s definition: “something that everybody wants to have read and nobody wants to read. ” It’s not in the “hook ya quick, stay fast and punchy” style that seems to have been winning out in fiction, the story has two distinct phases which appeal to two different kinds of readers, and it makes references which won’t outlive its cultural context. That said, the setting is excellent and I’m surprised it doesn’t seem to have even one game adaptation when Dune got an adventure game and three RTS games, Ringworld got two adventure games, Gateway got two adventure games, and Riverworld got an RTS.

Given that I enjoy novel takes on the universal/multiversal construction of settings, I definitely enjoy this book for the setting, just as I enjoyed Piers Anthony’s Mode series, the film adaptation of Neil Gaiman’s Stardust that I wandered in on, and as I anticipate enjoying The Long Earth, the Spiral series (which I also was introduced to via fanfiction), and the fanfictional village of Eezdraug , which I think I remember being inspired by The Way.

Final Verdict: Worth a read, but go into it knowing that it’s slow for the first 20 chapters.

Posted in Reviews | Leave a comment

A Balanced Exploration of Arguments For and Against Ape-like Cryptids

I was watching some old documentaries on YouTube and a particular one on Bigfoot made some points I hadn’t considered in my conclusion that it was just a mix of myth and hoax.

Don’t get me wrong, I haven’t become a believer, but I now don’t feel that there’s enough evidence to solidly disbelieve either. (Luckily, I don’t really have an emotional connection to either outcome, and that ambivalence makes it easy to sit on the fence.)

Arguments Against

So, why was I so certain that Bigfoot didn’t exist before? Mostly because I had the following strong arguments which grouped Bigfoot in with other things that everyone agrees to be fake:

First (and most convincingly), now that everyone has a cameraphone in their pocket, we should be seeing a lot more evidence. Evidence for real phenomena doesn’t stay flat as the number of people with the will and means to gather it grows exponentially.

The BBC had a whole series, Nature’s Weirdest Events, built entirely around this idea and the fact that, with the massive number of people carrying cameras now, even very rare occurrences are getting conclusive recordings made.

Second, in 2017, they finally did DNA analysis on purported Yeti remnants (fur samples caught on vegetation in valleys, scalps kept as relics, etc.) and every single one was conclusively determined to not be from a primate. Some were potentially from an unknown type of bear, but the only conclusively positive result that was surprising was that, judging by the fur samples, the Himalayan goral has a larger range than we thought.

Third, oral histories (in any culture) tend to blend myth and reality in ways that mislead those who try to extract reality from them without being experts, and Bigfoot believers invariably brush this under the rug.

Fourth, it’s very rare for large animals to remain undiscovered. The countless new species we continue to discover tend to be insects, small reptiles and amphibians, plants, and fungi.

Finally, Bigfoot believers tend to set up a false dichotomy that, with all this evidence, it must either be true or some grand conspiracy to commit a hoax. However, we humans have a history of cognitive biases producing odd results.

It doesn’t have to be a global conspiracy to engage in a hoax if our neurobiology is inherently biased toward developing the concept of “wild men of the wilderness” in the same way that it’s inherently biased toward inventing gods to explain nature.

When people see something they’re not certain about, they tend to fill in the details based on whatever cultural zeitgeist is floating around in their heads. One of the books I read (probably Carl Sagan’s The Demon-Haunted World) went into detail on how the post-World War 2 UFO craze caused a rapid shift in interpretations of existing events like sleep paralysis.

Arguments For

So, with all that strongly leaning away from Bigfoot being real, what did the documentary say that cast it back into doubt?

First, it pointed out two things that I had never seen mentioned in any other documentary, and which hadn’t occurred to me before:

  1. It’s rare to find animals remains in the wild, because they tend to retreat to die, and, when it’s not dead livestock in the middle of a wide-open pasture (with no cover and possibly a guard donkey or llama), scavengers are very efficient.
  2. Animals like Bigfoot and the Yeti are said to live in areas which are still rugged and sparsely-populated to this day.

As the anthropologist they interviewed said, there are at least 100 bears for every Bigfoot and he’s never found a bear that died a natural death, just lying there in the wild.

That ties in with an important detail I already did know: Some animals are very shy. Heck, even primates we know about can present supporting evidence. Western scientists didn’t acquire specimens of the mountain gorilla and bonobo until 1902 and the 1920s, respectively.

Beyond that, from observations of other shy species we know, it’s perfectly plausible to conclude that there exist species so shy that they are likely to go extinct from competition for habitat before we ever encounter them and it’s plausible that Europeans, having a more industrialized and less in-tune-with nature lifestyle, produce a larger “radius of deterrence” compared to aboriginal peoples.

Likewise, both South America and Australia have humans and thick forests, yet the range of places where creatures like Bigfoot, the Yeti, the Almas, and so on appear seem to better match the ability of non-human species to spread, rather than our much greater ability to spread. That’s a point against the “myths emerging independently due to a bias in human neurobiology” hypothesis.

There were a couple of other points made in the documentary regarding pre-Columbian evidence (some native carvings that seem too consistently ape-like and a claim that Leif Erikson encountered a “forest spirit” that doesn’t fit the description of of a Native American), but I had to discard them since I couldn’t find any solid online corroboration and I don’t care enough to go poking through offline sources.

Third Option: Maybe Bigfoot once existed but not now

Everybody seems to be so caught up in taking sides that I’ve never seen anyone address this possibility. Maybe all the 20th century stuff is hoaxes and wishful thinking, but there really is something to the native myths.

Difficulty in testing it aside, it’s certainly a reasonable hypothesis. Tribal history doesn’t really care about precisely recording how long ago the most recent encounter was, and there is strong evidence of pre-industrialized humans driving animals to extinction even when we don’t outright hunt them. (Jared Diamond’s The Third Chimpanzee mentions that, for example.)

All in all, I think you can see why I adopted the more scientist-ish viewpoint of “What do I believe? I believe that the evidence is inconclusive.”

Posted in Geek Stuff | Leave a comment

Fanfiction – Being Harry Potter

Kirinin really has a knack for writing fanfiction that has a special spark to it. I first recognized that when I was looking for Ranma ½ fanfiction and read The Pit. This time, it’s a Harry Potter – Draco Malfoy body-swap fic with a difference:

Being Harry Potter by Kirinin

The basic concept is that Draco Malfoy wakes up as Harry Potter in year 6, with no idea what happened.

I don’t want to say much about the plot, but I will say that it follows Draco and he discovers the “who” and “why” in chapter 2… but it turns out to be a big and very novel plot twist.

This is not your ordinary “they have to lay low and slowly gain an understanding of each other as they wait for a solution” fic. (And I do really love the foreshadowed reason for the “why” to backfire on the “who”.)

Instead, it’s a tantalizing blend of “lay low because I’m too ‘set adrift’ to think of a better plan”, stuff I don’t want to spoil, and scenes that could be in a more ordinary body-swap fic, but most authors wouldn’t think of them.

Now, as a more specific example which isn’t a spoiler, I do really like the interaction between Snape and “Harry” during a detention. Draco’s preconceptions about Harry do evoke some interesting character-exploring behaviour from the both of them.

There’s also a delightfully clever “No, wait. Bad mental image.” moment in chapter 6, though I can’t quote it because it depends on details which would constitute a spoiler.

I let my note-taking slip somewhere around the middle of reading it, and I don’t have time to re-read it right now, so I can’t go into detail beyond that point (to the degree I usually would), but Draco’s character evolves very nicely throughout the story and there are some very elegant little touches (such as the role a certain jacket ends up playing).

I also found the manner in which Voldemort met his end to have a particular poetic cleverness to it.

I will mention that there is a moment when a male-male relationship comes up and the character being into guys had no basis in canon. While I have no problem with that sort of thing in and of itself, I do feel like the way it was introduced detracts from the narrative as a whole. That said, it’s quite minor so, if you just treat it as one flawed scene and keep reading, it should quickly get carried away as you get back into the flow of the story.

Before I put this review on the back burner, somewhere around the middle of the story, I estimated that I’d probably give it a 4.7 out of 5 rating because I wasn’t feeling that sense of certainly I normally associate with a 5 out of 5. While I’d probably need to re-read it in one sitting to be sure, that does seem about right.

Posted in Fanfiction | Leave a comment

Resources for Reverse-Engineering 16-bit Applications

See Also: My list of tips and resources for writing new DOS and Win16 apps

While offering some advice, I got a little caught up in the research I was doing, so here’s a list of the resources I found for picking apart 16-bit x86 applications.

Reference Materials


In the days of DOS and Windows 3.x, executable packers and code protectors like PKLite and PackWin were a common means of saving precious disk space, as well as deterring casual inspection of an executable by novices with tools like DEBUG.COM.

They still see use to this day, but exponential decline in the cost of storage space, combined with the risk of false positives from virus scanners, has reduced the demand for this sort of software. (Aside from JavaScript minifiers, for which an effect similar to a decompiler can be achieved using a code beautifier.)

When it comes to reverse-engineering, packed/protected executables must be unpacked/unprotected before utilities which operate on the on-disk form of the program will return useful results.

A now-unmaintained but open-source utility which will handle the vast majority of packed executables for DOS and Windows 3.x.
Universal Extractor for Windows
A tool which combines code and algorithms from a great many unpacking tools not covered by UNP into one convenient package… including various tools for unpacking installers without running them.
UPX for all major platforms
The most popular executable packer today and also capable of unpacking its own creations, assuming they haven’t been modified to obscure their nature.
archive of
the Wayback Machine’s October 2002 archive of this site contains a huge list of more esoteric unpacking tools.


Decompilers attempt to retrieve something higher-level than assembly language from a program.

This may be the normal state of things if the language doesn’t compile to machine code or it may be a convenience accomplished by looking for patterns of machine instructions that are known to come from specific higher level constructs like for and function calls.

(For languages which compile to machine code, you get something half-way between assembly language and the original source code, because the compiler threw out various higher-level details which would be needed to perfectly reconstruct the original source.)

Reko for Windows
According to the old SourceForge page (which has screenshots), this open-source decompiler’s list of noteworthy supported formats includes MS-DOS, Win32 and AmigaOS.
The release notes on GitHub mention adding support for NE-format EXEs (Windows 3.x and OS/2), SEGA Genesis, SEGA Dreamcast, NeoGeo, partial support for Atari-TOS, and improving support for MacOS Classic (though I couldn’t find the initial mention of adding it).
DoDi’s Visual Basic 3/4 Decompiler for Windows
The site refers to this freeware tool as a Visual Basic 4 decompiler, but the tool is originally for decompiling Visual Basic 3 and, if the newer version is limited to Visual Basic 4, the site also provides links for earlier versions specifically intended for Visual Basic 3.
DisC – Decompiler for Turbo C 2.0/2.01 (source)
A decompiler specifically for programs built using Borland Turbo C 2.0 and 2.01 (which is offered as a free download by Embarcadero).


Disassemblers are what you need if you want to inspect the code in its entirety when it’s not running

They’re generally more reliable than decompilers, and preserve the correspondences to the machine-code form necessary to design patches.

Compared to debuggers, they tend to have more advanced searching features (to make up for the lack of ability to find things by running the code until you hit a breakpoint), but can’t deal with especially dynamic code where the behaviour is most easily understood by running it.

All Formats

semblance (source)
An open-source, non-interactive disassembler for MZ (DOS), NZ (Win16), and PE (Win32) executables.
Doesn’t explicitly mention which platforms are supported, but it works on Linux and I suspect it’ll build on any POSIX-compliant platform (eg. MacOS, Cygwin, etc.).
TatraDAS (GUI for Win32, CLI for Linux)
Open-source disassembler with support for MZ, NE, PE, and .com executables. Unlike semblance, doesn’t seem to dump non-code segments.
CLI version is claimed to be OS independent, but I haven’t verified that claim.

DOS MZ Format

IDA Pro Freeware v5.0  for Windows
It’s hard to beat the IDA Pro disassembler and the 5.0 release, which is free for non-commercial use, can disassemble DOS MZ and 32-bit Windows PE binaries.
The ScummVM developers have requested and received permission to host a copy to ensure it will always be available to people wanting to add new game engine re-implementations to ScummVM. If my link breaks, check the HOWTO-Reverse Engineering page on the ScummVM wiki.
In my testing, this ran just fine on non-Windows platforms under Wine. (See also PlayOnLinux and PlayOnMac as easy ways to manage Wine versions and application prefixes.)

Windows 3.x NE Format

URSoft W32Dasm (A.K.A. Win32Dasm) for Windows 9x
Don’t let the name fool you. This tool disassembles both 16-bit and 32-bit Windows EXEs and, from what I remember in my high school years, it was by far the most comfortable option around.
Sadly, it appears to have been the result of a one-man operation with a website run on his ISP’s hosting, and it vanished from the web some time between February 2002 and May 2003, with its most recent version listing a 1998 copyright date in the About box.
When I was poking around, I found it not at all difficult to find the most recent registered version, but I couldn’t find a citation to back up the claims made by some sites that the last release is freeware that never received a patch to remove the warning about not sharing it, rather than so-called abandonware. (It could go either way. There is precedent for official freeware re-releases with warnings left intact and the author didn’t bother to update the copyright date in the image in question from 1995 to 1998.) As such, I will not provide a link to it.
From what I remember, it can be finicky about which Wine versions it will work under. (It won’t crash… it’ll just fail to load its desired monospace font and display useless placeholder glyphs.)
Windows CodeBack [2] [3] for DOS 3.x+
The Wine developer wiki recommends this disassembler for Win16 executables.
If my links ever go dead, it won’t be difficult to find as in various archives of old shareware and freeware. Like IDA Pro Freeware, it’s free for non-commercial use, and the features withheld for paying users are ones you’re not likely to need.
However, my quick tests seem to indicate that it’s a purely non-interactive, command-line disassembler.
In my testing, this ran perfectly well in DOSBox 0.74.
An open-source, non-interactive disassembler for NZ (Win16) executables with supplementary features for Major BBS modules.


Debuggers are what you need for inspecting code while it’s running. They take some getting used to, but their versatility is unmatched.

More advanced debuggers even support “reverse debugging” allowing you to get the program to a point of interest, like the manifestation of a bug, then rewind its execution to explore how you wound up there.

DeGlucker for DOS
A protected-mode debugger which claims to be more powerful than Turbo Debugger and Soft ICE. Version 0.5 alpha, released in May of 2000,  is closed-source, but freeware.
Also offered is version 0.4 from January 1999, released with TASM x86 assembly source code under informally stated “do what you want but leave the attribution” terms after the original author no longer had time to maintain it.
Insight for DOS
A GPL-licensed real-mode debugger that gets suggested frequently. I don’t know whether it has any advantages over DeGlucker aside from being open-source and being usable on older, more limited hardware.
Open Watcom C/C++ for DOS and Windows
Open Watcom includes a complete set of tools, including DOS and Windows debuggers (WD.EXE and WDW.EXE) and a resource editor capable of poking around inside EXE files built by other compilers (WRE.EXE).
While Open Watcom hasn’t made use of the support it inherited for Windows 3.1 builds of the installer, all installers will install the DOS and Windows tools (even the Linux installer includes them), so you can use the DOS installer under Windows 3.1 as long as you don’t mind manually setting up the Windows bits.
WineDbg for POSIX (Linux, MacOS, etc.)
Wine‘s built-in debugging support can be used in two different ways:
  • Using the built-in command-line interface
  • Using an open-source graphical frontend like gdbgui, DDD, or kdbg via the gdbserver protocol.
DOSBox Debugger
The DOSBox emulator contains a debugger which can be enabled in special builds.
Win32 builds are provided, as well as instructions for making debug-enabled builds for other platforms.


Radare2 is hard to classify because it does so much. Wikipedia summarizes it as “a complete framework for reverse-engineering and analyzing binaries”.
It supports DOS, Win32, Java, Gameboy, Gameboy Advance, Nintendo DS, Nintendo 3DS, Commodore VICE, WebAssembly, Android, and XBox binaries, among others.
According to the website, it can disassemble, assemble, debug, patch, be scripted in multiple languages, run on all major platforms, and more.
You’ll probably want to use the Cutter GUI with it.


If you’re looking to poke at Win9x-era stuff too (eg. Win32 PE binaries), some of the listed tools support them and here are some additional tools you could try which were omitted from the previous lists for supporting neither MZ nor NE:

PE (Win32/Win64)

  • x64dbg (Open-source debugger)
  • OllyDbg (Shareware debugger, free registration but not needed for full function.)
  • Snowman [2] (Open-source decompiler, can run as an x64dbg plugin)
  • Boomerang (Open-source decompiler)
  • IDA Pro Freeware 7.0 (Non-commercial-only like v5.0. Supports 64-bit PE but drops MZ. Also adds Linux and MacOS versions.)
  • Ghidra (Open-sourced by the NSA. I’m unclear what formats other than PE are supported, but I’ve seen it described as being like IDA Pro but more free or like Radare but more mature.)
  • Borg Disassembler (info claims it to be freeware, but source is offered too)
  • Frida (Dynamic instrumentation framework, describes itself as “Greasemonkey for native apps”)
  • Destroying x86_64 instruction decoders with differential fuzzing (Article on how and why reliably disassembling x86-family machine code has become such a hard problem)

Macromedia Director and Flash

  • Swifty Xena Pro for Windows (Extract SWFv4-6 and Macromedia Director v6-7 resource bundles from single-EXE projectors)
  • dirOpener (extract resources from Macromedia Director resource bundles (v8.5 and earlier). The original site is only on the Wayback Machine and they pulled the download links, but you can still use it as reference for the filenames to google. May need the SWA Decompression Xtra from the full Shockwave Player installer for some content.)
  • JPEXS [2] (a complete open-source reverse-engineering suite for Flash files)
Posted in Geek Stuff | 2 Comments