Skip navigation

Kill the Kill Switch

Bruce Schneier recently posted a commentary on Wired titled I’ve Seen the Future, and It Has a Kill Switch.  Looks like everyone wants to be able to control everything.

OnStar will soon include the ability for the police to shut off your engine remotely. Buses are getting the same capability, in case terrorists want to re-enact the movie Speed. The Pentagon wants a kill switch installed on airplanes, and is worried about potential enemies installing kill switches on their own equipment.

Microsoft is doing some of the most creative thinking along these lines, with something it’s calling “Digital Manners Policies.” According to its patent application, DMP-enabled devices would accept broadcast “orders” limiting capabilities. Cellphones could be remotely set to vibrate mode in restaurants and concert halls, and be turned off on airplanes and in hospitals. Cameras could be prohibited from taking pictures in locker rooms and museums, and recording equipment could be disabled in theaters. Professors finally could prevent students from texting one another during class.

Somehow I knew Microsoft would be involved in this.  Read on for Bruce’s impressive rant against devices controlling devices.  I’m in 100% agreement with him on this issue.

Libraries might like the idea of being able to silence cellphones entering the building, but there are just too many ways that something like this can be abused.  At least give me the ability to reject these “orders” being sent to my gadgets.  You hear me, Microsoft?

Cylons explain DRM

Thanks to Laura Solomon for tweeting this.  Just say NO to DRM!

Optimizing SQL Presentation by Jay Pipes

Last week I got to see Jay Pipes speak at a local PHP users group meeting. He did a 2-part talk on optimizing SQL (Join-Fu, as he calls it). I managed to keep up and follow part 1, but I have to admit that part 2 was largely over my head. Below are some of the key things I took away from Jay’s great presentation.

Vertical Partitioning

Partitioning vertically is a database optimizing technique where tables with many columns are split into multiple, smaller tables.  Without partitioning, even normalized tables may be a mix of frequently and infrequently accessed columns.  This makes it difficult to keep things loaded in memory and can affect overall performance.

By splitting the table in two, you can have a table of frequently accessed columns and a table of less frequently accessed columns.  The tables can be merged together dynamically when needed, but most of the time you will just need the table with the frequently accessed data.  This approach also gives you the option of using different table types (storage engines) for each of the tables.  Of course, it’s probably easiest to implement vertical partitioning at the beginning of your project instead of coming back and making changes to the database structure later.

Horizontal Partitioning

Partitioning horizontally is a similar concept except that the table is split by rows rather than columns.  This works well when certain rows are accessed more frequently than others.  Depending on the size of the database, having a table of more frequently accessed rows can really speed things up.

The events registration system I created at MPOW can potentially benefit from this.  We have over 10,000 registrations in the system, but most of those are for past events that we rarely need to access.  Having a table of 100-200 registrations for upcoming events and a separate table for the thousands of past event registrations would probably provide a noticeable performance increase.

Query Cache

MySQL has a query cache that it uses to increase performance.  If a particular query has already been run on the database, MySQL can return the cached result instead of having to parse it, optimize it, etc.  I was already familiar with the query cache and we use it MPOW.  However, I learned a couple of new tidbits from Jay:

  • “Any modification to any table involved in the SELECT invalidates the stored result.”  I guess I already knew this.  What’s cool, however, is that partitioning your tables properly can reduce this.  Making a change to a table containing upcoming event registrations would not affect the cache for the table containing past event registrations.
  • Don’t use InnoDB tables when there are more than 5000 rows and you’re doing full table scans.  It’s slooooow.  Use MyISAM table types instead.
  • If you are doing a SELECT on tables that change frequently, there is no point in storing the result in cache because it will soon be invalid.  Use SELECT SQL_NO_CACHE to prevent MySQL from storing highly dynamic results and filling up the cache.
  • MEMORY table types are fast and good for data that can be thrown away or re-computed again.

ANSI vs. Theta Coding Style

Jay put two different versions of a SELECT statement up on the screen and asked the group which style they used.  One style used INNER JOINs (ANSI style) and the other used WHERE and AND clauses (Theta style or comma style).  I think most of the room (including me) raised our hands for the latter.  Jay made some good points about ANSI being easier to read and more portable.  I need to force myself to try ANSI and get used to it.  Theta style, however, is very natural for me and I suspect it will be hard for me to change.

The slides from Jay’s talk (including part 2) are up on his website.

NYPL is Moving to Drupal

I’ve previously mentioned my preference for content management systems over traditional websites.  We use Drupal at MPOW and it allows almost everyone in our office to easily contribute to our site.

Drupal is also becoming a popular choice for libraries and now the New York Public Library is joining the party.  Josh Greenberg recently posted on NYPL Labs that they are in the process of moving their site to Drupal.  It’s not only an informative post about Drupal, but also a cool look at the process that NYPL is going through to rebuild their site in a CMS.  Looks like it will be a good fit for them.

I gotta say that having a “behind the scenes” blog is an awesome idea.  It can give the public more of a connection to the library while also keeping the rest of the staff informed.

Do Libraries Make You Sick?

A group of people in New Mexico claim that they are “allergic” to WiFi signals. They are trying to get WiFi removed from all public buildings and guess where they are starting? Libraries.

So that’s why people aren’t going libraries! They don’t get headaches from trying to figure out our catalogs or navigate our poorly designed sites. It’s the free WiFi! Maybe libraries should pass out tin-foil hats. Or would that just amplify the signal?

As crazy as this sounds, there are many people who claim to be electro-sensitive. My question for this group is why focus on WiFi? There have been tons of other signals bombarding us for decades. And if there really is something in the 2.4GHz range that affects people, why should this be treated differently than any other allergen? Should we remove all other sources of pollen and dander in cities? Seriously, many people suffer from and have to manage their allergies. Why would a WiFi allergy be any different?

Before these people start attacking libraries for providing a free, needed service, they should check their own neighborhood. I bet a few of their neighbors are leaking some sickening WiFi from their homes.