California Voter Registration

PSA for the day:

If you live in California and you need register to vote, you can fill out a voter registration form online. Once you complete the online form they will mail you a pre-filled in form that you will have to sign and mail in (postage is pre-paid).

Having trouble getting out to polling places? Select “Yes” on the “Permanent Absentee Voter” option. Anyone can sign up for permanent absentee voter status now:

PERMANENT ABSENTEE VOTER:State law now allows any voter, who so requests, to be a permanent absentee voter. Once enrolled you will automatically receive an absentee ballot for every election in which you are entitled to vote. Failure to return an executed absent voter ballot in two consecutive statewide general elections will cancel your permanent absentee status (not your voter registration) and you will need to reapply for permanent status.

SQL Server: Escaping The Database Name

Welcome to another episode of being caught off guard by strange string requirements. Today I discovered (the hard way of course) that Microsoft SQL Server 2000 doesn’t like to have dashes in database names. Fine, I probably should have used an underscore instead, but this was a database being used for something else that I just need to do some quick queries against in PHP.

I knew that the connection between the web server and the SQL Server systems was working because I had scripts talking to other SQL Server databases. My problem wasn’t connecting, mssql_connect() didn’t cause an error, it was selecting which database to use. Fortunately the answer was right there in the docs for mssql_select_db():

To escape the name of a database that contains spaces, hyphens (“-”), or any other exceptional characters, the database name must be enclosed in brackets, as is shown in the example, below. This technique must also be applied when selecting a database name that is also a reserved word (such as “primary”).

So just get in the habit of wrapping your SQL Server database name in brackets ( [ ] ) and you’ll be fine:

   $conn = mssql_connect('SQLSERVERHOST', 'username', 'password');
   mssql_select_db('[database-name]', $conn);

What I want to know is, why brackets around the whole name instead of traditional character escaping?

Weird Al – "White and Nerdy"

Another single from Weird Al‘s new “Straight Outta Lynwood” has been making the rounds: “White and Nerdy“. If you are having a hard time keeping up, the lyrics are available.

I’m not sure that I should admit to how many of the references I’m familiar with in this video. Let’s just say that if you watch this video and you’ll be ROTFLOL.

UPDATE 18 Sep 2006 @ 10:10pm : YouTube has pulled the videos, but it is on Google Video. The folks at Wikipedia has already have already started listing details from the video.

Caller ID on Dish Network DVR

I stumbled upon a neat feature on my Dish Network DVR 625, you can have it display Caller ID information (if you have that service on your phone line). Nothing earth shattering, just a fun little feature have.

Instructions for enabling this are in Users Guide, page 101. For the PDF version it is Chapter 3 page 53. And for the really lazy:

  1. Press MENU on the remote control
  2. Select SYSTEM SETUP
  3. Select INSTALLATION
  4. Select CALLER ID
  5. Select ENABLE CALLER ID
  6. Select DONE

NetBSD And Charles Hannum

It would have been hard to miss, but just in case you did, Charles M. Hannum sent out an email about his concerns on the future of NetBSD. It got a lot of attention and sparked some interesting discussions (and plenty of ranting too). The story is still going at Confessions of a Recovering NetBSD Zealot.

I’ve only used NetBSD a few times, and I certainly haven’t followed the community. That said, reading these comments by Charles paints a very unpleasant picture of the current situation.

The Why of Vaporware

So John Gruber (Daring Fireball) takes on the TechCrunch spin of Zune by describing it as High on Vapor Fumes. The point being mostly that until the device is actually out, ranting about how successful it will be is premature at best.

John ends his post with a few questions:

If they’re “not done with it yet”, on September 14, when will they be? How late can they wait to go into production and still hit shelves for the holiday season?

And if this really is a killer feature in a product they honestly expect to ship within the next month or two, why are they talking about it now? Why tip their hand to Apple in advance? Why blow all this media attention before people can actually fork over their money for the thing? Why not go for maximum impact with a “Here it is and you can buy one today!” debut a few weeks from now?

And the most important question of all: Brown?

When will they be done? Who knows. How late can they get it in to production to make into the holidays? I don’t know that one either, but it may not be that important. The telling question to me is asking that if this is so great, why talk about it now, possibly giving your competition ideas and time. Very simple, getting it into the minds of the consumer. If people believe that Zune will be many times better than the iPod, they’ll put off buying a brand new iPod of the holidays and wait for the new Zune device. Think of it as a battle for hearts and minds.

Microsoft may even realize that they aren’t going to make this holiday season at all and are doing this in a attempt to do nothing more than dampen iPod sales. That scores a little too high on the over the top conspiracy meter for me, but then again Microsoft if known for releasing products late.

As for the brown thing, no idea.

Checking Out jQuery

I’ve been reading through some of the jQuery docs and I’m getting more and more interested. I’m aware of mootools (and Jonathan’s drag and drop example) and the latest updates to prototype. I hope to get around to playing with those as well.

The compressed version of jQuery comes in at impressive 17,587 bytes. I do wonder if there is any slow down in performance. Either way, it is a huge leap from the 45,778 byte uncompressed version of jQuery.

Too Much Of A Good Thing, JavaScripts Loops In Prototype

Ryan Campbell investigates the cost of enumerable loops in Prototype. The resulting numbers are pretty dramatic when dealing with larger arrays. One thing to keep in mind though is that for only a few iterations over arrays with a small number of elements then the penalty is probably small enough that it won’t cause problems.

Benchmarks using the various JavaScript libraries is something that I’d expect to see more of. Soon or later someone will post benchmarks between Prototype, YUI and JQuery on various tests. The benefit from having numbers like this is that eventually all libraries will adopt the fastest approach that meets their goals.