C#: Value does not fall within the expected range

Categories: programming

To save anybody from a fruitless internet search, the default message for ArgumentException is the phrase "Value does not fall within the expected range". This error may be returned from various sources, but in my case it was an explicit throw:

if (someInvalidValue)
{
    throw new ArgumentException();
}

So if this error is bubbling up, it's an ArgumentException.

Fantasy Consoles

Categories: programming

I'd been meaning to write for my blog, since I'm now posting more regularly on Twitter, and am fairly active in a few Discord chats. Most of what I've been doing lately has been centered around fantasy consoles.

Fantasy Consoles?

While there are differing opinions on exactly what constitutes a fantasy console, the basic idea is that it's a game development platform for hardware that doesn't exist. In some cases, there are entire systems dedicated to maintaining the illusion that somewhere in an alternative universe, these video game consoles could have existed.

Read more...

ROM Checksums and Headers

Categories: programming

Lately I've been futzing around with classic game ROMs a bit more. Since nearly day one of Nesticle hitting the Internet, I've been obsessed with emulation of classic computer systems. I love playing old video games, and I love learning more about the internals of the systems I cut my teeth on back in the day.

Read more...

Let's Get Cuddly! (or not, I'm not judging)

Categories: programming

As a personal preference, I'm a fan of cuddly braces. It's the way I learned, but I feel like it leads to more concise and readable code in most cases. I could go on, but as a topic it's been beaten to death, and there are arguments with merit on both sides.

That being said, at work we use newline braces, and I don't like it. A good programmer follows the in-place coding style, so that's what I've been doing. It doesn't mean I have to like it, though. While I use a separate installation of Visual Studio on an entirely different computer for coding my personal projects, there are times where I'd like to not have to completely switch machines to bang out some lines of code.

After reading that you can export and import Visual Studio settings, I created two settings files trimmed down to only include indentation and newline settings, so now I can simply import a settings file and all the rules I want changed are changed.

Feel free to edit the below files to your needs:

These are only for Visual Studio, though. I've got nothing to offer for other editors, but feel free to contribute settings files for any other IDE.

PSA: Vertex and Vertices

Categories: uncategorized

Hey everybody, just a quick reminder that the singular form of vertices is vertex. There is no such thing as a "vertice".

the singular form of "vertices" is "vertex"

I've heard it pronounced this way in some...specific 😉 video tutorials, but recently I've noticed this malapropism being used in written tutorials as well.

The Importance of Order

Categories: miscellany, open source software

The order of things is important; even moreso when those things are command line arguments.

the venerable Blender default cube

After spending way too long (~30 minutes) trying to figure out why my background Blender renders were producing default cubes when that is clearly not what is in the scene, I finally looked at the console output and understood.

blender --background --python script.py myfile.blend

What this command does is tells Blender, "Load into memory as a background process and run script.py (which changes some settings and starts a render). Then load myfile.blend." Once the file is loaded, background Blender exits.

In the proper order:

blender myfile.blend --background --python script.py