Sorting a generic List(Of T) using IComparable(Of T)

List(Of T) supports sorting through it’s Sort method.  When you call Sort it will use the default comparer for the items it contans.  So if you have a custom class in there, you need to implement IComparable or IComparable(Of T). 

Here is some code that shows how to do this.  This code sorts lowest to highest.

    Public Function CompareTo(ByVal other As CustomClass) As Integer Implements System.IComparable(Of CustomClass).CompareTo
Dim myscore As Integer = Me.SomeValue
Dim otherscore As Integer = other.SomeValue
If myscore > otherscore Then
Return 1
ElseIf myscore = otherscore Then
Return 0
Else
Return -1
End If
End Function

My Sansa e200 Review

I figure I should put up a review of my Sansa e200 incase anyone else is thinking of getting one.

I had a couple trips I had to take last month and my old Archos mp3 player decided to die on me.  Luckly for me I was able to find a Sankdisk Sansa e200 or e220 or e2XX whatever.  My model is the 6GB version, which is the largest they offer at the moment.

The unit cost $280 at Circuit City and while I could have got it online for $250 or so, I was going to be on a plane the next day so I didn’t mind paying a little extra to have it with me on the trip.  Have I mentioned that I hate Circuit City?  Why is it that every time I got there I end up getting frustrated or pissed off?  I guess the one time I went there to see a TiVo demoed was ok… except now that I think about it they didn’t know how to work the Tivo.  I ended up buying one and loving it though (this was back in ’99).

Anyway, I have to say I am very pleased with the Sansa.  It was exactly what I hoped it would be in almost every way.

Battery life is awesome.  I think I read somewhere that it does 15 hours, which sounds about right.  I haven’t had it run out on me yet.  Oh, this does bring me to one of the few things I don’t like about it.  You can’t listen to it while you have it connected to your computer, which means you can’t listen to it while you are charging it thorough the USB.  Maybe you could “disconnect” through windows and have it still get power, but I don’t know.

Playback quality and volume are good.

Navigation is IPod-like, which is ok, but rather than use a “touch wheel” they have an actual wheel you can turn that makes navigating easier in my opinion.  The only thing I don’t like about navigation is that if you want to change to a song on another album by the same artist, you have to click Menu (down), Back To List (Middle), and then “Back” (Right).  I guess there is not obvious way to improve that, so overall I can’t really complain.

FM Radio / Video: Well I will never be using the video, and I am sorry to say that as soon as I started using the FM radio I realized how much I would have rather had AM.  Oh well.

Audio Recorder: Haven’t used it.

Graphics: I was a little suprised that there were now “Themes” to choose from, only the 1 default theme.  It’s not bad, just something I would have figured they would do.  They show the album cover if you downloaded it, which is cool.

PC Integration: Awesome.  My winXP computer saw it right away as some kinda media device, no driver installs or anything.  You go to My Computer, click on the Sansa icon (it’s almost like an external hard drive), and you just drag over your folders.  Once loaded, the Sansa will look at your MP3 tag info and index them all like the IPod does.

My wife bought me a little rubber case for it that I leave on all the time, and I have no worries about it breaking.  The thing feels really solid. 

Size: It looks bigger in these pictures than it is.  It’s smaller than a large pack of gum.  Very nice.

Overall I am very happy with it!!  I would really recommend it to anyone who wants a great MP3 player, but doesn’t want to get stuck with an IPod.

 

MusicBrainz

This website www.MusicBrainz.org has a great piece of software called “Tagger” and a not so great, but supposedly getting great program called “Picard.”

I am still trying to figure out Picard, to see if it can download album covers for me, but I am not having much luck as of yet.

But Tagger is awesome.  You basically point it to your MP3 collection, and it will attempt to match up your MP3s with their database based on a “music fingerprint” and then it will automatically set all the tag info as well as rename the file.

So this means if you have an MP3 of Pink Floyd’s Breath from Dark Side of the Moon but the MP3 has no ID3 info and is named PinkF.-Breath.mp3, it will most likely look at the audio and match up the mp3 with their database and put it into Pink FloydDark Side Of The Moon1 – Breath.mp3 or however you tell it to rename files.

Pretty sweet!

I just need to find a similar program to get album covers too.

IBiz Quickbooks Integrator

nSoftware just released a product called IBiz Integrator for Quickbooks, which is supposed to enable one to integrate their applicaiton with Quickbooks via QBXML.

A comprehensive suite of Internet-enabled components for QuickBooks (QBXML) Integration. Includes easy-to-use components for accessing QuickBooks constructs and automating accounting tasks.

Should be work looking into for QB applications.

Backing up Cisco router settings

Working with Cisco products is not an everyday event for me, but when I do work with them I want to make sure I backup the config files before I do anything.

To do this you can follow the instructions on this page:
http://www.cisco.com/en/US/products/sw/iosswrel/ps1835/products_tech_note09186a008020260d.shtml#tftp

You can also download a free TFTP server at this location:
http://www.solarwinds.net/Tools/Free_tools/TFTP_Server/