Category: tech
You are viewing all posts from this category, beginning with the most recent.
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.
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.)
-
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
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 tags, so it should look something like this:
<style type="text/css">
body {
margin: auto;
padding-right: 1em;
padding-left: 1em;
max-width: 44em;
border-left: 1px solid black;
border-right: 1px solid black;
color: black;
font-family: Verdana, sans-serif;
font-size: 100%;
line-height: 140%;
color: #333;
}
</style>
Then run the pandoc
command like this:
pandoc -s -S --toc -H pandoc.css -A footer.html README -o example3.html
and you’re done. A fully standalone HTML document.
- It doesn’t have to be called that, by the way.↩
Cluttered by Google, Lost by Bing
I was reading The Clutter Didn’t Kill the Love by Brent Simmons, about how he was trying Microsoft's Bing search engine, instead of Google. His reason was the current worry that Google is becoming less than trustworthy.
Google losing trust would be a shame. But at least a Google search for “martin mccallion” (without the quotes) has this blog as the number one hit. Try that on Bing at the moment and you get a whole pile of other Martin McCallions.1 The worst part to me is that the first six are Facebook or LinkedIn profiles (the seventh is one of those annoying directory sites, then you get me).
I wouldn’t mind other people with the same name appearing above me, if it was their proper sites; but to me social-network profiles feel like distinctly second-class web entities.
Or is that snobbish?
-
As an experiment, and to ensure a like-for-like comparison, I signed out of Google, and went to the .com version (I normally use .co.uk by default). I was still at the top. ↩︎
Intrusive login options
I’ve not really had many dealings with the Huffington Post, but I thought I’d drop a comment on this piece about a cover versions album of Nirvana’s Nevermind. The writer, Michael Vazquez, describes himself as being ‘part of the generation that just-missed Punk’, and goes on to say he’s 45.
Thing is, I’m just a year older, and I didn’t miss it. I lived right through it. Not, it’s true, at its bleeding, safety-pin-punctured heart.1 But still, I was aware of it, was introduced to the music by friends, listened to Peelie. Formed bands, for god’s sake, which is what it was really all about.
I can only conclude that Vazquez was a late developer.
Anyway, my point wasn’t about that, it was about commenting at the Huffington Post. You have to be registered to comment; fair enough, that probably keeps the spam down a bit. There are a number of login options, as is common nowadays: Twitter, Facebook, a dropdown for others.
I tried the dropdown and chose to use my Google account. A popup pops up, saying, ‘This site wants to know your email address and your contacts.’ Email address, fair enough, that’s normal for registering at most places. But my Google contacts? I think not.
I cancelled, tried Twitter. ‘This site wants to see your contacts, add contacts, post tweets…’ Get, as we say in my part of the world, tae fuck!
Oddly, it asked less of Facebook; but I can’t be bothered going back to check exactly what.
In the end, not wanting to be thwarted, I registered with them by giving them a username and my email address, in the old-school way. Obviously I unchecked the ‘Please spam me’ box.
Is this normal behaviour nowadays? Certainly seems odd to me.
-
Copyright (c) Cliches-R-Us, 2011. ↩︎
Maccetty Mac
So, I've had this here new MacBook for a couple of weeks, and I've yet to post anything from it. I am, not surprisingly, loving it.
The initial weirdnesses (I’ve never used a Mac before, apart from once very briefly, before OS/X) include the absence of a hash-key (though you can get the character using Alt+3: #); the plethora of modifier keys: Ctrl and Alt, of course, but also Cmd and Fn. Though actually, most laptops have Fn, so it’s really just one extra. But they get a lot of use.
The nicest thing is probably the multitouch trackpad: scroll with two fingers, navigate with three, do some other weird navigation thing (Exposé, I think it’s called) with four. Pure dead brilliant, in the vernacular of my homeland.
Most annoying thing is the American positioning of the @ and " keys. I’d like to remap those back to where my muscle-memory says they should be, but haven’t worked out how to do that yet.
I’ve installed various pieces of software on trial or demo options. I’m typing this entry using MarsEdit. I’m gathering notes for the the thing I intend to write for NaNoWriMo using Scrivener. And so on.
All in all, it’s the beginning of a big adventure.
And now, let’s see how this posts.