“Just”

I was reading about PSD.rb the other day. For me, this is one of those really ground-breaking, big big projects. I haven’t had a play yet, but already I’m itching to get stuck into messing with PSDs. I’ve been super-impressed with Slicy, which is constantly in use here at Riot.

I’ve always found it interesting that Photoshop, a photo editing application, is used so heavily in application design. The lack of quality export tools has cemented my opinion of it as a mis-used but useful application. It also saves out to that most awful of formats - the .psd file, which is probably the reason there are so few decent helper applications available. The difficulties of dealing with this format are legendary. So this is actually a really big deal, for a lot of people.

For whatever reason, I decided to read the Hacker News comments.

Hacker News, for me, has reached Eternal September status. My pet theory is that every application on the Internet strives towards more - more users, more content, more value - and in doing so becomes less refined, and less special. While it’s great for the founders of a site to show upward-sloping graphs, I feel like the pay-off is this slow, long-tail entropy towards YouTube-level commentary. One comment thread immediately stuck out to me:

Hacker News thread

This unassuming comment really sums up the developer mindset for me. Why use something new, when another product can already do it? Why not use what’s already there? Why can’t you just use ImageMagick?

Don’t get me wrong - ImageMagick is a wonderful library. But that’s it - it’s a library. It needs to be wrapped in libraries like Paperclip to really be user-friendly. I don’t know any of the flags, and would have to look them up to use ImageMagick in this particular way. Worse, an ImageMagick command is by no means self-documenting.

# reference to PNG data
png = psd.image.to_png 
# writes PNG to disk
psd.image.save_as_png 'path/to/output.png' 

It’s blindingly obvious what this does. It’s self-documenting code, with documentation. A double-dose of readability. A more people-friendly, human interface. Better yet, I know that if I need to figure this out, I can fire up a REPL and interact with it. I can run through this recipe line-by-line and discover what other cool stuff is available at each stage. That’s not something I can do with ImageMagick.

For giggles, I looked up how to do the same thing with ImageMagick. First result? A comment thread expressing uncertainty about why, given

 convert test.psd out.png

as a command, two files were created: out-1.png and out-2.png.

wat

This is what I like to call Arcane Code. It’s a fun word, and makes me think of wizards and witchcraft and magic spells - which I think is a reasonably accurate depiction of remembering ImageMagick flags. In fact, replacing flag arguments with quasi-latin might even make things easier to remember. Anything would be better than -coalesce. What is coalesce actually going to do? I don’t know. That’s ImageMagick talking.

But we’ve evolved from this machine servitude. Today there’s no reason you can’t have a GUI that does command-line things for you. We’ve even built two ourselves - Hammer and Anvil - based on other people’s libraries, and designed to ease the mental process of learning their intricacies.

Once you’ve learned something, it’s important to remember what it was like before you knew. That wonderful moment between the knowing and the not-knowing. If you remember that you too were once baffled by ImageMagick flags, it’s easier to be empathetic.

My favourite way to spot an unempathetic response is to look for the word “just”. In context: why not just use ImageMagick? or can’t you just add this feature? It sounds innocuous enough, but to me it’s the “It Turns Out” of put-downs. The quickest, easiest way to anonymously assert intellectual dominance. A good feeling, if that’s what you need. I suppose many of us do.

 
667
Kudos
 
667
Kudos

Now read this

Chrome’s insane password security strategy

Chrome does something interesting when you first run it. The other day, I was using Chrome in development for an Ember.js app. I use Safari for day-to-day browsing, but it has a habit of aggressively caching files when I least expect it,... Continue →