« June 2007 | Main | August 2007 »

July 2007 Archives

July 2, 2007

The Top 10 Most Played Songs On My iPod

There's a bunch of things I want to write about over the next couple of days (iPhone, my new bike, the track list for the wedding), but most of those will take some thought. Instead, I'm going to make a list. I'm not even going to make a list - I'm going to have my iPod make a list.

The Top 10 Most Played Songs On My iPod
(in reverse order, Band: Title)

10 - Gorillaz: Re-Hash
9 - The Field: Good Things End
8 - Desmond Dekker: Israelites
7 - Alkaline Trio: This is Getting Over You
6 - Alabama 3: Converted
5 - RZA: La Rhumba
4 - Alkaline Trio: Goodbye Forever
3 - The White Stripes: Seven Nation Army
2 - Underworld: Cowgirl
1 - Underworld: Rez


I was going to do the top 25, but it was 35% Gorillaz, 35% Underworld, and the balance was split between KMFDM and songs from the OC soundtrack, and no one needed to know that.

Sean, Ben - I'd like to see yours, please. No cheating.

July 9, 2007

Monotonically decreasing jackassery

Warning: nerdy post. If you come here for laughs, you will not find them in this post. Unless you like laughing at ignorance, in which case, strap on your chuckle boots and start wading.


I feel like I'm constantly having a discussion about whether or not database schema should have an numeric, auto-increment, primary keys. I'm usually on the side of 'yes, stupid' but for some reason I find that I'm in charge of managing a lot of databases that do not have one of these columns for each table in the database. Not that we don't have primary keys, of course, but rather that those primary keys are often made out of the intrinsic properties of the data being stored, and not something imposed from outside.

I've only recently learned that the question at hand is whether a table should have a Natural or Surrogate primary key. Natural primary keys are built directly from your data: If we are storing some collection for a user of a system, perhaps the natural key would be the name of the collection plus the uid of the user. This makes a lot of sense, kind of - the name of the collection shouldn't change, the number of the user shouldn't change, and so those things together should make a pretty solid primary key. Trivial!

Surrogate keys seem kind of dumb at first glance. The most common (to the best of my knowledge) surrogate key is a unique integer id assigned to every row in your table. It's definitely wasteful, since it appears to necessarily denormalize your database (as I understand it, anyway. If there is another collection of columns in the db that uniquely identifies the record, than having a separate unique column is redundant).

Even though surrogate keys might seem dumb, and natural keys might seem to make sense, I really have to keep reminding myself never ever to let anyone talk me into using a natural key for a table again. Ever. You know why? Because when someone tells you that some piece of data is not going to change, they are lying to you. They are probably not being malicious, but it doesn't make it any better. So you might find yourself in a situation where (hypothetically), someone wants some portion of a natural key changed, so the only way to do it is to delete the record and create a new one that looks just like it, but has a different value in that portion of the natural key; but some other programmer has (supposedly) leveraged the fact that, since primary keys do not change, he can use the create date of the record to sort the data. But after you delete and recreate the record, you need to go in there and manually change the create date of the record, which is a disaster.

I will accept that you probably shouldn't be using the create date as a sorting key in your application code, but here we (putatively) are. If a surrogate key was used, you could change ANYTHING in the record without any problems, since the (single, unique) primary key wouldn't change. As a surrogate, it is NECESSARILY never going to change - it exists in a space that's completely orthogonal to your data, and so will never change if your requirements change.

Then the only problem is keeping some jackass programmer from using it to sort in his app code. Attack that next - we strive for monotonically decreasing jackassery in our code, so take it one step at a time.

Reference: Some page on ASP FAQ.com, which I liked because not only does it use the phrase "pissing contest", but it also provides a link to Usenet.

July 11, 2007

Comment Spam

Hey! I'm getting my first batch of comment spam! That's so great! It doesn't show up because I spend a part of my ridiculously valuable time approving comments.

I feel like I'm really part of the blogoweb now. Screw you, spammers!

July 16, 2007

A newfound interest

I don't mean to be the guy who's all "Hey, look at me, I'm getting married," but I really have to say - I'm hella psyched by the envelopes for my RSVP cards. For real.

July 19, 2007

I hate mashups

I don't know if you kids are down with the new music craze that's sweeping the nation, but it's all about the mashups these days. [editors note: By "these days" Kennyb clearly means "a few years back", and by "that's sweeping the nation" he means "that used to be popular quite some time ago]. I first was introduced to the concept (quite late in the game, I will admit) at a RJD2 show in Brooklyn, when Diplo opened for him.

Diplo did these amazing and (to me at the time) unheard of things - like looping the guitar opening to Weezer's Sweater Song, and dropping pounding hip-hop beats on top. Made the crowd crazy go nuts (and I actually just remembered that I wrote about this once before in my old blog).

And since that day, I just fell in love with the musical combination of things that probably shouldn't have gone together but did anyway. There are just some brilliant things out there. At this very moment, I'm listening to Britney's "Slave 4 U" mixed with Aphex Twin's "Windowlicker." Really, the only thing that's missing is a video with Richard D. James' head photoshopped on the body of a hundred Catholic school girls.

But all in all, I really don't think it's worth it, and I'll tell you why. Because every once in a while you'll totally be rocking out to something, and you'll look down and see that what you were totally just into right then was Death Cab For Cutie mixed with Madonna. And that's really embarrassing, and just not worth it.

July 20, 2007

Reasons Why The Philipines Are Awesome

Todays reason: Higher quality prison inmates:

(hattip: Boing Boing)

July 26, 2007

Password: Alex

Today, I needed to generate ANOTHER password for work. This makes

- Windows Network
- Unix
- Password for the software I develop
- Exceed
- Exceed Passphrase (distinct from the exceed password)
- VPN
- Password for a new tool that lets me log into the unix machines

That makes seven. Of course, I don't use all of them every day, which is both a blessing (since I would have to chew my own leg off) and a curse (since I can barely remember where the office is every morning, much less seven passwords).

They sneak up on you. I find I need a new one every six months or so. Because of gradually increasing security restrictions, the strength of each password is required to be higher than the last.... so they are ALL different. This is not only a pain in the ass, but it's also potentially a serious obstacle to my getting work done (since if I forget a password, it could be as long as 10 minutes to get it reset, depending on how busy the operators are).

I have a solution, however, and it's even a step above writing all my passwords down on a piece of paper (which is something that security experts actually suggest, believe it or not). It's a Palm application called Keyring. Great piece of software. It's pretty much just a piece of paper with all your passwords, except that it requires a password to get into, and the data is encrypted in the flash memory (so if someone swipes your palm pilot, they can't get all your passwords unless they can guess your Keyring password). So you go from having to remember a bunch of passwords to only having to remember one. It's very nice.

This, plus a simple password hashing algorithm (like interspacing the letters of your cats name in between the letters of the domain name for the site you're generating a password for) should provide a nice solution ot the proliferation of passwords that we all have to deal with, while also providing a relatively secure set of passwords. As long as you never let anyone know the name of your cat, of course.

July 31, 2007

Something to look forward to

There was a dark time in my life, right before the release of the last Lord of the Rings movie, when I realized I might not have anything to look forward to ever again. When was it announced - sometime in 1999? From that point, to the day before my first viewing of The Return of the King in mid December 2003, I was SO psyched, and looked forward to each movie like I used to look forward to Christmas morning.

And then they ran out the trilogy (which, by the way, completely lived up to my completely unreasonable expectations), and I had nothing to look forward to anymore. Spiderman? I tried, but it wasn't nearly the same. Superman? Meh. My life was a dark place, interrupted by small flashes of light from the medals on Admiral Adama's chest and the the explosion to open the hatch.

But I have found something to fill that void, at least until end of November. More information about the Futurama movies has been released. So huge! Evidentially the first episode will concern, at least in part, "the secret to time travel which is somehow attached to Fry's buttock." I'm glad to see that they are keeping true to the spirit of the original episodes.

About July 2007

This page contains all entries posted to Kennyblog Redux in July 2007. They are listed from oldest to newest.

June 2007 is the previous archive.

August 2007 is the next archive.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.34