Making Clickable US State Maps

Posted on

I wish I'd known about this plugin 6 months ago, but better late than never. This is a useful jQuery plugin that will use Raphael.js to draw a clickable map of the United States. Its easy to style and bind event listeners to react to clicks on particular states.

Easily add a an interactive map of the USA and States to your webpage without using Flash.

From: U.S. Map - It's a jQuery plugin - Flash not needed

─── ✧ ─── ✦ ─── ✧ ───

Nielesen: Designing Effective Carousels

Posted on

I wrote a roundoup of articles explaining why carousels are bad and kill clickthrus earlier. Jakob Nielsen provides some advice on how to design one properly if you really must have one.

Summary: Carousels allow multiple pieces of content to occupy a single, coveted space. This may placate corporate infighting, but on large- or small-view ports, people often scroll past carousels. A static hero or integrating content in the UI may be better solutions. But if a carousel is your hero, good navigation and content can help make it effective.

From: Designing Effective Carousels

─── ✧ ─── ✦ ─── ✧ ───

Why global variables are bad

Posted on

This question came up yesterday when Sandy and I presented at DC Web Women, an Introduction to  PHP [slides]. I couldn't come up with a coherent set of arguments at the time, in a way that I could explain easily. These posts do a better job, first a general programming article on the subject:

Implicit coupling -- A program with many global variables often has tight couplings between some of those variables, and couplings between variables and functions. Grouping coupled items into cohesive units usually leads to better programs.

From: Global Variables Are Bad And a PHP specific article full of excellent examples

You may have heard that globals are bad. This is often thrown around as programming gospel by people who don't completely understand what they're saying. These people aren't wrong, they just don't often program what they preach. I've lost track of the number of times I've had the "globals are bad" conversation with someone (and been in agreement) only to find their code is littered with statics and singletons. These people are confusing globals (as in the \$GLOBALS array) and global state.

From: Why global state is the devil, and how to avoid using it - TomNomNom.com

─── ✧ ─── ✦ ─── ✧ ───