fuzzy notepad

Atom feed everything

[dev] Did some Spline work, again

Sketch is still buying days of my time, which is super cool of him. Continuing from last month, he asked that I make it possible to disable normal editing and only accept proposals on the wiki.

After some internal debate about how to add a real configuration system, I realized this could just be expressed with permissions, so I wrote some little permissions UI. And actually added them to the proposal code. Which is good.

I wanted to have a nice way to iterate all possible permissions from whatever plugins are currently active, but the way permissions work right now is kind of fucked up anyway, so in the end I just hardcoded a list of existing permissions. Oh, well. I’ll get around to it.

Also I added CSRF protection everywhere. Whoops. Like I said, spline is still lacking in a lot of niceties, such as “being ready for production use”. But it’s getting there, one architecture astronauting session at a time.

While I was in there I finally added UI so Glip can attach videos and cutscenes to Floraverse pages without my intervention. It was pretty easy and I don’t know why I subjected myself to messing with the db manually for so long.

This isn’t very long or exciting; it was my project and I knew what I was doing, and there was a lot of pondering involved, and I don’t have anything to complain about.


Which is why I’m using it to start off a dev log, containing shorter posts about things I have done that don’t merit some deep dive into obscure technology. I also started keeping a notebook (a real, physical notebook) for jotting down stuff I do every day, and maybe I’ll summarize it once a week or so. I’ll also post about little “releases” like Mario Maker levels. In fact I might go make backdated posts for all the levels I’ve made so far.

Remember, if you’re following via the Atom feed and only want to see the blog, there’s a feed with only blog posts.

I’m not sure what this means for the projects page, which has always been kind of a mess. It’s also annoying that you can’t easily filter by project, because they’re just tags, and it’s not obvious which tags are projects. I’ll figure this out as I go, I suppose.

[release] Mario Maker: Pipe Dream

1AA3-0000-0104-C7ED
Difficulty: easy
Quality: ★★★★☆
Secrets: 🍄🍄🍄🍄

I bumbled upon a pipe-themed level while playing 100 Mario Challenge, and decided I wanted to do one. Unfortunately I hit the warp pipe limit much earlier than I’d expected, so it’s only partially pipe-themed. Still, I’m pretty happy with it.

I keep trying to make levels that are easier, more interesting, and less linear, and I think this is the first time I really feel like I hit that mark. I only spent a few hours on it, too.

[blog] ZDoom on a Wii U GamePad with a Raspberry Pi

Well. That was the idea, anyway. SPOILERS: It didn’t work.

Vladimir Costescu has upped the ante and bought a day of my time this month, requesting:

It would be cool to read about you tinkering with a Raspberry Pi or similar cheap device and trying to get it to do cool stuff (where “cool stuff” is left up to your discretion).

Well it just so happens that I already have a Raspberry Pi. I got it at PyCon US, I think three years ago, when they gave every single attendee a Pi for free. I thought it was super duper cool and I spent a whole afternoon tinkering in their Raspberry Pi lab and then I came home and put it in a drawer forever because I had no idea what to use it for.

At first I thought it would be cool to rig something that would download a random wad from idgames (like vectorpoem‘s WADINFO.TXT) and just launch it and let you play it. A teeny tiny portable Doom box.

Then I realized you’d still need a mouse and keyboard (well, at least a keyboard) to actually play, which is a little bit more cumbersome and detracts from the portability a bit.

But I remembered hearing about a Linux-only project that had managed to interface with the Wii U GamePad. Run ZDoom on a light wireless controller with gyros and everything? That sounds awesome.

So off I went.

[release] Mario Maker: Mount Erebus

8A2E-0000-00FE-85D5
Difficulty: fairly easy
Quality: ★★★☆☆
Secrets: 🍄🍄A + trick to make the boss easier

There’s a story behind this.

I was bored and wanted to make a Mario level, so I asked Mel to pick a tileset. They said castle. So I made a castle level.

I didn’t say it was a very good story.

I’m a little unhappy that you can get hurt with little warning in a couple places, but I think it’s balanced out by how short the level is.

If you’re curious, this is named after a level from the original Doom, which in turn is named after the southernmost mountain on Earth.

[release] Mario Maker: Free Will

D161-0000-00FA-5905
Difficulty: entirely in your hands
Quality: ★★★☆☆
Secrets: 🍄🍄

I want to call this “experimental”, but then, aren’t all of these experimental?

Something I’ve been thinking about a lot lately is games where the plot isn’t actually necessary. The world isn’t ending, your life isn’t in danger, it’s just a fairly standard story. And the game never explains why the protagonist needs to do it. It’s just taken for granted that the protagonist wants to go through the story, because that’s how games work.

(I can’t actually think of examples of this off the top of my head, now, but I know I’ve run into it.)

Of course, players tend not to notice this, because the entire point of playing a game is to do the thing that the game offers. So sometimes that’s the only reason the protagonist wants to do it: because the player wants to do it. Because it’s a game, and if you didn’t do it, there’d be no point.

So.

Here is a completely trivial level. You can just immediately run to the goal. The point of Mario games is to reach the goal, right? There’s nothing stopping you here.

Or is the point to enjoy the experience of traversing a level? If you do that and enjoy yourself, even though none of it got you any closer to the goal, didn’t the level still serve its purpose?

Up to you!

[blog] Undertale

Undertale is a very good game.

So you should play it, because I am about to spoil the hell out of it.

No, really. Don’t read this if you haven’t played the game. It won’t even make sense. I’m reflecting on it, so I’m not gonna bother explaining stuff you would know if you’d seen the ending(s).

This is a heavily story-based game. Dissecting the plot without playing it will not entertain you and may ruin your enjoyment of the game later. I’m not kidding.

Okay then.

[release] Mario Maker: Cookie Dough

00EC-0000-00DB-3CA7
Difficulty: fairly easy
Quality: ★★★★☆
Secrets: 🍄🍄🍄🍄

Vanilla Dome has a cool aesthetic and an unusual style — you navigate up and down through caverns, rather than mostly to the right as is common in Mario. I tried to capture some of that here.

This was the first time I tried to do any real narrative things with the detailing in the level. Not some grand coherent plot; just little hints that life is happening here and it’s not necessarily centered around you. I love that in games.

There are also quite a few branching paths, which is a little difficult to cram into Mario Maker where the world can only be two screens tall. Jamming in a lot of secrets made it even harder, but I managed. See if you can find them all! No backtracking required, I think.

There’s a boss battle at the end, though the solution is unfortunately not as obvious as I’d hoped. A surprisingly tricky problem is finding ways to force the player to actually beat the boss, rather than scurry past it. (I’m not sure anyone has picked up on what the boss is, either.) It’s a real shame, because it feels clumsily tacked onto the end of what is otherwise a pretty nice level.

Overall I think this could use a little bit more cohesion, but I’m pretty happy with it.

[blog] The tech diversity blind spot

Twitter recently lost its only black engineer in a management role.

The top-voted comment about this story on Hacker News begins thusly (emphasis mine):

I’ve been working for over 20 years in tech at 10+ different companies around the Valley, and I can count on 1 hand the number of direct coworkers that were black, and on 2 hands the number of coworkers that I indirectly worked with that were black.

I don’t believe this is due to any sort of racism, but rather due to the education system in general. Trying to solve the diversity issue at the hiring end, when the number of qualified candidates is so small, is not the right way to solve the problem. The only way you will hit higher-than-normal diversity numbers is to reduce hiring standards, which is wrong.

This is an interesting thing to say (and upvote) when the article itself said the exact opposite:

In the course of the meeting, [the VP of Engineering] suggests that we begin tracking the ethnicity of potential candidates in the pipeline to understand better where candidates are falling out. I agreed that this is an important metric to track and conveyed that the current data we had indicated that the problem is not just the pipeline. While ethnic and gender data early in the pipeline is incomplete, we do know that in 2013, 4.5% of CS graduates from the top 25 schools were African-American, and 6.5% were Hispanic/Latino.

A chart in the article indicates that in 2014, Twitter’s tech employee population was 1% black and 3% Hispanic.

[blog] Internet novelty: testing personality

This month, Vladimir Costescu has requested (with dollars):

For this month’s funded post, I’d like to see you write about personality typing, with an emphasis on Myers-Briggs / Jungian typology. This means I’d like to see you write mostly about MBTI and dig a bit into cognitive stack theory, but if you happen to have tidbits of knowledge about other methodologies (e.g. Big Five, Enneagram, etc.) already in your mental data banks, it would be cool to hear about them too.

Don’t worry: I don’t know anything about cognitive stack theory, or even what that means. But that’s never stopped me before!

[blog] Copyright is broken

Undertale is a fantastic game. I might even write about it sometime. But not right now.

See, Undertale’s creator said a few weeks ago that taking Undertale commissions is fine, but selling unofficial merch is not. I said yesterday that I think this is kind of uncool, and I was somewhat surprised to get half a dozen people instantly disagreeing with me for various reasons. I thought about this a lot in the shower, and here are some words.

First let me clarify why I think this is uncool. The merchandise I had in mind was buttons and stickers and prints and other physical incarnations of art. You see this kind of stuff sold rather a lot at anime conventions, because it works really well — it combines a popular subject with unique custom artwork. Commissions are all well and good, but they don’t pay very well and there’s a physical limit on how many a single person can do. It’s much more efficient to put more time into a smaller number of things with broad appeal, then sell them as physical objects to a greater number of people.

That’s what I see being disallowed here. Someone could pour days or even weeks into a beautiful illustration, and then not be able to sell it — to be compensated for their hard work. Meanwhile, the free spread of that same illustration online helps keep the source material popular, fueling more sales of the game.

Some people said, well, he might want to sell his own merchandise. My kneejerk reaction is that maybe he should get on that then? He even had a head start, seeing as he knew everything about the game long before it was released. My second kneejerk reaction is that I really doubt artwork competes with itself as strongly as direct copies might; there are plenty of people who will gladly buy many different depictions of the same thing. There’s a cap on how much a given person can spend, sure, but official merch is always wildly popular and I can’t see it seriously being cannibalized by a few indie keychains.

But the more I thought about this, the more I started to wonder: why do we even take for granted that he should have a monopoly on merchandise?

[release] Don’t use pickle — use Camel

Don’t use pickle. Don’t use pickle. Don’t use pickle.

The problems with Python’s pickle module are extensively documented (and repeated). It’s unsafe by default: untrusted pickles can execute arbitrary Python code. Its automatic, magical behavior shackles you to the internals of your classes in non-obvious ways. You can’t even easily tell which classes are baked forever into your pickles. Once a pickle breaks, figuring out why and where and how to fix it is an utter nightmare.

Don’t use pickle.

So we keep saying. But people keep using pickle. Because we don’t offer any real alternatives. Oops.

You can fix pickle, of course, by writing a bunch of __setstate__ and __reduce_ex__ methods, and maybe using the copyreg module that you didn’t know existed, and oops that didn’t work, and it’s trial and error figuring out which types you actually need to write this code for, and all you have to do is overlook one type and all your rigor was for nothing.

What about PyYAML? Oops, same problems: it’s dangerous by default, it shackles you to your class internals, it’s possible to be rigorous but hard to enforce it.

Okay, how about that thing Alex Gaynor told me to do at PyCon, where I write custom load and dump methods on my classes that just spit out JSON? Sure, you can do that. But if you want to serialize a nested object, then you have to manually call dump on it, and it has to not do the JSON dumping itself. There’s also the slight disadvantage that all the knowledge about what the data means is locked in your application, in code — if all you have to look at is the JSON itself, there’s no metadata besides “version”. You can’t even tell if your codebase can still load a document without, well, just trying to load it. We’re really talking about rolling ad-hoc data formats here, so I think that’s a shame.

But I have good news: I have solved all of your problems.

[art] Pokédex doodles, part 1

Inktober” is a thing where you do an ink drawing every day throughout October. I tried it, mostly got frustrated at producing scribbly crap with errant lines everywhere, and gave up after a few days.

I know drawing without relying on an eraser is good practice, and it’s definitely something I want to get better at. So here’s an attempt at combining it with speedpainting, where poor results are more palatable, because hey I didn’t have much time anyway.

The rules:

  • Draw Pokémon, in order
  • Pose must be different from the stock/reference artwork
  • I have to publish the results, no matter how terrible
  • 5 minute hard time limit
  • No erasing
  • No undo
  • No layers
  • No layer modes
  • No starting over
  • No cheating

Mel pointed out that the rules are likely to get old after a while, so I might shake them up every couple dozen or so, or change how I’m drawing, or whatever.

Here’s the first batch. I’m underwhelmed, but not ready to throw my tablet out the window, so that’s an improvement. Let’s see how this goes.

[blog] Fair warning: minor restructuring ahead

I started using Tumblr some time ago to publish sporadic shorter writing, as a way to combat the feeling that everything I wrote in this “real blog” had to be long and semi-formal. The short writing more or less migrated to Twitter, but Tumblr remained for some community-specific griping. When I started learning to draw, it was an obvious place to stick my doodles as well.

But Tumblr is a frustrating platform that I’ve never found myself particularly enjoying. Plus, it seems a shame to have this amazing domain hack and only use it for one kind of thing.

So I’m going to try expanding the purview of my tiny platform. Pelican isn’t quite designed for this, but I’m going to turn its concept of “categories” into more like content types, whatever that ends up meaning. “Blog” is now its own category; I’ve put all my old posts in it and will put other long-form writing in it in the future. (I also cleaned up the tags I use, merged the old categories into tags, and hid single-use tags from the sidebar.)

I haven’t decided exactly what else will go here yet. Posting art is an obvious start, and I might even backfill all my doodles since I started drawing in January. I might write some shorter and more “disposable” things. I might write short updates on particular projects. I might post tons of cat photos, and backfill those too. I might try keeping a “dev journal”, where every single day I write a quick paragraph or two about what I did.

I mention this mainly as a heads up to any techies who’re following via the feed. If you want to see anything and everything I publish, it’ll all be in the same global Atom feed, so you don’t need to do anything. If you only want to follow my blog, there should be a new feed just for blog posts. Every category gets its own feed, so you can also mix and match as you please, once I get some other categories started.

Are you excited? I’m excited.

[blog] Next steps for beginning programmers

Last month @zandrmartin asked me on Twitter:

i would love to read a post about things you would recommend newish programmers learn, esp those coming from a php web background

not even tutorials as such, just like ‘you should learn about x and how to implement it effectively’ would be great

like when you were talking about bit masks a while back, i have no idea what those are or why you’d use them, but i want to

I’ve opined on this sort of thing briefly in various impermanent places, but somehow never tried to consolidate it at all. So here you go, some stream of consciousness on being more better at computers.

[blog] My search history is now full of illegal drug terms

Someone has generously pledged a pile of money and asked me to write about the War on Drugs. Preliminary research reveals that this is not actually anything to do with programming, which confuses and bewilders me, but I’ll give it a try anyway.

My gut reaction is to say “it’s bad”, on the basis of victimless crime and right to private action and all that, but that doesn’t make for a very interesting post, and there are plenty of thinkpieces along those lines anyway. I’ll try to do a teeny bit of research, so I’m not just paraphrasing Wikipedia.