Bathroom technology 3

I remembered this commercial for some odd features:

Here are the things I noticed:

  • The bears communicate through telepathy. Their mouths aren’t moving when they talk. That would appear to give bears an advantage over us non-psychic humans.
  • They have to decide how much bathroom tissue to use first. Under the bears’ system, they have to predict how much they’re going to need ahead of time, and then go off and do their thing. I would guess that very early on, humans saw the folly of such a system (if indeed any humans ever bothered to even try it). I for one have never been a guest at anyone’s house and seen the TP out in the hallway where you had to make a prediction and take some before entering the bathroom.

It’s really a happy ending. Any concerns one might have had about intelligent psychic bears gaining dominance over us humans are eventually quashed. Any species who would use such an obviously inefficient system is clearly no match for us.

Levels of rules in bridge

Bridge has been said to be the most difficult card game to master.

There used to be a regular bridge game at lunchtime where I worked. It takes four to make a bridge table (two “teams” of two people sitting across from each other) so the number of tables depended on who showed up that day. At the less advanced table, nobody kept score, and the strategy seemed strange to me until I went to a duplicate bridge club.

After playing duplicate bridge, the strategy made more sense to me. Duplicate bridge tilts the luck-skill balance almost all the way towards skill. The cards are shuffled and dealt at the start of the session. After each hand, the cards are put into a “board” where the four hands are kept separated as they were originally dealt. The boards and players move from table to table in a certain pattern. At the end, you’re scored against the other players who played exactly the same cards that you did. The luck of the cards is unimportant; to win, you have to beat the others who played the same hands.

I imagine the rules as a sort of hierarchy, for both the bidding and the play of the hand, with Level 1 being the most fundamental.

Level 1, bidding

The dealer bids first and bidding goes clockwise around the table. Each player can either “Pass” (which amounts to not bidding), make a higher bid than the last one (higher in number or in a higher-ranked suit, where “No Trump” counts as a “suit”), or “Double” or “Redouble.” The partnership who made the highest bid gets the contract for however many tricks they bid in whatever trump suit they bid (or “No Trump”).

Level 1, play of the hand

Whoever first bid the trump suit (or “No Trump”) is the declarer. The player on the declarer’s left makes the opening lead; then the declarer’s partner lays down his hand face-up on the table, he’s now the “dummy” and watches the declarer play the cards from both hands in the partnership. Each trick has four cards, one played by each player in turn going clockwise. Players have to follow suit if they can, otherwise they can play any card. The highest card of the suit led wins the trick unless somebody played a trump, in which case the highest trump played wins the trick. The winner leads to the next trick, and so forth.

Level 2, bidding

Each bid states a number of tricks and a trump suit, but it also gives information about the bidder’s hand. Someone in the history of the game evidently realized that an “unnatural” bid could have a special informational meaning. If the bidder’s partner knows the meaning, the partnership can benefit from this shared knowledge. The bidder’s partner knows that the special bid doesn’t suggest the bid suit as trumps, and knows not to leave the final contract in that trump suit.

But doesn’t it seem wrong for a partnership to have a secret bidding system? The rule-makers thought so, but rather than prohibit such unnatural bids, they decided that such bids are legitimate as long as the opponents are also informed about the bidding system being used.

Over time, a set of the most popular bidding conventions was grouped together and declared to be the “Standard American” bidding system. Decent players are supposed to know these conventions, which have increased in number over the years.

Level 2, play of the hand

There are also conventions in the play of the cards. Certain cards played have “meanings” that a partnership can agree on (and should tell their opponents about). Since the declarer is himself playing both partnership hands, one of which is face-up on the table, it’s only the other two players (the “defenders”) who would use these card-play “signals” to help each other. There are “standard” card-playing conventions that decent players are supposed to know.

Signaling by facial expressions, “casual” remarks, or other secret codes is strictly forbidden. Signals must only be given by the choice of a bid or by a card played!

Beyond level 2

From here on it gets crazier. If a player hesitated a long time before a bid, did that give his partner extra information? At a bridge club, the opponents would call the director, who would have to judge whether extra information was given, or whether an advantage was gained by this information. There are more rules to handle these cases, but this is as far as we’ll go in the hierarchy for now!

Constraints and creativity

It is said that constraints are good for creativity. As soon as you make a decision about what direction to go, you are ruling out other options and constraining yourself in some way. Or, to look at it the other way, as soon as you impose constraints, you are making a decision about what direction to go.

Sometimes this decision/constraint process is done without even thinking about it. For example, a blogger might decide that each blog post

  • should be understandable without any special technical knowledge
  • should be under 750 words (all except for one)
  • should have a single main point

and may not have consciously thought about these things until trying to make a list of constraints in a blog post.

But to get to the single main point of this blog post, it is surprising how severe the constraints can be and still produce creative results.

A commonly-used definition of a haiku (at least the one I remember) is that it must have seventeen syllables split as 5/7/5. This would seem to be a serious constraint, yet much has been done with this form. One could even attempt to write a sort of parody of a haiku. Apparently nowadays the English-language haiku rules have been changed, but the haiku form is still quite constrained.

Fonts are complicated things. In the olden days I used to hand-letter things following the proper typographical rules of proportion and such. But who would have thought that being limited to the lines in this grid:

Grid for gridfonts

The grid for gridfonts

that one could make such a wide variety of fonts with distinct styles such as these?

Once upon a time, people recorded songs on records. Somewhat before my time, 78 RPM records could only hold one song. Before the days of multitrack recording studios, the musicians had to record music all at once in one take, and sometimes they would run out of time and have to speed up near the end in order to fit the entire song on the record. But that’s not much of a constraint on length compared to this well-known highly-constrained example!

Behind the scenes 1

As gifts when I was growing up, I would often get books about Star Trek. Our whole family had always enjoyed this show in reruns. These books were not the Star Trek novels, but rather books about the making of the TV show. Much of what I read was interesting not just because it was about that particular TV show but because it provided a behind-the-scenes glimpse at how TV shows are made.

Apparently they didn’t necessarily have the space to have all the sets built all of the time. Also, some of the sets performed multiple functions: for example, two different corridors inside the starship might be the same set with different lighting filmed from a different angle. In such a case they could first film all the scenes where people needed to use corridor number 1, which might be scattered throughout the show. Then they could change the lighting and camera placement and set up corridor number 2 and film those scenes. An alien planet might only be used in a single episode, so they could build that set, film all the scenes on the planet, and then take the set down and use the space for something else. Logically this makes sense but I hadn’t thought much about the possiblity that the scenes in the show were not filmed in the sequence in which you see them.

This must be very odd for the actors, especially if they’re used to acting in stage plays. If the scenes are not filmed in sequence, the character development must be out of sequence as well. The actors must need to have a sense of what part of the story each particular scene comes from, and put their characters in the appropriate frame of mind. I find it very impressive that when you see the finished product, there’s nothing in the characters’ behavior that would give this away.

Movies must be done quite out-of-sequence as well. Often people have identified continuity errors in movies where, for example, a character is eating a sandwich that suddenly has a bite taken out of it or suddenly becomes whole after he’s eaten some of it, or a drink goes from full to empty to full again, or something like that. Or perhaps the sandwich changes into a hamburger and then back to a sandwich again. I find this interesting not just because somebody made a mistake, but because the scenes were filmed in such a fragmented way that it’s even possible for such things to happen. What looks to the viewer like a continuous conversation is evidently not even close to happening in real time. Perhaps a lot of credit also must go to the editors who assemble these scenes so that they seem to flow naturally.

In the real world it’s so much easier: we get to just live our lives in real time. It’s nice that everything happens in its actual sequence, but there have been those occasional times when I would have gladly used the fast-forward button.

Unauthorized information and software development

So what information are we talking about here, and who has to authorize it?

Software depends on knowledge to make something work. As a house is built upon its foundation, software is built on certain types of knowledge that the developer believes to be stable.

Much software is written with a certain operating system in mind. For example, someone might have started out to write a program for Windows. How does the developer know how to make a program that will run on Windows? Well, Microsoft provides documentation on how to do this, and based on this documentation, the developer can access features in the operating system and produce a program that works correctly. This type of information is referred to nowadays as an Application Program Interface (API). If someone creates software (such as an operating system) that is intended to be used by other software, they generally document an API that gives this other software some reliable knowledge to build on.

So how can this information be “unauthorized”? Let’s go back in time to the early 1980s. At that time, a home computer was likely to be one of these:

  • Apple ][
  • Atari 800
  • Commodore 64
  • IBM PC (at first this was more of an office machine)

Of these, only the IBM PC has true “descendants” to this day. In fact, it is possible that someone could have written a program to work on an early IBM PC, and this program could still run on a modern computer. (I know this for a fact, as I wrote such a program.) How could this be?

Back in the early 1980s, IBM published the source code to its BIOS (Basic Input/Output System). This code contained copious comments (comments are text that doesn’t do anything computer-wise but provides the reader of the code with information). These comments documented the API of how one could write programs that worked on an IBM PC.

As a quick digression, it took some creativity for someone to figure out how to legally create an IBM PC “clone” that could run programs compatibly. Source code is generally considered the property of its creator, and it would have been illegal for someone to take the source code of IBM’s BIOS and copy it into their own BIOS. IBM published the source code but they still owned a copyright to it. So these “clone” creators wrote their own document containing only the API information, and passed it off to their own developers who were strictly forbidden from looking at the IBM source code. It turned out that it was legal for them to develop their own BIOS with the same API as long as they were not actually copying their code from IBM’s source code.

Anyway, software developers are a creative bunch, and wanted their programs to work as well as possible. This created a bit of a controversy. IBM had some functions in the BIOS to create text and graphics on the screen, and they said they wanted developers to please use their API to create their text and graphics. If they did this, IBM would guarantee that the same API would work for future IBM computers that hadn’t been invented yet.

But developers decided to ignore this request from IBM. They could look at the BIOS source code and see the workings of these text and graphics functions. The developers found that if they accessed the graphics hardware directly instead of using IBM’s API, their programs would run noticeably faster.

The developers were taking a risk here. Hypothetically, IBM could invent a new graphics card and change their graphics hardware completely. Along with this, IBM would also have to modify its BIOS code to work with this new graphics hardware. If developers used IBM’s API (as IBM had asked them to), their programs would continue to work. But if developers accessed the graphics hardware directly, their programs would no longer work with these hypothetical new graphics cards. If the developers complained to IBM, then IBM could say, “We warned you that you should have used our API. You should have listened to us.”

What actually happened, though, was that developers had almost universally decided that IBMs BIOS functions were too inefficient and slow. I recall having to decide how graphics should work in a program I was writing, and by this time it was considered “accepted practice” to access the graphics hardware directly. I decided to jump on the bandwagon and follow the crowd, abandoning the BIOS graphics functions like everyone else. If IBM ever radically changed their graphics card, I wouldn’t be any worse off than all those other developers who made the same decision.

In fact, the hypothetical situation never happened; IBM never changed the way their graphics cards worked. Maybe this was to make things easier for themselves. But another factor could have been that accessing the graphics hardware directly had become such widespread “accepted practice” that IBM was essentially trapped. Who would upgrade to IBM’s new graphics card if it wouldn’t work with any existing software?

So the “accepted practice” had won a victory over IBM’s documented API. As other manufacturers started to make their own graphics cards to use in these “clone” PCs, they all stayed compatible enough with IBM’s original design that existing software still worked.

But wait a minute, you say. Several paragraphs ago, I said that some of this old software would still work on a modern computer. But surely graphics cards have changed substantially in all those years. If I wrote a program in 1985 that accessed the graphics hardware directly, how can it still work over a quarter of a century later?

The answer is that this “accepted practice” won out in a bigger way than anyone would have expected. Back in the early 1990s, Windows 3.0 and then 3.1 quickly became the new standard for office computers. And Microsoft did a very clever thing. They knew all about the “accepted practice” of accessing graphics hardware directly, and they built into their operating system the appropriate stuff so that all of these old programs still worked!

I must admit I was rather stunned the first time I saw an old DOS-based program that I wrote using the “accepted practice” run perfectly fine inside an “MS-DOS window” in Windows 3.1. On an old IBM PC, my program occupied the whole screen and controlled the graphics hardware entirely on its own. But here it was running inside a window along with other windows running different programs that were on the screen at the same time. Windows 3.1 intercepted my program’s accesses to what my program “thought” was the graphics hardware, and it did the “equivalent” things so that my program would run correctly in a window!

***

So does this mean that you should use unauthorized information? No, it just means that IBM didn’t have the authority that it had hoped. The information was in a sense “authorized” by common practice, so in just this special case, the developers won out by ignoring the rules.

Oh, but despite that, it’s really really bad to depend on unauthorized information. Not that you’d know that from this story, but most of the time, “unauthorized information = bad”. Oh, and besides, “the exception proves the rule,” so, um, right, this story really shows that if you depend on unauthorized information, it would be bad. Yup, you’d definitely want to not be doing that. If you did, it would be like, all risky and stuff.

The slide rule

Out of all the millions of people reading this, I’ll bet only a small percentage know what this is: 

slide rule

Identify this object

The title of this post may have given you a clue: it’s a slide rule. But if you don’t already know what a slide rule is, that may not tell you much. If you saw the movie Apollo 13, you may remember a scene where the people at Mission Control had to do a calculation, and they took out slide rules similar to the one pictured above. 

Basically, this is how technical folks calculated things before calculators were invented. I never used a slide rule except as a novelty item; by the time I had to calculate anything professionally, calculators were commonplace. 

To understand how a slide rule works, imagine two one-foot (or 30 cm) rulers that are mirror images, placed so that the measurement scales touch: 

Math with rulers

Put two rulers together

If you push the top ruler two inches (or cm) to the right, as in the picture above, you can look under the 3 on the top ruler and see a 5 on the bottom ruler. Congratulations, you have just used a really lame method to calculate 2 + 3! 

A slide rule works essentially like this, except that the numbers are spaced according to their logarithms base 10 instead of their plain old values. The scale starts at 1, and ends at 10, smushing the numbers together more as they progress. From 1 to 2 is about 30% of the whole scale, while from 8 to 10 is only about 10% of the scale. 

So what, you say. Well, when you add logarithms, it multiplies the numbers that they’re the logarithms of. So if you used the lame ruler addition technique with logarithmically scaled rulers, you’d push the top ruler so its left edge (where 1 is) lines up with the 2 on the bottom, and you would find that the 3 on the top ruler lines up with a 6 on the bottom ruler, and now you have used a lame method to multiply 2 x 3. That’s basically how a slide rule works. Actually it’s a rather clever idea. 

2 x 3 = 6

2 x 3 = 6

What about numbers that aren’t between 1 and 10? Just move the decimal point. You’re on your own to figure out where the decimal point goes. Also, how accurate can the answer be? Not very; you can only get the first three digits or so. You can use a thin line on a movable clear piece of plastic to help judge exactly how the numbers line up. Accuracy is especially bad if your answer starts with an 8 or 9 (since those numbers are crammed together in the last 10%) and less bad if it starts with 1. 

Fancy slide rules have more scales. Some have a log-log scale (the logarithm of the logarithm) that lets you do exponents, sine and cosine scales, square root and cube root scales (logarithms stretched by a factor of 2 or 3), or multiplication scales with the 1 in the middle somewhere so you don’t have to slide the rulers quite so far sometimes. 

Slide rules seem antiquated now, but they must have been useful in their day. One shouldn’t underestimate the power of such simple tools. After all, they did help bring astronauts back to Earth.

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