Showing posts with label ski racing. Show all posts
Showing posts with label ski racing. Show all posts

Tuesday, December 3, 2024

Repeatability

Have you heard the story of a guy that traded a paperclip for a house? It didn't happen that simply. He traded the paperclip for something else and continued trading until he eventually had a much more expensive item. When I think about what he did, I imagine he took advantage of having something that someone else needed to the point where they would trade something more valuable for the less valuable item he had. I also doubt the process he followed is very repeatable. While someone could take some of the ideas, trades for different items would need to be substituted. Furthermore, I doubt many would have his same success.

This leads me to my topic of interest today and that is repeatability. When software engineers create a program, they require a team of quality assurance (QA) engineers to test their code to look for problems. The worst kinds of problems to find are non-repeatable ones. If the program runs 9 times out of 10, it becomes the QA engineer's responsibility to figure out the exact repeatable steps to find the one time it doesn't work.

One area where this becomes increasingly difficult is when using a program that creates random numbers. The whole point of random numbers is to make things unpredictable. This is why most random number programs have two calls. The primary call provides a random number. To make sure it is repeatable, it will always provide numbers in the same order. If you ask for a single digit random number, it might first provide a 3 and the next time you call the function it returns a 5. Stopping the program and restarting it give you the same numbers in order. This is very helpful when trying to locate software bugs. The important thing to remember is to also use the second call or randomize function. This tells the program to not use the same order but instead to mix it up.

Why is this important? Several years ago I noticed that the software provided by the governing body for ski racing forgot to include the randomize function in their software. My son attended a race at Jackson Hole and had yet to complete a Super-G race. He got lumped in with all the other first-timers. The weekend had 3 individual races where all the first-timers should have been given random starting orders within their group. Starting near the front has its advantages and so one would think my son would have his start position changed randomly. Nope the 10 to 15 racers all started in the same order for each of the 3 independent races. The developer of the software never randomized the start order as he or she should have. I tried to protest but ski coaches and race organizers don't understand the nuances of software development and accepted as fact that the coding had been done correctly.

When looking for software bugs, repeatability is important. It makes it a lot easier to find problems and fix them. Just remember to add in that randomize function at the end. Otherwise you are not really creating random numbers and that is one area hackers exploit to break into systems.

Monday, February 3, 2014

WiFi Hotspot

This weekend I joined my son in Sun Valley for his ski race and we had a very good trip. We stayed with the team at an inexpensive motel and were fairly comfortable. When I checked in, they gave me a piece of paper with the WiFi password so I could get online and check e-mail. Unfortunately the password they gave me didn't work. Sure I could have called the front desk and straightened things out. Instead, I turned my Android phone into a mobile WiFi hotspot and connected to it with my computer.

For the past month or so I have been carrying around an Android phone and my iPhone 5. Both phones use the AT&T service. There are some things I like about my iPhone and others that I like about my Android. One area where the Android phone really shines is in its ability to become a mobile hotspot. For some reason, AT&T doesn't allow your iPhone to perform this functionality but it does for Android phones. I have to say that I am very impressed with this capability. The LTE download speed was nearly as fast as my home Internet connection. I was able to read e-mail quickly and do it on a full-sized computer screen with a full-sized keyboard. Furthermore, my son was able to connect his iTouch at the same time and read his e-mail as well.

Once my son and I were done with the Internet connection, I turned off the WiFi hotspot capability along with my computer. It was only needed for a couple of minutes and was very handy. After that we were both worn out from a busy day of skiing and went to sleep. Technology had served its purpose.

Thursday, December 20, 2012

Ski Racing in Park City

I have spent the last three days with my son ski racing in Park City. While skiing is a great sport to do in the winter, it is not very spectator friendly, especially yesterday and today. When we arrived at the parking lot yesterday, it was a crisp seven degrees Fahrenheit. This morning it was only one.

Today I rode up the chairlift with my son and asked him if he liked watching ski racing. He remarked that if he was at a ski resort, he would rather ski than watch a race. He elaborated that standing on the side of a mountain freezing was not a nice way to spend the day. I commented that watching ski racing was best done from the comfort of the living room couch. He agreed.

My wife had the luxury of viewing the results of the race from home today. While my son's races are not televised, the results are reported in real-time on the Live-Timing website. "Real-time," means that the Park City timing equipment has a feed directly to the web site. If my son had fallen during his first run, it would have listed him as a "did not finish" or DNF immediately after the fall. Since he finished his two runs, he had two times posted immediately after each respective run and she could see how he did.

While Live-Timing is not nearly as fun as watching a video of a race, you can still see the results. Furthermore you don't need to worry about getting frostbite. Trust me, I was concerned about that today.

Wednesday, October 24, 2012

Helping Others

In one of my previous posts, I explained how to get free lift tickets to Snowbird Ski Resort. It is that time of year where the Snowbird Sports Education Foundation just listed all of their races for the coming season and normal people can sign up to help. In return for spending a day freezing on the side of a mountain, you will receive 2 passes that can be used on another day during the season. If you are looking for a cheap way to go skiing, this is it.

I have spent a better part of my evening going through the list of volunteers that have already responded and adding names to the website. Unfortunately there are a few regular volunteers that offer to help and then never show up. If you ignore them, they sign up again and again. If you try to confront them about it, they claim they attended every race they signed up for. It isn't any fun to be the bad guy but I have to make room for people that actually help out.

Speaking of helping out, I think the world would be a much better place if we all helped each other out. There is a regular on my Monday morning flight that gives me a ride from the Oakland airport to my office in Foster City. It is on the way to his job in Redwood City and so it is only a minor inconvenience to drop me off. In return for the favor, I pay the toll across the San Mateo Bridge. If I was taking public transportation to get to my office, I would have to pay $10 and the bridge is only $5. It turns out we both save $5, which can add up over the course of several years.

This week as we were driving after getting off the plane in Oakland, my co-commuter asked about getting a PlayStation 3. Working for a video game company gives me access to discounted consoles like the PS3 as well as discounts on games. He told me what he wanted and I placed an order for him. I saved him about 50% as opposed to purchasing everything in the store and I was happy to help him out. Do I expect anything in return? Nope, and that's the way it should be.

Wednesday, January 19, 2011

I Got It on Video

This last weekend my two kids had a ski race at Jackson Hole in Wyoming. I enjoy skiing there but it isn't the best place to hold a ski race. It is tough to stand on the side of a wonderful mountain waiting for kids to flash by you when you could be sampling one of the greatest mountains in North America.

This weekend it was unseasonably warm and instead of being freezing, we had to contend with rain. We also had to deal with constantly changing conditions. One minute it would be sunny and the next it would be raining or snowing.

On the last day of the race, it looked like we would have good weather and be able to get all the racers down the hill safely. Then there was an issue with the timing computer. The person that normally runs timing wasn't there and the new one kept having problems. When it came time for my son to ski down the mountain, there was a course hold because of timing issues. We waited for him to come skiing down for quite a while. During this time a series of clouds rolled in and visibility went to zero. At the worst time of the day, my son was sent down the mountain. Not only was it snowing sideways but a cloud descended on the course and you could barely see the next gate in front of you.

I stood there on the side of the mountain wondering who would let a bunch of 14-year olds race in white-out conditions at 40 to 50 miles per hour. It was a miracle nobody got hurt. I tried to get my son's run on video, but the camera kept trying to focus on the flying snow. All I got was a white screen with the conversation I had with my daughter as my son skied past us.

My son finished his run safely and we packed up to head home. Luckily somebody saw the foolishness of the race and they cancelled it for the rest of the racers. I think it was only a matter of time before someone got hurt and so that was the wise thing to do.

The moral of the story is that proper computer training is important even in ski racing. My kids' race was plagued with timing issues that should have been worked out long before the competition even started. Trying to figure out computer problems at the same time you are holding an event is impossible. If my son hadn't been held at the start for 45 minutes waiting for these issues to be resolved, they could have gotten all of the boys to the finish long before the storm rolled in. Then everyone would have gotten a fair shot at doing well and that is what racing is all about.

Monday, December 20, 2010

The Importance of Training

It is amazing at how many people think they are an expert in something only to find out that they are really more of a novice. This weekend I got to participate as an official in a ski race. Normally I get assigned as the start referee, which is a lot of work. Saturday I was a simple gate judge with a twist. The twist was that I was on a headset with the start and finish. I have done that before, but only once. It was my job to communicate any crashes on the middle of the hill outside the view of the start or finish officials. Sounds like a piece of cake, right? Wrong.

The first race of the season generally has a lot of racers and so it was an all-day affair. I would watch skiers come down the mountain and as they passed, I was to give the racer's number and that they "cleared" the drift road, which was where I was standing. A typical conversation would sound like this:

Starter: Racer 1 on course, 2 holding in the gate.
Me,once racer 1 got to my spot on the hill: 1 clear of drift.
Next checkpoint, once racer 1 got to his spot on the hill: 1 clear of slalom start.
Finish, when the racer passed through the finish line: 1 through the finish.

Again, this sounds rather simple. However we could have up to 4 racers on a hill at the same time, staggered at 30-second intervals. That meant that racer 50 was crossing the finish line at the same time 51 was going past the slalom start, 52 was going past me, and racer 53 was leaving the start gate. Therefore it was important to use as few words as possible so you weren't talking over someone else. Furthermore it was important to use the right vocabulary.

During the course of the day, a skier missed a gate and started hiking so he wouldn't be disqualified. The racer behind him quickly approached and passed him. That means that racer 52 was in front of 51 and I used the word "passed" to indicate what had happened. Timing was able to make the necessary change in the computer so that racer 52 was given the correct time as was 51. Without this communication, both racers would have the wrong time. After the passing, I used the word "passed" with the next racer instead of "cleared." After all, the racer did pass my spot and I had the word "pass" on my mind. This confused timing because they thought two more racers had passed each other, which wasn't the case. Using the wrong vocabulary created confusion and I had to correct the error.

In my defense, it was the only mistake of the day but highlighted the importance of proper training. How many of us are eager to tackle a new project or try something innovative on our computer. Sometimes we have the proper knowledge or training and can do okay. Other times we know just enough to be dangerous and really screw things up. I hate it when I do that.

Thursday, December 16, 2010

Benchmarks

Today is the first ski race of the season for my youngest son. I wish I could be there at Park City watching. Instead I am stuck here in California working. The most important goal in this first race is to finish. Doing so helps with races later in the season.

My job today is running benchmarks. We will be rolling out a new product in the next couple of months and I need to make sure our infrastructure will support it. I am starting the day running speed tests. Later I will work on some reliability tests to make sure we can weather hardware and software failures. These benchmarks are sort of like the ski race my kids are participating in at Park City. The race doesn't really count for much other than to make sure they are in racing form and ready for more important races later in the season.

My daughter was also supposed to be at the race but got in trouble. She hit her brother after being warned repeatedly that it would keep her from this first race. She got home from school a few minutes ago and asked if she could go skiing at the resort near our house. My wife informed her that she was being punished and should work on homework. She knew she wasn't going to be allowed to race, but not being allowed to even ski today is really too much. If she had known that, she would have hit her brother harder. When I heard that, I just had to laugh.

Thursday, November 18, 2010

Random Numbers

Today is one of those days where I am putting together a bunch of sample reports. The reports contain fictitious data and serve as a starting point for management when they are trying to figure out what they want in a report. I may start with a bar chart in the sample report and then management will decide they want a line graph instead. Figuring out what management wants before I spend a lot of time fine tuning the report saves a lot of headache in the end.

My reports are all database driven and so it is important to populate the database with realistic-looking numbers. One of the tools I use is an existing report that I have printed and hanging on the wall of my office. When that doesn't work, I resort to random numbers. I just hate trying to make up numbers on my own.

Creating a random number with a computer is seemingly not a trivial task. My son discovered this with one of his programming assignments recently. They are using an algorithm provided by the professor, but it has one major drawback: the numbers aren't so random. If you call the function once, you will get a specific number. Then close the program, rerun it, and you will get the same number. In order to get a truly random number, you need to "seed" the algorithm with a true random number.

It may not seem like a serious problem until you truly need a random value. This is what was happening with my younger son in his ski races last year. He seemed to get stuck with the same bib number when start order for his group was supposed to be random. The software used to determine random start order was putting the same kids at the front of the group and the same kids at the back of the pack. For the kids lucky enough to be at the front of the pack, they had better snow conditions. My son, on the other hand, got relegated to the back of the pack and had to deal with ruts up to his armpits.

As with most seemingly complex problems, there is an elegant solution to having a computer generate random numbers: read the milliseconds from the computer's clock. When I explained that to my son working on the programming assignment, he couldn't believe there was such an easy solution. Now I just need to pass the information on to that bonehead who wrote the ski racing software.

Friday, January 8, 2010

Golf Pencils

I missed writing yesterday because I spent my morning on the side of an ice covered mountain helping coordinate volunteers for a ski race. When I got back to my office after lunch, I had a pile of work which took priority.

Coordinating volunteers for a ski race is a fun job if you know what you are doing. I had to train new people on the basics and then talk to everyone about new rules instituted this year. Finally I had to give everyone their paperwork that needs to be filled out on the mountain. If a skier doesn't ski the course correctly, it needs to be recorded.

Standing on the side of a mountain filling out paperwork for a ski race is very enlightening. For instance, did you know that a ball-point pen doesn't work below 32 degrees Fahrenheit? The ink freezes. NASA knew that a ball-point pen wouldn't work in zero gravity and spent millions of dollars coming up with a pen that would write in space. The Russians just brought a pencil. Ski racing officials use the low-tech solution and bring a pencil, which works great in the cold.

A second discovery that every ski racing official makes is that it is very cold if you have to take your glove off to write. After half a decade of helping with races, I have learned to write with my gloves on. It is a useful skill that recently came in handy when I was playing a party game and was asked to remove some candy from a foil wrapper while wearing thick, winter gloves. The only exception to being able to write with gloves on is if you get stuck with a golf pencil.

Golf pencils are those half-pencils without erasers that you get for free. They are called golf pencils because you most often see them at golf courses and are used to keep track of your score. If you go into an office-supply store, you can buy a huge box of them for less than an order of french fries. In fact the cheapest thing in the store is a gigantic box of golf pencils.

For the record, I hate golf pencils. They are only useful once. The moment you try to sharpen one, it becomes too small to use again. There is no eraser and so if you make a mistake, you're screwed. Well, unless you are carrying an eraser in your pocket. But who carries an eraser to a ski race? Hand warmers, candy bars, and goggle scrapers, yes. Pencil eraser, no.

The whole reason for the invention of the golf pencil is based on the idea of creating a writing instrument that nobody would want to steal. If golf courses gave out nice pencils, they would never get them back. However if you are done playing a round of golf, get in your car, drive an hour down the road, and then discover that you still have your free golf pencil, you will go all the way back to the course to return it because nobody wants such a useless thing.

As the new volunteer coordinator I'm going to go buy a big box of real pencils. Full-sized ones, with erasers on the end. Then I am going to drill holes in the backs of them just below the eraser. That will allow me to run a string through the pencils so I can attach them to clipboards. If that doesn't keep the writing instruments from disappearing, then it is back to golf pencils. But only as a last resort.