Java isn't slow

So if your Java code is doing something easier than processing 6 million events a second, and it’s slow, you can maybe make it faster!

Source: Java isn’t slow

Great piece by Julia Evans on some really fast Java applications. Notably LMAX.

URLs and searching

URL hiding

A while ago, I read a piece called “Improving the URL Bar" (turns out it’s almost a year old, but never mind). I made both mental and Pinboard-based notes of it, because my response to it was, “That’s not improving the URL bar, it’s destroying it."

Reading it again now, I don’t feel quite so strongly; I partly agree with what the author was getting at. But I feel we lose something important as we make URLs less visible. They show something of the hierarchy of a site, its structure — or at least that’s the origin of the path part.

The argument against that of course is that the path part is an implentation detail that doesn’t need to be seen by users, and perhaps more importantly, the whole thing is meaningless at best, confusing at worst to most users.

Well, maybe so. But to those of us who do understand them, hiding them can be confusing, even annoying.Of course you can click in the URL bar, or press Cmd-L or Ctrl-L, to see the whole thing. More usefully, In Safari, which I’m currently using, there’s a preference called “Show full website address”, which overrides the behaviour. So you can have your choice.

Searching

But then there’s this whole thing that we have now, of browsers doing a search when you type something in URL bar; especially (though not exclusively) when it’s not obviously a URL that you’ve typed or pasted.

I don’t like it.

Or I didn’t. I’ve been using Safari since I wiped and reinstalled this Mac because it was getting really slow (successfully, I might add). I decided to keep things as stock as possible (within reason — I wasn’t going to switch back from Lightroom to iPhoto, for example, or from MailMate to Mail.app). And Firefox can sometimes be a bit of a resource hog.

But I spent quite some time trying to find out how to give Safari a separate search bar like FF has (or can have — it may be a plugin, but if so it’s one that I install without thinking). I had muscle memory that went Cmd-T, Cmd-K (or Ctrl-T, Ctrl-T when I’m on Windows) when I want a new tab I’m going to search in. Still have it, actually, because I still use FF on Windows on my work machine.

It turns out that you can’t have that on Safari. You just have to search from the URL bar. So I just got into the habit of doing that. And now I find I do it even on Firefox (you have both options there).

I don’t know; I still feel that the URL bar should be for URLs, and searching should be something else. but it doesn’t offend me like it used to.

Still, the effect is to further blur the distinction between searching for a site and going to a specific site. I see people — even experienced, technically knowledgable people — going to Google’s home page and typing “facebook.com” into the search box. I mean, what?

Oh, and of course if you search from Google’s home page in Chrome, your cursor jumps to the URL bar! Or it did the last time I used Chrome. Which blurs the distinction between site and browser, as well as between site and search.

In the end it doesn’t matter that much — people mostly get where they mean to go — but by making it less than clear what is going on when we navigate around the web, we make it harder for people to understand how it’s all put together, and I think we lose something important in doing so.

Thin

We used to call this “thin clients”; or just a terminal logged on to a server or mainframe. Jason Snell writes of something newish that Adobe and Google are doing with Chromebooks:

This week I got a demo of Photoshop running inside Chrome, and while it was really interesting, some of my assumptions were faulty. It turns out that when Adobe says Photoshop is a “streaming app,” they mean it—it’s much more like screen sharing than native software. Photoshop runs remotely on a Windows-based server, and video of the app’s interface streams to the Chrome browser.

via Six Colors: Adobe streams Photoshop to Chromebooks.

Aye, (Head)Phones

I’m not in the market for a new pair of headphones. My venerable Sennheiser HD450s are still doing fine for over-the-head use, and the same brand have provided me with a series of earbuds for mobile use. But I tried a pair of Beats by Dre phones in an HMV the other day, just to see what all the fuss was about.

They looked pretty good, felt comfortable, and sounded great. But the price!

Apparently Apple bought Beats more for the streaming service than the phones. That makes sense: if they’d wanted a headphone company they’d have gone for Sennheiser, obviously (and if they cared about earphones in general they wouldn’t have made horrible ones for years).

But you’d think that if they wanted a streaming service, they’d have gone for Spotify, which is surely more established.

So I suspect the truth may include a combination of the two, plus a degree of cool cachet, in what is perhaps a demographic that they don’t currently reach.

Either way, if the next iPhone or Mac comes with a cool pair of phones (unlikely though that may be) I won’t be unhappy.

Weirdest Customer Request?

This is one of those unpublished posts I told you about. I don't know why it wasn't published (well, except that I hadn't written the last couple of sentences).

A while back I heard the strangest ever request from a customer.

As you might know, I work for a software house.1 We write financial software for banks. As a thing to talk about it tends to be boring, but it can have interesting challenges.

Anyway, one of our product’s problems, as a web-based app, is that it was written to specifically target the Internet Explorer browser.

I know that seems at best charmingly retro, and at worst appallingly non-standards-compliant, but there are a couple of good-ish reasons. Principally the fact that the original version of the web app was written by contractors who both only knew IE, and were told that our clients only cared about IE. The latter was probably true at the time, and as for the former, well: let’s just say that sometimes people in companies make some stupid decisions, and leave it at that.

Inevitably, and especially as the browser landscape has matured and Apple and Google have come to rule the world, there have been calls to fix things. But there have always been higher-priorities. Getting new features done takes priority over making things work better, sadly.

One of these years we’ll fix it – personally I don’t think it’ll be as difficult as people always think (that fear is another reason why we have resisted doing it).

But what it would really take to force us to sort it out would be if a client demanded it.

If it were going to make or break a sale, we’d be all hands on deck.

So it’s interesting that we got a query a while back wherein a client was concerned about the fact that the app doesn’t work properly in Firefox. This was causing some of their users distress, as FF is their chosen browser. Was this it? Was this the opportunity, at last, driven by customer demand, to bring our app into the late twentieth century?

No.

No, the client had a better idea. They wanted us to to change our app such that it would detect that the user was running something other than IE…

… and prompt them to use IE instead.

Oh dear.

(We didn’t agree to their request.)


  1. Incidentally, why “house”, I wonder? By association with “publishing house”, obviously, but why are those “houses”? I’m reminded of a discussion I had on a software mailing list in the nineties regarding the American tendency (then, if not now) for referring to a “shop”, meaning a programming entity, including an old-school IT department within a company. ↩︎

Google is Buying Sparrow, but not Updating the Apps

Google buys Sparrow, current apps will not get any new features | The Verge.

This is annoying. The only thing that was stopping me from making Sparrow my default mail client on my iPhone was the fact that it doesn’t do rotation to landscape mode yet. Now it looks like it never will.

It’s rarely good in the long run when big software companies hoover up small ones, it seems to me.

Tip: using Pandoc to create truly standalone HTML files

If you’re using the excellent Pandoc to convert between different document formats, and you:

  • want your final output to be in HTML;
  • want the HTML to be styled with CSS;
  • and want the HTML document to be truly standalone;

then read on.

The most common approach with Pandoc is, I think, to write in Markdown, and then convert the output to RTF, PDF or HTML. There are all sorts of more advanced options too; but here we are only concerned with HTML.

The pandoc command has an option which allows you to style the resulting HTML with CSS. Example 3 in the User’s Guide shows how you do this, with the -c option. The example also uses the -s option, which means that we are creating a standalone HTML document, as distinct from a fragment that is to be embedded in another document. The full command is:

pandoc -s -S --toc -c pandoc.css -A footer.html README -o example3.html

If you inspect the generated HTML file after running this, you will see it contains a line like this:

<link rel="stylesheet" href="pandoc.css" type="text/css">

That links to the CSS stylesheet, keeping the formatting information separate from the content. Very good practice if you’re publishing a document on the web.

But what about that “standalone” idea that you expressed with the -s option? What that does is make sure that the HTML is a complete document, beginning with a DOCTYPE tag, an tag, and so on. But if, for example, you have to email the document you just created, or upload it to your company’s document store, then things fall apart. When your reader opens it, they’ll see what you wrote, all right; but it won’t be styled the way you wanted it. Because that pandoc.css file with the styling is back on your machine, in the same directory as the original Markdown file.

What you really want is to use embedded CSS; you want the content of pandoc.css to be included along with the prose you wrote in your HTML file.

Luckily HTML supports that, and Pandoc provides a way to make it all happen: the -H option, or using its long form, –include-in-header=FILE

First you’ll have to make sure that your pandoc.css file1 starts and ends with HTML