On electronics and “e-waste”

Burning electronics in ChinaI am a certified electronics aficionado. There’s a MacBook and an iPhone sitting on the desk in front of me, along with an external USB hard drive and a pair of computer speakers; on the adjacent desk, a USB turntable, cassette deck*, and two USB MIDI keyboard controllers. In the drawers of the desk are a mountain of cables, another USB hard drive, an iPod touch, a Bluetooth mouse, a remote control, and about 50 alkaline batteries of all different sizes. Also in the room are an LCD TV, an XBOX 360 and its attendant controllers (including Rock Band instrument controllers), an older laptop computer, a really old Macintosh SE, more cords and miscellaneous accessories, and of course a slew of digital media: more CDs, DVDs and game discs than I can count. (Oh yeah, there are also a couple hundred video game cartridges for the likes of the Atari 2600 and NES.)

I won’t be getting rid of any of this stuff in the immediate future, but someday it will be disposed of. And what of it then?

I don’t think I’ve thrown away any electronics in decades (although I will confess I rarely make the effort to recycle batteries). I know I have never recycled electronics — I don’t even know how I’d go about it. But when an electronic gadget outlives its usefulness for me, I do my best to dispose of it in a productive way: I give it to someone else, or I sell it at a garage sale or on eBay.

But back to the matter of recycling: what exactly happens with electronic gadgets when you recycle them? As is becoming increasingly well-known, most of them get packed up in giant shipping crates and sent across the ocean to places like China, India, Pakistan and sub-Saharan Africa. What happens then is mostly ignored by the rest of the world… out of sight, out of mind. Except it’s still there.

As this iFixit article describes, the “e-waste” ends up in impoverished communities where everyone, including children, works to break down the equipment and harvest valuable metals — copper and gold, mostly, at an average value of about $6 per device — from it by whatever means are available. This usually means burning, which releases toxic fumes into the air; and once the copper and gold are out, the rest is simply dumped, cluttering the landscape and leaving more toxic heavy metals (lead and mercury, especially) to seep into groundwater, further contaminating the environment in which these people live.

So, what are we to do? I’m not much of an activist: I don’t think protests get you very far. When there’s money to be made in something, it’s pretty easy for the makers of that money to ignore the ravings of the hippies picketing outside their doors. But if you want to be a conscientious consumer of electronics, the best thing you can do is to take actions that will prevent your gadgets from winding up in one of those China-bound shipping crates.

I’m not saying “don’t recycle your electronics,” although I suppose I am saying “don’t recycle your electronics if you don’t know where they’re going to end up.” The best thing you can do, I think, is probably what I’ve been doing all along anyway: keep the gadgets, or find someone else who wants them when you’re done with them. Ensure that they’ll get a maximum lifetime of use before they’re disposed of. (And by that time maybe you’ll think of them as collectibles and keep them in your personal electronics museum, like I’ve done with my Mac SE and the Atari 2600.)

Of course, there’s another solution, though it’s one I find a bit hard to swallow: don’t buy the stuff in the first place.

* Regarding the cassette deck: I’m proud to say that it’s something I recently acquired by salvaging it from a “free” pile at a neighbor’s curb after a garage sale.

My favorite new feature in iTunes 9

Yesterday Apple released iTunes 9 and iPhone OS 3.1, and this new version of iTunes addresses one of my biggest few frustrations with the iPhone: organizing your apps.

I cringe at saying “apps,” fearing I sound like Michael Scott talking about something they sell at Dave & Busters. But, given that it’s known as the App Store, I guess that’s what to call them.

Anyway… this is not about what they’re called, it’s about how they’re organized. And up to now, the only way to organize them was to go to your iPhone’s home screen, hold your finger on an icon until they all start to wiggle, and then drag them around. Not bad, when you only have one screen’s worth of apps, or even two or three. But I have seven — and that doesn’t even count the apps I downloaded but deleted from my iPhone.

Trying to keep seven screens’ worth of icons (16 per screen) organized by this finger-dragging method is tedious to say the least. And now that even the default configuration includes two screens, Apple realized they had to do something about it.

But now, we have this:

iTunes app syncing

Brilliant. I love it. The only flaw now is that this layout is too big to fit into the iTunes interface on my MacBook without having to scroll the entire thing, since the iPhone screen is represented at actual-pixel size. (I had to take two screenshots and stitch them together in Photoshop to create the image you see above, which is scaled down slightly from the actual size.

Then again, it’s always something, isn’t it?

Robert Reich on the public option

Robert Reich was President Clinton’s Secretary of Labor and is now a professor at UC Berkeley. I’ve seen him on TRMS a few times, and I’ve always been impressed.

He has made this video explaining in drop-dead (no, not from the “death panels”) simple terms exactly what the public option is, and how important it is to fight for, right now.

I can take some comfort in knowing that all three people who are in Washington to represent me in Congress — Representative Keith Ellison and Senators Amy Klobuchar and Al Franken — truly do represent me on these issues, and will vote accordingly. (Well, sounds like Sen. Klobuchar might be on the fence, but I’m hopeful she’ll come around after the persuasive and heartfelt email I just sent her.) And I don’t expect many of the Republicans in Congress to do anything more than continue to dig in their heels, bury their heads, spew hatred and lies, and spur liberals like me on to a frothing, cliché-ridden rage. But there are conservative Democrats who will potentially sabotage the entire enterprise for some unknown reason — oh wait, yeah… money — instead of voting with their party and the will of the majority of the American public.

CakePHP Auth component, Flash and Internet Explorer… a deadly combination

OK, it’s not really deadly at all… other than that it will kill your CakePHP session and log you out.

My CakePHP-based CMS uses YUI Uploader, a Flash-based file uploader utility. It’s much better than the default HTML file uploader, because it supports a fully CSS-customizable progress bar and multiple file uploads.

It’s pretty slick, even though I did tear some hair out earlier in the year trying to get it integrated into the CMS. All went well for several months, until one particular client, using Windows Vista and Internet Explorer 8, discovered a showstopper of a problem: whenever you uploaded a file, all would seem well until you went to save your changes and you’d get kicked back to the login screen, without the changes being saved. Bad news!

I did some diagnostics and determined that, yes indeed, the CakePHP session was in fact being dropped as soon as the Flash process finished queuing the file uploads (an AJAX-based process), before you actually click the “Save” button… but since there’s nothing else happening dynamically on the page, it wasn’t obvious that the session had been killed in the background.

Anyway, some research led me to a perfect explanation of the problem, and an equally perfect solution: Flash is sending a different user agent string, which was resetting the CakePHP session. I’m still not sure why it was only affecting Internet Explorer, but at any rate, a simple change to the app/config/core.php file solved the problem in a snap. The critical line:

Configure::write('Session.checkAgent', false);

I suppose by removing this line, the application is ever-so-slightly less secure, but there should be enough other precautions in place that removing the user agent check as part of the process of validating a session should not pose a significant security risk.

In defense of WordPress

WordPressThere’s a lot of negative talk circulating regarding the security attacks currently underway against outdated versions of WordPress. One of the most outspoken critics, not without cause, is one of my favorite bloggers: John Gruber of Daring Fireball.

That Gruber is loyal to Movable Type perhaps influences (despite his claims to the contrary) the tone of his assessment of the situation. And, I’m sure, my loyalty to WordPress influences my assessment of it as well. WordPress is not Apple, but I hold both in perhaps unduly high esteem.

That said, there are easy (or, at least, prudent) steps one can take to keep WordPress secure against this attack. Also, security is not the only (nor, dare I say, anywhere near the most important) factor in selecting a blogging platform. I’ve worked a fair bit with Movable Type, and while I can’t speak to the relative security of the two applications, I definitely can speak to their relative ease of use, and in that regard, I see no comparison: WordPress is surprisingly consistent and intuitive, given its open source nature and the large size of its developer community, whereas Movable Type seems to live in its own world where up is down, left is right, files are assets, and you need to rebuild the site every time you change anything. (Caching, if it’s even necessary, should be invisible to the user.) And then there’s the proprietary markup language.

It is unfortunate, and a weakness of the system, that WordPress has come under attack in this fashion. I’m glad that the latest version, at least, is immune to this exploit. But to dismiss WordPress because of this seems to grossly miss the point. And, debate this if you like, I do believe that if you’re not prepared to keep your installation updated, you shouldn’t be hosting the site yourself anyway. Use WordPress.com — it’s free, and it’s always up-to-date. The biggest victims here, I fear, are site owners who have relied upon an apathetic hosting provider to manage their system, and whose sites have been left vulnerable through no fault of their own.

All of the room34.com sites are running 2.8.4, and none has fallen victim to these attacks. But this incident did inspire me to take an action I had been neglecting — last night I dug into my httpd.conf file, shuffled a bunch of directories around on the server, and consolidated all five of the WordPress sites I’m running down onto a single installation of the software, so from now on I’ll only need to update once instead of five times. I probably could have migrated to WordPress MU, but it was an interesting experiment to take the approach I did, and it allowed me to avoid having to merge databases.