Bathroom technology 2

It boggles the mind to think about the improvements that innovative individuals have managed to implement with the simple toilet paper roll. There is one such innovation I found particularly intriguing.

At first I thought it was an anti-theft device, somewhat like the protection on some paper towel dispensers.

Certain towel dispensers store paper towels in a stack where the trailing edge of each one is folded within the next one. You pull out a towel through an opening in the bottom of the dispenser, and because of the interfolding technique, the edge of the next towel automatically gets pulled out for the next person to conveniently grab.

These particular paper towel dispensers have a lock on the top. Clearly this is an important security precaution. Without the lock, someone could just grab a stack of paper towels en masse in just a few seconds. With the lock, someone can still steal lots of paper towels, but they really have to work at it, taking them one towel at a time. I can easily imagine this thwarting many potential bathroom criminals. It would be tedious to have to acquire their loot one towel at a time. I’m sure they simply don’t have the patience for that sort of thing.

But I digress. The amazing invention I’d like to talk about has two rolls of toilet paper in a single dispenser. But wait, there’s more. There’s a clever interlock mechanism. The cutaway view below attempts to depict this mechanism:

Toilet Paper Dispenser Mechanism

The clever TP interlock mechanism

The picture shows a top view cutaway with the bottom of the picture being the front of the device. The enclosure containing the two rolls is open in the front. Suppose that the sideways-L gray piece were not there. Then our sinister bathroom criminal could just swipe the two rolls of toilet paper out the front of the contraption in one fell swoop. But the gray piece is actually a sliding door. As shown, it covers the left-hand part of the front opening, so that only the right-hand roll is accessible. But the part of the gray piece between the rolls is the clever part. As long as there is paper on the right-hand roll, the door can’t be slid to the right, because the paper is in the way. But once the roll is used up, then, presto, just like magic, the interlock mechanism now allows the door to be slid to the right to access the left-hand roll!

Now our devious bathroom criminal is foiled. In order to steal the two rolls of toilet paper, he’d have to take one, and then slide a door to the other side, and then take the second roll, rather than being able to take the two rolls en masse. I’m sure most bathroom criminals don’t have the patience for that sort of thing.

As if its anti-crime protection weren’t enough, I suspect there is also an anti-germ purpose behind this contraption. These days people are much more germ-aware, and protection against stray germs could be an additional motivation to keep the second roll enclosed until it is needed.

The Magic of Poetry 2

Sometimes you read a poem and it stays with you in some way. I just felt compelled to share this one.

How the Sun Helps Us

A trip to the sun
Would not be much fun
For you would grow old
     On the way.
The sun’s heat is white,
The sun sends a great light
To shine on our earth
     To make day.
The sun has no trees,
No cool gentle breeze,
No flowers, or streams,
     Or green grass.
The sun has no frogs,
Or horses,—or dogs,
For everything on it
     Is gas.
The sun is so hot,
Believe it or not,
You never could get
     Near this star;
No, a trip to the sun
Would not be much fun,
It’s millions of miles
     Too far.
Mildred Celia Letton

Bathroom technology

Printed on the front of an electric hand dryer in a men’s room:

  • Shake excess water from hands
  • Push button to start dryer
  • Rub hands vigorously under warm air
  • Dryer shuts off automatically

Written in by hand below this:

  • Wipe hands on pants

DRY and unauthorized information

Is it “cheating” when you change a blog post that you already wrote? I believe it’s legitimate, as long as you include a suitable disclaimer.

Originally I wrote about unauthorized information, but I think this newer article says it much better.


For those of you who don’t develop software, the process is probably quite mysterious. But some of the basic principles are straightforward.

House building and software development

Even though your house has already been built, some things can be changed. You can easily paint the walls a different color or put down a new carpet. If you want to add additional rooms or remove some walls, that’s more work. And if you decide you want a bigger basement, that’s very difficult.

The analogy of software development to architecture is a good one in many respects. Maybe you wrote a program, and Version 1 is already finished, and you want to improve things for Version 2. If you want to change an icon’s color from red to blue, it probably won’t take much effort. But if you want to change your program from being a to-do list editor to, say, a nuclear reactor control program, that will take more work.

Are the cases of the house and the computer program truly analogous? The house example made sense because you’ve seen houses and maybe even lived in one. But you don’t really know what’s involved in changing the icon from red to blue. You’re just taking my word for it that it’s easy to change.

The “stop” icon

Suppose the red icon is the “stop” icon, and someone clicks it to tell your program to stop doing something. It’s the only red icon in your program. In many places within your program’s code, you need to distinguish this icon from all the other icons. Whenever it needs do this, your code just looks for the red icon, and figures that must be the right one.

But for Version 2 you now want to change the “stop” icon’s color from red to blue. You have to change not only the icon itself, but you have to change every spot in the program code that relied on the icon being red.

Fixing the “stop” icon

So in this case, what could the developer have done better? (Pretend now that it’s not your program, but someone else’s. It’s always easier to criticise someone else’s code.)

First improvement

Almost any programming language has things called subroutines, functions, or procedures. These are named chunks of software code. To use these, the programmer puts the code that looks for the stop icon inside a function he creates called “FindStopIcon”. Then, anywhere else in the code that the progammer needs to find the stop icon, he uses the function’s name, “FindStopIcon”. Now, if the method of finding the “stop” icon ever has to change, only the single piece of code inside “FindStopIcon” has to be modified, not many pieces of code scattered throughout the program. Except for the code inside “FindStopIcon”, the rest of the program happily uses that function and doesn’t even “know” whether something inside the function was changed.

Since we all know acronyms are cool, there’s one for this technique: DRY (Don’t Repeat Yourself). The code to do one thing should only be in one place. That way, if it ever changes, the change affects one piece of code, not many pieces of code.

Second improvement

Another more subtle flaw is that the program used an odd method to distinguish the “stop” icon; it looked at the icon’s color. This is in a sense unauthorized knowledge and is outside the scope of this article.

In conclusion

In real life, you don’t always know what things about your program might change in the future. With your house, you can see what things can be changed because it’s physically there in front of you. With software code, there’s nothing physically there, so in theory, anything could change.

Many software development principles are variations on either DRY or on how not to use “unauthorized” coincidental knowledge. So if these two principles make sense to you, then you already understand a lot about software development.

Well-informed politics

Conversations about politics can be difficult. Many people have already chosen one political side or the other. Recently, people’s opinions seem to be especially polarized, which makes an in-depth discussion of the issues rather difficult. When someone has formed an opinion, they aren’t always interested in discovering any additional facts.

I was involved in a conversation about U.S. health-care reform a while back. One part of the conversation went something like this (heavily paraphrased here):

Person A: “The government should stay out of health care; when the government gets involved in something, the result is always bad. Also, we don’t want the government deciding what treatment people are allowed to get; this decision should remain with the doctors.”

Person B: “But the decision has already been taken away from the doctors. Most of the time, the insurance companies decide what treatment people are allowed to receive. Something needs to be done.”

Some may agree with the “Government = bad” equation, and some may agree that our health care system is in need of fixing. But there is more to the debate than that.

If you believe that there is a health care problem that needs solving, having the words “health care reform” attached to something doesn’t automatically make it a solution. Six paragraphs from the end of this speech, there’s a paragraph that starts thusly: “But we have to pass the bill so that you can find out what is in it, away from the fog of the controversy.” At first I couldn’t understand the logic of this. Wouldn’t you want to know what was in the bill before passing it? Once you pass the bill, isn’t it, like, already passed? That would seem to make it harder to change than if the bill were not passed.

But perhaps some people think, “I trust the Democrats in Congress so much, I don’t need to know the details of what they’re doing; they always do the right thing. And we obviously need health care reform, and look, here’s something referred to as Health Care Reform, so that must be good.”

Others may think, “I distrust the Democrats in Congress so much, I don’t need to know the details of what they’re doing; they always do the wrong thing. Also, ‘government = bad,’ and look, here’s the government trying to get involved in health care. It must be bad.”

Of course, the health care system of an entire country is very complex. Neither “government = bad” nor “we need reform, and here it is” quite captures the nuances of what’s involved.

Unfortunately, some arguments are worded carefully and sound deep and intellectual, but when you think about what they’re actually saying, they boil down to one of the two “arguments” above.

With an issue as complex as health care, it’s not easy to understand the details and form any sort of well-informed opinion. And amid the noise of all the non-arguments, it’s not easy to find real information.