New Front Speakers

Home audio is one of those things where you keep wanting to improve what you have. I finally reached the point where I wanted an upgrade of the speakers that had treated me well for a year. I'll let you make the call, but I may have gone a bit overboard on the upgrade. However, I'm really happy with the decision so far with the new speakers.

Original setup

The audio setup started rather modestly. When I first moved in to my current apartment, my Dad had an old Marantz PM500 amplifier that he let me bring along. It worked well for its purpose—to power two speakers I had laying around from a shelf system that had bit the dust. With no remote, it wasn't exactly new or top of the line, but it did the job. You can see that original setup in all its glory, including the beautifully-rigged DVD player not even in the cabinet.

Speaker comparison

It was about a year ago I decided it was time for an upgrade on the audio front. I used my $600 stimulus check from the government and bought a new receiver and home theater speaker system, which I detailed in an earlier post about my home theater and audio setup. I realize now I never took a picture of that setup and posted it here—whoops. Fast forwarding a year, let's just say we upgraded the front speakers slightly.

The new speakers are the Polk Audio Monitor 70s. They are the top of the line in the Monitor Series, which seems to be a line they are phasing out. Newegg has some great deals on the entire line. The speakers are pretty good-looking.

They look large, but not overwhelming in my full speaker and entertainment system setup. I'm planning on holding onto these guys for quite a few years to come, so I didn't hold back on the purchase. Hopefully I don't start itching to spend more money anytime soon, although the center channel is now awfully undersized.

Left speaker without grille
Full setup

New Eee kernel has KMS enabled by default

With the release of kernel-eee-2.6.30-2 tonight, I've made the switch to KMS (kernel mode-setting) being enabled by default. Hopefully this will be a seemless transition for all as I've pulled in three patches to the build to ensure things are working well. This is the first time I've patched the vanilla kernel in some time, so you know I'm serious about this.

The biggest things to keep in mind when upgrading:

  • Any vga= or video= lines you may have in your grub command line should be removed with the change to KMS.
  • Ensure your userspace has been upgraded- you need a relatively new version of Xorg for this to work.

I didn't need to make any xorg.conf configuration changes once I pulled in the relevant patches, so hopefully the same applies for everyone else. Please let me know if you have any trouble with the upgrade (by leaving a comment) and I'll try to follow up here. If everything works great, feel free to speak up too. :)

Blu-ray player purchase

Since writing a post a while back about my home theater setup, not much had changed, or at least until my quick to pull the trigger purchase of a Blu-ray player on Amazon last weekend. They had a great bundle deal on the Samsung BD-P1600 and four Blu-ray discs, and I paid under $200 for the whole thing.

Overall I think it was a worthwhile purchase. Of course, I've only had it 2 days, so don't look at my thoughts as extensive, but it has a lot going for it. The built in Netflix streaming is awesome, and means I don't have to do anything funny with a computer hooked up to my TV and whatnot anymore. The streaming quality is also really good, a lot better than I had expected through the player. I doubt I'll be using it much for movies because you miss out on the surround sound (vs. DVD or Blu-ray), but for TV shows it works great.

I've only watched one Blu-ray movie on it so far, but I was pretty impressed. You really notice the upgrade in resolution from a DVD, and I can finally watch a 1080p source on my 1080p capable LCD TV. The player also supports 24 fps output, which should allow for my 120 Hz TV to show movies without doing tricks such as 2:3 pulldown.

The only real problem I've found with it so far deals with the audio output. There are three options the player allows:

  • PCM - decode in the player, sending multichannel PCM to the receiver
  • Bitstream (Re-encode) - decode in the player, sending a re-encoded DTS bitstream to the receiver
  • Bitstream (Audiophile) - send the primary audio bitstream directly to the receiver, no internal decoding

If using an HDMI connection for audio (which I am), really only the first and third options make any sense. The benefit of the first is that secondary audio tracks on the media would be audible- with the audiophile bitstream, you won't hear these sounds. However, when using the PCM mode and listening to a Dolby Digital/DTS demo DVD, I noticed some severe clipping of the audio track, especially in the rear speakers. When I switched to the audiophile bitstream and let my receiver do the decoding, the audio track was perfect. I want to bring this issue up on AVS Forum to see if anyone else has noticed as well as get in touch with Samsung to see if they know about it.

Since the Blu-ray player has an Ethernet connection to allow things like Netflix, Pandora, and BD-Live to access the internet, I thought it would be interesting to sniff some of the traffic the player was sending over my network. I mostly wanted to capture its initial fact-finding (e.g. DHCP, any update sites it was contacting).

I fired up a little tcpdump magic by running it on my router and writing out the packet capture to my desktop machine where I could read it later. Since my other computers are on an Ethernet switch, I knew I wouldn't see any of the traffic on them, so the capture had to be done on the router.

There wasn't anything too terribly surprising. The first thing captured was the standard DHCP Discover/Offer/Request/ACK sequence between the player and my router. Next came some ARP traffic. Finally, the player sent out a single web request and a DNS request to a firmware update server and received a [NO UPDATE] text response. I won't post the URL here, but it was nothing more than a GET request with the model number, country, and current version of the firmware.

I pulled up the packet dump in Wireshark to get a better idea of what I captured, and found one interesting nugget of information in the DHCP packets:

Option: (t=60,l=46) Vendor class identifier = "Linux 2.6.12-3.1-v10r15_377-uclibc-brcm 7440b0"

Interesting that the Blu-ray player itself runs Linux, but there probably won't be any Linux desktop Blu-ray software for a while. I did a quick nmap scan on the player as well, which revealed all 65536 ports were closed.

PostgreSQL thoughts and experiences

When I moved my blog from DreamHost to Slicehost for toofishes.net, I also took the plunge and switched from MySQL to PostgreSQL as the backing database for this Django web application. DreamHost provided the MySQL databases and didn't offer Postgres as an option, so I was left without much choice there. Moving to a VPS solution, I had my choice of databases so I decided to give Postgres a try.

Postgres was one of the big-name RDBMSs I had yet to work with. In the past, I have had a decent amount of experience with MySQL, MS SQL Server, Oracle, and even a bit with IBM DB2.

Hopefully this post doesn't become a "PostgreSQL crushes MySQL" type rant, but I've definitely seen some advantages to switching. I'll try to highlight a few of those and also outline any drawbacks I've seen.

Postgres doesn't have the same concept of multiple storage engines as MySQL, which I find to be an advantage. You don't have to worry about which database type supports true foreign key constraints and full-text search—Postgres just does.

psql has turned out to be as useful as the mysql command line client. Things are slightly different, but psql definitely gets it right in that Control-C doesn't dump you out of the client like mysql does.

Memory usage has been great for fitting within the bounds of a 256 MB slice. The virtual memory allocated by Postgres is a bit deceiving at 40 MB; however, right now it appears to be only really using 4 to 5 MB of physical RAM. Of course, I have a lightly-trafficed site and a rather small set of data, but there isn't a huge tradeoff memory-wise between using Postgres and going the embedded route with sqlite.

Postgres has a couple of types devoted to storing IP and MAC addresses. MySQL leaves much to be desired in this arena. You can either store IP addresses as varchar columns (as Django does by default), or you can create an INT UNSIGNED column and use the inet_aton() and inet_ntoa() functions to translate to and from the dotted-quad representation.

Where does this fall apart for MySQL? One, it can't handle subnets and other things nearly as well as Postgres, which does it easily with the inet type. It also chokes if you want to mix IPv4 and IPv6 addresses. When it comes to Django, storing IP addresses natively rather than in text form also allows the sort order to be correct, rather than text-based. MySQL will sort '128.127.126.125' before '76.77.78.79'; Postgres gets it right.

So where does Postgres lose? I haven't had to do it yet, but the dump/restore on major upgrades isn't quite as as seamless as a MySQL upgrade. I'll wait and see before I pass too much judgment on this—I'm currently running 8.3.7, 8.4 is in beta, and I will probably upgrade soon after the 8.4 final release.

MySQL's ubiquity means there is a lot more information on the internet when it comes to questions. However, I've yet to have a question about Postgres I haven't found the answer to. It might also be a benefit that Postgres is used a bit more selectively, as it cuts down on the signal-to-noise ratio. PostgreSQL's online documentation is also excellent.

Why JS libraries are timesavers

If you have ever home-rolled JavaScript to do DOM traversal and manipulation, you know it is a painful experience. It is especially apparent when working on a legacy project where you end up adding to the mess, but I offer this advice- move to a JS library as quickly as possible.

I wrote up the following code the other day before I realized I should just grab a library. The idea is to apply a CSS class on the fly to <code/> elements in my blog. This allows the prettify code to come though and highlight it, as it works by finding all elements with a given class.

function makePretty() {
  var possibleCode = document.getElementsByTagName('code');
  for (var i = 0; i < possibleCode.length; ++i) {
    // Apply the pretty-printing to all parents if they are a 'pre'
    p = possibleCode[i].parentNode;
    if (p.tagName.toLowerCase() === 'pre') {
      p.className = 'prettyprint';
    }
  }
  prettyPrint();
}

jQuery comes to the rescue and makes this a breeze to code, and in one line at that.

function makePretty() {
  // Apply pretty-printing to code elements inside a pre tag
  $('pre > code').addClass('prettyprint');
  prettyPrint();
}

Yes, I know the two code snippets do something slightly different (which element ends up getting the 'prettyprint' class applied), but the end result was the same, and it was accomplished with a lot less effort on my part.

Between jobs and personal projects, I've used YUI, prototype, and jQuery. I don't want to advocate any of these over others as I think they all have their roles, but I would recommend sticking with only one in a given project if at all possible.

Want to see more posts? Take a look at the archives or take a look at the tag list.