Link

I just noticed that Don Lancaster has made his unorthodox business book “The Incredible Secret Machine” available as a PDF download for free.

Make no mistake: much of the advice (particularly business advice) in this book is dodgy, much of it is out of date, and some of it is even both.

But there is good stuff in here. In particular, the chapters on “words”(“-on-paper”) and “images” are solid.

Two books are predominantly responsible for the voice I write in. One is Strunk’s “The Elements of Style”. This is the other.

Text

Bicycle lighting tips

So you can ride at night safely.

  • Emit light; don’t just reflect it. It’s too easy to be in a spot where no headlights or street lights are falling on you; you will then be invisible, and that’s bad.
  • Emit and reflect light in both directions. A forward light and rear reflector is not enough. A forward light or reflector with nothing to the rear is especially not enough (and, where I live, illegal).
  • Be visibly a bicyclist, not just a floating spot of light. Wear bright colors, ideally hi-vis with retroreflective strips, so that drivers stand a better chance of seeing you, and your pose (that of being on a bicycle), and not just your headlight or taillight floating in midair.
  • Don’t blind others. Some head-mounted and handheld flashlights are too bright to be safe to use as bicycle headlights: a driver or wrong-way cyclist may see your light, but be rendered unable to see literally anything else (including you, your bike, how far away you are, or anyone else on the road). Use a proper bicycle headlight, properly aimed.
Text

Frozen

From a notebook I used to keep near my bed. Originally written circa 2007, published here for the first time. The following is the complete, verbatim text of the page.

Imagine that you’re in a shopping mall, and everybody you see is frozen in place.

You go into a shop, and ask the shopkeeper a question, but he just stands there motionless and says nothing—he’s frozen, too.

Then you catch sight of a mirror, and notice that you aren’t in it.

You’re frozen somewhere, too.

Photo
whyappcodeisnice:

AppCode detects `imageNamed:` messages to NSImage and UIImage and offers to complete the image name with names of image files that are in your project.

whyappcodeisnice:

AppCode detects `imageNamed:` messages to NSImage and UIImage and offers to complete the image name with names of image files that are in your project.

(Source: whyappcodeisnice)

Link

The packaging designs featured in the article.

Designer Aaron Mickelson wants to solve the problem of excess packaging, by creating products that have no packaging at all.

Except that three of the five products shown do, in fact, have packaging.

Of course, packaging also serves an important protection and safety function, but Mickelson says most of the time that stuff is over-engineered.

This may be, but eliminating packaging entirely cannot work.

(Quotes below are from Mickelson’s site.)

The functions of packaging

Packaging protects the product against four threats:

  • Air. Many substances will oxidize when exposed to air, leading to surface—and, eventually, internal—deterioration. Food items with high moisture content will dry out.
  • Moisture. Oxidation can be hastened by humidity, and food items meant to be sold dry—such as cereal—will become mushy as they absorb moisture. Enough moisture can eventually lead to cultivation of mold, particularly in food.
  • Contamination. This includes both accidental contamination, such as bugs getting into the product (more of a problem in some areas than others, and mostly a concern for food products), as well as intentional contamination. Back in the 1980s, there was a scare when somebody poisoned the Tylenol in some bottles on retail shelves. That incident is a big reason why we’ve had “Sealed for your protection” packaging on medicines and food products since then.
  • Structural damage. Some products are fragile, and most are at least breakable. This category includes both impact damage (i.e., falling or being thrown) and shear damage (being torn). Many food products, particularly snacks such as crackers, cookies, and chips, must be protected against impacts, lest all of the contents be turned to fragments and crumbs, and any kind of bag must resist being torn so that the product does not leak out.

Additionally, packaging fulfills a fifth purpose: Communication. This is split into two:

  • Marketing. You’ll want to know who made the product, for any of numerous reasons: You read a recommendation and want to buy the recommended product; you read an anti-recommendation and want to avoid the product; you want to explore other products by the same company; you want to write a review of the product; you want to know whom to complain to/seek relief from if the product fails.
  • Vital statistics. Most packages tell several facts about the product, including its total weight or volume, unit count, capacity, or capabilities. Some of these, such as weight/volume, cannot be easily ascertained by the buyer without specialized equipment and more effort than most people care to undertake (and wouldn’t be appropriate to do in the aisle at the store).

Last, but not least, is the Hippocratic principle: “First, do no harm.” Any package must not interfere with the function of the product. Most packages satisfy this constraint with zero effort, so long as they fulfill their functions above of preventing damage or deterioration of the product; when you merge the package into the product, as Mickelson has attempted to do, then this principle must be considered.

The examples, and how they fail

Mickelson created five mock-ups:

  1. Tide single-load detergent pods
  2. Oxo plastic container
  3. Twinings tea bags
  4. Nivea soap bar
  5. Glad kitchen trash bags

The detergent pods

The package itself is a sheet of laundry pods stitched together, printed using soap-soluble ink. The POD plastic is, just like in the existing product, water-soluble. Consumers tear off each POD and use one-by-one. With the last POD, the package itself is gone.

This fails two of the constraints:

  • Weak against water. By definition, this product deteriorates in water. I can imagine a few days on the truck in a humid environment hastening the end of this product’s shelf life.
  • Weak against damage. “Consumers tear off each [pod]”, with the assumption that they have already bought the product. The pods will need to be only tearable at the perforations, while still being water-permeable enough to dispense the detergent. Moreover, if pods can be torn off while the roll is on the retail shelf, you can bet some people will do exactly that.

A product like this could certainly exist as described, but it would have to be sealed in plastic, with the pods not printed with anything that could get on the clothing. This is not far off from how they’re already sold today.

The container

Brand identity, marketing material and product details are all screen-printed directly on to the surface of the container with soap-soluble inks. Everyone washes food containers before use; that same act now disappears the package.

This one gets a pass from me. Assuming that “soap-soluble ink” exists (maybe it does; I don’t know), this sounds like it could totally work.

One key difference is that washing the container would actually be necessary. I’m not so sure that “everyone washes food containers before use”; if it was brand-new and sealed in plastic when I bought it, and the package doesn’t specifically say that I ought to wash it, I’m likely to assume that I can just use it as it is.

With the plastic gone, there’s nothing to stop some vandal from spitting into it before I come along, so I’d want to wash this container before using it for more than just aesthetic reasons.

Eliminating the plastic wrap presents one other problem: A thief or vandal could separate the lid from the container, either to replace a lost or broken lid (rather than asking the company for a replacement or buying a new pair) or just for shits and giggles.

Update: Steve Holt mentioned a couple of things. First, that Oxo containers are already sold without plastic wrapping—only a paper insert inside. I’m surprised. Second, a link to one example of an ink that (the manufacturer claims) washes away under soap and water. Cool.

The tea bags

The consumer unsticks and tears off tea bags one-at-a-time…. The folder [containing each bag] itself becomes the hanging tag. With the last tea bag, the package is eliminated.

Mostly a good idea, but as Mickelson himself notes:

There is still packaging waste involved here (as will likely always be the case with food packaging) but it has been severely curtailed.

There’s also the issue that the tea bags, like the Tide pods, would be highly susceptible to theft.

There is one redeeming feature:

With the added surface area and the storybook-quality of the accordion packaging, the manufacturer has a new opportunity to provide information or a story to the consumer.

Photo showing the stack of tea bags spread open in the middle, with the revealed sides of two of the bags displaying a passage of company history.

So, just like the Tide pods, this could work, but the stack would have to be wrapped in plastic, which would in turn have to be thrown away.

The soap bar

The package is a septic-safe, water-soluble paper. Consumers take the whole package into the shower with them. When it gets wet, it dissolves, leaving no packaging behind.

So there is packaging, but you don’t throw it away, you let it wash down the drain.

This is the same mechanism as toilet paper, so it theoretically could work, but boxes generally are thicker than toilet paper. You’ll need to go through a lot of R&D to ensure that this won’t ruin people’s plumbing.

The packaging seems familiar—essentially appearing as a paper box. But there are two primary differences: First, the shape, which was developed to prevent the consumer from absentmindedly tearing open the package.

Cue millions of buyers writing furious tweets, blog posts, and the occasional complaint letter, each along the lines of “why did Nivea make their package so damned hard to open?!”

They shouldn’t open it because (Second) the paper is water-soluble and designed to stay on.

Nobody will know this unless:

  1. The box states this fact, AND
  2. The buyer reads it from the box.

Even if you successfully communicate that buyers are not meant to open the package, the result will be them wondering how they’ll be able to use the soap without taking it out of the box.

Rule of interface design: If you have to explain it, then it sucks.

And yes, packaging is a human interface.

The substrate functions just like normal paper—it can be printed on and embossed, as in this solution—until it is exposed to water. When the consumer takes it into the shower, the non-toxic material 100% dissolves and washes down the drain.

Again, I worry about how well such packaging will survive humid conditions.

There’s one other way in which water-soluble packaging could fail: If the store employee who bags the product puts it in with a frozen item that will be covered in condensation by the time the buyer brings it home. Imagine if that happens and you look in the shopping bag to find your frozen burger patties and whatever else covered in a soapy, paper-pulpy mess.

The trash bags

Product information and a refreshed Glad logo are printed with traditional oil-based inks on the last trash bag in the roll, which is no longer kept in a box. The last bag is the package itself, leaving no extra trash when it gets used.

Bags are pulled out from the center, one at a time, until only the printed bag remains.

Some trash bags—particularly the cheap rolls at Ralphs/Kroger and the dollar stores—already come packaged much like this. But, of course, they’re sealed in plastic to make it harder for people to steal a bag or two at a time in the store.

So what do I suggest?

If we want to eliminate packaging, merging packaging into the product is usually not the solution. It makes three of the examples more vulnerable to theft/vandalism, and the soap bar harder to use (the consumer will need to read instructions to figure out how to operate a cardboard box).

So far, the best way I’ve seen to eliminate packaging is exemplified by the bulk-foods sections at Whole Foods and Sprouts.

Each product is in an enormous bin, from which the buyer dispenses it into a thin plastic produce bag, which they then seal with a bag-closing tab (like you find on bread bags). The tab has a label attached to it, on which the buyer writes a number code identifying the product, for the cashier to type in at the cash register.

(How it’s dispensed varies. At my nearest Sprouts, they’re just bins with a lid and a scoop for each one. As you can imagine, product from one bin gets into neighboring bins, and everywhere else, fairly frequently. Another Sprouts has gravity dispensers like you often see for bulk coffee beans, but that doesn’t work as well for some products, such as flour or pancake mix, that tend to pack so tightly that they stop flowing out through the spout.)

Even this is not zero packaging. The bag obviously is packaging, but it’s recyclable; the plastic bag-closer tab also counts and it might not be recyclable.

As critical as I am of the ideas that Mickelson proposed, I sincerely commend the effort. His thinking is good food for thought, and it’s the kind of thought we need.

I hope more people and, especially, companies will try to make more progress toward his goal, because it’s a worthy one.

Photo
Most of my solar lawn lights have gotten steadily dimmer over time, to the point that two of the four had gone out completely. Unfortunately, they use NiCad batteries, which makes replacing the batteries tricky.

Turns out the batteries weren’t the problem, though. The solar panels had gotten fogged up. This is a common problem with headlamps on older cars, and you can buy kits at auto-repair shops for abrading off the lenses’ foggy exterior (it’s not actually fog in the sense of water vapor, but rather a superficial deterioration of the plastic under UV).

The cheap person’s alternative to those kits is toothpaste. Like the major components of headlamp-cleaning kits, toothpaste is a mild abrasive. (Unlike those kits, toothpaste will not replace a car headlamp’s anti-UV coating with a new one—good kits include a replacement anti-UV coating as the last step, so you probably should use a proper kit on your headlamps.)

So I took out a cheap toothbrush and my toothpaste (bog-standard Aquafresh), went out into the dewy evening, and cleaned the solar panels on all of the lamps.

The result, after one overcast and occasionally rainy day, is what you see above. All four lamps are working again, and even the one that had dimmed (distant right) is back to nearly full brightness.

Most of my solar lawn lights have gotten steadily dimmer over time, to the point that two of the four had gone out completely. Unfortunately, they use NiCad batteries, which makes replacing the batteries tricky.

Turns out the batteries weren’t the problem, though. The solar panels had gotten fogged up. This is a common problem with headlamps on older cars, and you can buy kits at auto-repair shops for abrading off the lenses’ foggy exterior (it’s not actually fog in the sense of water vapor, but rather a superficial deterioration of the plastic under UV).

The cheap person’s alternative to those kits is toothpaste. Like the major components of headlamp-cleaning kits, toothpaste is a mild abrasive. (Unlike those kits, toothpaste will not replace a car headlamp’s anti-UV coating with a new one—good kits include a replacement anti-UV coating as the last step, so you probably should use a proper kit on your headlamps.)

So I took out a cheap toothbrush and my toothpaste (bog-standard Aquafresh), went out into the dewy evening, and cleaned the solar panels on all of the lamps.

The result, after one overcast and occasionally rainy day, is what you see above. All four lamps are working again, and even the one that had dimmed (distant right) is back to nearly full brightness.

Video

How the 1980s version of the Doctor Who theme was created.

Text

An interesting way to start the day

Wake up to a left arm falling into your right hand.

Yes, a left arm, because it didn’t feel like mine. It was warm, but I wasn’t getting touch sensations from it: the touch between this left arm and my right hand was not mutual (right hand felt arm, but not vice versa), and I wasn’t feeling my pillow with that arm, either.

Next thought: Is this my left arm?

I tried two experiments pretty much simultaneously: One, tracing the arm with my right hand. It turned out to indeed be attached to my shoulder, which answered the dual questions of where my left arm was and just how many arms I had on hand. The other, trying to move my left fingers. This succeeded, though I could only see them moving, not feel them moving.

I rolled from my right side onto my back and, a few seconds later, my left arm’s senses of touch and proprioception returned. So, problem solved.

But what was my arm doing sticking up in the air in the first place?

Link

Not all of this is applicable to Cocoa and Cocoa Touch development (good luck not using the heap), but so much of it is. I recommend reading the whole thing, but here are some highlights translated to Objective-C and its environs:

Rule 2 (routine checking)

  • All code shall always be compiled with all compiler warnings enabled at the highest warning level available, with no errors or warnings resulting.
  • All code shall further be verified with a JPL approved state-of-the-art static source code analyzer, with no errors or warnings resulting. …

… The rule of zero warnings applies even in cases where the compiler or the static analyzer gives an erroneous warning. If the compiler or the static analyzer gets confused, the code causing the confusion should be rewritten so that it becomes more clearly valid. Many developers have been caught in the assumption that a tool warning was false, only to realize much later that the message was in fact valid for less obvious reasons. …

Raise your hand if you’ve heard the sentence “it’s a false positive, ignore it” before.

Rule 7 (thread safety)

  • Task synchronization shall not be performed through the use of task delays.

Specifically the use of task delays has been the cause of race conditions that have jeopardized the safety of spacecraft. The use of a task delay for task synchronization requires a guess of how long certain actions will take. If the guess is wrong, havoc, including deadlock, can be the result.

In Cocoa/Cocoa Touch, this means that you should avoid using performSelector:withObject:afterDelay: (or sleep, usleep, nanosleep, +[NSThread sleepForTimeInterval:], -[NSRunLoop runUntilDate:], etc.) to try to “fix” a bug. Occasionally it fixes something. Often it breaks something else. And often it doesn’t fix the original problem.

For instance, an area of memory above the stack limit allocated to each task should be reserved as a safety margin, and filled with a fixed and uncommon bit-pattern.

On the Mac, you can do this with the malloc environment variables and/or GuardMalloc.

Rule 15 (checking parameter values)

  • The validity of function parameters shall be checked at the start of each public function.
  • The validity of function parameters to other functions shall be checked by either the function called or by the calling function.

Foundation provides NSParameterAssert for this purpose. In Objective-C, what this document calls a “public function” will generally be a method you’ve declared in the @interface in your class’s header file, whereas other functions are methods that you haven’t declared there. In other words, the class should trust itself to give itself good input, but not other classes.

Test cases are a good way to exercise these assertions: Intentionally send messages to the class, or instances of it, with bad input, knowing that if the assertion fails (an exception is thrown), the test will fail. If that doesn’t happen, it may indicate that the bad input would spread deeper into the class/object in a real run, which could be causing a problem your users are seeing (or will see).

Rule 25

  • Functions should be no longer than 60 lines of text and define no more than 6 parameters.

This is especially true of C functions, since there’s nothing to label the parameters at the call site, but it’s a good rule for Objective-C, as well. If a single message contains more than, let’s say, 4 arguments, I recommend building an object around that message instead. Turn the arguments, particularly any that are optional, into properties.

Such objects will probably help you clarify other aspects of your design while you’re at it.

(Source: twitter.com)

Video

A 17-and-a-third-minute video showing how TV producers can edit clips of interviews to make it seem like the interviewee said almost anything they want. Not the Charlie Brooker one, though that’s good, too (that one uses reality TV as example, though the techniques are the same).

This or something very much like it should be unskippably played by every TV the first time it’s turned on.

(Source: reddit.com)