A street without rules, a safer street?

A few weeks ago, I started listening to another podcast: WHY? Philosophical Discussions About Everyday Life, hosted by philosopher Jack Russell Weinstein.

Listening through the backlog, I found an excellent show, Episode 28: “On Liberty and Libertarianism” with guest James Otteson. In it, Jack and James philosophize about so-called “Libertarianism”, talking about how government should relate (or not relate) to both social and moral issues.

One of James’ fantastic talking points was on traffic. In short, all the rules and regulations that both drivers and pedestrians must follow are dehumanizing. Destroying the human connection between driver and pedestrian takes the social issue of road sharing and turns it into… well, something else, where drivers and pedestrians no longer need to think—it becomes a matter of just reading signs, staying within lines, and blindly following the guidance of blinking lights.

In the show, they discuss a Finnish town with a high number of traffic accidents. The town removed traffic lights, stops signs, and other regulatory sundries and traffic accidents went down.

They’re beginning to do the same on London’s Exhibition Road in the UK:

The idea is that when driving zones are heavily delineated, drivers tend to be on autopilot, focusing on other cars rather than pedestrians or cyclists. That’s why London has so many guard rails on either side of pedestrian crossings, preventing pedestrians from straying into the road where they’re not supposed to. But 10 years ago, Kensington and Chelsea experimented with removing the railings from Kensington High Street and found that the number of pedestrian accidents dropped by 60%. It seems that when drivers are forced to be more aware and pedestrians are forced to take more responsibility for themselves, everyone is safer. Rules, it seems, were counterproductive.

Interestingly enough, The Guardian publishes this in the Arts & Design section and describes the movement as liberal. In my opinion, it’s anything but. Leave it to the Europeans to re-pioneer freedom & common sense.

Upload multiple photos to Meetup without Flash

Do you use Meetup and upload multiple photos regularly, but hate doing it?

Meetup has an multiple-photo feature that uses Adobe Flash, but as you can expect of Flash it’s not particularly reliable or stable. There no reason to put up with Flash’s nonsense—HTML5 includes a multiple-file upload control, well-supported by the latest Web browsers. Unfortunately, despite my posting a wishlist item (please vote!), Meetup has done nothing to support it.

So I did it myself: if you use Chrome or Greasemonkey/Scriptish for Firefox, install this user script: Meetup: HTML5 multiple-file upload for photos, also available on GitHub (direct download).

Once installed:

  1. Go to the “Old Upload Form” for your Meetup group or album. This can be tricky to get to, but the URL looks like: http://www.meetup.com/GROUPNAME/photos/upload/
  2. Make sure you’ve selected the right album.
  3. You should only see one file upload widget (the “Old Upload Form”, before this script, had 10).
  4. Click it, and you’ll notice you can select multiple photos you want to upload. Go ahead and do so.
  5. After you’re done selecting and dismiss the widget, the page will now tell you which photos you’ll be uploading.
  6. Click upload to start uploading photos.

Enjoy uploading your photos without Flash’s crashing, errors, or mayhem!

A note: if you use Firefox, you won’t be able to know how much you’ve uploaded (unlike Chrome, Firefox has no built-in upload progress meter). Try the Upload Progress add-on to keep tabs on your uploads.

UPDATE [19 Aug 2015]: UserScripts.org has been down for a long time… I’ve linked to the script on GitHub for the time being.

Changing Drupal 7’s built-in jQuery UI theme

jQuery UI, a Javascript widget framework built upon jQuery, comes built-in Drupal 7 core. One of jQuery UI’s nicer features is that you can switch themes by changing out a CSS file.

There are some nice jQuery UI themes out there (unfortunately, not enough!), like Tait Brown’s port of Aristo to jQuery UI (see demo).

But since jQuery UI is in Drupal core, which internally keeps track of CSS files, how do you switch the jQuery UI theme in use?

The Seven theme, including with Drupal core, provides inspiration on the “one true Drupal way” of doing this, by providing hook_css_alter(). Place into your theme’s template.php:

function MYTHEME_css_alter(&$css) {
  if (isset($css['misc/ui/jquery.ui.theme.css'])) {
    $css['misc/ui/jquery.ui.theme.css']['data'] = drupal_get_path('theme', 'MYTHEME') . '/jquery.ui.theme.css';
  }
}

Replace “MYTHEME” with the name of your theme, and adjust the path to your jQuery UI theme’s CSS file accordingly (the above assumes you place jquery.ui.theme.css in the root folder of your theme).

With this magic in hand, I now have the Aristo jQuery UI theme running on this blog. Looks quite a bit better!

This post was inspired by an answer I posted on StackExchange.