<< Previous | Home | Next >>

iTunes Match vs. Google Play Music on the desktop

My iTunes Match subscriptions isn't working anymore (some tech issue that will be fixed soon I hope) so I got to test Google Play Music for a couple of weeks. That's great!

In this first post, I will compare both services on the desktop. There is a second post with a look at iOS.

Updating your cloud collection

First off, the program that does update your music collection. On Apple's side, it's simply iTunes. On Google's side, it's an app called the Music Manager. The key difference I could find is about the way to add a new album once the initial sync is complete. On Apple's side, you need to manually add the album to your iTunes collection. On Google's side, if all your MP3s are in some central repos, the app updates your collection automatically. I couldn't get that working on Linux at home, probably because my music is on a samba share, meaning it's not on a local drive and the app doesn't get any notification when a file is updated. So I have to quit the app and launch it again for it to rescan my folders. Still simpler than Apple's approach. On the bad side, Google seems to store your MAC address on the first connection and forbids you to connect from any other MAC address. That's... bewildering.

One word on Tagging and Covers. iTunes Match is quite picky when it comes to covers and some albums never got a cover. There was very few albums in that state for me so it was no biggie, but still, Google's program is much better at handling covers. However, with Google, I could not figure out how to update a tag in a MP3 file. You can go to the website and update your song, but I would have liked the updater to automatically update the songs on which I modified any ID3 tag... On iTunes you can just delete the album and re-import it. It's not perfect, but it works.

So, on Google's side:

  • Automatically uploads songs I add to my MP3s repos (even if this feature needs work).
  • Works on Linux. I'm on Linux at home, so that's a plus for me.
  • Better covers support. More formats supported (Apple's list is more restrictive). Both support the formats that count for me - MP3 and a tiny bit of AAC.
On Apple's side:
  • The update works on any machine with iTunes on it. That's a plus if you want to update your collection from multiple places. Or if you ever change your PC. I cannot imagine that Google will keep that policy (I can only update from the first PC I ever updated from) in place for long but you never know.
  • Updating a tag in an MP3 file can be propagated to the clients.

So, that was for the update part.

The player

Apple's player is, once again, iTunes. That's no tiny lightweight app, but the behemoth behaves. You might like it or not, but you can find you music and play it. It will register to the play/pause/next/etc keys on your multimedia keyboard. After a reboot you get your playlist where you left it. You can download songs to have them locally or stream your songs, your choice. If you choose to download songs, you can decide to view only the songs you have locally. That's useful when you only want to see part of your collection. I share the same iTM account between me, my wife and kids, so there is a sizeable part of my collection I'm not interested in.

Google went the way of the web app. So everything works on your browser of choice, providing you have flash. There is an option to get your sound played with the HTML5 output, but it doesn't work reliably and at some point no sound at all comes from the damn thing and you just have to press F5 to refresh the tab. And lose your playlist. Because the webapp doesn't store your current playlist. localStorage anyone? Anyways... Also, no way to listen to anything offline. You have to be connected. No biggie on a desktop, not so much on a laptop. But, for all its caveats, the app works and you find your music quickly. It is pleasant to use. Then, there is this "Artist art" that is an image depicting your artists. You kind of see it everywhere. All artists will have one, except those that don't and you cannot do shit about it. Can't change them (and they're pretty inconsistent so far). Can't avoid them. That's the way it is. Whether you like those images or not.

So, on Google's side:

  • Works on all OSes where flash works, which is more than Apple's offering: Windows and Mac. Again, I use Linux at home...
On Apple's side:
  • Remembers your playlist after a reboot / app restart.
  • Ability to work offline. Also ability to hide the music you don't have locally.
  • Handles multimedia keys on the keyboard.

Wrap up

Both offerings are solid and work well, unless you're offline where Google's offering will stop dead, or if you're on Linux and then it's Apple's offering that won't work (I run my iTunes in a Vista VM - quite the painful way). But more people are offline on their laptop than on Linux.

Google wins on the update side and Apple's on the player side. Since one's supposedly spends much more time listening than updating/adding stuff in one's collection, I'll have to declare Apple the winner on the desktop. And believe me, I'm no fan of iTunes. And yes, Google's offering is Free vs 25€/year for Apple. I still think Apple's offering is stronger.

There is a second post with a look at the situation on iOS

iOS7 - At last some real usability improvements.

Don't worry, I'm not going to write a review of iOS7. I lack the time and the patience to do so, but I wanted to share with you some usability improvements that really make the platform more usable for me. And saved me two spots on my home screen.

The first one is with the flashlight. You're not discovering anything here as it's been all over the news already, but having the flashlight two taps away from the lock screen realy comes in handy. And gone is the flashlight app from my home screen.

Then comes the alarm clock and timer. I used an alarm app called Touch LCD, mostly because you didn't have to think to figure out when you're going to wake up. When launching the app, you see the time of the next alarm and the time between now and the next alarm, which gives you the hint of whether the next alarm is set for tomorrow or for another day. On the stock alarm clock, you have to hunt through your alarms that are on, check the time, check the day of week they're supposed to ring and figure it out for yourself. The problem is that sometimes when going to bed, part of my brain is already sleeping (or drunk for that matter). These times, it is painful.

Now, in the notification center, you see instantly the next alarm setup for either today or tomorrow. No need to hunt in settings.

The snooze has also been improved. Again, whenever the alarm clock rings, part of my brain is sleeping (actually all of it) and sometimes I'll hit snooze and sometimes I'll unlock thinking I hit snooze. Then I wake up and I have no way of knowing if a snooze is in progress or not. Maddening.

Now, right in the lock screen, you see the time remaining from the last snooze, with seconds counting down. Really helpful.

There is also the timer. When cooking something, my iPhone has become my new countdown device of choice. I have it in my pocket so wherever I am when it goes off, I hear it. The problem is: how much times remain? Get your phone out of your pocket, unlock it, hunt for the clock app, see the time remaining.

Now, also right in the lock screen, you see the time remaining for the current timer, with seconds counting down. Really helpful.

The last item is the Messages app. Whenever sending an SMS to anyone, you kind of never know if it got through or not. If it fails to get delivered, you see a nice "!" icon on the SMS app. That is, if you think about looking at it. If your phone sits in your pocket, you will never be notified.

In iOS7, the failure to send an SMS sends you a notification, just as if you'd just received an SMS. Much smoother.

 

Well, all in all, all these are small things, but they add up to the overall usability of the entire device.

Tags : , , ,

Limbo

So, I'm not going to write the umpteenth review of Limbo, the game by PlayDead. There are plenty already. But one thing bothers me about this game.

Well, it's great. Not in the game itself but the mise-en-scène, the universe, ambiance. The graphics are stunning, the music bewitching, the whole thing nightmarish. It's not about game controls or maneuverability, it's about the journey this little boy will take. And of course, when you're done, you wish there was more.

And why not? I'm sure that with the success they had they got their money's worth from Limbo. So why is there nothing more than this? Because for all the praise Limbo gets, there is one downside: the game is done quickly, very quickly. And I'm fine with this. I understand PlayDead was a small company with not much resources. And they did well.

So I hear here and there that they sold the rights to some big firm which will invest heavily into a 3D-based sequel. Which I don't want. I mean, it might be great and all, I'm sure, but that's not what I want right now. What I want is more of the same. Let's say he's now unsure about the fate of his little brother, and let's start over the whole thing! The same game, with more levels, more forest, more villages more factories, more hotels, more rain, more floodings, more spiders (but less gravity jumps please.)

Why not? Angry Birds did exactly that. The Rio edition or the Seasons edition was exactly that: More of the same. Sure, a couple more musics, a few twitches into the game engine, a couple of new monsters. But the core game is the exact same. Why can't they do that with Limbo? As I said, the game is not great because of its levels or controls, but about the universe it plunges the player in. We want more of that!

All in all, there is one thing I want to say now that I'm done with Limbo:

Moar! Gimme moar!

Dilbert: The end of the road

I used to be daily a reader of Dilbert - the comic strip. On the website (http://www.dilbert.com) you can read the Dilbert of the day for free. Just as you would do while reading your newspaper. So I subscribed to the blog via RSS. And every morning I'd get my daily dose of Dilbert in the subway. And that's what is good about RSS: You can download your dose of news and read it later, offline.

This morning, the Dilbert entry looked like this:

Dilbert readers - Please visit Dilbert.com to read this feature. Due to changes with our feeds, we are now making this RSS feed a link to Dilbert.com.

This means one thing: I won't be reading Dilbert anymore.

Goodbye. It was good while it last and you provided it in a form that I enjoyed consuming.

Tags : , ,

Google: developers, developers, browsers !

Is it possible that a single company be responsible for both the best browser out there along with the worst one?

As it turns out, yes it is possible, and yes it does exist: Google.

Since the first release of Chrome, it has become my browser of choice: Fast, fast, stable, fast, versatile, and the easiest to debug. I did not think about it for a minute. Plus, as a developer, it is one of the most advanced browsers and allow many cool things. All in all, kuddos for your browser there, good work.

Then came Android, with a default browser also based on WebKit. I - among many - thought that it was a "mobilized" version of Chrome. But no, they did another browser altogether. Fine.

Now, it isn't as fine as we hoped at the time. It seemed obvious - knowing Google - that their browser would kick ass. But no, it doesn't kick ass: it sucks. In fact, among friends we call it "The IE6 of WebKit". "The IE6" refers to the disabled child in the family. There is a surprisingly homogeneity in the WebKit browsers if you exclude Android's default browser. And once every 5 times, you do something that works on iOS, Chrome, Safari... and Android stumbles on it.

Now, it's been several loooong years for web developers, and still there are so many areas that lag behind all other mobile browsers... that I'm starting to lose hope. Really. Despair crawls into me day after day, week after week, month after month.

So Google, pleeeeeeease, just give it the attention it needs, or replace it with Chrome, but pleeeeeeeease, do it fast. Seeing as 1/3 of the traffic from Android comes from version 2.3, we know one thing for sure: even when Google gets its act together on that front, it'll be quite a while for web developers to be able to forget this pain.

Please. Act quickly.

Just released: color-finder

ColorFinder is a small javascript library that detects the main color in an image. The algorithm is simple and flexible. By the way of a callback method, you can influence the results by favoring certain types of colors. You can find it here: https://pieroxy.net/blog/pages/color-finder/index.html You can also have a look at the GitHub repo.

MySQL charset hell

There are not a lot of paradises on this corner of the earth, but there's one sure hell: charsets with MySQL. MySQL has the peculiar idea of defaulting everything to latin1. Everything.

Everything should be utf-8 of course, just because it fucking works with every character on earth. And no, MySQL's utf8 cannot. Because they rushed it in I suppose. So if you want to be able to use every character on earth, you should use utf8mb4.

Now, let's assume you got the following error message somewhere in some obscure logs:

Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
This means one thing: you're in MySQL charset hell. Welcome in. You're deep in. It's hot.

The road to heaven

First, you will need to edit your my.cnf file, to be found on linux in /etc/mysql/ and add/modify the following properties in the proper section:
[client] default-character-set=utf8mb4 [mysql] default-character-set=utf8mb4 [mysqld] default-character-set = utf8mb4 // NOTE: Newer versions of mysql seems to choke on this one. collation-server = utf8mb4_unicode_ci init-connect='SET NAMES utf8mb4' character-set-server = utf8mb4
The goal is to see everything as UTF-8 while running the following:
show variables like 'char%';
The result you want is this:
+--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+----------------------------+ | character_set_client | utf8mb4 | | character_set_connection | utf8mb4 | | character_set_database | utf8mb4 | | character_set_filesystem | binary | | character_set_results | utf8mb4 | | character_set_server | utf8mb4 | | character_set_system | utf8mb4 | | character_sets_dir | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+
Similarly for collation:
mysql> show variables like 'collation%'; +----------------------+--------------------+ | Variable_name | Value | +----------------------+--------------------+ | collation_connection | utf8mb4_general_ci | | collation_database | utf8mb4_general_ci | | collation_server | utf8mb4_general_ci | +----------------------+--------------------+

Now what?

Now, you're still in hell, but you just got the promise of not getting deeper. And you still need to get out, that is to change all your tables to store UTF-8. There you have several options, some consisting in dumping everything, recreating a new DB and reloading everything (see the second link below). I chose the path of the ALTER. Here is what you can do:

Migrate your dbs:

ALTER DATABASE YourDbName DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_general_ci;

Locate the faulty tables:

SELECT table_schema,table_name, column_name, character_set_name FROM information_schema.`COLUMNS` C where character_set_name is not null;

Migrate table after table:

ALTER TABLE t CONVERT TO CHARACTER SET utf8mb4;

This is the easiest solution by far and it will convert all char based columns. If for any reason you want to convert only a few columns, you will have to alter them by hand:

ALTER TABLE t MODIFY col1 CHAR(50) CHARACTER SET utf8mb4;
Of course, the CHAR(50) piece (and eventual other options such as NOT NULL) depends on the column. Good luck.

And remember: For every MySQL install you do from that point on, do this first. Less trouble for after.



Thanks:

Dos and Don'ts

Never do
CREATE DATABASE new_db;
Always do
CREATE DATABASE new_db DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_general_ci;

lz-string: We'll try to make it faster


I've setup a small page where I share my findings in trying to optimize the implementation of lz-string. This work will continue in the coming weeks. You can leave a comment in this blog entry for any feedback.

Just released: lz-string

lz-string is a compression program for JavaScript in the browser, based on LZW. It is fast, meant for localStorage or any other string-based storage in JavaScript, and is particularly efficient on short strings.

All can be read on the home page: https://pieroxy.net/blog/pages/lz-string/index.html And a demo can be found below for live compression: https://pieroxy.net/blog/pages/lz-string/demo.html

Tomcat, Java and https

So I recently acquired a free https certificate from StartSSL. All well and good, this was fairly easy. Now, I have 4 files at my disposal:

ca.pem pk.mydomain.com ssl.crt sub.class1.server.ca.pem

At that stage I'm fine. I'm about to configure https and will go on with my life. As it turned out, things aren't exactly going to turn out that way.

Tomcat needs a keystore. None of those files will make the trick of course, but none of the stupid attempts I was about to try made it any more. It's not about just throwing the three certs in a keystore. Oh no, it's a bit more than that.

As usual, Stackoverflow bootstrapped me in the right direction.

openssl rsa -in pk.mydomain.com -out out/ssl.key cat sub.class1.server.ca.pem ca.pem > out/intcacerts.pem openssl pkcs12 -export -in ssl.crt -inkey out/ssl.key -certfile out/intcacerts.pem -name "mydomain" -out out/keyandcerts.p12
And that's it. Now, in the server.xml you would find the following:
... keystoreFile="/path/to/my/keystore/file/keyandcerts.p12" keystoreType="PKCS12" ...
And that's all. If you have several domain names running on your Tomcat instance, you need a certificate that will accommodate them all, because to this day, Tomcat cannot use a different certificate for different hosts.
Tags : , , ,

Ruzzle - neat cheat

Ruzzle is a game on iPhone and Android involving small puzzles (4x4 grid of letters) and the ability of the player to find words in the grid. Of course, as soon as I saw this, I wrote a small program to cheat at it.

Here is the cheat program.

Of course I don't recommend to actually cheat at Ruzzle. But it can help you train.

<< Previous | Home | Next >>