World Design and “instant-only” magic

So to go into detail a little further on last night’s little thought, I keep thinking about fantasy world design with traditional D&D magic, and how utterly illogical they are.

My main point is that the presence of long-lasting magical effects would pretty much always result in something that is no longer a feudal society.

You can throw around the handwave of “but it’s FANTASY” all you want, but the fact is every society faces pretty much the same problems: food preservation, sickness, transportation, and war. Humans invented agriculture so as to allow food to be created literally while they were sleeping; medicine, because people get sick and die over the dumbest things, like a small infection; transportation, because sitting in one place eventually exhausts its local resources; and war, because fuck those other guys. The first 3 also serve to make war more efficient: moving troops and their food, and healing their injuries.

So your average fantasy world (as shipped by whatever edition of D&D is current) has spells for all those things, yet every game world is pretty much late feudal in structure. What total crap.

(SIDEBAR: Yes, I am aware of Eberron, which is I think the first mass-market not-dumb-feudal setting. Sadly I have yet to meet anyone who actually plays it.)

Anyway, I think the “fix” for this is to simply disallow any spell or effect that does anything that persists. It fixes every problem!

  1. No stupid “colleges of Magic”. Magic effects happen as a result of some unknown, unquantifiable process. There is no correspondence course to learn how to shoot lightning bolts from your butt.
  2. Great and mighty empires happen mostly as a result of conquest, not superior economics, which is what happens when you can preserve food, acquire resources, and keep your people healthy.
  3. Trap-laden holes in the earth are now essential means of guarding treasure, as you cannot simply ward them with impenetrable force fields.

And so on. The exact definition of “instant-only” is a little fuzzy at times: obviously “continual light” is out, but “cure disease”? In my mind, “cure disease” is not instant, but I suppose opinions vary.

A brief D&D nerd thought

What if “magic” was defined as only momentary violations of the laws of physics?

So one of the things that define D&D magic is things like enchantment of items, the “continual light” spell, and so on; things that persist. What if the world only allowed only momentary violation of physics, causality, whatever?

It seems like a small change on the surface, but it’s probably huge: it’s a world without “magic” swords, or whatever. Most fantasy game worlds are built on persistent magic.

Switching to Amazon Cloud Player

I’ve been using iTunes Match since beta, and I’ve mostly been happy with it. That is, until sometime around the most recent iTunes update cycle, when it started to become moody: flaky and unreliable on some days, fine on others. 

Taking this as a sign that it’s time to start putting effort into getting off the iTunes ecosystem, I have started using Amazon Cloud Player. 

The Good:

First and foremost, so far the best thing about it is it always works. I have not yet encountered flakiness, strangely disappearing songs that were in the playlist yesterday, interminable day-long application stalling, songs that simply refuse to download, songs that simply stop playing halfway through and then won’t play at all, or any other general weirdness. The experience is as close to perfect as our computers allow. Upload a song, and it’s there, all the time, as long as Amazon itself is up. Since that is the primary purpose of these music-in-the-cloud services, I have to say Cloud Player is pretty great.

Device support is good. The recently released iPad app is snappy and easy to use, as is the iPhone app. I don’t have Android but I assume that it’s just as good, esp. given that they sell an Android device. As far as I know, it doesn’t support Roku or other TV devices, but here’s hoping one day it will (especially since e.g. Roku supports Amazon Video; obviously you can’t stream on AppleTV.)

Although hardly a seamless experience, you can continue to use iTunes (or whatever) to play music you buy and download from Amazon. Basically: buy digital on Amazon, and configure your browser to automatically download and import music. Said music will appear automagically on your Cloud Player. This gives you a pretty good best-of-both-worlds experience.

The cloud player is 99% pure HTML, so it performs very well. I run an instance in Fluid and it uses barely a pretty average amount of CPU.

The Less than Good:

The experience is what you might call “bare bones”. If you can’t live without smart playlists and ratings, not to mention pervasive drag-and-drop, Cloud Player probably isn’t for you. Other than the device apps there is no iTunes analog; the player is entirely web-based. The Mozilla-based Songbird player seems a natural fit in terms of technology – it even has a plugin to browse the Amazon MP3 store. I assume Amazon wants to avoid the business of software, since it produces very little in the way of desktop apps, so that’s just my blue-sky dream.

Speaking of desktop apps, the uploader uses the execrable AIR, so it’s horrible on lots of platforms. It stalls, sputters, lies, and generally makes a mess of things. If you have a truly immense library fixing things might take a while; but the most common screw-ups are easily fixed with just a few clicks, and like I said, once they’re fixed they tend to stay fixed.

The match feature made a few mistakes, but so did iTunes, so that’s a wash.

About a third of the default presentation of the player UI is devoted to ads, cross-sell for the currently playing song/album/artist. You can make it go away with a little jQuery magic if it bugs you.

The Bottom Line:

If you need to escape the iTunes ecosystem, Cloud Player is a viable option, provided you properly calibrate your expectations. 

Thoughts on Komodo 8

So Komodo 8 is going to be released next week. I have mixed feelings.

First, there’s a lot of good: the visual refresh is much needed, and the update of the core components is even more helpful. Having applications based on Mozilla really need all the great stuff Mozilla has come out with lately.

So that’s awesome. It feels faster and lighter, and looks prettier. Moving language keywords into the snippets library is awesome.

What bugs me is that some things seemed almost like a no-brainer to add, and they’re not there.

  1. Node.js is sort of a big deal right now. No built-in node shell? Mozilla themselves use the hell out of Node so it’s not like Node is some sort of ‘enemy’ technology. And in any event, we’re on version 8 and there’s not even a Spidermonkey-based shell. I cannot be the only person that uses a lot of JS shell.
  2. I’m sort of shocked that there’s no real improvement to the source control stuff. A couple of basic commands, no real UI.
  3. Speaking of source control: I’m equally shocked that there’s no Github or Bitbucket integration. Imagine how awesome it would be to have your project push directly. The obvious retort – “Well, no one asked for it!” is just as perplexing.
  4. The macro/expansion API seems more-or-less the same. It’s already pretty comprehensive and effective but there’s lots of obvious gaps, and I’m shocked no one notices them (eg, you can’t do a bunch of stuff via the keybinding UI or via macros; you have to click).
  5. I’m amazed that anyone likes the minimap thing and I feel like it’s going to end up a giant “what were we thinking?” feature, but whatever. Opinions and assholes, I guess.

Worst of all, RC1 is still buggy as hell. Forum chatter indicates they’re closing bugs really fast now, but it gives me The Fear that it won’t really be usable for a few minor releases. As I write this, there’s a really annoying display/redraw bug that’s making me almost motion-sick. This is a release-candidate.

Stop blaming Apple for your decisions

Via Hacker News, we have “I mortgaged my future with a Mac“. 

All of my music is in iTunes, having been re-imported from the original CDs over a period of time. I can just re-rip all of it on my Linux box, but that’s going to suck. Or, I can try to grovel around in their grungy database and try to make sense of it and “export” things, but I’m sure that will be even worse. 

First and foremost, you have failed to do basic research. The simplest Google search shows that most modern distros can play AAC files*, provided they’re not DRM’d. Since you state you ripped from CDs, “importing” your music is as simple as copying the files over. You might lose some ratings and playlists. Big deal. 

Another problem is going to be iPhoto. I’ve cropped, rotated, geotagged, sharpened, level-adjusted, and done countless other things to my thousands of pictures. They all also live in some database which is effectively opaque. While there’s probably some way to get it out, it will be far from trivial.

They’re all on the filesystem. Some data loss (geotags, etc) is locked in the database-thing iPhoto uses, but the corrected photos (along with the originals) are stored as simple images. You won’t lose the most important thing, which is the images themselves.

Then there’s my phone. How do you use one of these things without a computer upon which to sync your data and backups? I don’t believe they can realistically behave properly while completely untethered. That means relying on iCloud, and you’d have to be crazy to do that. Besides, that would just give them more of a grip on my data and more ways to change things and screw me.

You bought an iPhone and now you’re complaining that it’s locked you into the Apple ecosystem. OK, fine, except this is what people complain about all the time, since the goddamn thing appeared. Stop whining and do some basic consumer research.

Maybe I’ll wind up with a relatively dumb phone again, and then I’ll start carrying my point-and-shoot camera around once more. If I need a map, I’ll look before I leave the house and write a quick note with the pertinent details, just like I did for years pre-iPhone. That will cover phone calls, pictures, and even short videos. It will also free me from being on a relentless treadmill from Cupertino, Mountain View, or Redmond.   

This song is for you.

I really need to stop reading Hacker News. There’s millions of people living without clean water and the most horrible thing to happen to them is the possible loss of some iTunes metadata for their immense CD collection. 

* although you apparently have to jump through hoops since AAC is wrapped up in IP the freetards dislike. But it wasn’t hard to find what appeared to be the right combination of plugins. 

The Mandatory “My First Year With” Post

So, about a year ago, I got a new job and dove into Python.

Prior to this, you could count on 1 hand the LOC I’d written in Python. I “knew” exactly 3 things about Python:

  • It had namespaces, because every Python person brings that up immediately in any language argument on Reddit or Hacker News
  • Significant Whitespace, aka The Whitespace Abomination, which is why I’d generally avoided it like the plague in the first place
  • Python advocates seemed like a dour, hyper-conservative bunch (technologically speaking)

I cut my teeth on the TIMTOWTDI world of Perl and then spent years in the fever swamps of PHP and Ruby; correctness and conservatism were not in my DNA.

I started learning by doing the Python Koans, which I enjoyed immensely, and then pretty much diving right into real work. 

So where am I today? Glad you asked.

First, regarding the items above:

  1. Namespaces are great and all but I simply cannot figure out why they are the first thing people start crowing about in language arguments. Maybe my time in the namespace-less world of PHP made me sensitive to the criticism (FWIW, I argued for namespaces in PHP and was pretty vocal about the use of \ as separator as a horrible idea)
  2. Significant whitespace is absolutely awful for about a week and a half, mildly annoying for about a month, and then fades into nothing at all after that. It’s really the worst thing in the world for all of 5-7 days, but really, you get over it. I’ve love insight into the coding habits of people who can’t manage to get their head (and fingers) around it.
  3. Python advocates are a dour, hyper-conservative bunch (technologically speaking).

The last point is not intended to be flame-y; I’m just re-spinning the Steve Yegge bit here. It is, nonetheless, how the Python world looks to me. There’s a noticeable lack of fun or whimsy at Planet Python. You will be hard-pressed to find a more dry Planet aggregator. (Fun is obviously not a requirement of professional software development, but compare with the general happy vibe at, say, Planet Mozilla.)

In terms of technology, oh, you know, whatever. PHP is a complete crapload, but it’s far easier to crank out web apps with PHP than Python. The amount of setup boilerplate (among other fiddly bits) is frustrating; but that’s how a generally poor language like PHP managed to work its way into the web stack. It simply is of the web, whereas Python requires a lot of work to bridge that gap.

(The counterpoint is that Python is simply a better language, in so many ways, that once I really have all the rough edges sanded down I’ll stop caring. This is probably true. It’s going to take a lot of work in 2013 to sand those edges down, both in my internal “IT” apps and our products, but I’m starting to see a coherent picture of how to do it.)

I’m still not very good at Python. I forget which namespace things live in (os? os.path? ffffuuuuuu); I forget that you have to ask if a key exists in a dict, instead of just ‘if key equals value’; I totally suck at structuring large packages; I don’t understand metaclasses. But it’s only been a year, so I’m positive about losing the remnants of my other-P-lang habits, and generally improving.

A little Coda 2 plugin

I made a little Coda 2 plugin for fun: wrapping js-beautify. You can download it here

Pay close attention to the documentation; the script environment doesn’t do what you think it does, and so you’ll be very grouchy.

I want to love Coda a lot; as I mentioned in my review of Komodo IDE, I mention as one of its downsides it’s so very not-native. Coda is extremely, wonderfully, beautifully native. So there’s that.

But it’s ultimately an app for cranking out WordPress plugins, not doing serious work. If you want to build serious, production web applications – and especially in something other than PHP – look elsewhere.