SirPoonga

Name: SirPoonga
Joined On: Feb 21, 2006
Maintag: SirPoonga
Age: 30
Occupation:
Location: Oshkosh, WI
Currently: Online
Last seen: 11/21/08

1952 Member Points

View Members Homepage

My Gamertags

Xbox 360
SirPoonga

My Clans

Xbox 360
2Old2Shoot
2old2plays GSN

My Bookmarks

Woohoo Microsoft

This is probably not going to interest many people on the site and it will show how much of a geek I am. Visual Studio 2008 service pack 1 came out today. Also .NET 3.5 SP1 came out. This also includes SQL Server Compact Edition service pack 1.

I have a really good reason to be happy about it though. At work we've been moving from Visual Basic 6.0 (yuck!) to C#, .NET 3.5, WPF. To help learn this newer technology quicker I've come up with a project to do at home. One thing I want to do is take an old 50s wood radio and make it a modern mp3 jukebox. I want to find something like the following where I don't have to change the outside. I can put a touchscreen in place of the turntable.

There's jukebox software out there already, but I am going to make my own. I don't learn well by just reading a book. I need a project, a reason to use the stuff. This projectis perfect and will have stuff that is analogous to the business world.

So, why I am excited about these service packs. There's something with SQL Server Compact that has been annoying me, it had no TOP command. I am using SQL Server Compact because then I don't have to install anything extra. It's part of .NET 3.5. Yeah, it's limitted but I am not making a business application. I just need to keep track of songs. It's a simple database. What TOP does is limit the amount of data that is returned. Sometimes you don't need everything. I have such a case.

Take a look at the following screenshot. I am working on how to do the song selection. The following screenshot show the albums in order of artists. I only have one database table which stores all the songs. To make that screenshot I ask for the unique artist/album combinations from that table. Basically in return I get a list of all the albums, no song information. However, to get the cover art I need to get it from one of the mp3s. Before the service pack there was no way to ask for a single song that matches the album and artist. Currently I just take the first song in the list that is returned and use that mp3 to get the cover art. However, returning all of those songs takes up memory and extra processing cycles. Now with TOP being supported I can have the database return only the first song (Top 1) instead of all the songs in the album. With today's computers you won't see a difference in a small change like this. But I think most of today's programmers have become lazy. Doing a bunch of small improvements like this will affect the system as a whole.

(Click for actual size)

Interesting tidbit. The look and feel is programmed using WPF (Windows Presentation Foundation). This is a new thing Microsoft is introducing. It;s what Vista's interface is programmed in. It's vector based which basically means it will look the same at any resolution. That window is 800x600 but the contents are in a 640x480 box that is being stretched. doesn;t looked stretched, does it? That's vector graphics for you.



Posted by SirPoonga on Mon Aug 11, 2008 @ 6:16 pm EDT | 11 Comments
You could sell those jukeboxes to "high end" users if they looked as good as the pic. The rest is Greek to me. ;)

Posted by microscent on Mon Aug 11, 2008 @ 6:23 pm EDT

With the earlier versions of the SQL CE, you can use the SetRange method in lieu of TOP or LIMIT.

It also seems like you would be adding a little bit of overhead to the application using SQL CE. Why not just use the ID3 information already embedded in the MP3 files?

There are some inexpensive sorting algorithms in the .NET Framework that would make this pretty snappy. With a limited screen size, you wouldn't need to keep that much info in memory.

Posted by hudsmack on Mon Aug 11, 2008 @ 6:34 pm EDT

What do you mean about using the information in the ID3 files? I can query the filesystem?

I am using SQL CE so I can bind the controls to the data. The database is filled by processing the the ID3 tags.

I saw SetRange, but that doesn't look like it will work. It looks like you need to know what the first item is going to be.

Posted by SirPoonga on Mon Aug 11, 2008 @ 7:06 pm EDT

Build the Dataset in memory from the ID3 tags and bind the controls to the Dataset. You in essence are cutting out the middle man.

Posted by hudsmack on Mon Aug 11, 2008 @ 7:12 pm EDT

That's what I am doing though. I am building a dataset off a database query. I am currently not storing the image n the database, so that I have to get from one of the mp3s. I am grabbing that if I need it. When something want's the cover i check to see if there is one. If not i find and mp3 and set the cover, that way i is there for later use.

Are you saying put the entire database table into dataset? Can I filter a dataset to then just show albuns? .NET is new to me so I am learning this stuff. if I can do that then that makes more sense. Yeah, it uses more memory but it would be faster.

Posted by SirPoonga on Mon Aug 11, 2008 @ 8:02 pm EDT

Send me a PM, I'll send you an email with a class structure and some threading work to give you an overall idea. You shouldn't have to change the UI, you could wire it up to this structure and just cut out the SQL CE.

Posted by hudsmack on Mon Aug 11, 2008 @ 8:05 pm EDT

What I got from that...Blah,blah, blah....I want to turn an old turntable into an MP3 jukebox....
Much respect for your awesome knowledge of technology Poonga

Posted by Teufelhunden11 on Mon Aug 11, 2008 @ 8:30 pm EDT

Teufel, did I not warn you with the first sentence?

I did provide pretty pictures for the less fortunate, though.

Posted by SirPoonga on Mon Aug 11, 2008 @ 8:32 pm EDT

Your right, you are a Geek! ;)

Posted by Geekboy on Mon Aug 11, 2008 @ 8:55 pm EDT

Good luck finding an old turntable that's not outrageously priced. Your best bet would be to go to a lot of estate and garage sales.

Posted by VenomRudman on Tue Aug 12, 2008 @ 11:40 am EDT

Venom, yeah, i am watching garage sales. I want to find one that isn't working. Working models are insanely expensive.

If I found a good woodworker I'd have him make something.

Posted by SirPoonga on Tue Aug 12, 2008 @ 11:53 am EDT

You must login or register to leave a comment.

Blog Stats

Since 8/20/2006:

  • Viewed 11708 times
  • Bookmarked 24 times
This month:
  • Viewed 401 times
Subscribe:

My Consoles

Currently Playing