Mastodon Verification Link Blog – Sam Seltzer-Johnston

Jan 05, 2017

Trying out the Orx Game Engine

Orx is an open-source, ultra-portable game engine with a strong core focus on data-driven design. For being so niche, it’s actually quite mature in game-years. It’s more than a decade in the making. It has its quirks, but I like it a lot so far. It’s honestly more like a game library than it is an engine, but whatever.

It uses a highly customized deviant of INI config files for defining the vast majority of game behavior. Since exploring data-driven development, I’ve found my code more sparse and clear, which is always a win.

Not convinced yet? Consider this: almost all game codebases eventually tend toward a data-driven architecture (provided you don’t hate yourself) for totally practical reasons. Prototyping is a big one, but general configurations are central to all games. Some engines solve this problem slightly differently, but ultimately data drives much of game behavior from an architectural standpoint.

In any case, Orx’s focus is on robust expressive data, but it’s API mirrors it in a way that’s flexible enough to enable you to do things your way. It’s up to you to decide on a balance between data and code.

One of my favorite things is the community, particularly the creator. He’s a professional game developer and is also the most helpful, welcoming human being I’ve met to date (online or otherwise). But everyone in this community is helpful, and there are a few very active members besides the creator who have been a pleasure to chat with daily.

So yeah, I’m only just starting to scratch the surface, but I’ve already started on a skeleton/template project for my own benefit, and hopefully other people’s as well.

I’ll likely post more on Orx as I use it more, but for now, I urge you to try it out as well. At least look at it. Or don’t; your call.


Jan 04, 2017

Where are the Configuration Script Generators?

I recently have found a need for a multiple-choice command-line/terminal script generator. This seems quite trivial to me and I’m sure someone must have made something like this, but apparently my search-engine-fu skills are insufficient for finding it.

To be more specific, there’s a need for a basic Q/A and multiple choice script generator that allows you to design a configuration flow on multiple operating systems that can output in multiple scripting languages. It’s up to the user of this generator to make sure outcomes are consistent across OSs/languages, but the logical flow can most certainly be automated. It would drastically simplify maintenance.

I should never have to reference how to do this for at least three different languages.

I’m putting this on my todo list for things to maybe make eventually. Maybe. For now I guess I could just include an interpreter for each OS with one consistent script language, but that seems sort of obnoxious.


Jan 04, 2017

Blog Flux

Contrary to popular belief, blogs do not need perfect continuity, consistency, or accuracy. Those are nice things to strive for, but not something to constrain oneself to. I’m taking a tip from Khatz and doing the same for my blog.

A post isn’t just text; it’s a message more than anything. The text can change to better convey it, but the message should stay relatively consistent with it’s original intent, which is admittedly subjective and only known by the author. If the overall message of a post changes in a dramatic way, that’s worth a new post for the sake of juxtaposition. But what is the point of leaving ALL past posts untouched when clearly there are ways to make them read better, be more compelling, and possibly more accurate? Posterity? Hah!

There’s value in documenting history, but history is to be stated in retrospect. It’s more efficient. Can you imagine a programmer leaving changed bits of code behind wrapped in comments? No. That’s silly. Delete that stale compiler food and version that sucker. You leave the book-keeping to the commit history of your VCS. Annotate your code with meaningful comments on the changes if you must, but only if it’s useful for the reader.

In the case of a blog, it does not have that implicit commit history, but frankly it does not need one. Programmers use commit history to track bugs, figure out when new issues are introduced, and otherwise is for educational purposes. For a blog, this is only useful information if you want to see how an author/editor does their job. I guess blog edit history might be a nice feature, but meh. If information should be added again, it will become apparent, just as a bug would. There’s a loss of efficiency there if it happens too frequently, but I doubt it will. If that does become the case, well, I reserved the right to be wrong and that’s where I change my process.

Then. Not before that. :)


Jan 03, 2017

Why are you still using Silverware when you could be using Chopsticks

I’ve been annoyed with silverware for as long as I’ve owned my own sets of it. I’ve had the misfortune of having hand-me-down things that I don’t necessarily need dumped on me, tons of silverware being one of them. Having too little of anything is supposedly poor form. Having too much not only takes up space, but also enables me to put off cleaning them for a bit longer. It’s clutter as far as I’m concerned.

As such, I’m officially making the move to chopsticks as my primary utensil. It’s not just because it deepens my Japanese immersion environment. It’s for totally practical reasons. I promise.

To be clear, I don’t mean the disposable kind you’ll find in most restaurants. I mean the kind that are of reasonable quality and totally reusable.

You don’t look convinced. You’re probably thinking “chopsticks aren’t good for everything” and “chopsticks are harder to use” and “forks and spoons make more sense” and “you’re obviously some degenerate weeb who’s just doing this because you have a sick obsession with Japan”. Nuh-uh, I’m being totally serious and pragmatic here. Allow me to explain by debunking these chopstick-related criticisms in a glorious streak of strawman arguments!

Chopsticks aren’t good for everything

Perhaps, but spoons and forks aren’t exactly that great either. That’s also a somewhat arrogant/ignorant criticism to make. Much of Eastern Asia has quite literally used chopsticks for centuries (feel free to fact-check me on this) and they appear to be doing just fine. Not only that, but Asian cuisines are relatively diverse to boot. This criticism implies that chopsticks are only good for certain foods and that’s just plain wrong. Chopsticks are great for most foods if you think about it. A good pair of chopsticks should allow one to pick up things as small as a grain of rice with relative ease.

Chopsticks are harder to use

No they’re not, they’re just different. I very much doubt anyone was a pro at using a fork/knife in a concerted effort to cut something efficiently right off the bat. It simply takes some getting used to. Nothing revolutionary here.

Forks and spoons make more sense

Oh really? You’re not just saying that because that’s what you’ve used all your life? If all you have is a hammer, every problem looks like a nail. Chopsticks are on the reverse side of that, except that chopsticks have some objective benefits that are a direct result of their simplicity. Case in point, no one seems to agree on how to eat spaghetti. Go on, ask around. I dare you. Second case in point, I had a Chinese professor who claims to have eaten spaghetti with one chopstick. Yeah. Eat that.

Don’t laugh (or do, I guess I don’t care), but it wasn’t even a question for me as soon as a friend of mine astutely pointed out that chopsticks are easier to clean and not that much harder to use. Let’s pretend for a minute that he’s not a person who has similarly been learning Japanese (quite successfully) through the craft of a self-imposed immersion environment as I am. Let’s focus on what’s important and not-in-any-way-biased: Chopsticks are simpler in almost every way and not as hard to use as you think.

Let’s try putting chopsticks to the logical test with more things I’ve heard people say.

You can’t eat soup with chopsticks

You totally can. In fact, it doesn’t make sense to use a spoon in most cases. The bowl is a giant spoon already, and anything that can be grabbed/lifted out is a strong candidate for chopsticks. A fork can’t reliably do that for soup.

You can’t eat a steak with chopsticks

Again, wrong. You may need a knife, but you don’t need a fork anymore than you do chopsticks. It may require the chopsticks to be of the more pointy variety, but that’s not a difficult quality to satisfy. Wait. No. You don’t even need a knife. Frankly, the only time you have any business using a fork and knife is when you’re trying to impress some (potentially imaginary) third party with how supposedly distinguished you are as an eater. Any other time, you can use your hands if you want, and even use your teeth as a knife. We evolved to facilitate that, right? Now that I think of it, maybe chopsticks would be marginally more difficult in this case, but again, who are we trying to impress? Furthermore, have you ever noticed that many dishes have the meat conveniently cut up already? Yeah. It’s not a bad idea. Your call, I guess.

What about peas? Peas are slippery and round and would definitely be too hard for chopsticks.

This criticism has not considered that peas on their own are an obnoxious food choice to begin with, and are just as difficult with a fork or spoon. In fact, if chopsticks are capable of picking up a single grain of rice (not just the sticky kind) then they can easily handle peas. But frankly, why are you eating a food with such obtuse transportation requirements for getting it into your mouth? Mix those peas in with something that’s simpler to get a handle on, like soup, or a casserole. Anything, really.

Alright, the strawman has retired for the day. He almost had me with steak but I sure showed him! I think it also goes without saying that some of these are pretty contrived examples. What I’m trying to illustrate is that chopsticks are a suitable replacement for standard silverware in more cases than you might imagine.

Not too surprisingly, there are a few things that can’t be eaten with them as easily.

What about pudding? What about ice cream and jello?

A co-worker pointed this out to me. Well shoot. He got me there. I imagine pudding would be rather difficult. I think I could manage jello, maybe even ice-cream, but it’s a stretch and I can’t say I’ve ever tried. Though much of the time, chopsticks are used like a fork for many things, but it does take a little more balance. Again, it’s just practice. On the other hand, I’ve seen many examples of spoons being used for deserts in Japan. I’ll get to these minor exceptions in a minute. Apparently Thailand uses a fork-like-thing instead of chopsticks, or so I’ve heard. Again, this diversity arises from necessity, not superiority.

Fun fact: Chopsticks are also great for cooking! They have a special variant that’s much longer than normal ones for hotpot and the like. I’ve never had success with a fork in that scenario. The closest we have is tongs, which are like baby’s first chopsticks if you think about it. With soups it’s nice to have a spoon to taste with. Some Asian cuisine has its own version of the western spoon for that exact purpose.

To summarize, the best things about chopsticks are

  • Simple/Low-profile
  • Easy to clean
  • Replace both spoons and forks in most cases

It’s not that chopsticks are in every way superior. They just have a few things that are totally better and those few things happen to be things I value.

I will assert, however, that anything else can be solved with a spork, which is why I own a titanium spork. Easier to clean than a fork, but more robust than both a spoon and fork, which conveniently covers anything that chopsticks are less-than-optimal for, which admittedly is very few things. There you go. Chopsticks + Spork = Win (for me). Try it sometime.


Dec 23, 2016

Trying Out Spacemacs

I’ve been on the hunt for solid IDE-like plaintext editors for a while now. In being a software engineer for both hobby and career, I’ve had my share of RSI, or whatever you want to call it. I’ve become mouse-phobic and have been looking for an editor that better enables that. My search has come to a pause on Spacemacs.

Here’s what it looks like. I’m editing a configuration file (top left), the source code that uses it (top right), a console window for the project (bottom left), and a git interface known as magit (bottom right).

Using Spacemacs to make an Orx game

Spacemacs is an unholy child of Emacs and Vim. As someone with minimal Vim experience, and being largely concerned with usability on both sides of the holy war, this was a weird choice. Turns out, it’s a completely different beast from both Emacs and Vim. It’s both and neither at the same time. Technically speaking, it’s a configuration framework for Emacs, but it really feels like a completely different editor. I find its most attractive features lie outside the Emacs/Vim intersection. It’s in the “Space” part of Spacemacs. It’s the Vim leader-key being moved to the spacebar and kicked into overdrive.

This is definitely a hipster’s editor. New, irreverent, and niche. I guess it’s time to put on the wide-rimmed glasses and scarf I don’t own.

So far, here are my favorite things.

  • Clean and modern looking - no UI fluff and a very nice default theme.
  • Highly extensible - there are tons of layers you can install to streamline your development and tune the editor to your needs.
  • As you may have guessed, almost everything can be delegated to the spacebar as an entrypoint.
  • Excellent window and file management. It took some getting used to conceptually (not having tabs), but I’m in love with it now.
  • It’s well-documented and in many ways self-documenting. This was a big deal for me as a learner.
  • Jumping around the contents of project files is incredible. Helm swoop, avy, and snipe are an impressive tag-team.
  • Automatically considers repositories as projects and integrates with Makefiles.

So far, this has been the most comfortable keyboard-focused plaintext editor I’ve tried. It’s not perfect, but it’s well on it’s way. Try exploring it for a couple weeks. It has a lot of features to experiment with.

It’s still a very young project, but it already has a large and active contributor base. Still, it’s technically in beta. I’ve had some freezes and crashes, but I’ve never lost work as a result. One big thing that bugs me is that it’s still not quite an IDE. Autocompletion and multi-edit just don’t work as one might expect if you’re coming from a robust IDE like Visual Studio. If I could port Resharper’s features to Spacemacs, I’d be set for life. If only…


Newer
6 / 9