Browsing the archives for the Blog category

Canonical URLs in WordPress

Like any good obsessive-compulsive blogger, I frequently pour over my web site statistics looking for interesting stuff. One thing that caught my eye is that search results coming in from Google tends to link to threaded comment pages for entries.

For example, I’d get hits to /blog/2009/03/05/entry-slug/comment-page-1/, which is an URL that’s pretty hard to actually find on the page — it’s only used for permanent links to entry comments, with an anchor to the comment ID tacked on, like this.

What I’d prefer to see is incoming hits to the actual blog entry URL /blog/2009/03/05/entry-slug/ in this case. Luckily, there’s a smart and simple solution — canonical URLs. The Google Webmaster blog explains it nicely with examples.

So I simply add a canonical tag referencing the preferred URL in each page. Now, it’s just the preferred URL on my side — this is just a hint to search engines that tells them that this page is a duplicate, and that I’d prefer them to let results point to one particular page of these duplicates. In 99% of the cases it will be respected, though.

The actual code is just a few lines. Add this in header.php of your theme, somewhere in the head:


<?php if (is_singular()) { ?>
<link rel="canonical" href="<?php the_permalink() ?>" />
<?php } ?>

is_singular is a function that returns true if any of is_single(), is_page() or is_attachment return true — in other words, if you’re currently visiting a single entry, a page or an attachment.

With this, each entry sub-page of comments has the main entry URL as their canonical URL. Now to wait a few days and see when the search engines1 pick up the change.

1 And by “search engines” I mean “Google.”

No Comments

Spotify Bay

Welcome to Spotify Bay.

There’s an application called SpotSave making waves in the Spotify community. SpotSave lets you save music from Spotify straight to your computer, no strings attached, with the same quality you hear straight from Spotify itself.

I haven’t tried it myself, because to be quite frank, Spotify stinks and doesn’t have any music I enjoy after the Great Purge the record industry performed. (Probably because they don’t really want to see Spotify succeed, because then they’d have to move forward to a new business model.)

Now, consider the following statements:

  • SpotSave lets you connect to Spotify to download music to your computer.
  • µTorrent lets you connect to clients via The Pirate Bay to download music to your computer.

Is there any difference here?

Technically? Not really. Technology doesn’t care about concepts like “copyright” and “fair use.”

Spotify wasn’t designed to let you download music — the intended design is that you stream music to listen to it.

Pissing in the stream

Here’s another thing technology doesn’t care about — the intended design. Here we have another couple of statements to consider:

  • Receive a stream of data from the internet and write it to your hard drive.
  • Receive a stream of data from the internet and don’t write it to your hard drive.

When you download, you receive a data stream from the internet and write it to your hard drive. When you stream, you receive a data stream from the internet and let an application do something with it, and then throw the data away.

From an outside perspective, it looks identical — a data stream going from the internet to your computer. What happens inside your computer is what makes the difference between streaming and downloading.

Once the data stream reaches your computer, it’s a Wild West. Spotify intends for me to stream the data to the Spotify application and never save it, but who are they to tell me what to do with a data stream my computer receives from the internet? Sure, there’s probably some unreadable legalese in the Spotify EULA about this, but that’s not exactly enforcable without a Spotify representative watching over my shoulder, is it?

I haven’t tried SpotSave, but here’s a qualified guess at what happens: it looks at connections to/from your computer, identifies the ones going to Spotify, and then makes a copy of the streamed music and writes it to disk.

This is very basic stuff, and has been done before. It was a popular method to save web radio transmissions for later use, and probably the main reason the record industry got their panties in a bunch about web radio technology in the first place.

Floodgates

Since history tends to repeat itself, this will start an arms race between Spotify and SpotSave. Spotify will start by encrypting their data stream (and I’m surprised they didn’t do it in the first place). If the SpotSave authors pick up the thrown gauntlet, they’ll dig deeper into Spotify’s allocated memory and rip the decrypted stream out of that instead. Spotify might claim the Blizzard defense and state that they own the copyright of a part of memory in your computer and sue SpotSave for copyright infringement. And so on.

This is why DRM – Digital Restriction Management (though some people insist on the R meaning “Rights”) — keeps failing. In order to prevent the product from being copied, they lock it up with encryption. But the customers can’t play it if it’s encrypted, so the key to unlock the encrypted data is also included in the product the customer buys.

That’s right; the customer gets both the lock and the key. It’s always just a matter of time until someone discovers where the key is hidden, and then the floodgates are wide open again. All it takes is one person to discover it and then tell someone else. Security through obscurity isn’t.

Here’s another cute little application of relevance — Mutify. Mutify is an app that also listens to the incoming data stream to Spotify. If it detects a song with a title that is in its database, it simply mutes Spotify until the next song starts. The list of “songs” are, of course, the ads Spotify plays for non-paying accounts. If there are new ads you can just click “This is an ad” in Mutify and enjoy the silence.

The arms race has already started here, and Mutify currently doesn’t work as intended with Spotify — Spotify simply pauses the ad when Mutify mutes the sound. Until then, you can just lower the volume yourself. Let’s see Spotify try to work around that.

On a similar note, there was a faceless TV exec that expressed great horror at the concept of switching to a different channel during the commercial breaks, stating that you violated a social contract by doing so. What if I need to go pee? What if I mute the sound and read a book until the commercials are over?

Owning your own interpretation

I have random thoughts about this all the time — what kind of control do I actually have over the interpretation of data streams arriving at my computer?

Let’s take web pages. They’re written in HTML, which is basically a language that tells your web browser how to display a page.

You could argue that I’m violating a contract by having a program that auto-mutes Spotify whenever an ad plays. Am I violating a contract if I tell my browser to not show images even if the HTML tells it to?

I use GlimmerBlocker to strip out the image tags for ads and banners from the stream of HTML before it reaches my browser. Am I violating any contract here? I’m clearly not viewing the page as the designer intended.

It’s the Wild West again. Once HTML reaches my computer, it’s up to me to render it as I see fit. Noone would argue with me if I surfed with images disabled in the browser due to being on a very slow connection. Stripping out useless banner ads not only preserves your sanity, it also makes the page load way faster due to all the needless crap you don’t have to download.

I’ve specifically configured my ad blocker to let text ads from Google through. These ads aren’t intrusive and don’t tell you to punch the monkey. This is the type of ads I want to encourage, so I let them display.

Once or twice a year I even click on one.

15 Comments

Sharing is Caring

Public service announcement: I read my feeds in Google Reader, and I end up sharing tons of entries I find interesting and/or weird.

Here’s the shared page, or go straight to the feed for it.

There will be the occasional item in Swedish, but most of it is English.

Addendum: I should also mention that I have a habit of sharing things that I know interest people that follow my shared items. Breki wrote about Things recently, so I’ve shared a handful of Things-related entries that show up in my feed.

Want me to share stuff that interests you? Make sure I read your blog and tell me that you follow my shared items, and I’m almost certain to start sharing stuff you’ve blogged about recently.

4 Comments

Postcards

Ingvar Åkesson, chief spymaster of FRA, was on SR (Sweden’s Radio) openly declaring that citizens should consider all email sent on the internet to be “postcards,” thus making it perfectly okay for anyone who handles the postcard to read its contents.

My first question here is what he thinks of people using a new technology called “envelopes,” in the shape of asymmetrical public-key encryption. That has to be okay as well, right? (Here’s my public key.)

Sadly, Swedish politicians have already stated that anonymity and encryption are “problems” on the internet. I wonder how long until it’s illegal to use envelopes for your mail, since it prevents military intelligence agencies from spying on their citizens?

Apart from that Åkesson constructed the usual straw men about how they’re not at all going to store all email sent. Nearly everyone already knows that they won’t do this. Our problem with the military surveillance of civilian traffic is that we feel infringed the second our email gets scanned by FRA, whether they store it or not; whether it’s done manually or with automated algorithms.

No Comments

OpenID Enabled

I’ve enabled OpenID validation for comments now. Feel free to try it with a comment on this entry.

1 Comment

MrSvensson — Scam Auctions

So I got an unsolicited email invitation from some Maria that I’ve never heard of for an auction site called MrSvensson, that I won’t deign with a link.

I’ve seen this sort of semi-scammy deal before. Sure, they have auctions. Sure, people win them and get the item. But the entire auction method is completely stacked.

When you bid on an auction, it goes up by 0.10 SEK (about 0.012 USD, or 1.2 cents). However, you must first buy bids before you can place them.

You can either pay per bid on your phone bill for extortionate sums that MrSvensson blames on the phone carriers (which I totally believe), or buy bid packages with 10 to 50 bids. It starts with 10 bids for 149 SEK (14.90 each) to 50 bids for 3849 SEK (7.70 SEK each). A bid via cell phone costs 20 SEK per bid.

The big scammy profit for MrSvensson is that you pay them to bid even if you don’t win. You bid on something, the cost of that auction goes up by 0.10 SEK, and you’re down one of your paid bids. If someone places a new bid, it goes up by another 0.10 SEK and you’re both not winning the auction and paying them for that lost bid.

Granted, they do have a “cashback” deal where the second and third highest bidders (as in most bids placed) get a certain amount of bids back, probably to instill a sense of not actually throwing your bids away, while at the same time encouraging you to place more bids.

On their “Lucky winners” page we get a few examples. Someone won a bid on a vacuum cleaner for 25 SEK. That means with bid increases of 0.10 SEK there were a total of 250 bids on it.

Let’s assume that most people go for packages and buy 20 bids at a time. That gives 12.45 SEK per bid. With 250 bids, that’s a total of 3112.50 SEK for that vacuum cleaner.

Did the vacuum cleaner cost that much for MrSvensson? I doubt it. So there’s one person that got a vacuum cleaner for the extremely low price of 25 SEK (about 3 dollars), and the rest of the bidders essentially threw their money straight at MrSvensson.

Another example: a digital camera won for 122.70 SEK. That makes 1227 bids for a total of 15276.15 SEK or 1860 USD in bid fees. It looks like some semi-decent compact camera that I very much doubt costs more than 500 dollars.

Playstation 3 for 216.40 SEK (26 USD)? That netted 26941.80 SEK (3280 USD) in bid fees.

Is this a legal business method? I don’t know, I’m not a lawyer. It probably is. But I still see it as just a step above scams. There is nothing whatsoever preventing mysterious users run by the people behind the site to place snipe bids on auctions so they don’t sell too soon in case the item isn’t profitable via the bid fees yet.

4 Comments

Spotify Stinks

Spotify is a good idea. Too bad that the implementation is pretty horrible.

For starters, Spotify makes it very hard to find new music to listen to. I can search just fine, and Spotify even has a modest amount of the music I listen to. But why can’t I find any new music?

If I look at the “radio” tab, I see eighteen categories, none of which describe the music I like, and a slider to pick a range of decades of music. The big problem here is that the categories are horribly generic.

I listen to a lot of electronic subgenres, yet the only thing vaguely resembling my taste is “techno” — and I don’t listen to techno. After 30 minutes of listening to music in this strange techno category, I heard one single song I could maybe classify as techno. The rest was trance, goa trance (which, of course, isn’t the same as trance), drum and bass, synthpop and futurepop. I can’t think of any way to make Boards of Canada qualify as techno.

They need to take a long hard look at last.fm. There I can participate in social tagging and tag artists and groups with whatever genres I think they fit into. Looking at the EBM tag at last.fm I see a fairly accurate representation of actual EBM – though I don’t really know what Covenant is doing that high up on the list.

Another thing they need to borrow from last.fm: Where are all the other users? Why can’t I add friends? See what they listen to? Find other users with similar taste in music that way?

Spotify is a nice idea. But it feels too much like Web 1.1 with one-way communication from the music industry to a silent crowd of passive consumers, rather than the social activity you can get at last.fm with user taxonomy, forums, discussion and music comparisons letting you find new music.

If I want to find new music on Spotify the only way is to play the incredibly vague “techno” category and hope I stumble upon something I actually like.

This is me on last.fm. At a quick glance you can see what I’ve listened to recently, what my favorite music is, and if you’re a registered user, get a comparison to see how our music tastes match.

Get to work, Spotify! We’re not in the 1990s any longer.

Last-minute edit: One minute after posting this Spotify gave me opera song and instrumental chamber music… which is apparently techno.

Update: It does seem that they actually listen, and last.fm scrobbling support was recently added. It’s a small step forward, at least.

7 Comments

They’re Taking My Freedoms Away, Haha

What in the name of sanity is going on with politicians lately?

First we had the Swedish FRA law mandating that all internet traffic that passes national borders (in effect nearly all traffic) shall be routed through FRA for surveillance for “threats to the nation.” Citing a poignant part from the Wikipedia article:

According to the Swedish National Defence Radio Establishment’s Director-General, Ingvar Åkesson, they destroy the data collected after eighteen months, but they confirm that they have, in fact, been collecting information not just on foreigners but also on Swedes as the presence of Swedish search terms used on the data would indicate.

So for a decade they have conducted illegal surveillance on Swedish citizens. No politicians ever talk about holding them responsible for their crimes. The general opinion seems to be “but the FRA law makes it legal, so then we can turn a blind eye to the decade of criminal activity.”

The FRA law went in effect on January 1, 2009. I assume that everything I write on this blog passes through FRA, including my password for the admin interface. Anyone that uses Hotmail or Gmail have their passwords intercepted, as well as all the emails they read.

Now we have the next outrage around the corner: the telecommunications data retention act.

This act requires ISPs to store metadata — each and every IP address you communicate with and when, how long the communication lasted. If it is a cell phone call, the cell phone carrier will record who you called, how long the call lasted, and where you were when making the call, turning your cell phone into a government tracking device.

This isn’t paranoid rambling; this is openly written in the act.

In the UK the police may be able to hack into computers without a warrant and access the contents of your computer. Other countries can ask British police for access to any results of the intrusion.

Here in Sweden there’s a similar inquest that’s already written. The government is debating the proposition for the law, and the Social Democrats in the opposition are positive to this.

In the same inquest it is openly written that passwords, cryptographic keys and anonymizing proxy services are seen as a problem that needs to be solved.

In the UK it is already a criminal offence punishable by prison time to not surrender the keys to encrypted files. I expect that to be law here within five years if this keeps up.

This is all done in the name of “fighting terrorism.”

Terrorism can threaten freedom and democracy. But only politicians can destroy it. And they are dismantling our freedom piece by piece.

I am a member of the Swedish Pirate Party. It is the only party opposed to the FRA law and other freedom-crushing laws. You should join too.

No Comments

A Sermon on Ethics and Love

One day Mal-2 asked the messenger spirit Saint Gulik to approach the Goddess and request Her presence for some desperate advice. Shortly afterwards the radio came on by itself, and an ethereal female Voice said YES?

“O! Eris! Blessed Mother of Man! Queen of Chaos! Daughter of Discord! Concubine of Confusion! O! Exquisite Lady, I beseech You to lift a heavy burden from my heart!”

WHAT BOTHERS YOU, MAL? YOU DON’T SOUND WELL.

“I am filled with fear and tormented with terrible visions of pain. Everywhere people are hurting one another, the planet is rampant with injustices, whole societies plunder groups of their own people, mothers imprison sons, children perish while brothers war. O, woe.”

WHAT IS THE MATTER WITH THAT, IF IT IS WHAT YOU WANT TO DO?

“But nobody wants it! Everybody hates it.”

OH. WELL, THEN STOP.

At which moment She turned herself into an aspirin commercial and left The Polyfather stranded alone with his species.

No Comments

Happy New 2009

Happy new one!

I kick this year off by switching this domain to a different server. Same web host; just a different server. I was one of the first to sign up with TextDrive, and consequently one of the first on their servers.

Sadly, those early servers suffered a bit from overcrowding and general early illnesses. Since I’m one of the VC200s, the 200 people that invested 200 dollars each in TextDrive when it started up, I have a free account with them for the lifetime of the company — and I’ve certainly gotten my 200 dollars worth of web hosting a long time ago.

The early investors were offered a Golden Ticket to move to an equivalent account on newer, fresher servers, and my new account was just activated. In a few days I’ll start the move, beginning with a fresh WordPress install. I won’t just copy the entire account over; it’s a damn mess behind the scenes and I want a clean slate to work with.

There may be some downtime while the DNS switches over, but overall it should be a transparent change.

3 Comments
« Older Posts