Steve's No Direction Home Page

I'd give my right arm to be ambidextrous.

 














Subscribe to "Steve's No Direction Home Page" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.

 

 

  Wednesday, August 03, 2005


Cory Doctorow: As a confirmed bottled-water nut, it was sobering to read Tom Standage's excellent NYT piece on the total absence of any benefits to drinking bottled water over tap water -- it's not better for you, doesn't taste better, and is rotten for the environment:

It cannot be the taste, since most people cannot tell the difference in a blind tasting. Much bottled water is, in any case, derived from municipal water supplies, though it is sometimes filtered, or has additional minerals added to it.

Nor is there any health or nutritional benefit to drinking bottled water over tap water. In one study, published in The Archives of Family Medicine, researchers compared bottled water with tap water from Cleveland, and found that nearly a quarter of the samples of bottled water had significantly higher levels of bacteria. The scientists concluded that "use of bottled water on the assumption of purity can be misguided." Another study carried out at the University of Geneva found that bottled water was no better from a nutritional point of view than ordinary tap water.

Admittedly, both kinds of water suffer from occasional contamination problems, but tap water is more stringently monitored and tightly regulated than bottled water. New York City tap water, for example, was tested 430,600 times during 2004 alone.

Link

(via Kottke)

(Via Boing Boing.)


11:25:52 AM    comment []

I really enjoyed reading this piece from Zend about the Observer Pattern. It shows a great technique for doing a wide variety of things that you often have to do: logging progress in a script, notifying people by email or otherwise when something happens, and more.

At my last, godforsaken, job, there was a lot of PHP code that was poorly documented, at best. It was peppered with statements that printed "Got here!" to the screen (exclamation point included), but often didn't tell you where "here" was, or do useful things like print out the values of variables. I know I've used this "technique" before, and I'm sure I'm not alone, but this observer pattern is much more powerful, and can be turned off and on more easily. The other really useful technique in the article is the "mock" dummy class, which can be used for testing. The mock class looks to calling classes just like the real thing (in this case, an uplaoded file), but you can put arbitrary errors and values into the mock object to see how other objects which call that object behave. Very useful stuff.

The jump from procedural to object programming is interesting. I was speaking with someone about this the other day, and he was talking about a third person's code. When you first look at it, he said, it looks like it's object oriented -- it begins with the word "class." But inside the class is just a long block of code. I was thinking that some of my ventures into objects are the same way, though maybe a bit better than that. But this piece shows a lot of good techniques for really using objects well. It also illustrates why objects are so useful. In this case, you can add logging and notification as needed, later, without having to modify the object itself, just the main scripts that call it. Well worth the read!


10:57:53 AM    comment []


Click here to visit the Radio UserLand website. © Copyright 2005 Steve Michel.
Last update: 9/2/2005; 10:18:31 AM.

August 2005
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Jul   Sep