I can hardly believe I posted a bunch of photos of Styx earlier this year.
Three months later to the day, I put him to sleep.
I suppose this is his obituary.
I can hardly believe I posted a bunch of photos of Styx earlier this year.
Three months later to the day, I put him to sleep.
I suppose this is his obituary.
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.
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!)
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.
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.
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…
I’m not too proud to admit that I might have a problem: where can I possibly fit more shelves?
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.
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.
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 he wrote and displays his PDF résumé. No other form of
.iso submission is acceptable.
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.
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:
Y chromosomes must self-destruct in the presence of saturation, or something.
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.
Here are some photos of my poor darling car. Consider this a test of this fancybox plugin.
Yelp had a hackathon a couple weeks ago. These affairs are mixed blessings for me: a fixed chunk of uninterrupted time to work on a single project is great, but I tend to have at least a dozen ideas that I want to do all at once, none of which can be reasonably “finished” in a scant 30 hours, and most of which are obscure enough that nobody can work on them with me.
For example, during this most recent event, I wrote a roguelike. In Rust.
Long-time readers may recall that I’ve attempted to write a roguelike before, in Python, but fell prey to architecture astronomy. This time would be different! Because I would only have 30 hours. Also because static typing limits my options, thus making it easier to overcome choice paralysis. (It’s a working theory.)
But first: a bunch of people have asked what I think of Rust, and now I’ve actually written something approaching a real program in it, so let’s start there.
This is a thing I got yesterday. Not 24 hours ago, even.
Mel had it done last December and started dropping hints that I should also get it done pretty much that day. I stalled and dawdled forever, but I’ve been experiencing a lot of eye strain lately and was due for an eye exam anyway, so I finally made an appointment for Wednesday.
Not that Mel was continually bugging me to do it or anything, but when faced with the prospect of doing something terrifying, spinning it to myself as something someone else wants doing is a convenient brain hack.
Yes, terrifying. You see, I don’t like things i my eyes. I don’t like water in my eyes. I had never opened my eyes underwater until a couple months ago, and it still feels like a superpower to me. If I get an eyelash in my eye, I have to find a mirror and manually guide it out because it bugs me so much. And now I was facing a medical procedure that involved shining a laser into my eyes. A laser! You know where you’re supposed to shine a laser? Anywhere except into your eyes.
Everyone at the clinic told me reassuring things, like that it’s a cold laser, or it doesn’t hurt, or it’s over pretty fast, or whatever. No, no, you don’t understand. It’s not that I don’t like things in my eyes because some rational underlying fear. I just don’t like things in my eyes, the same way I don’t like sharp things under my fingernails, or I don’t like spiders. I don’t like it. It’s creepy and I want to run away from whatever it causing it.
Okay, this story seems to have gotten a little off-track. Let’s rewind.
I love tinkering with things, but in the absence of external stimuli (like, “it’s my job”), I’m pretty bad at finishing things. Instead I gradually accrete a ball of projects, todo lists, XXX comments, half-written blog posts, and mental notes-to-self. Eventually the mental load becomes overwhelming and I freak out at how many recreational things I “have” to do.
So I spent much of last weekend trying to alleviate this, by dumping various todo files and the contents of my head and tabs that have been open for months and half of my Workflowy into issue trackers. I know, duh, but I always get out of the habit of using them, and then it seems like more effort to get back into the habit than to just jot down or remember one more thing. Maybe this time it’ll stick. I have far more brain to be dumped, but what’s left is generally more detailed planning that won’t come into focus until I sit down to seriously work on the corresponding project. The real test will be whether I keep filing tickets as they come to mind. And actually, like, assign them to myself. And do them! Whoa.
I’m also making an effort to make my code more accessible to anyone who wants to contribute to it; I’ve been using git and GitHub for ages and attracted a couple pull requests, but I’m pretty lax about even build documentation. I wrote a few READMEs to alleviate this, and will be writing some more as I touch repositories that lack them.
Oh, if you give half a crap about what I hack, I’ve thrown together a projects page listing some of the things I’ve started attempting to build. Or you could just look at my GitHub, really. Feel free to contribute, or tell me how I’m making it hard to contribute.
And I totally cut down on the number of distinct categories I was using for this blog, so when I start posting more than once a month, categories will be useful for sifting through posts!
Partway through that, I gave myself the additional unwritten rule that the next language would be selected by polling the nearest group of nerds. This has resulted in math problems solved in such wildly inappropriate languages as vimscript, MUMPS, LOLcode, and XSLT.
It’s been a while since I did one of these, but I still remember that the next language I’m stuck using is COBOL. I don’t know who suggested it, but I hope he chokes on a rake. ♥
I figure if this is interesting to me, it might be interesting to someone else. So let’s learn some math and/or COBOL.
This is a thing I did. It was a cracking contest held by Stripe (who run a pretty neat service, btw), and it ended today. I was third to beat level 7 and twentieth to beat level 8, so here is the tale of how I came upon the solutions.
I haven’t reproduced the entirety of each puzzle below, because that would suck, but if you’re lucky maybe you can still sign up and follow along. If not, Stripe has promised to release the puzzles (and solutions) tomorrow. I think.
Anyway, my sympathy for PHP’s deviltry is because I appreciate its ethos. Its just-get-it-done attitude. Or, as Melvin Tercan put it in his recent blog post, “here’s to the PHP Misfits. The pragmatic ones who would pick up anything – even double-clawed hammers – to build their own future. Often ridiculed and belittled by the hip guys in class who write cool code in Ruby or Python, but always the ones who just get shit done.”
He’s on to something there. The best is the enemy of the good, and shipping some working PHP code is approximately a million times better than designing something mindblowing in Haskell that never actually ships. I fully support Jeff Atwood’s call to replace PHP once and for all–but I hope that everyone realizes that eliminating its many, many, multitudinous flaws won’t be enough; they’ll have to somehow duplicate its just-make-it-work ethos, too.
This is a recurring sentiment: developers telling me, well, yeah, Python may be all cool in your ivory tower, man, but like, I just want to write some programs.
To which I say: what the fuck are you people smoking? Whence comes this belief that anything claimed to be a better tool must be some hellacious academic-only monstrosity which actively resists real-world use?
But, hey, I’m sick of talking about PHP. So let’s talk about Python. In honor of the 90s, let’s make a guestbook.
Mel, Jayson, and I are attempting to construct a game called Flora. It seems obvious now that we’ve actually started: between us we have the pixels, the words, and the binaries. That’s everything right there.
I could blather about my adventures figuring out how to make OpenGL do anything useful, but who the hell cares. Far more interesting is the adventure of figuring out what the game actually is.
We have a pretty simple approach here: we’ve each played some decent set of video games, and we each have unreasonably strong opinions about what was good or bad. All we have to do is make a game with all the good stuff and none of the bad stuff. Done. Ship it.
The game revolves around Mel’s fictional universe, populated by all manner of colorful critters. The protagonists and namesakes are flowercats, so named because they are flowers with cats growing out of their stems.
It’s a top-down role-playing adventure, except everyone has a different idea of what that means, so let’s say it’s roughly the same style of game as Link’s Awakening. Turns out all three of us like adventuring: exploring a world, feeling like part of it, discovering secrets, finding teases of the plot, and hitting stuff. Luckily, the main characters are into the same kinds of stuff, so we’re off to a good start there.
The theme is turning out to be “elements”: both of nature (earth, fire, etc.) and of gameplay itself. We keep finding ways that distinct focus on each of exploration, puzzles, and combat seems appropriate. Possibly because each of us has a different favorite of the three.
Which brings me to the tricky bit: finding a middle ground between what we like and what drives us fucking bonkers.
Avoiding the bad is going to be tricky, to say the least. Some of these plague virtually every game because it’s just damn hard to do anything else. Still, I have every confidence that we are uniquely suited to avoid pitfalls that the biggest and most successful game development studios have yet to subvert. Cause we’re awesome.
So far we have one sprite drawn, and I’ve built an engine that lets it walk around a fixed region. (Spot the programmer art.) Basically done! I guess I’m building it half-from-scratch: I’m using pyglet and cocos2d, which provide a lot of basic niceties like event handling and layering and transformation and actions over time, but they’re both simple enough that I can easily understand everything they’re doing and could replicate it with a gun to my head. It’s the same kind of sweet spot as Pyramid is for Web development.
We have a Large Pad with tons of small ideas scribbled on it, and we brainstorm every other day. Currently trying to pin down how combat and advancement will work; there are a ton of options and getting it right is tricky. As the engine becomes useful, we’ll be able to actually try stuff out.
This is a side project among side projects for all of us, completely unfunded, with no deadline. So there’s no ETA, and we’ll just work on it as we feel inspired to do so. Interest is always interesting, of course.
The code is ISC and the assets are CC BY-NC-SA. All of it lives on GitHub. We’d still like to sell the completed game, but the plan is to only charge for the installer. (Oh, right: I develop on Linux (who doesn’t!) and it’s all Python and OpenGL, so it oughta run on pretty much anything.)
Yep, that’s all I got. May write about bits of it in more detail later, if there be interest.
Part of my Python FAQ.
How do I pass by reference? Does Python pass by reference or pass by value?