After my last post on music players capable of Ogg Vorbis playback, I
was recommended:

I can discount the iHP120 straight away as it’s a HD based player and
will be too large for what I want.

Update: I’m intentional avoiding any Apple
products.

iRiver t10




iRiver
T10

90GBP will get me a 2GB device. Several people have claimed it works
as USB mass storage, although I’ve seen someone say American versions
wouldn’t work. iRiver have a firmware updater to convert it to UMS, so I
might need to find a Windows installation. It has good battery life of
around 45-50 hours from a single AA battery, which is good. It’s got good reviews for
its sound quality and its rugged construction might make it good in the
gym.

Kingston K-PEX100




Kingston
K-PEX100

A 2GB model will set me back around 65GBP. It’s a touch larger, but
thinner than the T10. Looks like a UMS device. It can be expanded with
miniSD cards, which seems a nice feature. It only has a 17 hour battery time using the internal
rechargable, which seems a bit low, considering my CD player will do 120
hours off two AA. Reviews have mentioned that the build quality is a
little budget and a couple of firmware bugs, but hopefully these have
been fixed now.

Samsung’s YP-U2




Samsung
YP-U2

Can only find a 1GB unit for 60GBP, although there is a 2GB unit
available. Battery life is only 14 hours from the internal rechargable
battery. It’s smaller than the iRiver T10 and is a UMS device. I’ve seen
reviews complain about the audio quality of this device. I think the
lack of battery life and audio problems will rule this one out.

Cowon iAudio U3 and T2

I wasn’t recommended any particular models, but the two I’m considering
is the T2 and U3.




iAudio
T2

The T2 is a necklace style player, which is rather unusual, but I can
pick up a 2GB model for around 100GBP. Battery is around 12 hours using
the internal rechargable battery. Looking at the reviews, the supplied
headphones make up the actual necklace part and you have to remove that
to use your own headphones, which is what I’ll be doing, having just
bought some Shure E2Cs. They also say the controls are a little
confusing.




iAudio
U3

This is the most expensive of the products I’ve looked at at 115GBP
for the 2GB model. Battery life is around 20 hours. Reviews have been
very positive. Not sure if it’s worth the extra price though.

Update: Apparently the 2GB model can only be charged
via USB, where as the 1GB model comes with a charger too, Also, I read
in a review that it has doesn’t do gapless playback, which is very annoying. Why don’t
players do gapless playback?

Summary

I think my top choice is the iRiver T10, although each of the others
have their plus points. The K-PEX is expandable, the T2 is small and the
U3 gets good reviews. I think I’ve discounted the Samsung. I will try
and find each of the players in a local shop to have a play before I go
out and buy one. If you have any comments on any of these players, or
you have another product to recommend I’d be
very interested.

Oh, and continuing my trend of discovering bands that have split up,
I’ve been getting into At The Drive-In. :S

Firefox 2 is an improvement on previous versions, but one thing
annoys me is the new tab style. I don’t like having a close button on
each tab and I don’t like it hiding tabs after you have a certain number
open. Fortunately you can fix this. Go to about:config in the URL and
then set browser.tabs.closeButtons to 3 and browser.tabs.tabMinWidth to
0 and now you should have a close button on the right and all tabs
displayed.

Content-Type: multipart/alternative;
        boundary="----=25532899_4522_4927_1140_664401643181"

This is a multi-part message in MIME format.
------=25532899_4522_4927_1140_664401643181
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

This message is in MIME format. Since your mail reader does not
understand =
this format, some or all of this message may not be legible.
------=25532899_4522_4927_1140_664401643181
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

No, my mail reader understands it perfectly. It’s your crappy mail
client that sends out multipart/alternative mails which don’t contain
alternatives. Fuckers.

If you use Last.fm, you may have got
around to using their events feature where you can search for events
near you and mark yourself attending those events. I was manually
entering the information into my google calendar, which was a pain.

Fortunately, being one of those hip, friendly web2.0 websites, Last.fm
allows you to get your data out in all sorts of useful ways, including
you event calendar as an iCal file. Google being useful, allow you to
display external iCal files in your calendar. Can you see where I’m
going with this? To get this up, log into you Google calendar, go to
“Manage Calendars”, then “Add Calendar”, then “Public Calendar Address”.
Finally type in the url of your last.fm iCal file, which will be http://ws.audioscrobbler.com/1.0/user/dpash/events.ics,
although obviously you need to change dpash to your particular last.fm
username. Now, you only need to mark yourself attending a gig to have it
show up in your Google calendar.

You can use something like this
to get it into your Evolution calendar.

In the continuing saga I like to call “Dave, what’s wrong with your
ex-employer today?”, I’m still missing large chunks of my pension.
Finally had enough of my former employers not giving me any answers or
claiming to be looking into it, as I’ve been asking since around last
March. As per this
guide, I’ve started making efforts to resolve the problem myself. The
first step has been to formally request a copy of the pension scheme’s dispute
resolution procedure. I sent them an email last wednesday and hand
delivered a letter last night, giving them until the 9th February to
supply me with the procedure. If by then they haven’t I’ll contact the
The Pension Advisory
Service
. I’m hoping it won’t come to that, but given the lack of any
progress in the past, I’m not holding out much hope.

Do you ever feel you should implement equals(),
hashCode() and toString, but just can’t be bothered to
do it for every class? Well, if you aren’t bothered by speed, you can
use Jakarta Commons Lang to do it for you. Just add this to your class:

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;

class Foo {
   public int hashCode() {
      return HashCodeBuilder.reflectionHashCode(this);
   }
   public boolean equals(Object other) {
      return EqualsBuilder.reflectionEquals(this,other);
   }
   public String toString() {
      return ToStringBuilder.reflectionToString(this);
   }
}

And that’s it. Your class will just do the right thing. As you can
probably guess from the function names, it uses reflection, so may be
suboptimal. If you need performance, you can use tell it to use
particular members, but I think I’ll leave that up to a future article.
I also recommend you don’t use this technique if you are using something
like Hibernate, which does
things behind the scenes on member access; you may find it does
undesirable things. 🙂

I noticed today that Mark Pilgrim
linked to Eddie, my liberal RSS and Atom parsing library for Java, so I
figured I should make a new release. It’s been a few months since I did
any serious work on the parser, but in the last few days I’ve reduced
the number of test case failures to less than 100 out of 3502 test cases
which come as part of Mark’s Feedparser parser for python. The
majority of the failures are in the date parsing routines and due to
bugs in the Jython library which cause literal dictionaries not to match
with classes inherited fro PyDictionary.

Improvements in this version include:

  • Massively improved support for different character encodings. With
    Java 6, it also has support for UTF32 feeds.
  • CDF Support.
  • Optional support of TagSoup for sanitizing of HTML in entries.
  • Improved support for different input sources including String,
    InputStream and byte[].
  • Numerous bug fixes, with 97% of test cases passing, up from 90%

If you use Eddie, drop me an email. I’d like to thank Mark Pilgrim
again for providing the community with a fantastic and comprehensive
suite of test cases, extensive documentation and a first class Python
library.

I was quietly minding my own business, fixing some encoding bugs in
Eddie, my liberal RSS and Atom parser, when I noticed that Java 6
included support for UTF-32, which is one of the encoding tests that was
failing. I downloaded and installed the Ubuntu packages and installed
it, and decided to run a quick benchmark using my unit tests.

First up was the Sun Java 5 JVM. I’d been running the unit tests all
night, but timed it this time,and got these results:

Ran 3502 tests
Passed 3322 tests
Failed 180 tests

real    1m10.293s
user    0m40.375s
sys     0m3.632s

Next I tried the Sun Java 6 JVM, using the same jar files and
got;

Ran 3502 tests
Passed 3326 tests
Failed 176 tests

real    0m56.059s
user    0m39.198s
sys     0m4.212s

One thing to note was that it spend a couple of seconds noticing new
jars to read, so I decided to run it again and got:

Ran 3502 tests
Passed 3326 tests
Failed 176 tests

real    0m45.317s
user    0m34.770s
sys     0m3.516s

Wow, I’d gone from 70 seconds to 45 seconds using the new runtime,
and interestingly enough, past 4 more tests in the process. I’m assuming
they are the UTF-32 tests, although I have’t checked yet. The other thing
for me to try is recompiling the code to see if that has any additional
benefits.

Update: Got around to checking what Java 6 fixed and
it turned out it was the additional support for koi-u and
cspc862latinhebrew encodings. After I fixed the UTF32 support in Eddie,
it passed an additional 16 tests. Down to just 160 out of 3502. I just
wish they would add support for some of the stranger encodings. Maybe
this will happen when it’s open
source.

Dear Lazyweb,

I’m after recommendations of a portable music player, which is small
and can play ogg vorbis files. I’m not sure I need something with a
large capacity; 2GB should be fine. Basically want something I can use
in the gym, so I don’t have to listen to the god-awful dance music they
keep playing on MTV Dance. Reasonable audio quality a bonus. Last.fm support would be amazing. I
would be tempted by something that could run Rockbox, but I suspect they
are going to be on the top end of the size scale.

Spent some time checking upcoming gigs and I’ve settled on And You
Will Know Us By The Trail Of The Dead, The Killers,
65daysofstatic, and The Barfly’s Great Escape mini-festival, 3 days of
gigs over 20 venues. Trying to decide if I want to go to see Inspiral
Carpets and Electric Six in the world’s dirtiest club.

MySQL cleverly maps

CREATE INDEX foo_bar ON Foo(Bar);

to

LOCK TABLE Foo WRITE;
CREATE TEMPORARY TABLE A-Foo ( .... INDEX foo_bar (Bar));
INSERT INTO A-Foo SELECT * FROM Foo;
ALTER TABLE Foo RENAME TO B-Foo;
ALTER TABLE A-Foo RENAME TO Foo;
DROP TABLE B-Foo;

If you have a very large table, expect this operation to take a) a
lot of disk space, b) a very very long time and c) block any writes to the table
in the process. I don’t recommend adding indexes or altering any very
large tables that are in production on MySQL, because you won’t be in
production for quite some time.

Update: Tom Haddon asked me if this applied to
recent versions of MySQL or to PostgreSQL. Looking at the docs, it
appears to still apply to 5.1:

  • http://dev.mysql.com/doc/refman/5.1/en/create-index.html
  • http://dev.mysql.com/doc/refman/5.1/en/alter-table.html

    In some cases, no temporary table is necessary:

    • If you use ALTER TABLE tbl_name RENAME TO new_tbl_name without any other
      options, MySQL simply renames any files that correspond to the table
      tbl_name. (You can also use the RENAME TABLE statement to rename tables. See
      Section 13.1.16, “RENAME TABLE Syntax”.)

    • ALTER TABLE … ADD PARTITION creates no temporary table except for MySQL
      Cluster. ADD or DROP operations for RANGE or LIST partitions are immediate
      operations or nearly so. ADD or COALESCE operations for HASH or KEY partitions
      copy data between changed partitions; unless LINEAR HASH/KEY was used, this is
      much the same as creating a new table (although the operation is done partition
      by partition). REORGANIZE operations copy only changed partitions and do not
      touch unchanged ones.

    If other cases, MySQL creates a temporary table, even if the data wouldn’t
    strictly need to be copied (such as when you change the name of a column).

  • http://dev.mysql.com/doc/refman/5.1/en/alter-table-problems.html

As far as PostgreSQL is concerned, it doesn’t mention anything about
doing the same thing, but does mention that it does a full sequential
scan of the table. During this time writes are blocked. You can use the
CONCURRENTLY keyword to allow writes to happen, but it does two scans
and will take longer, but you can still use your database.

http://www.postgresql.org/docs/8.2/interactive/sql-createindex.html