fuzzy notepad

Atom feed everything

[blog] Comment policy

I’m still dealing with cretins’ comments on my PHP post, two years later. I’ve always made an effort to never delete or ban any of them, in the interest of allowing discussion and all that jazz.

But let me tell you, it is fucking exhausting reading all that and I am tired of it. And I just realized I wrote a sassy post about Mozilla.

So the comment policy is thus:

Keep your fucking vitriol to your own blog.

Disagree with me all you want. In fact, I encourage it! I love to know when I’m wrong, and arguing over things is how I figure out why I think them in the first place.

But this space is mine, and I even said long ago that the comments are really optional. The important stuff here is what I say, not what you say. If what you say is clearly only intended to be destructive, it and you are gone. I’ve had enough.

[blog] Mozilla and free speech

What a fucking clusterfuck.

In case you were absent from the Internet the past two weeks, or for some reason don’t care about tech shenanigans, the following has happened:

  • Six years ago: Brendan Eich, inventor of JavaScript and founding member of Mozilla, donated $1,000 to support Prop 8, the amendment to the California state constitution that sought to define marriage to exclude same-sex couples, and that apparently would have voided 18,000 existing same-sex marriages.

  • Two years ago: Someone dug up and published a list of everyone who donated to Prop 8. The tech community noticed Eich, CTO at the time, was on the list. There was some furor, enough that Eich responded on his blog. Nothing else really happened, and it blew over.

  • March 24: Eich was made CEO. People still remember that whole Prop 8 thing. All hell breaks loose.

  • April 1: OKCupid adds a big splash page for Firefox users, asking them to maybe switch browsers in protest of Eich’s appointment. All hell escalates.

  • April 1: Eich does an interview with CNet in which he says he’s the best man for the job. The interviewer asks him pointedly about Prop 8 several times, and Eich deflects. All hell escalates further.

  • April 3: Eich steps down as CEO. All hell becomes sort of morose quietness.

  • April 3: The world outside the tech community catches wind of all this. All hell breaks loose, again.

I’m pretty interested in that last part, but first:

[blog] A brief overview of copyright

Technical people can probably skip this one; if you’re even remotely aware of what open source is, you probably have a working grasp of copyright.

Alas! It seems no one else does. So here is my primer.

Legal disclaimer, of course: I am not a lawyer and have no idea what I’m talking about, but this is my current understanding of how stuff works.

Egocentric disclaimer: This is all pretty specific to the United States, assuming any of it is correct at all, but as far as I’m aware the Berne Convention should mean that this is at least faintly similar is most other countries.

Copyright is literally that thing it says: the right to copy. If you own copyright over a work, you have the exclusive right to copy that work as you please. (The point being that no one else does.) “Copy” here is pretty broad; it can mean literally reproducing, selling, performing, or even creating something new based on it. All of these involve copying the original work in some form.

This is also why it’s not spelled “copywrite”.

Thus, when you hold copyright over something, you are the only person who is allowed to do pretty much anything with it except enjoy it. If someone else copies or sells or shares your work, you can go sue them out the butthole.

There are details.

Works

Copyright applies to creative works. You can copyright stories, artwork, music, designs, sculptures, software, and more or less anything you can actually create in some form, but you cannot copyright ideas, you cannot copyright information, and you cannot copyright facts.

This has funny implications for fictional characters; see below.

Copyright is automatic. When you create something, you have copyright on it. You don’t have to use the © or whatever; if you make it, it’s yours. The © really just makes it easier to show a court that you’re the original creator, and might let you sue for more since the jackass ripping you off can’t claim ignorance. Speaking of which…

Restitution

If someone violates your copyright, your only real recourse is to sue. And if you’re reading this instead of talking to your lawyer, you probably aren’t going to sue anyone. Oh and the amount you sue for is probably going to be pretty meager unless you’re rich or a corporation. Which makes this all kind of hilariously pointless in the end. Sorry.

Luckily, in practice, the kinds of people who run hosting companies and sites for hosting creative work are pretty interested in copyright, so you can probably just go up the chain of command and ask to have something removed without ever involving the legal system.

Work for hire

There is a single exception to the rule of automatic copyright: if you create something for your employer as part of your job, it’s called “work for hire”, and your employer owns the copyright.

Commissions are not work for hire; if you call it a “commission”, you’re not an employee. At best you’re an independent contractor, but that’s still not an employee—the only way a one-off work done on personal time could be considered a work for hire is if all parties involved sign a contract agreeing to such. And if you’re willing to do that, you should charge out the ass, because you’re selling your rights away too.

So when you get paid to create a one-off painting or story or drawing or song or program, unless otherwise specified in writing, you still hold the copyright and the buyer gets squat. You’re selling your time, not the work itself. Arguably the buyer has implied performance rights (and I suspect a court would agree), but the buyer does not have the right to modify it, the buyer does not have the right to sell copies of it, and above all the buyer does not have the right to tell you what you can do with it.

Licensing

If copyright were truly limited to the original creator and no one else, the world would be a rather blander place. Which is why we have licensing!

A license is what it sounds like: permission to certain people to do certain things. As the creator, you have free reign to do whatever you want with your own work, but you can give other people license to do some of those things too. (By contrast, you’ve probably seen “all rights reserved”, which literally means “I’m keeping all the exclusive rights I have and you can’t have any of them.” This blurb was actually necessary to claim copyright, before 1976.)

Lots of licenses are informal. You might say “I made this, feel free to use it if you want.” It would make a lot of lawyers cry, but it’s a license given to everyone to do whatever they please with your work.

There are also formal licenses, like Creative Commons, which are designed to actually hold up in court.

To the best of my understanding, unless it explicitly says otherwise, a license can’t be revoked. Once you share your rights, you can’t take them back.

You’re also free to sell your copyright at any time to anyone else, as it’s your property to do with as you please. But if you do, you have zero special treatment over your work. If the new owner doesn’t grant you some rights with a license, you’re no different than anyone else. (It’s a massive tragedy that a great many record labels have contracts that grant them automatic copyright over the songs the artists make. Yes, many mainstream musicians don’t actually own their own music.)

Of course, since you hold the copyright and can do whatever you want, you aren’t bound by the terms of whatever license you give out. You can even give out one license to some people, and a different license to other people. A license only gives other people permission to do some of the things you’re allowed to do automatically. More on this in a bit.

Fair use

Fair use” refers to a brief list of excuses for copying someone else’s work, e.g. criticism, parody, research, reference, news reporting, and so on. The general idea is that there are legitimate types of work that are useful and necessary, but that can’t exist without copying someone else’s work. The rules are pretty fuzzy and pretty much up to a court’s discretion, though, so claiming “fair use” is unlikely to be a bulletproof defense.

Look at a copyrighted image on Wikipedia sometime, and you might see a fair use rationale given. It usually claims that (a) the article would be significantly less useful without the image, (b) the image is only a small low-resolution part of the entire original work, and (c) Wikipedia’s use of the image poses no real threat to the owner’s business model or reputation. Those are pretty much the criteria for successfully claiming fair use.

Delete ROMs after 24 hours

Yeah, no.

All that was just about how copyright actually works. What it is is not so much legal as philosophical.

Copyright originally lasted 14 years (with the option of requesting a single extension); now it lasts up to 120 years. 120 years! That’s so ridiculously long that we don’t even bother talking about copyright expiration any more, because it has zero practical impact on anyone who’s actually creating new things today.

Now we have this strange and self-contradictory culture of ownership. A lot of creators tend to feel very protective of what they create—after all, it’s theirs, and it will be for the rest of their lives. Yet, simultaneously, piracy is commonplace and at least moderately acceptable socially—how many artists have pirated Photoshop, how many musicians have pirated FL Studio, how many students have pirated Microsoft Office?

I think the difference is that people feel somewhat entitled to experience culture. If all of your friends are watching a show, it’s not just the creative output of some group of people any more; it’s part of your shared culture, and by not watching it, you’re missing out on something socially tangible. If every professional artist uses Photoshop (or, more likely, Sai) and you don’t, then not only are you missing out on a powerful tool, but you’re missing out on the vast resources and discussions constantly happening around you related to those tools.

In many cases, by not having access to very popular copyrighted material, it’s easy to feel that you are being actively denied something.

Which brings me (almost) to what I think copyright is, and which I suspect a lot of people intuitively feel about work that isn’t obviously created by a peer.

Without copyright, anyone’s work could be copied and freely redistributed or sold by anyone else. That’s not very nice of the rest of us, and would discourage people from creating things in the first place.

But! The point of publishing work in the first place is to share it with society, to contribute it to our culture at large. What is culture if not a distinct collection of creative works and ideas?

So the idea that a creator is owed multiple lifetimes of control over work sounds really weird to me. Copyright can’t just be a power grab.

Rather, I think copyright is a polite nod from the rest of us, to show our appreciation for having contributed to our culture. Cool, you made this; you can do what you want with it for a little while, but after that, it’s part of the collective consciousness and up for grabs.

It’s unfortunate that copyright term has been dragged out to absurd lengths, mostly to preserve portfolios of work created by people who are now long-dead. Lengthy copyright stagnates culture: the very companies with the resources to create lots of new ideas are encouraged to recycle instead, and no one else can give old work a new twist in the meantime.

This sort of belief is what produced the open source/free software movements.

Copyleft, copyfree, and software licensing

With the rise of computers, a strange problem arose. Previously, a “machine” was something mechanical, built out of physical parts. The design of a machine is an idea and thus can’t be copyrighted—it can be protected by a patent, but patents don’t prevent you from tinkering with your car in your own garage.

Software, on the other hand, is something we describe as being written. It’s considered creative work, and thus is subject to copyright. But unlike almost all other creative works, software can be compiled: you can run it and use it and appreciate it without actually being able to see what it is. You can fairly easily observe the strokes in a painting, the pixels in a digital drawing, the notes in a song, and the words in a story… but you can’t pop open progman.exe in a text editor and see what it’s doing.

You also can’t actually buy software. Since it has no (useful) physical representation, software exists solely as digital copies, and controlling digital copies is virtually meaningless. Instead, you are actually buying a license to use the software, which grants you an unintelligible list of rights. (That’s the legalese you don’t bother reading when you install something: the End User License Agreement, or EULA.) This is a question that never really came up before, as everything had always been distributed as a physical copy, but it’s getting a little weird as more work is sold digitally. Am I buying this ebook, or just a license to read it? Why can’t I sell that license like I can sell the physical book? To the best of my knowledge this is all still very gray legally; some courts have rejected EULAs as not being legally enforceable, there’s growing tension over the inability to resell digital work (like Steam games), and so on.

Where was I.

Right, so. “Free” or “permissive” licenses came as a reaction to copyright and the control it established over software. Developers who didn’t want their software to be locked up in a black box could choose to use a specific license that grants everyone the right to use and inspect and modify their software. In recent years we’ve seen the creation of such licenses for other types of creative work too, but permissive licenses for software in particular tend to require that the source code be made available, so users can see how the software they’re running actually works.

These are two major camps here, with a bit of friction between them.

A copyfree license allows anyone to do basically anything with your work. If there are any restrictions at all, they’re usually just that your name has to stay on any copies, modifications, or derivatives. The ISC license and CC-BY are copyfree licenses. (The term “copyfree” actually isn’t used very much; unlike “copyleft”, there isn’t much of an organized presence behind it.)

A copyleft license is one that allows anyone to do basically anything with your work, with the critical condition that anyone who releases modifications of your work must use the same license. The GNU Public License is the archetypical copyleft software license and the root of the whole idea of licensing away copyright; the equivalent Creative Commons license is the CC-BY-SA.

Both types of license tell the world that you created your work for their benefit, and they can do as they please with it from here. They promote a sort of freedom of ideas. But in the case of copyleft licensing, that freedom is enforced on anyone who wants to reuse the work. The difference is a question of your philosophy: do you support freedom more by enforcing it on others, or by giving others the freedom to not support freedom?

In the case of software, copyleft licensing is particularly controversial, because anyone who modifies your work must also give out the source code for their modifications. A lot of software shops are very protective of their source code and thus don’t take kindly to copyleft licensing—Apple, for example, forbids using it at all in anything they ship. And this is the intended effect of copyleft licensing: anyone who’s willing to play by the same rules can take advantage of a great amount of existing work, but anyone who’s not has to look elsewhere or start from scratch.

(Being protective of source code is a slightly strange thing. Copyright already protects it, and not having the source code doesn’t prevent anyone from bootlegging the finished product. I’ve even met plenty of e.g. homebrew developers who make a point of giving away little tools freely, but are still very protective of their code.)

A particular point of confusion that arises with these licenses is that of selling work. Remember, as the creator, you are never bound by the terms of the licenses you use anyway—but copyfree and copyleft licenses don’t forbid you or anyone else from selling work. However, since the licenses say that anyone can freely give out copies, it’s perfectly fine for one person to buy the work and then give it away to anyone else who wants it. There’s no such thing as piracy with permissive licensing, because you’ve given everyone permission to make all the copies they want.

To recap: if you use a permissive license, anyone can use, reuse, remix, copy, give away, or sell your work. I’m inclined to think permissive licensing has accelerated software development quite a bit, and I wish it were more popular in other fields. Maybe give it a try. Yeah, some jerk might sell mousepads of your work, but he was going to do that anyway. Think of well-meaning people and what they could create with more resources. And sell your own mousepads.

Public domain

Public domain is the realm of work whose copyright has expired. A public domain work thus has no owner, and everyone is free to do anything with it. (Government-created work can automatically be public domain under some circumstances I’m not qualified to explain, by virtue of being created by the public in the first place.)

Note that, at least in the United States, you can’t choose to put your work in the public domain. Public domain is defined only as where work goes after its copyright expires; there’s no legal mechanism by which you can discard copyright before it was set to expire. I doubt this will ever come up in court, since only the copyright holder can sue someone for violating copyright, and someone who tried to put something in the public domain is unlikely to then sue over it.

As a somewhat more robust alternative, Creative Commons offers the CC0 license, which just grants everyone everywhere a license to do absolutely anything. Software has the far more entertaining WTFPL.

Fictional characters

The copyright of fictional characters is an extremely gray area, and I’ve been unable to find any solid guidelines.

Strictly speaking, you can’t copyright a character, because a character is an idea rather than a work. So anyone claiming “my OC is copyright me” is already full of it.

That said, the legal system does recognize characters as being a part of the works in which they appear, and thus sharing in the copyright of that work. This requires that the character be distinct rather than just an archetype—again, the rules are pretty fuzzy. This is probably better left to human decency than to the legal system.

An interesting case that came up very recently was that a court ruled Sherlock Holmes (the character) to be in the public domain. Only some of the original Holmes stories have lapsed into the public domain, but the court felt that the first few books established the character, and thus the copyright on him expired with the copyright on the books, even though other original books starring him are still copyrighted.

What does this mean for, say, Superman? Copyright on the original Superman comics is due to expire in a few years. I guess we’ll see.

That's all I got

I hope this was at least moderately intelligible for anyone not familiar with the subject. Lemme know if anything is unclear or missing or outright incorrect so I don’t get sued for linking this to people who know even less about this than I do.

Final disclaimer: I mean “brief” in the legal sense, obviously.

[blog] Level 27

Another year gone by. I don’t think I even did one of these last year, but let me think about what I did while I was 26.

  • I lost a cat for the first time. It had… quite an impact. Later I adopted a new little buddy, Anise.

  • I bought a Soekris router and slapped pfSense on it. No, really, you would not believe what a nightmare this was to actually make work.

  • I did a whole bunch of Yelp-funded work on pyScss, turning it into a rather solid Sass compiler. I learned a good bit about parsing from this, which is cool since I’ve always thought it interesting but never found a good opportunity for getting my feet wet.

  • We (myself, my boyfriend, my girlfriend, and her husband) just moved to Vegas, which has been fantastic. The old house was co-owned by someone I’d gone to room with after moving out initially, and with the addition of my cluster (and accomanying menagerie) it had gotten a bit crowded. We finally got around to buying a new house in December, and it’s been pretty great so far; the house is cheap but huge (with a pool!), food is everywhere and also cheap, and the weather is rather a bit less dreary than Seattle.

  • I did a whole lot of technical tinkering and not a whole lot of releasing software and that is a shame. I’d really like to actually spit out some useful things this year. Fingers crossed.

Surely I’m forgetting something; that doesn’t sound like a lot. Okay yeah obviously buying a house is kind of significant, but it only ate a month. And I guess Styx’s declining health ate another month, during which I was largely a zombie. And pyScss was the only significant project I worked on for quite a while… hmm.

Seems like 2013 was a dreary void of a year for a lot of people. Even a millenium can’t escape being awkward and useless when it’s 13.

[blog] XY UI nitpicks

Game Freak, you are kinda bad at interfaces. Don’t get me wrong; Pokémon X and Y are absolutely the best in the series and even just showing the party Pokémon from within the bag is nothing short of genius.

But goddamn how does nobody working there notice these other things, some of which have been around since Red and Blue.

(Pretty light spoilers since this is just standard Pokémon gameplay stuff.)

  • When learning a new move and choosing which one to delete (in battle, anyway), there is no way to see the Pokémon’s stats. So if I’m choosing between a 60 power physical move and a 70 power special move, which is not uncommon… I can’t see if the Pokémon has better Attack or Special Attack. I often end up having to consult veekun to guess at the stats of the Pokémon that’s already out!

  • Getting from a move to its description (and damage class, ahem) in battle is ridiculously tedious. You can, of course, hold L and choose a move to see its properties. But this is never mentioned anywhere in the game, I’ve had this actually use the move once or twice, and anyway it doesn’t work if you have L=A turned on (and why wouldn’t you? one-handed mode wooo). Meanwhile, the X and Y buttons do absolutely nothing.

  • The bag has five pockets. Four of them are nicely organized.

    • Key items, of which there are probably a few dozen at most.
    • Berries, which can’t hold more than… 65, I think?
    • TMs, of which there are 108.
    • Medicine, which probably doesn’t exceed 50.

    That leaves the “other crap” pocket, which gets filled with the following:

    • 20 types of Pokéball
    • 18 Arceus plates
    • 18 type-boosting held items (Charcoal and the like)
    • 18 type-boosting gems
    • A dozen evolution items
    • At least 17 species-specific held items (Stick, etc.)
    • At least two dozen general-purpose held items
    • Some untold number of (ahem) the new item type introduced in XY
    • Fossils, shards, loot, Heart Scales, Honey, mail, and god knows what else.

    That’s over 200 items in one pocket, twice the size of the next-biggest.

  • The miscellaneous pocket of the bag no longer shows item grouping icons (like a Pokéball), which at least helped separate sections in BW.

  • Neither the bag nor the in-battle item menu show item icons any more. The held item on a party or boxed Pokémon doesn’t, either.

  • The “item” submenu on a party Pokémon offers to let me take or swap an item even from a Pokémon that doesn’t have one. It also doesn’t tell me what the item is before I take it, which is annoying when I’m trying to find where I left something like Amulet Coin or Lucky Egg.

  • Deposit” and “withdraw” on the Pokémon box system are useless. Using one or the other is slightly faster than going through “organize”, I guess, but anyone who runs with a full party of 6 (i.e. almost everyone) is going to want to do both together. It wouldn’t matter except that this is the one thing stopping me from merely mashing A to get to my boxes.

  • For some reason trading has two ways to show a Pokémon: press A, or tap a weird icon or something at the bottom I forget. The next step from either of these to actually offering a trade is a little different, and I can’t figure out why.

  • When viewing a party Pokémon, I can’t switch directly to my Pokédex and read a description of it. I have to remember its dex number and look it up manually.

  • There is no list of all moves or abilities I’ve seen. :( Shouldn’t the Pokédex track what abilities Pokémon can have?

  • The zoomed-out box grid view on the PC should really color each box icon according to its wallpaper. With 24 boxes this view is not very useful.

  • There are two (and a half…?) completely separate and distinct interfaces for deleting a move. There are at least two completely separate and distinct interfaces for seeing a Pokémon’s summary. This is a little silly, but it’s been the case for a while.

  • The summary view when perusing boxed Pokémon neither mentions its nature nor indicates which stats are raised/lowered.

  • Learning a new move and forgetting an old one involves some three separate prompts. If you change your mind about learning the new move, the button to abort is helpfully labeled “QUIT” and just restarts the sequence of prompts over—more than once have I just mashed A and accidentally agreed to learn it again. Why not just say “here’s a fifth move, pick which one to lose”?

    (That’s an annoyance in a lot of games, particularly RPGs: the button I mash to advance through dialogue is the same button I use to agree to choices offered in dialog. My 3DS has like a thousand buttons I’m pretty sure you can spare a second one.)

  • There are several places in the game where a list of items is intended to be scrolled by sliding on the touch screen, a la most phone interfaces (e.g. the bag, puffs in Amie), but either I’m a clumsy buffoon or something is not calibrated well because I very frequently end up tapping an item instead.

  • I miss the Habitat List. Please stop adding neat UI features in doomed branch games and not bothering to port them to trunk of the next generation. :(

So hey all those people with uncles and cousins that work at Game Freak who’ve come out of the woodwork since XY was announced: if you could pass this along that would be fantastic.

[blog] Cython versus CFFI

(This article has been translated into Russian by Everycloudtech—thanks!)

I have a hilariously unfinished Python module I work on from time to time named sanpera. It’s an imaging library for Python, with the vain hope that it might replace PIL someday. But this isn’t about sanpera.

sanpera happens to be powered by ImageMagick. I distinguish this from being an “ImageMagick wrapper”, as it explicitly has nothing resembling the ImageMagick API, because said API is insane. But this isn’t about ImageMagick, either.

Using ImageMagick requires binding Python to C, and that’s what this is about. There are several ways to use C libraries from Python:

  • Writing an extension module means the Python API is defined in C, so the library is used exactly as it was intended: with C code. Unfortunately this requires writing a lot of C, as well as a lot of careful Python refcounting. My C is passable, but I’ve done far more reading it than writing it, so this is not an appealing option.

  • ctypes is a standard-library module that can load shared libraries and call functions from them without the use of a C compiler or any new C code. Convenient, especially if you hate dependencies (in which case why are you binding to C?), but all the ctypes-powered code I’ve read has been tedious and fiddly and ugly.

  • Cython, a spiritual port/evolution/fork/something of the older Pyrex, is a language similar to Python that translates to C and then compiles into an extension module. Cython code can define Python classes and functions, but also call C functions and perform other C operations directly. Code with C semantics is translated fairly directly to C; code with Python semantics is translated to appropriate use of the CPython API; and Cython fills in all the bits to translate between the two.

I went with Cython because it looked interesting, it seemed to reduce the number of translation layers I’d have to care about, and it would even let me write hot loops (this is an imaging library) in C without actually writing any C. Plus, since it’s not actually Python code, it can compile to both Python 2 and Python 3 extension modules with very little effort on my part.

Here’s what Cython looks like:

[blog] dictproxyhack, or: ActiveState Code considered harmful

This is a story of how nothing in this story is my fault.

I’ve got a coworker who’s super into Clojure, a Lisp-like that runs on the JVM. In particular he’s super into how it’s got notions of mutability (and, thus, immutability) all throughout.

More than once he’s lamented that Python lacks a frozendict—a dictionary type that can’t be changed. Dictionaries tend to crop up a lot in Python, and in a very large codebase, it’s very easy to end up with this scenario:

  1. Some function somewhere generates a dict that’s only used by one caller. The interface is obvious since the keys and values are created right there in one place. No problem.
  2. Other code comes along, notices this handy function, and starts using its return value. Some of this code may pass the ad-hoc dict up to callers, too.
  3. Some of that other code needs more things added to the dict, but computing the extra data is expensive, so arguments are added to the function that optionally turn on certain keys.
  4. Some code needs even more things added to the dict that are outside the purview of the original function, so they add helper functions that take the ad-hoc dict and add more things to it.
  5. Since this has all now happened multiple times throughout your codebase, someone addresses the problem by writing adapter code that infers the original dict from some other object describing its structure, thus saving everyone from writing all these functions that return dicts.

A lovely spaghetti dinner. It’s now nigh impossible to trace what the dict contains or where half of it came from.

Returning an object in the first place would have avoided much of this, but when you’re sitting at step 1, that seems like a lot of effort just to return half a dozen things from a function you wrote to another function you wrote. Swapping out dict() for frozendict() is easy.

My opinion on frozendict had never grown stronger than “I guess that would be cool”, so I never sat down and wrote the class, and there must be enough subtleties that nobody else at Yelp has either.

Then today, PEP 416 came to my attention. This PEP proposed adding a frozendict type, but was rejected last year as being largely unnecessary. What’s interesting about it is that the rejection ends with almost a footnote suggesting that perhaps dictproxy ought to be exposed to Python-land, instead. And indeed this was done, and it exists in Python 3.3.

[blog] I bought a new laptop

Wow, where the hell have I been.

That whole “dying cat” thing ruined most of my April, and I spent most of May dealing with various other life crises, and then June scrambling to catch up. I’ve started and abandoned maybe half a dozen posts in that time that I will totally maybe finish someday. In the meantime, here’s something aimless and specific to me about how I bought a thing. Par for the course, then.

[blog] The controller pattern is awful (and other OO heresy)

Almost a year ago now, Jack Diederich gave a talk entitled “Stop Writing Classes“, in which he implores Python programmers to stop creating classes just for the hell of it, and specifically calls out the common pattern of a class with only a constructor/initializer and a single method—which should, of course, just be a function.

A few weeks ago, Armin Ronacher wrote a rebuttal entitled “Start Writing More Classes“, which argues that classes are essential for both writing extensible code and smoothing over crappy interfaces. (Hm. Now that I look at it again, if you read the post backwards, it almost sounds like he’s suggesting writing a class to smooth out the crappy interface you get from using too many classes…)

I’m having some trouble here, because I agree with both points of view. There must be a way to resolve this contradiction, a message that resonates with everyone.

I think I’ve found it.

Stop writing stupid classes.

[blog] Suzanne Venker is a robot alien in disguise

It’s my best guess. It would explain some things.

She has written another charming opinion piece and I can’t resist butting my big dumb head in to object to a few things here.

(The article was originally accompanied by a thumbnail of a happy couple in typical wedding garb kissing with a cool skyline background. Minor oversight: both of them were women, which sort of contradicts the article’s title in a number of hilarious ways. Strangely, this illustration has now vanished!)

[blog] Look at my cat

In early December 2011, I bought a digital SLR.

In mid December 2011, I bought a cat.

You can see where this is going.

Styx is a Sphynx, one of the hairless breeds. (Wow! Just like Dr. Evil’s cat! I have never heard that before! You are so clever!) Mel already had a sphynx, Twigs, and he pretty much sold me on Sphynxes being the best cats ever. Though I think Styx might have more of a Devon Rex personality and body shape, based on Mel’s cat breed book.

I’ve accumulated a mountain of cat photos, but only a few of them have seen the light of day. Let’s fix that! And please do pardon my shoddy attempts at composition and framing and white-balance and post-processing and otherwise trying to take photography more seriously than Instagram.

[blog] Catchin’ ‘em all

Look at this sweet guy Mel got custom-made for my birthday. There’s context here, but it’s big and complicated, so let’s just say it’s a life-size stained-glass Chandelure and is totally fuckin rad. (That’s an official life-size Eevee, for scale.)

Having a bit of trouble finding a place to keep a three-foot-tall plush, though. He’s got a hook near the top of his flame, but hanging him from the ceiling doesn’t really help since he hangs down to chest level.

Caldera is so cool.

While I’m at it, my collection expanded considerably after our two-week vacation in Japan, and I finally got around to adding a new shelf to hold them all. So, here’s what my room looks like now…

Pinkie Pie is not mine.  No, really. Left side of a big ol' shelf we stuck over my desk. Right side of the big ol' shelf over my desk.  There are a few guys in the background you can't see very well from below. All legendaries.  This is technically a closet, but it has no doors or track, so my desk sits partly inside it. In case the Celebi doesn't make me enough of a nerd, this clock can also show hex, binary, octal, and Roman numerals. The two biggest Eevees are different life-size releases.  Far right Eevee talks!  And something here is out of place... This is where the magic happens.  If by magic you mean sufficiently-advanced technology.

I’m not too proud to admit that I might have a problem: where can I possibly fit more shelves?

[blog] A new use for StackOverflow

It’s hard to get a feel for a new tool. Is it any good? Does it do anything I can’t already do? What’s the community like? Tough questions to answer without diving in and using it for a significant amount of time—and then you risk not liking the answers you get.

But fear not! I have discovered a new and brilliant way to discern the novel features of a tool, the vibrance of its community, and its range of users all at once. In mere minutes.

Look at its ten highest-voted questions on StackOverflow.

I’m totally serious. Watch.

[blog] CVs and file extensions

Like many employed engineers, I get roped into the hiring process from time to time. I don’t actually screen résumés, but I do grade some code tests, and the résumé is sent along with it—in case I find myself desperately seeking an explanation for receiving five hundred lines of JavaScript arranged as haiku.

In glancing over these résumés, I’ve observed a pattern: I’m far quicker to judge the file extension than the contents. It’s easy to lie or exaggerate in a document, but habits are far more difficult to hide. If you’re the kind of person who reaches for Microsoft Word, you’re still going to do that when writing a résumé.

I expressed this to Twitter, and not only did I get several people asking what formats I preferred, but I’m drowning in a deluge of suggestions for ridiculous résumé formats. Let us collect some here.

(Disclaimer: I don’t speak for my employer yadda yadda.)

docx: What the hell is this? Are you even a programmer? I haven’t had an office suite installed for years and I don’t plan to start now just to find out what dumb school you went to. I may open it as a ZIP and glance over the text nodes in word/document.xml; hope there’s no important formatting in here.

doc: This isn’t much better, and your office suite is ancient besides, but at least I can throw this at antiword and have a good chance of being able to read it.

pdf: Okay, sure. I apologize in advance for the horrendous mangling your hand-crafted masterpiece will experience when it encounters everyone’s HR systems from 1993.

pdf with only glyph strokes and no text information: Fuck you.

pdf clearly generated from LaTeX: Instant boner. Are you sure you’re in comp sci and not math? Maybe you want a LISP shop.

tex: Hired.

rtf: You’re either an idiot or as frustrated with the lack of light document formatting formats as I am. But it doesn’t matter because I still can’t read it.

txt: NICE, as long as it contains either RFC-style genuine plain text, Markdown, or ornate Unicode box-drawing decorations with emoji insets. Suggestions for appropriate monospace fonts a plus.

odt: This is still a pain in the ass for me to read, but kudos for trying, and double kudos for using a file format no HR department on the planet will recognize.

ps: Nice try, but I’m not a printer. Cross your fingers and hope Inkscape gets it right.

html: There is something very fundamentally wrong with emailing HTML as an attachment. If you’re so familiar with HTML then maybe you should get, like, a website.

xls, ods: Allow me to respond with this chart of how much I hate you.

xps: You are out of your goddamn mind. I’m intrigued.

xml + xsl: I’ve had enough XSLT for one lifetime, thanks.

link to a shared document on Google Drive: It appears you work for Google and they won’t let you have a real computer, only a Chromebook. They’re probably paying you more than anyone else can, so it doesn’t much matter whether we make an offer.

py: Putting your entire program in a single file is poor form. This should be a bdist egg.

exe: Acceptable only if this is a crack for expensive obscure software released in the past 15 days. I will also be judging you based on the sweet trance music that plays while it’s running.

swf: Unless this is a vim swap file, get the fuck out. If it’s a vim swap file, you direly need to delete/recover some old files, and then get the fuck out.

iso: I’m aware of precisely one psychopath who has created a disk image that boots into the OS they wrote and displays their PDF résumé. No other form of .iso submission is acceptable.

c: goddammit klange

jpg: Now you’re just fucking with me. A text-heavy image should be a PNG.

anything that 0-days my machine: You can have my job.

[blog] Dimorphism

Today I went to the drug store. I bought nail clippers, a nail file, and a nail buffer. All existing nail clippers in this house have been transmuted into cat toys and subsequently batted into the void where lost cat toys go.

The cashier asked, with a knowing smile, “For your wife?”

Well, naturally, because dudes don’t have fingernails. That’s why guys have all the jobs where fingernails would be a hindrance or hazard, like programming or rock-climbing or making more money.

I told him “no, for me” with a sigh, and only later realized that he’d think I was sighing at myself rather than him. Whoops.


I twatted something similar last night, while looking on Amazon for lounge pants (which, let’s be honest, are just pajamas). The same category tree exists for both men and women, yet there is quite an obvious difference between men’s loungewear and women’s loungewear. Or even, hell, men’s socks and women’s socks.

I just want neat abstract patterns in nice colors. Instead, I get:

  • Solid dark blue, solid black, solid dark black
  • Plaid, usually prominently featuring the above colors
  • Bad tessellation of a beer logo
  • Stock artwork of Stewie Griffin saying something from a Family Guy episode that first aired in 1999

Y chromosomes must self-destruct in the presence of saturation, or something.

[blog] Crash!

So someone hit my car last week.

It was parked on the curb, right in front of my house. (We have four cars and a packed garage, so.) I heard a super loud smack, but thought someone had dropped a large appliance on the sidewalk until Mel appeared in my doorway with someone hit your car.

Outside I scurried in pajamas and slippers (working from home is awesome) and I beheld the scene you see inset. The driver was very apologetic, and luckily unharmed. She’d been fiddling with something on her dashboard and wasn’t even looking at the road, so she hit my car at full speed. The photo is framed as it is because my car had been parked with its rear wheel on that grate, and with the parking brake on. That’s how far she knocked it. (Speed limit on this street is 25, by the way.)

I felt kinda bad for her, but at the same time, that this even happened is terrifying. I don’t know if a human being would have survived the same impact. She said she’s “normally such a safe driver”—I guess she’s only a dangerous driver sometimes, then, and it turns out those are the times when you hit things.

Called 911; couple police cars came to direct traffic around her and file an accident report, and a flatbed tow truck took her car off. I had to leave my car “parked” in front of a fire hydrant overnight, because the rear axle was bent so much that it doesn’t move at all.

My car was towed to a local shop the day after; they called me back earlier this week with an estimate around $7400. The driver’s insurance is paying for absolutely everything without question, though, so I shouldn’t be out a dime over this. I have a rental in the meantime.

This is actually the second time this has happened; early this year I was street-parked on the other side of the street, and I awoke to find a conspicuous dent in the driver’s side door. And when I say “dent”, I mean it spanned the bottom of the door up to the window; looked like a shopping cart had hit it at an angle while going 40. I’d only slept for a few hours the night before, and Mel had been awake through the night, but neither of us heard or saw anything. Don’t know what happened or who did it. I thought it would be a simple fix, but the shop had to replace the entire door, I had to pay a few hundred deductible, and my insurance went up. Super.

I’ve never hit anything, never gotten a ticket, never even been pulled over. I live in a fairly sleepy town, not on a major road. And in two years my car has been hit twice, while parked at home. I’m just gonna start parking on the lawn.

Below are some photos of my poor darling car. Consider this a test of this fancybox plugin gallery plugin.