Press "Enter" to skip to content

Posts published in “Computing”

The art and science of mechanized thought.

[twenty twenty-four day seventy]: fix it the way that works

centaur 0

So, this is worthy of a longer blog post, but the short story is, looking under the streetlight for your keys may provide visibility, but it won’t help you find them unless you have reason to think that you dropped them there.

A lot of time in software development, we encounter things that don’t work, and problems like stochastic errors and heisenbugs can lead software developers to try voodoo solutions - rebooting, recompiling from head, running the build again, or restarting the server.

These “solutions” work well enough for us that it’s worthwhile trying them as a first step - several times recently I have encountered issues which simply evaporated when I refreshed the web page, restarted the server, retried the build, or restarted my computer.

But these are not actual fixes. They’re tools to clear away transient errors so we can give our systems the best chance of properly functioning. And if they don’t work, the most important thing to do is to really dig in and try to find the root cause of the problem.

On one of those systems - where I literally had tried refreshing the web page, restarting the server, refreshing the code, reinstalling the packages, and rebooting the computer - the build itself was something that you had to run twice.

Now, this is a common problem with software builds: they take a lot of files and memory, and they can get halfway through their builds and die, leaving enough artifacts for a second pass to successfully solve the problem. I had to do this at Google quite a bit.

But it isn’t a real solution. (Well, it was at Google, for this particular software, because its build was running up against some hard limits that weren’t fixable, but I digress). And so, eventually, my build for this website failed to run at all, even after a reboot.

The solution? A quick search online revealed it’s possible to change the parameters of the build to give it more memory - and once I did that, the build ran smooth as glass. The “run the build again” trick I’d learned at Google - learned where, for one particular project, it was not possible to fix the problem - had led me astray, and overapplying this trick to my new problem - where it had partial success - kept me from finding a real, permanent fix.

So, if a fix feels like voodoo, stop for a minute - and search for a better way.

-the Centaur

Pictured: What do you mean, you haven't updated the package configuration for THREE YEARS?

[twenty twenty-four day sixty-seven]: my new game console

centaur 0

SO! I am the proud owner of ... an Atari 2600+! This console, a re-release of the original Atari 2600 from 47 (!) years ago, only a notch smaller and with USB and HDMI outputs. It plays original Atari cartridges, though, which shall be my incentive to hop on my bike and visit the retro game store in nearby Traveler's Rest which has a selection of original Atari cartridges among all their other retro games.

The first game I remember playing is Adventure, which came out in 1980, and, while I can't be sure, I seem to remember first playing it in my parents' new house on Coventry Road, which we didn't move into until early 1979, just before my birthday.

In fact, as I dig my brain into it, we played Breakout in the den of my parents's old house on Sedgefield Road, so we must have had access to early-generation Atari. Our neighbors when we moved had a snazzier Odyssey 2 :-), and a few years later another friend from school had an even better game console, though none of the second-generation units I looked up online seem familiar to me.

Therefore, by the process of elimination, either my parents got my Atari 2600 for Christmas for me sometime around 1977 or 1978, or one of our relatives or babysitters loaned us one when we lived on Sedgefield. I have distinct memories of getting a Radio Shack Color Computer in Christmas of 1980, a grey wedge of plastic with a massive 4K of RAM, and remember programming games on it myself - perhaps because I didn't have an Atari to play with; this makes me think that, at least at first, the Atari was actually the "better game console" my other friend from school had, and that I went over to their house to play.

Regardless, I solved the first level of Adventure in minutes after cracking open the Atari.

No big challenge, but apparently I still got it.

-the Centaur

Pictured: the box, and the unboxed start of Adventure.

[twenty twenty-four day sixty-six]: there’s no man so self-made …

centaur 0

"There's no man so self-made he bore himself in the womb."

No, I don't really have any deep thoughts here riffing off "an individualist so rugged ..." ... I just thought of the turn of phrase (when thinking about the same people) and thought it went well with this book I saw.

-the Centaur

Pictured: a book I found in a nearby Barnes and Noble, and a picture taken and sent to friends who heart heart reduplication.

[twenty twenty-four day fifty-six]: code rots

centaur 0

Only six months have passed since I last worked on the Embodied AI Workshop website, and now the code will not compile in a horrible mess of broken dependencies. I have tried two or three ways of installing it, including in place, from scratch, and even on a Parallels instance of Ubuntu in case macos was the problem. Nothing works. As a last-gasp effort, I plan on creating an AWS instance, in case Apple Silicon itself is the problem (I suspect it is, as one of the libraries has no Apple Silicon binary packages, and the instructions to recompile from source are roughly five years out of date).

But software is a mess. Occasionally you get something that's awesome (like Python - or Rust! Installation of the Bevy game engine was smooth as a dream) but more often things explode in a mess of unresolvable dependencies, and you're stuck between Apple locking everything down, Windows becoming spyware, and Linux not running anything you want at all.

I'd weep for the future, but I'm too busy hiding from it.

-the Centaur

Pictured: My software consultant, deciding discretion is the better part of valor. Actually, up top Loki has seen the installer for the rock border in the French Quarter, and below he is hiding from him.

welp, looks like my Facebook got hacked …

centaur 0

And Facebook is a perfect example of customer-service hell in which once one has lost one's account, there's no way to talk to a person who can get this unfucked.

What happened? As best as I can figure, someone attempted to hack my 2-factor authentication last night while I slept - I woke up to a text message from Facebook with a 2-factor authentication code.

What did Facebook do? When I went to check, I was logged out of Facebook on all devices, and I was told that my account was suspended for "not following their rules":

Is this possible? No. Since I rarely post, I'm pretty circumspect, and I primarily use it for Messenger to talk to a few old friends, I'm pretty sure that I wasn't doing anything that violated community standards.

And I sure didn't while I was sleeping.

Is there a way to fix this? No. I tried to follow their procedures, only to find I didn't have a linked auth.oculus.com account, because I didn't have an Oculus. And once you do create such an account, there is no mechanism to appeal a suspension - only this reference in the help files:

But, probably because these folks were trying to hack my account, they likely mucked with the email, so I never got an email from Meta about this - not even in my spam folder.

So the hackers did something bad with your account? Maybe? I can't tell. So, the next attempt is to report the account as compromised. There is a way to do that, which takes you to the following page:

But, since the hackers were likely messing with two-factor authentication and trying to break in to the account, we get back to the temporarily blocked state you have above:

Are you sure you were hacked? Pretty sure. The text came in at 2:23am, after I was already asleep.

As a last ditch effort, I remembered I had an open Facebook tab, so I tried to go screenshot it. It quickly logged out, but I got to see, very briefly, my old Facebook page, and could see the last activity was merely me using Messenger to talk to friends.

How could this be fixed? Easily. This is the kind of thing that a customer service representative, looking at the account, can resolve in five minutes flat over chat, just by looking at the calm history followed by a spike of hacked traffic. And it's the responsible thing to do for your customers.

But Facebook doesn't provide access for this - apparently except for business accounts. And, while I'm not happy with a lot of stuff Elon did at Twitter, this makes me more inclined to use services you pay for. X, in contrast, makes it very easy to appeal a decision via an easily findable and accessible form:

https://help.twitter.com/en/managing-your-account/suspended-x-accounts

The bottom line? Someone hacked me while I slept, and a decade plus of Facebook is gone - principally because Meta does not provide basic tools for customer support.

Welp, nothing to do but call Zuck out about it on Xitter ...

-the Centaur

UPDATE: There are forums, where people are reporting this issue, and customer support representatives for the Meta Quest are responding. Cross your fingers. But it wasn't at all obvious that this is a solution! We're getting help from people who aren't even support staff for the same product.

UPDATE UPDATE: Nope, nevermind, they just redirect you back to the Facebook help center, which as I already confirmed, can't help you.

UPDATE UPDATE UPDATE: Apparently Facebook has someone on Twitter who monitors for just this sort of thing. That is an unorthodox solution, but I've heard of the same thing at the Google. I'll reach out; we'll see. Cross yo fingies ....

UPDATE UPDATE UPDATE UPDATE: Apparently those people on Twitter are not affiliated with Facebook - there's a huge list people recommending various peeps as people who "helped me" and when you look at those users they don't appear to be affiliated with Facebook. So, no.

[twenty twenty-four post fifty-one]: worse than useless

centaur 0

So I recently came across a tutorial for game development that seemed pretty interesting, so I decided to give it a try. The tutorial was in Rust, a new language that I’d been hearing about, and so I thought it would be a good idea to learn that too.

I even found an online playground, https://play.rust-lang.org/, which lets you try out the language in the browser, much like the Go playground: https://go.dev/play/. I quickly started trying out some simple functions that I use a lot in a variety of languages …

… and got stuck right away on Rust’s lack of function parameters.

There’s a whole blogpost https://www.thecodedmessage.com/posts/default-params/ on why this antifeature is actually, in the minds of “Rustians,” is a good thing, but even that admits that the alternatives that the language provides “might seem worse than useless.” 

I’m sorry, I’ve gone through this kind of Stockholm Syndrome thinking before, where users held hostage to the good features of a language start coming up with excuses for its warts. For example, take the Go programming language. Programming Go felt like a breath of fresh air, but it was literally worse than useless for my use case - I had to write the software I wanted in C and then call it from Go. And the language itself had terrible warts from the terrible choices made by the core Go team - at the time I used it, no support for generics, endless proliferating error checks, and worst of all, an overly verbose unit test style which threw out everything we’d learned from Java and Python about how to write tests using semantically meaningful methods like assertIsNotNone or assertIsEmpty.

I’m not saying I’m not going to not learn Rust, nor that I’d never use Go again. Hey, one day I may be a convert! But, based on what I know now, I would never recommend these languages to anyone. My recommendations for programming languages remain the same "Big Three, Plus One": 

  • For most tasks, use Python. 
  • If you need speed, use C++.
  • If you work with a very large enterprise, consider Java.
  • If you’re working with a system that uses a specific language, use that language: C in the Linux kernel, Javascript on the web, Swift in iOS, Java in Android, PHP in WordPress, C# for Unity, and so on.

Many of the alternative languages that you can use - Go, Rust, Scala, Clojure, even my beloved Mathematica, Common Lisp, or J - are actually worse than useless for most tasks, for two reasons. 

  • First, most of them are less baked than the Big Three, and are less ready for developing real applications; they’re not chosen for their fitness to purpose, but instead chosen by zealots who are trying to make a point. Don’t be a zealot trying to make a point.
  • Second, working on these other languages actually detracts from making the Big Three better. The C++ of today is almost unrecognizably usable compared to when I first started using it, and Python and Java are rapidly adding new usability features as well.

That doesn’t mean we don’t try new things. C++ has mostly replaced C, and TypeScript is edging out JavaScript; who knows, perhaps, one day some variant of Go or Rust or Swift will become the dominant paradigm. (But, honestly, I hope not).

Nevertheless, I remember talking to a programmer friend about a refactoring I wanted to accomplish, and he angrily sketched out a better build system which could have solved the problem using a Turing-complete constraint language to figure out the dependencies.

I just remembered the famous quote from the creator of ANTLR - “Why program by hand in 5 days what you can spend 25 years of your life automating?” - and handwrote a script to solve the problem in an hour, and got on with my life.

-the Centaur

Pictured: Some of the older programming language books that I have in my stacks, most of which are now worse than useless for getting things done nowadays - though if you really love programming languages and learning how things work, they're more than priceless, now and forever.

[twenty twenty-four day forty-three]: neurodivergence by the numbers

centaur 0

So! While working on The Neurodiversiverse I've been reading up a lot on neurodiversity. According to Devon Price's Unmasking Autism, autism is massively undiagnosed, and for good---well, understandable---reasons. From parents concerned about their uncommunicative children or fans of cold geniuses on Sherlock and the Big Bang Theory, our culture focuses a lot on certain stereotypes of autism---while ignoring a much larger group of people who suffer from the same underlying conditions in their brains, but who are able to "mask" their behavior to appear much more "high functioning" or even "neurotypical".

As you might imagine, spending your whole day trying to react in ways that are fundamentally unnatural to you---and trying to hide the ways that you react that are natural to you---can stress people the fuck out. But many people never get a diagnosis---either because they're from a disadvantaged group, or because they don't want to risk the stigma and potential negative consequences of a diagnosis, or because they mask too well and no-on notices how they are suffering. But if you don't understand your condition, you may employ coping strategies which may actually do more long-term harm than good.

Well, now there are a lot of online tests and self-help books and even sympathetic therapists who can help people understand themselves better. While I've always known I was a bit strange---mostly solitary, typically withdrawn at family gatherings when I was a child, or explicitly labeled as having a weird brain---I've never pursued a diagnosis of any kind---in the past, because I didn't feel I had any trouble coping to the point that I needed help, and in the present, because having a disability label attached to you can have negative social and legal consequences that I have no interest in dealing with.

BUT! The personal stories of Unmasking Autism resonated a lot with me, and I now have friends who have gone through formal adult diagnoses of autism and ADHD, as well as an undiagnosed autistic friend who clearly is autistic and has to manage her life the way a masking autistic person does, but who did not pursue a diagnosis for precisely the same reasons that many other masking autistics do not pursue it: unless your condition is very severe, it isn't clear that a formal diagnosis can actually get you help, and it can often get you a lot of hurt. But UNDERSTANDING it, that, that we can now do.

So! And I note I again use "So!" at the start of a paragraph. Is that a verbal tic? Who cares? SO ANYWAY ...

Diagnoses of autism, and other neurodivergences! The neurodivergence I identify most with is Social Anxiety Disorder---in fact, this is the neurodivergence I chose for the protagonist of "Shadows of Titanium Rain", my own submission to The Neuroversiverse. But other people have suggested I have characteristics of OCD, or ADHD, or Autism, and I even went into therapy for stress and anxiety during the pandemic. So I decided to take five online tests: Social Anxiety Disorder, Autism, Anxiety, ADHD, and OCD.

The results are at the top of the blog---and I already gave away the game through the order I listed them. Normalizing all the scores from zero to a hundred, most of the tests put the boundary of "you've got the thing" at somewhere around 60-70% of the possible points you could score - let's call it at 2/3, or 66%, shall we? OCD scored the lowest - roughly 53%, which the test judged as "you've got OCD tendencies, but not OCD." ADHD was a little higher, 60%, and general Anxiety still higher, 63%. But none of these were over the "you've got it" thresholds for these tests---they just indicated a general tendency in that direction.

Things start to change with Autism: my test results for "Adult Autism" (*cough* MISNOMER) were 70%, well within the boundary of "you've very probably got it". Some of my friends are quite surprised to hear this, as they didn't see this in me at all; I guess my condition is "mild" and/or I mask very well.

But Social Anxiety Disorder? 86%, off the charts. And this wasn't a surprise: not only do I have a huge raft of coping mechanisms to help me deal with social situations, I also have some of the more subtle symptoms of Social Anxiety Disorder that you might not expect would be symptoms. For example, in certain socially awkward situations, I can partially stumble while walking. Most people, even those close to me, never notice that my foot briefly drags when we're walking and something socially awkward occurs - yet balance and coordination issues are a symptom of social anxiety.

Again, I've not pursued a formal diagnosis, and I don't plan to. But understanding these things about myself helps me understand why I've built a mass of coping mechanisms and masking strategies in my life---and can help me start to construct a healthier way to cope with the world within which I live.

If you feel alienated by your world, perhaps that's something you could try too.

-the Centaur

[twenty twenty-four day forty-one]: squirrel

centaur 0
der interwebs is kaput

Mt internet has been flakey, so I chatted with an AT-AT Druid online about it and they unexpectedly had a free repair tech slot the next morning. Send them? Yeah baby yeah!

After some kerfuffle with the confirmation, we got it scheduled and they showed up at 830 this morning only to find ...

The internet box half ripped off the house and the beginnings of what looked like a squirrel's nest in it.

Remember, folks, step one of network debugging is to check layer one of the stack: your physical equipment. "Your wires are loose" is the network equivalent of "Ain't got no gas in it" from Sling Blade.

So, hopefully, regular blogging will resume soon. Till then, enjoy this lovely blog post thumb-crafted on my phone.

-the Centaur

[twenty twenty-four day twenty-four]: in foggiest depths

centaur 0

One of the problems with computing is when it just gets ... foggy. Not when you're trying to do something hard, or when two pieces of software are incompatible, no. When things just sort of kind of don't work, and there are no known reasons that it's happening, and no reliable actions you can take to fix it.

Once this happened to me when I was working on a robotics device driver, and I realized the lidar itself was unreliable, so the only way to fix problems was to run each configuration ten times and keep average stats. Broken "worked" around ten percent of the time, whereas "fixed" worked around seventy percent of the time (approaching the rate at which the manufacturer's own software could connect to its own hardware).

Today, I ran into a seemingly simple problem with Anaconda, a Python package / environment management system. Conda lets you corral Python and other software into "environments" with different configurations so that potentially incompatible versions can be used on the same computer (albeit, not at the same time). It even gives you a handy indication about which environment is in use in your command prompt, like so:

There's a seemingly innocent blank line between (ThatEnvironment) and the previous line, yes? Not part of the standard Conda setup, but you can easily add it with a single line of configuration, changing the "env_prompt" to include an extra newline "\n" before printing the environment, like so:

Yeah, that line at the end. "env_prompt: \n({default_env})". In a conda configuration - a .condarc, or "dot condarc" file - which is almost as simple as possible. I don't even think the "channels" bit is needed - I didn't recall writing it, I think it just got added automatically by Conda. So this is almost the simplest possible change that you could make to your Conda configuration, done in almost the simplest possible way.

Except. It. Didn't. Take.

No matter what changes I made to the .condarc file, they didn't affect my Conda configuration. Why? I don't know. No matter what I did, nothing happened. I changed the prompt to all sorts of weird things to try to see if maybe my syntax was wrong, no dice. No amount of searching through manuals or documentation or Stack Overflow helped. I re-ran conda config, re-loaded my shell, rebooted my Ubuntu instance - nothing.

Finally, almost in desperation, I went back to my original version, and tried creating system-wide, then environment-specific configurations - and then the changes to the prompt started working. Thank goodness, I thought, and rebooted one more time, convinced I had solved the problem.

Except. It. Took. The. Wrong. Config.

Remember how I said I created a weird version just to see that it was working? Conda started reverting to that file and using it, even though it was several versions ago. It actively started overwriting my changes - and ignoring the changes in the environment-specific configurations.

So, I blew away all the versions of the file - local, system and environment-specific - and re-created it, in its original location, and then it started to work right. In the end, what was the final solution?

I have no idea.

When I started working on the problem, I wanted Conda to do a thing - print an extra blank line so I could more easily see a command and its result, separate from the next command and result. And so I created a file in the recommended place with a line containing the recommended magic words ... and it didn't work. Then I hacked on it for a while, it sort of started working, and I backed out my changes, creating a file in the same recommended place with a line containing the same recommended magic words ... and it did work.

Why? Who knows! Will it keep working? Who knows! If it breaks again, how do I fix it? Who knows!

This is what I call "the fog". And it's the worst place to be when working on computers.

-the Centaur

Pictured: Sure was foggy today.

Robots!

centaur 0

Still at the Conference on Robot Learning. LOTS of robot dogs were about, lots of diffusion model and transformer work, and lots of language model planning. More later, gotta crash.

-the Centaur