Moved to Linode

My web host for a good long while was Futurehosting. My OS was Debian 4.0 (Etch). Strike one: as of now there's still no option to upgrade to a newer version of Debian. Debian lags so much to begin with, it's really painful ify ou want to use anything released in the past two years.

I had an unmanaged VPS. I ran a bunch of funky non-standard stuff on there and it ran mostly OK. I had to upgrade to get more RAM just so SBCL would run on it, which sucked but I don't know that another host would've been any better.

The good thing about Futurehosting was that they responded very fast to tickets. The bad thing was the fact that I had ample opportunity to know this. The server would go down randomly once every month or two. I'd open a ticket saying "Hi my server is down", then things would be working again in a half hour, but why did this happen so often? I don't know. An awful lot of "failed switches". I wonder how often this happened without my knowing about it, given how often it happened in the middle of my using the server for something.

With all the hardware they were burning through I would've expected upgrades or price reductions over time, given that I was a steady customer for so long and that disk space and memory keeps becoming cheaper and cheaper in the world. But the prices always stayed the same, which was another strike.

Being hosted there was annoying but never annoying enough to switch. And migrating all of my sites and data to another server seemed like a huge pain. Momentum: the worst enemy of progress.

I moved to a new host on a whim recently: Linode. It was far less painful than I expected. Thanks to Linux and plaintext config files, it was mostly a SCP-it-all-over and tweak process. It took me one evening and a bit of time the next morning. Linode offers a lot of OSes which is also nice.

I pay less for Linode than I did at FH (and I get fewer resources at Linode, but I don't need much). Thus far I'm astonished how much faster things are running on the server. Even goofing off at a terminal, the shell is more responsive. My email loads instantly in kmail instead of lagging for a second. I never knew what I was missing. Linode's DNS control panel is also pretty braindead simple to use.

Futurehosting gets a C+ from me. It worked and my website existed, but it didn't knock my socks off. Hopefully Linode is better.

August 15, 2009 @ 4:03 PM PDT
Cateogory: Programming

Comcast blocks port 25

Testing a remote SMTP server is kind of hard when Comcast is secretly blocking all inbound and outbound traffic on port 25. I only figured it out when telnet wouldn't even work. I could've saved myself an hour of frustration if I'd known this. Thanks, Comcrap.

August 15, 2009 @ 8:22 AM PDT
Cateogory: Rants

Windows Powershell: Can you handle the power?

MS Powershell is Microsoft's ripoff of Bash. I don't think this is a bad thing necessarily. Bash is a good tool and it's open source. If Windows bundled a sensible, full-fledged Bash and got rid of CMD.EXE I would dance for joy.

So Powershell lets you refer to your home directory as ~ and a bunch of commands have *nix aliases like ls and cat. This is nice for those who have *nix commands firmly internalized. You have to use .\foo.bat to run things in the current directory instead of just foo.bat, which I thought was cool.

But Powershell is not without its problems. For one thing I see this a lot:

The redirection operator '<' is not supported yet.

How hard is it to implement input redirection, really? For another thing, tab completion continues to be broken. When you hit Tab it still doesn't put a slash at the end of the text it inserts. You have to type a manual \ every time you hit Tab, to continue tabbing your way through directories. Thus doubling the number of keystrokes you're forced to type. This continues to drive me crazy. There's a small amount of evidence that someday it'll be fixed, but I'm not holding my breath.

You also usually can't bundle flags together. e.g. rm -rf would have to be rm -r -f in Powershell. This is just annoying enough to bother me, but I can look past it.

Sadly, Powershell also runs slower than a geriatric sea turtle. I don't understand what it's doing that takes 10-20 seconds to startup. Or why tab completion often lags for 5+ seconds itself.

My happiest surprise was when I tried to uninstall Powershell (so I could try version 2) and got this:

/random/powershell.png

This dialog listed every program installed on my computer (in random order) including every Windows Update I'd ever installed. The worst part is that I couldn't even dismiss this dialog as an error. For all I know, uninstalling Powershell could cause every program on my computer to stop working. I've seen stranger things happen in Windows.

A person walking past my office when I saw this would have heard the crazed, maniacal, tortured laughter that only the experience of being forced to use Windows can elicit.

August 15, 2009 @ 7:50 AM PDT
Cateogory: Rants

Audiophail

My Grado SR-80 headphones are more electrical tape than headphone at this point. Inexplicably, sound continues to come out of them. The wires have so many breaks that I'm not sure how this is physically possible.

Also the top of the band is also splitting apart and the pads are worn down and fall off constantly and there are pokey plastic bits that hurt my ears a lot. After prying them apart with a hammer and screwdriver to fix the wires a few times, they look like they've been through a wood chipper. I love those things but it is time for retirement.

Researching headphones can suck up months of your time if you let it, especially if you believe the bullcrap. Going to an "audiophile" site like Head-Fi is like entering a new world. I have no idea what any of the vocabulary means.

"Detailed", "neutral", "open soundstage", I can figure those out to some degree. But what the hell do "sweet" and "dark" and "thick" and "smooth" mean with regard to headphone quality? Are we talking about music or chocolate? What do "forward" and "recessed" and "transparent" and "analytical" mean? These are rhetorical questions, I don't care what they mean. I have my doubts that they even mean anything objective.

Then there are strange beliefs, like that letting your headphones run for 100 hours to "burn them in" when they're new will make them sound better. I'd really like to see that theory put to a proper scientific test. I have strong doubts that it's anything more than people's minds fooling themselves. It sounds like voodoo. At least it's not as bad as $7,000 speaker wires.

I can definitely and easily tell the difference between cheapo $5 headphones and my Grado's, but beyond that I really start to doubt that it matters. Spending hundreds or thousands of dollars on headphones seems like insanity to me.

For this reason I decided to do next to no research, and went and bought the first pair that I found online that looked comfy, got mostly good reviews, got a couple good reviews on head-fi (as far as I could decipher) and had a price of around $100. I ended up ordering ATH-AD700's from Amazon. Should be here in a week.

This post is related to My Poor Headphones
August 05, 2009 @ 3:17 PM PDT
Cateogory: Hardware

Way to go, Arch

KDE 4.3 is available in Arch already. If the Arch MB is to be believed, it was available for install a few hours before KDE even announced it. Good job Arch devs. Arch seems to have pretty fast turnaround on new packages.

The stable release of KDE 4.3 is looking good too. I wiped my KDE profile because I think I've been running the same one since KDE 3.1 and the cruft was becoming noticeable. That helped resolve a lot of things (I can add widgets to the main panel without crashing things now).

One thing that has caused me tons of problems historically is CJK input in KDE. In KDE3 Skim worked OK, but I couldn't get it to work in KDE4. Instead there's UIM which so far has been better than Skim in terms of stability and predictability of interface.

As per a comment by knef on a recent post, you can set per-desktop wallpapers now (as in virtual desktops, workspaces, whatever you call them). You have to:

  1. Zoom out (via the cashew)
  2. Hope it doesn't crash
  3. Go into the Plasma options there
  4. Pray it doesn't crash
  5. Enable the setting to make each desktop have its own "activity"
  6. Yeah you probably crashed right here. In the off chance you didn't crash, once you zoom in you can set per-desktop wallpapers now.

Not just wallpapers, but widgets in general. This is kind of good, kind of bad. If you want to go back to a single wallpaper per desktop, you have to go back and screw with activities. Also I don't think you can "sticky" a widget to span all desktops. It's either everything per-desktop or everything global. I'd bet this will change in future versions.

But I read a suggestion somewhere (probably Slashdot) to set up a different Folder View on each desktop, each pointing to a different folder, and that's actually a great idea. You can set kwin to always open Gimp on a certain desktop and have a folder view of your pictures folder underneath, or something.

Kudos KDE devs, KDE is awesome and keeps getting better.

This post is related to KDE 4.3 Looking Good
August 04, 2009 @ 1:38 PM PDT
Cateogory: Linux
Tags: KDE, Linux, Arch

Wikipedia, You Scare Me

Weird Al's newest song has been on Youtube for less than 30 minutes and already the Charles Nelson Reilly page has been updated with a link to it.

How long is it going to be before the internet acquires a physical body and rules over us all?

August 03, 2009 @ 5:33 PM PDT
Cateogory: Rants

Adventures in blogging

So my newest site is about pareidolia which I think is an interesting subject. It's still in its early stages, using a data import from yet another of my old sites that I ran with a friend of mine. This makes three websites I'm running out of the same JVM on my server now. It'll be interesting to see how many more I can cram in there before my VPS explodes. CPU and RAM utilization are still supposedly minimal. I actually plan to redo my old faltering FF1 site entirely in Clojure too, which is probably the largest Clojure project I plan to undertake in the foreseeable future.

I'm still trying to come up with some kind of "how to make a blog in Clojure" tutorial once I nail down a good way to do it. The code for my blog has "grown organically" (i.e. become a mess) beyond the point where I'd inflict it upon the world without substantial cleanup. Probably easier to start over from scratch with something that's more demonstrative.

I'm also not too savvy on many of the "right ways" to do things in Compojure, as per this discussion. That's the good and bad thing about using a Lisp. You can pull off almost anything. There is no underlying structure to the code other than structure you impose. It's easy to write a mess.

August 03, 2009 @ 5:24 PM PDT
Cateogory: Programming

Making image thumbnails in Clojure

I'm making a new website (in Clojure of course) and I have a need to resize uploaded images to make thumbnails. At first I tried to use JMagick because I'm familiar with ImageMagick already and it seemed like an OK library. But on the crusty old OS my VPS uses, I had a really hard time getting it to build, and even once it built it started segfaulting like mad.

Should've gone with something simpler first. Java has built-in libraries for this. It only took a few seconds to adapt this code on Stack Overflow into Clojure code.

(use 'clojure.contrib.java-utils)
(defn make-thumbnail [filename new-filename width]
  (let [img (javax.imageio.ImageIO/read (as-file filename))
        imgtype (java.awt.image.BufferedImage/TYPE_INT_ARGB)
        width (min (.getWidth img) width)
        height (* (/ width (.getWidth img)) (.getHeight img))
        simg (java.awt.image.BufferedImage. width height imgtype)
        g (.createGraphics simg)]
    (.drawImage g img 0 0 width height nil)
    (.dispose g)
    (javax.imageio.ImageIO/write simg "png" (as-file new-filename))))
August 02, 2009 @ 4:32 PM PDT
Cateogory: Programming
Tags: Lisp, Java, Clojure

KDE 4.3 Looking Good

I just installed KDE 4.3 and it's looking good. Some features returned that I was missing. You can now once again display applications by name rather than description in the K-menu. You can now enable a nice kcontrol-like tree-view in the System Settings.

Some things are still missing though... like different wallpapers on different desktops. There are "Activities" which can have different wallpapers, but I can't for the life of me figure out how I'm supposed to be using them. I also lag and/or crash every time I Zoom Out in the cashew, possibly thanks to 3840x1200 screen resolution. I'm going to assume Activities are still a work-in-progress.

I was horrified to open Kopete and see that configuring the contact list window now uses the same completely broken configuration dialog that Amarok 2 uses for their playlist. Oh how I hope someone rethinks this.

There's a new Qt and Plasma theme in KDE 4.3 that looks pretty nice. Overall every release of KDE4 seems to become more stable, more polished, more eye-candy (if you want it).

July 25, 2009 @ 12:48 PM PDT
Cateogory: Linux
Tags: KDE, Linux

Songbird vs. Amarok: How not to design a GUI

Recently I forced myself to uninstall Amarok 1.4 and try Amarok 2 again. I saw there were some nice updates to the interface coming in the next version so I grabbed the latest version from SVN.

I very quickly started looking for other alternatives, and you'll soon see why. The best I could find was Songbird.

I'll start with a disclaimer that both of these programs are great, and they are free. I am not suggesting, let alone demanding, that anyone change anything in either program to suit me. Kudos and thanks to the devs of both. These two programs are both probably better apps than I could dream of coding. Feel free to respond "Ask for a refund" and "Fix it yourself" anyways if you like. I think it's still useful to give some constructive feedback, and maybe I'll learn something myself about how to make a good GUI along the way.

Next I'll start with my conclusion, so you don't have to read further, because this is admittedly long. Amarok 2's interface is extremely painful, but at least it plays music. Songbird has a wonderful interface, much like Amarok 1.4 had a wonderful interface; if only I could get Songbird to make sound come out of my speakers, I'd be set.

I think it's interesting to compare Songbird and Amarok 2, both being bleeding-edge music players for Linux with a similar philosophy and feature set. So let's compare GUIs. I sized the two windows exactly the same and tried to have them display mostly the same bits of information, so it'd be easy to compare. Click below for larger versions.

Amarok 2:

Amarok 2

Songbird:

Songbird

Playlist

In Songbird the playlist dominates the window by default. This is good because seeing a list of music is what I want. It's the whole point of a music player.

I strongly dislike the "filter pane" style of browsing my music. Thankfully you can turn it off in Songbird. You can also install "cover flow" sorts of eye-candy extensions if that floats your boat. I avoid such things, and Songbird's interface is easy and comfortable by default.

In Amarok by default the playlist is a little sliver of GUI off on the right, and the middle context pane dominates the window. Enough people complained about this that in later versions you can turn off the context view entirely, in which case the playlist will stretch to a reasonable size. Whether the information in it will look good is another story (see below).

Amarok's "Local Collection" browser is an expandable tree. You can customize how things are grouped. This was great in Amarok 1.4. It works similarly here. It's not as lightweight or responsive as in 1.4, but I can't complain. By default it's way on the left, with the playlist way on the right and the context view in between, but in later version of Amarok you can change the order of the panes.

I'll call this a tie even though you have to fight for it in Amarok.

Sorting the playlist

Songbird has a bunch of columns with column headers. To sort things you click the headers. Note that this is how Amarok 1.4 worked. This is how every program in the universe works.

In Amarok you have drop-down menus that you can add and remove with buttons, and you pick sorting criteria from that list, left-to-right in order of priority. This is clumsy. According to the devs' blogs this part of the GUI is a work in progress, which is fine, maybe it'll improve.

But note that the design of Amarok's playlist fundamentally limits the ways you can sort it. There have to be some magic GUI controls floating up top, disconnected from the playlist. You aren't going to get a bunch of column headers that you can click because the playlist isn't just rows and columns. Each song in the playlist can take up more than one row and there are grouping-headers interspersed. This is painful and I imagine it's always going to be painful.

Playlist readability

There are no labels in the Amarok playlist to tell you what information you're looking at in the playlist. I initially customized my playlist to show disc number and track number. Doing so, you get a bunch of numbers. What do the numbers mean? At a glance you can't tell. Am I looking at an Artist or Composer? Play Count, or Score? Does that big empty space mean my song is missing a Genre or missing a Year?

In Songbird the columns have headers.

Playlist length

How many songs can you squeeze into the playlist vertically? This is an important metric for me. I want to be able to find a song quickly without scrolling through a list for a year and a half. Sure I can search, but search doesn't replace my eyes in all circumstances.

In Songbird even with those filter panes above the playlist it fits a few more songs than Amarok. You can turn off the filter panes entirely, in which case you can display tons more songs in Songbird than in Amarok. Songbird wins.

In Amarok, by default the playlist has a bunch of multi-row header stuff mixed into the middle of your playlist to show artists and album names and cover art. You can make the headers not take up so much room (or turn them off entirely), in which case Amarok gets pretty close to Songbird. You'll just do without album or artist names. Unless you can manage to cram them into the playlist in the rows beside the track titles.

Which brings us to our major problem...

Playlist customizability

In Songbird you can right click and add and remove columns. You can drag-and-drop columns to rearrange them. You can drag the edges of the columns to resize them. It's simple and it works. This is how Amarok 1.4 worked too.

Amarok fails hard in comparison. In Amarok to customize the playlist you go into a special dialog. You pick your components from a horizontally-scrolling list of huge icons. Then you arrange them into rows.

You can put two or more items side-by-side in which case they become multiple columns on that row in the playlist. Kind of. To control the width of the columns, you hover over that component in this magical dialog, and a weird circular icon appears. When you click it, a drop-down appears with a microscopic slider at the bottom that looks like it was pulled from KDE2. This is the only way to resize columns in the playlist. Here's a screenshot.

Amarok 2

What in the world is this? What are simple drag-and-drop operations in Songbird and every other application ever made, are buried in this cryptic dialog under non-standard controls in Amarok. I've been using KDE and Amarok for a long time and it took me a good couple minutes to even figure out how this thing works.

I think the widths are percentages and have to add up to 100%, I don't even know. The slider is so small that if you drag it one pixel it usually jumps 5-10%, so it's nearly impossible to get anything to look nice. And when you resize the Amaork window later, the columns don't resize sanely; some fields are smashed into each other or overlap as others take up too much space.

Maybe this will all be fixed before the next release; I realize I'm looking at bleeding-edge pre-release software. But this whole idea is so fundamentally broken I don't know how it's going to be salvaged.

I've heard many times that "You can make Amarok 2 look like Amarok 1". No you can't. You can tediously stuff lots of information into the playlist so that it approaches the level of info you could easily and painlessly get in Amarok 1.4. But it will neither look nor act anything like Amarok 1.4. Resizing the playlist will break things. Nothing is labeled. Nothing is easily customizable.

Playlist consistency

Songs in Amarok are grouped into albums by default. If you have a song that doesn't belong to any album, it's displayed completely differently than a song that does. You can alter this in the scary playlist editor dialog mentioned above, under the "Single" tab (as opposed to "Head" and "Body" which control the "grouped" songs). Sound confusing? It is. Needlessly so.

In Songbird songs are displayed the same whether they belong to an album or not, since the play list is just a list of songs. This seems like it should be a no-brainer.

Playlist: overall

Amarok 2's playlist is unique, imaginative, and I'm sure it's a clever bit of code. It's also nearly unusable.

Why can't we have a grid of rows and columns? There's a good reason so many apps use such a control. It's simple and familiar and it works. I'm open to learning something new if it's an improvement. Amarok 2's playlist is not an improvement. Why can't the playlist be a simple list of things to play?

There's nothing about QT4 preventing someone from making a good GUI. Look at ktorrent.

The little things

Say I want to email or IM someone and ask them if they like some artist, whose name happens to be Japanese and difficult to type on my gaijin keyboard. How do you copy and paste the name of an album or artist in Amarok 2? In Amarok 1 you could just click any field in the playlist twice, and it'd let you edit or copy/paste that field inline. Same in Songbird.

In Amarok 2, you have to right click and go into the Edit Song Details dialog, and do it from there, then close the dialog. A tiny step backwards.

How do you change the rating of a song? In Songbird you click the stars in the playlist beside the song you care about. Same in Amarok 1.4.

In Amarok 2, you can display the stars for each song in the playlist, but to change the rating you have to click in the context pane. (So if you dislike and therefore hide the context pane, you're screwed.) Clicking in the playlist does nothing. A tiny step backwards.

All of these tiny steps add up.

Extras

So how well does each player serve as a web browser?

This seems like a ridiculous question, except that both really do try to be a web browser. You can open song lyrics and wikipedia pages and such things right in the music player. I find these features nearly useless. Lyrics are nice when it works (which isn't often, for the music I listen to), but browsing Flickr? Really? Does someone really use this?

Songbird does use its inline browser in a nice way to let you browse and install addons from the Songbird website, and Songbird has a cool feature to let you rip audio files from web pages. Amarok doesn't have these, but I don't hold that against it. I can easily live without any of this stuff.

So in Songbird you have an embedded Mozilla engine. It's hidden behind a tab. You can just avoid opening such a tab and then you don't see it. You can even hide the tab bar itself. Victory.

In Amarok the browser stuff inhabits the middle context pain. The size is limited for this pane, which means information is crammed into the available space, which greatly limits its use. It's also clumsy and difficult to turn components on and off, and I can't figure out how to resize them. The context view itself is either in your face, taking up most of your screen real estate, or it's gone and not easily retrievable.

Note in the screenshot, how in Songbird the lyrics pane is big enough to display all the lyrics, yet small enough not to be annoying. You can also hide the pane (as you can hide every other pane in the GUI) via that tiny button with an arrow under the pane. Amarok's lyrics widget is either too big (if you let it occupy the whole content pane) or too small (if you want to have anything else in the pane with it).

Note that Songbird's lyrics pane is added via an addon. It's a completely optional part of the GUI, which is nice. (Note that Songbird also mangles certain text in the lyrics due to encoding problems, which is a point against it.)

Wasted screen real estate

See that tiny little red icon in the bottom-right of Songbird? That's the Last.fm integration. It's all hidden in a little square of pixels, out of my face, not sucking up screen real estate. This is a common theme in Songbird. Everything is tiny and/or hideable. Tiny is good.

In Amarok everything is huge and round. Even ignoring the content pane, there's white space everywhere. There are buttons strewn all over the interface, like the seven in the lower right. Export Playlist? Does that really need a button? And other buttons appear (and disappear) in awkward positions at the top. "Add Position Marker"? Does this really deserve a prominent button right beside the main play controls?

And yet things I do need buttons for, such as changing the Skip or Repeat options, have no buttons. This is possibly the first player I've ever used that doesn't have a button for Skip and Repeat.

GUI skinning

Songbird is skinnable. So was Amarok 1.4, to a degree. Amarok 2 isn't and I don't know if it ever plans to be. I can live without skins but it's nice to have the option.

Desktop environment integration

As one might imagine, Amarok wins here, if you use KDE, as I do. Global keyboard shortcuts are already set up, it sits in the system tray, and there are nice Plasma applets you can put on your desktop.

Songbird meanwhile does not play nice. First, it has window hints set to hide its border and window title bar, and it tries (and fails) to manage windows itself, giving your window manager the middle finger. I had to force kwin to display the title bar and border just so I could resize certain dialogs that were otherwise broken.

Then, Songbird doesn't sit in the system tray. You can force it down there via alltray, but right-clicking the icon doesn't give you Play/Pause/Next/Back options like in Amarok.

There are no global hotkeys, but you can easily fix this in KDE too because you can set your own global hotkeys to do anything, and Songbird has a commandline interface to let you do what you need. It's still not as graceful as Amarok.

So KDE thankfully rescues Songbird from its own deficiencies, which is nice. Except...

Playing music

Ah, Songbird. Why oh why won't you work? Songbird uses gstreamer. In my years of bouncing between Gnome and KDE and XFCE and others, and using various distros, gstreamer has never worked for me consistently. I can get Songbird to play music, but Flash videos stop producing sound while Songbird is running. This is a known and reported bug, I'm not the only one. While Songbird is playing, other KDE apps randomly produce sound or not depending on the phase of the moon.

Amarok actually plays music, so I'm stuck with it. Unless I go back to Amarok 1.4 which I may still do.

Conclusion

Songbird is pretty good. If I can figure out how to make gstreamer play nice, I'll probably use it.

Otherwise just consider this yet another voice in the wilderness wishing for a Qt4 version of Amarok 1.4. There was nothing wrong with it, from a user's perspective. I'm not the first wishing for this, and won't be the last. If I had a couple years to get good at C++ and a team of programmers to help, I'd probably try it myself.

Why write an 87-page essay about the GUI of a music player? Because Amarok 1.4 was a really good program. I'm a programmer and I appreciate a good program. Songbird has a pretty darned good GUI too. It's painful to see Amarok 2 going in this direction.

July 11, 2009 @ 2:09 PM PDT
Cateogory: Linux