-Lithium Ion batteries don't like constantly being topped up-
(in case you didn't know, this is what is in your laptop/mobile phone/mp3 player/handheld game console etc.)
In fact, each time you add charge to a Lithium Ion battery, it's performance gets a little worse, for the average battery you can expect 800-odd charge cycles before you effectively kill it - by leaving it plugged in all the time you'll kill the battery at the fastest possible rate.
So what are the "take home" tips about this?
If it's a laptop, when you have access to mains power take the battery completely *out* of the device and put it somewhere cool (not freezing cold) and run the laptop with just the power cable plugged in (99% of machines are quite happy like this - see pic above)...When you absolutely *need* to be using the battery (e.g. on the move/in a tent/whatever), pop it back in for a full charge then off you go, keep the battery out at all other times.
If it's a mobile phone/mp3 player (etc.) or a laptop that won't boot without it's battery, minimise the amount of charge cycles as far as you can, and try to start your charge cycles (as far as is practical) when the battery is at 10%...
Now go off and enjoy your greatly increased (future) battery life!