Wednesday, November 30, 2011

Checking your speed


The weather has been so nice and the temperature so warm, that I'm still riding my scooter to work when it doesn't rain. The other day, as I rounded a corner, I noticed that one of those portable, automated radar speed indicators (like the one pictured at the right) was just ahead. It flashed my speed but I was caught off guard and I didn't check the speed on my speedometer in time. I was past the trailer before I could check it again.

I have wondered how accurate the speedometer on my scooter is. If we are threatened with being pulled over for going too fast, you'd think we'd be able to check the speedometer in an easier manner than looking for these radar indicators or finding marked sections of highway that let you check them. I've found that most of those marked highways are in areas of heavy traffic and it's almost impossible to keep a steady speed so you can time it correctly. Someone is always forcing me to change lanes or slow down. It just doesn't seem right.

I thought I'd be ready for it the next day so I could really check my speedometer correctly. As I got to the place where the radar trailer had been, I checked my speed and then looked up to see what the display showed. But it wasn't there. The trailer had been moved or just taken away. About mile later, though, I saw the trailer up ahead. Just as I was getting close, a car pulled out in front of me and I had to slow way down. As I passed the speed indicator, it didn't register anything. I was going less than the speed limit so I figured maybe they only flash a speed if you're going faster than the speed limit.

So, today, I saw the speed indicator in the same place it had been the day before. This time I was ready and raised my speed just above the speed limit and, sure enough, it flashed a speed very close to what my speedometer read. So, I finally knew that my speedometer could be trusted. And it only took me three tries.


Monday, November 28, 2011

Consistency

A Sigma 7 system
Here's a short, funny (or maybe just mildly amusing) story I remember from our introductory programming course in college. Yes, back in 1970, most of us didn't learn to program a computer until we got to college. And then, it was on a large computer that everyone had to share. No one had a personal computer at that time and there were not even minicomputers in any of the departments. Our school, Bucknell University, was more advanced than most, though. There were computer terminals all around the campus for us to use to interact with the main computer, a Scientific Data Systems Sigma 7. SDS was later bought by Xerox.

We first learned programming using BASIC and once we got to needing to write larger programs, we switched to FORTRAN. That was FORTRAN IV. I remember one of my big hurdles to learning FORTRAN was that you didn't need a line number for every line like you did for BASIC.

Anyway, our teacher was writing down three qualities of a good subroutine. I'll list them similarly to how he listed them. The explanations are my ideas from what I know now (this all happened 41 years ago - I'm lucky to remember that he made three points!). Back then, he just wrote three words and then explained in the lecture what he meant.
1) A subroutine should be reusable. The idea was to not have to rewrite code and a subroutine allowed you to use one piece of code over and over. While it might help to organize your code to write a subroutine for a piece of code that was only used once, you generally didn't want to do that.

2) A subroutine should do only one thing and do it well. This meant it should be simple to understand and simple to test. This allowed you to use it with confidence in other places.

C) A subroutine should be consistent. For instance, you shouldn't have a bunch of subroutines that take their arguments in degrees (for angles, not temperature) and then have one subroutine that takes its arguments in radians.
A few people noticed the problem and then, in a matter of seconds, everyone was enjoying the joke. Everyone but the professor! He didn't see the problem until one of the students pointed out the in-consistency of his list. But once he saw it, he, too, enjoyed the extra joke that the error would come on the Consistent item.

By the way, the picture here is from the CR4 Blog entry "On This Day" in engineering history for October 29, 1969. It talks about what many consider the first message sent between computers on the U.S. Department of Defense's Advanced Research Projects Agency network (ARPANET) - the precurosr to the Internet. The message was between a SDS Sigma 7 and a SDS 940.

Friday, November 25, 2011

Tiptoeing dog

Charlie NOT tiptoeing
Our dog, Charlie, has taught himself to tiptoe. Since it's a holiday today (our company gives us the day after Thanksgiving off) and my wife and daughter are out shopping and my son is not yet awake, the house if very quiet. I'm working on my computer (out of site of the dog bed) and Charlie is supposed to be on his bed - waiting for me to take him for a walk. But the left-overs from yesterday's wonderful meal are beckoning and the cat food dish is full and calling to him.

Charlie knows it is wrong to eat food that is not in his own dish so if he wants to get at the other treats, he needs to do it without me finding out about it. So, he tiptoes. His version of tiptoeing is to move very slowly and put his paws down as gently as he can. But his toenails give him away. If the house wasn't so quiet, I might have missed it but I heard the ticking of his nails and caught him in the act.

Only a hound dog can give you the look he gave me (similar to this picture I took a while ago ). He didn't scramble back to his bed (although he sometimes does that when I catch him off his bed). He just looked up at me mournfully. If he hadn't already had his breakfast and a treat, I would be tempted to give him something to eat. But both he and I know that he just wants more to eat. Yes, dogs are a lot like humans. Good and bad.

Wednesday, November 23, 2011

Driving isn't hard enough?

My title is a little misleading. If there had been more room, I'd have said, "As if driving before the Thanksgiving holiday isn't hard enough..."

I saw a report about a tanker leaking a tar-like material over a forty mile stretch of the Pennsylvania Turnpike. This report at National Public Radio has a bit of video with it. There is a another angle to the story in the Pittsburgh Post Gazette where people are blaming the turnpike authorities for not closing down the highway. Finally, here's another version from television station WPXI in Pittsburgh that has some pictures of the mess.

People were not aware of what was going on until their cars started handling badly. Then they noticed that other people were pulled off on the side of the road. What a mess. From the pictures, I don't know how no one was seriously hurt. It looks like one of those things that happens suddenly and it certainly wasn't something that you would have experience driving in. You'd never know how to handle the situation before it happened.

I often wonder about this. You try to be careful and figure everything out and practice and learn and study and prepare yourself for the troubles you'll face in life. And then somebody pours tar on the road in front of you.

Saturday, November 19, 2011

The joke that couldn't miss

Once again, I'm writing a story that I was reminded about when I went to visit some old college friends last month. That visit is mentioned in my post Too much to write.

My best friend Nick was in ROTC in college. He heard a joke there that he thought was great and told everyone. Here it is.

A really tough lieutenant was in charge of his platoon and had them all assembled. Word came to him that the mother of one of his men, Private Smith, had just died. Instead of dismissing the men and telling Private Smith of the tragedy in private, he announced, "Private Smith, front and center." Private Smith stepped forward  and the lieutenant announced, "Private Smith, your mother has died." Knowing his lieutenant didn't like his men showing emotion, Private Smith simply answered, "Yes sir!" The men were then dismissed. The captain saw this and talked with the lieutenant. "Don't you think that was a little harsh, lieutenant? I would like you to show a little more tact in situations like this in the future." "Yes sir," answered the lieutenant.

It so happened that a few days later, word came that Private Jones' mother had died. Remembering what his captain had told him, the lieutenant assembled his men and said, "All you men with mothers take one step forward." As the men complied, the lieutenant said, "Not so fast, Private Jones!"

Nick told this joke every chance he got. I thought it was funny but I didn't think mentioning death in a joke was a good idea. Weeks later Nick and his girlfriend (and future wife) Andrea went to see a performance in the campus coffee house. As they told the story, during a break in the acts, to take up some time as the next group set up, the master of ceremonies asked if anyone wanted to come up and tell a story, sing a short song or tell a joke. Nick raised his hand and Andrea knew right away what he was going to do. She tried to dissuade him but he jumped right up and told the joke. She said he was so excited about the joke that he had a hard time containing himself. As he finished the joke, "Not so fast, Private Jones!", she said no one laughed. There was dead silence. It was agonizing for his friends to think about but it was a good lesson, too. That's why people can earn a living telling jokes. If it was easy, everyone would do it.



Friday, November 18, 2011

Why didn't I post this earlier?

It's always bothered my that the National League has one more team than the American League. It's also bothered my that the National League Central Division has six teams while the American League Western Division only has four teams. I know there has been talk about realigning the leagues but the arguments against it were always that this would lead to an uneven number of teams so there would always be one team in each league that couldn't play on a given day. Also, there is the inertia of the owners and fans not wanting to change things.

There have been articles written for years about moving the Milwaukee Brewers back to the American League (they started in that league), just swapping the Pittsburgh Pirates and the Kansas City Royals (but what would that solve?), moving the Florida Marlins to the American League (so they could have a rivalry with the Tampa Bay Rays) and moving the Houston Astros to the American League (where they could have a rivalry with the Texas Rangers). Actually, I hadn't heard about the Astros move - it was something I thought about myself. As a matter of fact, I've had a draft of an article sitting in my Drafts folder for quite a while but never finished it. My answer to the problem of uneven numbers of teams in each league is easily handled by those two extra teams playing each other. The extra teams in each league would rotate. Baseball has had interleague play for years now so the "extra" teams would fit in with that nicely.

Well, now, the word is that the Houston Astros are going to be moving to the American League and into the same division as the Texas Rangers. That would mean that all six divisions of Major League Baseball would have five teams. Just as I thought they should! Why oh why didn't I finish my post and publish it even just a few days ago? I could have been famous! People from all around the country would have pointed to me and said, "See, this guy had the idea before anyone!" But I blew it. Once again, I've missed my chance at fame and fortune.

Thank goodness.

[Update - I looked back in my records and found that I first started working on a post about moving the Astros to the American League in May of this year! I can't believe I waited so long.]

Tuesday, November 15, 2011

Surprise visitors

Here is yet another story I was reminded of when I went to visit my old college friends last month as mentioned in my post Too much to write. This story is a another one about one of my best friends, Jim. I told a story about him before in two parts, Unintentional practical joke - part 1 and Unintentional practical joke - part 2, because the story happened in two parts - separated by about a year. This story happened in two parts, too, but it wasn't nearly as intricate and didn't happen over the course of a year. So, I'll just tell this one in one post.

My friend Jim was very busy and  a little absent minded. He would sometimes lose his phone bill and his phone would be shut off. This didn't happen often but it happened two times that I remember. As I mentioned in the previous story about him, we were living near each other for about three years after graduating. He lived in a high rise apartment in Washington DC and I lived in a suburban apartment in Northern Virginia. As luck would have it, our good friends Nick and Andrea stopped in to see us. This was very unusual because Andrea was still finishing up her last year of college and Nick was serving in the Army in Germany. But Nick was home on leave so they decided to surprise us. Well, they were able to call me and we decided to surprise Jim in Washington. We couldn't call him ahead so we just showed up at his apartment building. There was always someone at the front desk and they sometimes wouldn't let you just go up to see someone. They liked to announce you or let you call before going up. We decided to not let Jim know that both Nick and Andrea were there. So, I called him (apparently the phones worked as an intercom even if he hadn't paid his phone bill) and told him that Andrea had made a surprise visit and we'd like to come up. He was a little upset because his room was a mess and if we'd wait a little while, he'd clean up a bit. We gave him time and then went up. Andrea and I made sure he was in another room and brought in Nick and hid him under the messy covers of the bed. When Jim went to straighten them up, Nick jumped out at him and we all had a good laugh at Jim's surprised look. I remember us having a great time that week-end. Then they had to leave and we went back to our regular schedule.

Weeks later, Jim told me a funny story that was funnier because of our surprise visit. He said he was sleeping soundly when he got a call from the front desk in the middle of the night. The desk clerk said that there were visitors on their way up to his room. If we hadn't done the same thing to him weeks before, he would have thought nothing of it and assumed it was just a mistake. But because we'd surprised him once, he figured we were doing it again but at a worse time. So, he rushed around the apartment getting it straightened up. He cleaned what he could and made himself as presentable as he could so early in the morning. He was surprised it took so long for the visitors to arrive but was grateful for the time. He finally decided he'd done enough and sat down to wait. And wait. And wait. After a while, he knew something was wrong. When he called down to the desk to see what was going on, they knew nothing about it. Either they'd changed shifts or had called the wrong room and didn't want to admit it or - it had all been a dream. But if it was a dream, he must have dreamt the phone call and then woke up. But he said it seemed so real, he didn't think it was a dream. It was just one of those mysteries in life. But he'd never forget the foolish feeling he had of being all dressed and ready in the wee hours of the morning. He went to bed early that night.

Thursday, November 10, 2011

Secret experiment

This is another story I was reminded of when I traveled to see some old college friends last month. That trip was mentioned in my post Too much to write. In my group of close friends, we all, at one time or another, took a class in psychology. But Andrea took more than most of us because she was majoring in animal behavior - a mixture of psychology and biology. So, she was given many projects where she needed volunteers for experiments. She usually asked her boyfriend Nick, one of my best friends and her future husband, to help but sometimes she needed more than one person or Nick was busy doing something else. So, this time, I was the subject.

She told me that she would be asking me to make up sentences given a verb as a starting point and using a subjective pronouns like "I', "we", "he", "she" etc. which I could choose. She didn't tell me the purpose of the experiment because that would have biased the outcome. She started by giving me a verb and I made up a simple sentence. Next verb - another sentence. As I spoke my sentences, I noticed that she would seem to approve of some of them with, "Good," or "Yes.". It seemed like she found some of my sentences interesting so, I started to make up more elaborate sentences.

Sometimes, when I thought I'd made up a really good sentence, she would say, "Good," but other times, she'd say nothing in response to what I thought was one of my better offerings. Or I'd even get a, "Hmm," as if I'd made a mistake. I was getting desperate and was almost reciting small short stories with a single sentence. I was determined to find out what subjects she was approving of. Was it when I talked about personal things or should I make sentences about world affairs? Maybe she'd respond better if I threw in a little romance. But that didn't seem to elicit as much response as when my sentences were about food - but then a sentence about dessert got a, "Hmm." Then I thought she responded better to sentences about sports. No, I think she likes funny sentences better.

Well, I was so wrapped up in my search for approval of my "story telling" that I was surprised when Andrea announced that the experiment was over. Once we finished, we were able to talk about the purpose of what we'd just done. It turns out, she was seeing if she could affect my choice of subjective pronoun and specifically the gender I chose - "him" or "her". So, when I started the sentence with "I", "we", or "you", she wouldn't say anything. If I used "she", Andrea would give some sign of approval. If I used "he", then some form of disapproval was used. Sentence structure, depth of the story or subject had nothing to do with it. She said that she didn't seem to be able to correlate any of my pronoun choices with her influence. But I said, "You certainly did influence me. Just not in the way you intended."

This happens so often in our lives. We don't want to overtly influence people but we try to do it in a "nice" way by implying things. But usually, in my experience, the person we're trying to influence gets the wrong idea. It's better to just come out with it.

Monday, November 07, 2011

This day in engineering history

Today is the anniversary of the collapse of the Tacoma Narrows Bridge in Washington State in 1940. It's a sad day, of course, because it commemorates a failure. Fortunately, no was was hurt but it was still a waste of both money and time. And it could have ended terribly. I won't go over the whole story. It's documented many places as well in this Wikipedia article. But the importance of remembering failures is to learn from them. It doesn't help anyone to just say, "It was their fault." The failure of this bridge led to changes in the way bridges are designed and made everyone a bit safer.

This is one of those things that is true for engineering and true for our life in general. While it is important to get to the bottom of a problem, it doesn't help to just punish the people responsible. You need their cooperation in getting to the bottom of the problem. You need them to be open about the problems they faced and why they made certain decisions. I'm not saying you don't punish people who willfully disregard good design practices. But when someone is trying to do something no one else has done before, you must take into consideration that they had no path to follow for part of their project. Simply looking for scapegoats and making a big show of punishing them doesn't prevent future problems. It might cause people to be less willing to try things that are absolutely assured of success but it doesn't help us progress.

This is one of the nice things I like about the company I work for. When problems arise, everyone works together to solve the problem and learn why it failed and how to keep it from happening in the future. Sometimes, people are punished or fired when their methods were way outside normal engineering practices or they were intentionally deceptive in their methods. But nothing slows down innovation that making a big show of punishing people who were just trying to do something new.

Here's an interesting website. Learning from Failure, if you'd like to learn more about this.

Sunday, November 06, 2011

Sunrise...Sunset

Well, we've moved the clocks again. Where sunset was around 5:30 PM yesterday, tonight it was at 4:30 PM. The people who make up these rules (and change them) are not morning people. Well, yes, switching back to Standard Time in the fall is a good thing for morning people. But the whole concept of Daylight Saving Time does nothing for morning people. It was nice to see the Sun at 6:23 AM this morning instead of 7:22 AM as it was the day before. But that's just because we put it back where it should have been.

We didn't save any daylight during the summer and we didn't save any energy by changing the rules in 2007 (Congress passed the law in 2005 but didn't enact it until 2007). All switching our clocks twice a year does is disrupt our lives. I've heard people claim that the idea of Daylight Saving Time was to help the farmers but I don't believe that. The animals don't respond to our changing our clocks. My dog got me up at 4:30 AM this morning needing to go out and wanting to eat. Do you think the cows all shifted their schedules this morning when the farmers in Vermont wanted to sleep an hour later?

As a side note - isn't it funny that 500 years after Copernicus first proposed the idea that it was the Earth that orbited the Sun instead of the other way around, we still refer to our first view of the Sun in the morning as Sun Rise and our last view of the Sun in the evening as Sun Set? Even scientific journals and papers use these terms. If you need a good Sunrise and Sunset calculator, you might try the Time and Date site or the National Oceanic and Atmospheric Administration site.

Tuesday, November 01, 2011

What we did for Halloween

This year, instead of going to the houses in our area and the kids asking for treats, we participated in our church's Trunk or Treat event. These are found many places and done in different ways but at our church, families sign up to decorate their cars' trunk (or pick-up truck or van) to a theme and offer candy to passers-by. The vehicles are all parked in the parking lot so this is a safer way for the children to trick-or-treat and it lets families in our neighborhood get to visit our church in a less "threatening" atmosphere. In our case, we all dressed up as Nintendo game characters and decorated our car to the theme of Luigi's Mansion.

Luigi's Mansion is a game for the Nintendo gaming console that my son has enjoyed. In it, Luigi's brother Mario has been  abducted and turned into a picture (?!?) by the king of the ghosts. Luigi must find clues and track down his brother while fighting off ghosts and other bad things as he finds his way through the mansion. It's an adventure type game and really makes you think. In the picture here, you can see Evan dressed as Luigi (notice he has a vacuum cleaner - that was used in the game to capture ghosts) and Emma is dressed as Toad - a toadstool from the Mushroom Kingdom who helps Luigi. My wife is dressed as Princess Peach, also of the Mushroom Kingdom. I was dressed as Luigi's brother Mario but I was taking the picture. In the second picture, on the left, you'll see a young fellow who also dressed as Mario. We had a good laugh over that and he was a good sport about it.

It was a great time for all of us and over one thousand people visited our Trunk or Treat that night.There was free popcorn, hot chocolate (it was pretty cool that evening) and other free food. There were other activities for the kids, too, like dancing games and inflatable bouncies. The fire department was there to display one of their new fire trucks for getting into wooded areas that aren't normally accessible to fire fighting equipment. The next picture, on the right with the Statue of Liberty, was another of the more than 25 decorated trunks there. You can see that people really got into it!

The last picture shows our scariest visitors. I remember looking up from something I was doing and seeing those two faces staring at me. I took a step back before I remembered what we were doing and laughed at my own surprise. Many Christians don't like Halloween because lately, it has been co-opted by people who consider themselves witches and pagans. But they forget that this holiday, while similar to celebrations of pagan people, gets its name from the All Hallows Evening prelude to All Hallows (or All Saints) Day on November 1. There are no pagan celebrations for the Saints. I have always looked at our celebration of Halloween as showing our lack of fear of the dark powers of the Earth. We look to Christ for our power and nothing can harm us if we put our trust in Jesus. Even these scary folks!

I'm marking this as being posted on November 1, when I started this post, even though I finally posted it on Sunday,