Uncaught (in promise) invalid_parameter – Debugging Google Cast Error

I’m tinkering with the Google Cast API at home to play some music that I have. I’m using the messaging system to send commands to do various things. I was getting the following message and my error callback wasn’t being called:

Uncaught (in promise) invalid_parameter

This was a slightly puzzling problem, and I’ve identified the cause (at least in my case).

In my receiver, I had the following code:

window.mediaElement = document.getElementById('media');
 window.mediaManager = new cast.receiver.MediaManager(window.mediaElement);
 window.castReceiverManager = cast.receiver.CastReceiverManager.getInstance();

var customMessageBus = castReceiverManager.getCastMessageBus('urn:x-cast:org.jaredstevens.mediabase');
 customMessageBus.onMessage = function(event) {
 document.getElementById('message').innerHTML = "Got message: "+event;

What’s causing my problem is I’m calling window.castReceiverManager.start(); before my message bus has been setup. Making the following modification corrects the issue:

window.mediaElement = document.getElementById('media');
 window.mediaManager = new cast.receiver.MediaManager(window.mediaElement);
 window.castReceiverManager = cast.receiver.CastReceiverManager.getInstance();

var customMessageBus = castReceiverManager.getCastMessageBus('urn:x-cast:org.jaredstevens.mediabase');
 customMessageBus.onMessage = function(event) {
 document.getElementById('message').innerHTML = "Got message: "+event;


I hope this helps!

Go ahead, send your message during the movie. I don’t care.

A few months ago, my friends were upset with me because I wouldn’t go see Star Trek Beyond with them. My explanation? I saw the new Star Wars movie on opening night. Middle seats, middle of the theater. Behind me, someone brought their kids who seemed like there were several other things on their list of things to do that day than watch a movie. It ruined the movie for me.

I’m probably not your average movie goer. I take movies more seriously than most people. Movies for me are an escape from reality. When seeing a movie, I want to forget about my job, finances, that weird thing in the garage I’ve been trying to build for three months,  social media… The list goes on.

I’m the guy who closes his eyes and plugs his ears during the trailers so that the movie that I’ve been looking forward to for a year isn’t shown to me in two minutes. I don’t want preconceptions or judgements. I don’t read the reviews. I want my mind to be fresh. Kind of like how the creators of the movie intended.

What pulls me out of that faster than anything? The theater screwing up the ticketing system and selling me and another person the exact same seat for Deadpool. (Worth noting, I’m a software engineer, and if you’re a theater executive, your contractor/employee needs to read a blog post about race conditions). The douche in front of me last week when I saw Jack Reacher that got board and spent part of the movie texting. Or the baby that someone brought to Dr. Strange. No, I don’t have kids. I paid the same amount as you did for your ticket though, hoping to see an incredible movie in peace.

For that reason, I’ve spent a few years building a home theater system where I can control things like people texting during the movie or babies with relative effectiveness. Yes, it was expensive. Lately though, movies have gotten expensive. Popcorn and soda has always been expensive.

Next time you’re at a theater, imagine me watching the same movie three months later, for the first time, while I eat pizza and drink a beer. I’ll be sitting in my lazy-boy recliner.

I’m buying Star Trek Beyond on Blu-Ray and will watch it in my basement. Probably alone. But, I will get to live on the Enterprise for over two hours, which is what I want.

Cloud Apps at Home

What Happens When Cloud Apps Rain?
I’ve been using Amazon Music and Google Music services since they were in beta. I’ve enjoyed both services and when they came out, I was really excited about their potential. Amazon Music was especially good because I was already buying tons of my music through Amazon and it integrated really well with the music player.

Google Music started doing the matching thing which made it even easier to use. I could move my music from Amazon over to Google without too much fuss. I liked their interface better, and the music search seemed to work right.

A few weeks ago, while using Amazon Music, I tried looking for a song I had purchased on Amazon. It was gone. I thought that I bought it on Amazon, but I have purchased some music on iTunes – so I decided to check my receipts. Sure enough, I had bought this song on Amazon. Where was it? I still don’t know.

Between that and other experiences with cloud apps, I’ve decided that in most cases, I can’t trust those apps. I either need a way to back up my data locally, or I need a replacement solution.

How Many Software Engineers Does it Take to…?
Being a software engineer, I decided to solve this problem by building my own music service that I host at home. My internet connection is fast enough that I can stream media to wherever I am. I also recently purchased a pair of Chromecast devices from Google. Google whitelisted them for me and now I’m trying to build my own music player.

It will work on my TVs (through the Chromecasts), my phone, and my browser – when I’m at work, my parent’s house, on vacation, wherever.

There are lots of problems with this:

  1. What if my hard drive fails?
  2. It will cost money to run a computer out of my house that does all of this
  3. It will take a lot of effort to build the app.

Well, to address these problems, I’ll need to create some sort of backup mechanism. The cost of the hardware and hard drives may be expensive. There are also other options out there like Mozy, but that can introduce some of the same problems I had previously.

For energy and hardware costs, I’ve repurposed an old Asus EeePC to be the computer. I estimate under load, it will only draw about 5W of power, which is pretty dang low. I spent $100 on a Western Digital Passport 1.5TB hard drive though. It is also low power and has decent capacity.

The effort to build the whole system is probably the largest drag and biggest risk. I get bored fairly easily, and I don’t have tons of time. I’m hoping that I can focus on this enough to get something functional working though. It also helps that my current options leave me frustrated every time I use them, which provides motivation to work.

The Future
I’d like to build local apps that manage my photos, DVD/BluRays, email, etc as well. Evernote recently lost some data of mine and I’m also eager to replace that app with something that I can trust. That will be much harder to replace though.

I ultimately think that I’m not going to be able to pull this off, but I’m going to try anyway, because I feel like I’ll learn a lot. Some of these services use technology that I’m unfamiliar with, or processes that I find interesting. Being curious, I’m always interested in how things like handwriting recognition or music fingerprinting work. That will be the ultimate reward for me.

What Would I Do With Free Money?

With the Powerball lottery climbing so high, I was wondering to myself what I would do if I won a bunch of money.

Elon Musk is kind of a hero of mine, and I like what he did with his payoff from PayPal. He built freaking rockets (SpaceX). That not being enough, he built some sweet electric cars (Tesla). I wonder what he’ll do next. ūüôā I’d hope that I would invest that kind of money in the same way he did – using it to push the limits of our race’s abilities.

Then I thought, what would I do with a smaller amount, say… $50,000?

What follows are simply some options that I’d have. It also assumes $50,000 – straight out. No income taxes or anything.

Another thing to note, is that the things I’ve listed will probably match for a lot of other people. When reading this, you may realize these are things you’d do as well.

Buy a House

I currently live in a town home that I bought in late 2007 when the housing market was near its peak. The town home’s value has since dropped quite a bit. $50,000 would allow me to pay off the difference in value, and make a down payment on a new house somewhere.

This alone would be life changing. I’d have a yard for the dog and future kids. I could build a fort there.

I’d have garage that I could use to pursue my hobbies as well as discover new ones. I’d have room for an office, and bedrooms for everyone.

Since I’d no longer be in an HOA, I could set up my amateur radio antenna (discretely so that I don’t bug the neighbors), and talk to people everywhere.

Invest It

$50,000 at my age would do wonders for a retirement plan. To over simplify, if I could get a 6% return over the next 36 years, and didn’t contribute anything else at all to the fund, I’d wind up with $407,000.

I wouldn’t see benefits immediately from this, but when I near retirement age, it would make a massive difference. I’d just have to stay healthy long enough to enjoy it.

Pay Down My Mortgage

If I use it to pay down my mortgage and made the minimum payment over the remainder of the mortgage, I would pay it off 15 years early. I would also save about $82,000 in interest over the life of the loan.

If I paid extra on my mortgage, I could¬†conceivably¬†own my house much sooner. Not having to deal with debt and a bank is nice, but as you saw from the “invest” option, compound interest is a more attractive option.

Fund a Startup

I’ve had it in my head that I’d like to start a company. I’ve got a few ideas of things that I think could take off and even pursued some to just test feasibility.

Because of the risk involved, its very hard to quantify and predict what would happen. I could fail and lose it all, or experience mild success and be financially secure for years to come.

I could be wildly successful and have enough money to do what Elon Musk does and build rockets and electric cars that will change the way we travel.

The other risk here, is that I can’t do it alone. I’d have to talk a small group of people that I really really trust away from their well-paying and secure jobs to come help me on some hair brained idea. I’d need people for the various positions.

I’d need to find somebody I could trust to run the operation, (in my StarTrek fantasy, I’m Scotty, and not Kirk). Hopefully we’d get something going with enough traction to attract some investors and get the thing off the ground.

Party and Waste It All

It seems like the knee-jerk reaction to sudden resources is to have as much fun as possible for as long as possible, ’cause, YOLO, man. I see celebrities with this attitude all the time – they get that role in the movie, or their album comes out and is a hit. Suddenly, giant parties and cars. Next thing you know, they’re selling everything to pay off $3 million in debt or something. They had fun though.

What frustrates me is that while you do really only live once, and while that is very fun, there is little planning for what the rest of your life is like. If managed well, something like $50,000 could improve your quality of life throughout the rest of your life!

I’d rather live a like that, than have maybe a year or two of intense fun.


Money is an interesting thing. $50,000 seems like a ton of money to me. For a lot of people, its an enormous amount of money, (especially¬†people that live in countries that aren’t as well off as the United States). For others, they’ll burn through it going to rehab after all the partying.

When used right, it can make all the difference.

In the comments, tell me what you would do with an unexpected $50,000? (Or, with an unexpected $600 million). ūüôā

How I Didn’t Die.

The Idea

Upper Muley Twist

Upper Muley Twist

I turned 30 in February of 2012. Most people take this opportunity to evaluate their life so far and see if it’s what they expected. I’ve apparently been doing this since I was 24. During my birthday though, I was frustrated with all the new stuff in my new job, and needed a vacation. Since it was my 30th birthday, I thought I’d go the extra mile and go on an adventurous vacation, unlike any I’d ever been on. I wanted less of a vacation, and more of a physical challenge. Probably to prove to myself that I’m still 18 even though I’m a few dozen pounds heavier than I was then.

So, I called up my good friend Matt and asked if he wanted to go backpacking. In February. I live in Utah, and the south is perfect for this kind of thing. I wanted to try and go somewhere that I’d never been before and somewhere where nobody else would go.

So, over President’s day, we went to Upper Muley Twist Utah’s grand Captiol Reef National Park.

Getting There

Road between the visitor's center and Burr Trail

Road between the visitor’s center and Burr Trail

Before we left, I compiled maps, routes and instructions for our families. I included a timeline with two different times. We expected to be out of the canyon and able to “check in” on Sunday by around noon. I noted that if they hadn’t heard from us by 4pm, that they should notify the Parks Service and report us missing. This was our deadline for making contact. I left this information with my wife and Matt’s wife, just in case.

We also went to the local outdoors store (called Recreation Outlet in American Fork), and got some supplies. As we were browsing, Matt asked wether it would be good to buy some hiking boots or snow pants. I responded that he should probably wait and use the money for some really good gear later. I also talked him out of getting some shoes because he’d have to “break them in”, and you don’t want to do that on a long hike like this. He did find a good deal on some thermals and despite me also not recommending them, he bought them. Just 48 hours later, I would be regretting this advice, and Matt would be regretting that he followed it.

We got our gear to the truck and were deciding what to pack. Matt’s wife bought him a crank battery charger that you can plug into your phone. I persuaded him to leave it here as it would just add extra weight, and I’ve never had a need for one before. Matt later recalled that I had ironically used a phrase like “never in a million years will you need that”, to describe how silly it would be to bring it.

We left work early on Friday and started the three hour drive down there in my old beater 94 Pathfinder, stopping for gas and ice cream in Scipio.

We arrived in Torrey late in the evening, and after the Park Service outpost there had closed. For this park you are required to obtain a free backpacking permit. This is mostly because, in rare circumstances, backpackers get stuck or injured somewhere. By obtaining a permit, the Park Service knows your who you are, where you plan to be, and when you plan to leave. This makes searching for you much easier.

We decided to get some good food in Torrey and spend the night in a hotel.

Saturday morning was a little bit chilly, but the sun was out and it was promising to be a very nice day. We got up, loaded up the truck, enjoyed the waffles, boiled eggs, and English muffins that per part of the continental breakfast, and set out for the Park Service.

When we arrived we filled out the permit, learned the rules of the country, (no pets out there, no guns, don’t walk on the crypto biotic crust, etc), and got our permit. The Park Ranger there mentioned that it would snow Sunday and asked us about our cold weather gear. He wasn’t very concerned about it though as the forecast only warned of “trace amounts” of snow. It would likely melt during the day anyway.¬†I had been watching the weather intently in the days leading up to the trip and nothing had indicated to me that weather would be a problem either.

On our way out, the ranger there handed us a terrain map of the area we were going to be in and wished us luck.

We hopped in the Pathfinder and started out to the trailhead.

We drove ten miles past the ranger station, then turned onto a paved road that turned into a dirt road after five miles. We followed this road for thirty or so miles. We took the inevitable wrong turn and made the decision to not try and cross a bunch of mud and a small runoff creek. After finding the correct road, we wound our way through Burr Canyon, up the steep dirt roads until we came to the top. From there we left the road we were on and followed a jeep trail to the Upper Muley Twist/Strike Valley Overlook which eventually required high clearance to pass.

I tell you all this to illustrate how remote this area is. We didn’t have cell phone reception and there was nobody out there. It was a desert.

Adventure Begins

Me standing next to the trail marker

Me at the trailhead

Upon arriving at the trailhead, we got out and took some pictures. We gathered our gear and started hiking. The weather had gotten warm now and we shed our sweaters for a lighter and cooler layer. The terrain was flat and fairly even as we followed the trail, winding north through the bottom of the canyon.

Every 30 minutes or so, we would see an arch and stop to take a picture. We talked and ate our food and drank Gatorade as we walked.

After some time, we came to the first narrow in the canyon. For those of you unfamiliar with a narrow, it’s a part of a canyon where the walls are only a mere few feet apart. The walls can tower 50 feet or more into the sky. They are marvelous to walk in, but can present some interesting dangers. Even in the deep heat of summer, the bottom of these canyons can be very cold. If it rains, the rest of the canyon will funnel water into the narrow and cause a flash flood that has killed hikers in the past.

The trail markers more prominently marked a bypass to the narrow, so we took this. It led us on the edge of the narrow and up against the greater canyon wall. Below us was a slick rock slope that eventually dumped into the narrow.

Me standing in a narrow canyon, right under an arch

Me standing in a narrow canyon, right under an arch

We followed this trail until it joined up again with the bottom of the canyon. Near this point, there was a side canyon with another really cool arch. We stopped for a break and more pictures.

We pressed on though until we came to the second narrow. On this one, we needed to take the bypass because the narrow would terminate in a dead end after a few miles. This bypass was much steeper than the earlier one. There were several spots where we scrambled up and down rocks and dirt to follow the trail, always aware of the slot canyon below.

Upon finding the end of this canyon, we decided to set up camp for the night. The sun had

Matt with the canyon behind him

Matt with the canyon behind him

set, and the temperature had plummeted to close to freezing. The wind was starting to pick up a little bit as well.

We set up our tent on a nice flat spot and unpacked our gear for the night. We got our stoves out and made some Mountain House meals. The warmth of the meals raised our spirits and we talked until we got tired.

After hiding our food away from camp, we got in our tent, shut off our phones and went to sleep.

A few hours later, the wind picked up a lot and was gusting powerfully through the canyon. There were several times during the night that we were sure somebody was outside, when it was only the wind howling through brush and rock.

Part way through the night, I rolled over and turned on my phone to see what time it was. It was only 1:30am. The night was passing slowly. Exhausted, I put my phone back in the tent pocket and went back to sleep.

Morning finally came and we woke up early as snow started to fall. We ate breakfast quickly and discussed our situation. After such a miserable night we decided to head back out and abort the trip. It was too cold and windy to be fun, and we still had several miles ahead of us.

It was also at this point that I realized that I had forgotten to turn off my phone the night before after I checked the time. My battery had less than 4% of its energy left. I shut it off, hoping to have a little left if we needed the phone. Unfortunately, I couldn’t get it to turn back on for rest of the trip.

First Sign of Trouble

As we packed our gear, the snowflakes became large and fluffy. Snow was falling much faster now as well. After only snowing for thirty minutes the ground was already covered with a solid inch. This was concerning as the steep terrain we had passed in the previous day would only be made more dangerous by the slippery snow.

View from the trail from the day before. This area was now under a few inches of snow.

View from the trail from the day before. This area was now under a few inches of snow.

We finished packing and started hiking back. It continued to snow as we reached the first bypass that we needed to pass. I ventured a few steps onto the slick sandstone and determined it was too dangerous to pass. Matt gave more of an effort and ventured several feet out, eventually falling on all fours and scrambling back to safety. It was far to slick to return by this route. If we fell, it would mean sliding down the slick rock followed by a 30-40 foot drop into the slot canyon that would certainly break bones or kill someone.

We stopped and thought about our options. We decided to continue the hike and try and leave the canyon along the ridge route that followed the east ridge of the canyon.

As we walked the snow got deeper and deeper and covered the terrain with a friendly looking white sheet. The snow wasn’t so friendly to Matt’s feet – barely protected in his soaked tennis shoes.

The snow continued to fall heavily as we continued further down the canyon. We were actually making fairly good time as the ground was fairly flat. After a few hours though, we began to reach the end of the canyon and the need to ascend the ridge became apparent. Most of this was switch backs and scrambling up some rocks and other various terrain.

Having not slept well the night before, eating a cold uninspiring breakfast, and the snow all began to suck energy out of us. With each scramble up the rocks we made, the longer we had to rest. We started resting right before the scrambles to build up enough energy to reach the top safely.

The Summit

Matt on "The Summit"

Matt on “The Summit”

After very slow progress and more snow, we finally reached a place where we could see a hill in the distance with a sign posted on top. Both of us hoped that this wasn’t where the trail was leading us, but we also hoped it was, as it gave us a goal to work toward.

After two more scrambles, we made it high enough to walk up to the sign. Thinking it would say something cool like “summit” we decided to stop and take pictures with Matt’s camera. As we got near it, the sign simply indicated that we were now on the rim route and that the place we had come from was the valley route.

This was interesting because up until this point, there was some debate about whether we were on the rim or not – illustrating how adept we were with maps.

It wasn’t snowing so hard at this point, but it was still cold and a dense fog began to roll in. The combination of the newly fallen snow and fog made finding the cairns that marked the trail much more difficult. We also ran the risk of getting separated and losing each other. For this reason, we stayed close and headed in a general southerly direction.

Our jeans were also wet from the ascent to the rim. Parts of it required we get on our knees or roll around. It was beginning to get very hard to stay warm.

Things Got Real (Scary)

The wind picked up a little and blew thick patchy fog past us. After hiking for another couple of hours, we had an interesting discussion about our situation. It was decided that we were in enough trouble to try and call or text out for help. The snow storm was far worse than we expected and we didn’t know if it would stick around or be followed by another storm.

The battery on my phone had died the night before and was $400 worth of extra weight at this point and wouldn’t be helpful for contacting anybody.

We tried using Matt’s phone and attempted to make calls and send messages.¬†It was frustrating because the phone showed that we had reception, but none of our calls or even get text messages were getting out. All we could do was hope that our wives followed the plan to call the NPS at 4pm. We didn’t want to wait on this mountain for a few more days for people to come looking for us.

Back home, our wives were getting nervous already as it approached three. They had contacted each other and were trying to decide whether to call NPS at 3pm instead of 4pm. I didn’t know it at the time, but NPS closes at 4pm, and wouldn’t open again until Tuesday morning.

They decided to call at 3pm and Parks Service told them to hang in there and wait to hear back from Matt and I. At 3:58pm, they called again and Matt’s wife insisted this time that we were in danger and was able to convince them to start organizing a search party. Had she not done this, its possible that we could have been stuck for an additional day or two before people started trying to look for us. We had the food and could melt snow for water, but it was so bitter cold at night, that I’m not sure what kind of shape we would have been in when they would eventually find us.

We continued on a little ways from there, at this point trying to find a place to stop for the day. We found a very inviting tree that appeared to be an adequate shelter from the wind and put our packs down there. I continued further down the trail a ways to see if I could find anything better.

A short distance down the trail, it began to slope downward and fall into a break in the ridge line. Could this be the trail that takes us down into the canyon? If so, we could drive out of there that night and enjoy some pizza in Torrey.

I returned to Matt and told him what I had seen. We both went down further and investigated. It was impossible to see where the trail lead as there were rock formations in the way. The trail definitely wound around the formation and appeared to continue downward. I decided to walk around the formation to try and get a better view. This was tricky as the ground sloped quickly downward and was slippery from the wet, new snow. I didn’t venture far, but decided it was worth attempting.

My Decision Making Paradigm – Shouting at Televisions

The original plan was to leave our packs on the ridge, slide down the slope, escape into the canyon and drive home. Leaving our packs would help us balance on the tricky parts and make better time. I remembered though watching the various survival shows on TV and shouting at the dumb people who decide to leave their packs somewhere to make better time. This decision is usually the reason they make it onto the show, and live up to names like “I Shouldn’t Be Alive”, or “1000 Ways to Die”.

We both decided it would be wise to bring our packs with us. We began walking around the rock formation, and carefully slid down the slope. Upon reaching the bottom, we found very steep grades (or cliffs) on both sides of the ridge. To our dismay, we also found a cairn marking the trail up a steep slope that continued along the ridge. This was worrisome as we didn’t think we could go back the way we came because it was too slick. The way going forward was dangerous for the same reason. We decided that it would be best to move forward up the slick slope. If I was watching this as an episode of “I Shouldn’t Be Alive”, this is a point where I’d again start yelling at my TV.

The slope was very slippery and was fairly steep. The grade increased as it fell down into the water pocket fold below us, ensuring that if either of us slipped, we’d slide assuredly and swiftly to our doom. There we very few plants to hold onto as well. The snow also made it difficult to determine the best route.

We scrambled for what seemed like a couple of hours, Moving on all fours through the snow. More fog rolled in at this point and made it hard to see the top of the ridge we were now trying to get to. Our jeans soaked up the wet snow and pressed chillingly against us. My coat was also absorbing water and Matt’s shoes were long since soaked through. We were scared and freezing. With each movement I made forward and up, I wasn’t sure if I would slide off the mountain or not.

I felt my muscles begin to give out as they fatigued. Matt was also struggling but had managed to find a slightly safer route, only to have it cancelled out by the lack of traction on his tennis shoes. Near the top, fueled by fear and adrenaline, we scrambled on all fours with everything we had left to climb the final few yards to the top. It felt as though we were climbing faster than we were sliding and that if we stopped, that would be it.

Upon reaching the top, we sat on the ground and rested. Both of us were stunned at what we had just experienced. Somebody observed through heavy breathing, “We almost just died!”.

Matt and I would talk about this experience many times later as well the nightmares that sometimes still haunt us.

When I caught my breath and felt I could walk again, I decided to continue on for a few hundred yards to find a place to set up camp. I was exhausted, and tired. The subtle effects of hypothermia were taking hold. We needed to stop, regroup and think.

Where to Camp

We eventually found a place in the terrain surrounded by trees, bushes, and a hill. It was snowing still, and the fog was thinning out. Cold, and partly numb, we fumbled to set up the tent. It was hard for me to remember which way the poles went. My brain wasn’t functioning properly. The snow was still falling and wind blowing forcefully.

We finally got it set up and put the rain fly on the right direction. We unpacked our pads and sleeping bags to let them loft while we went to work on a fire.

Matt teased me a little about this, as it is actually illegal to create fires in the national park and I had stubbornly refused to do so the night before. At this point though, we were soaked through with freezing water and if we were to survive the night, we would have to somehow dry out our clothes and gear. When faced with survival, I decided I would face the consequences for building the fire.

We gathered up prairie grass and small twigs as kindling and used a stove to dry the wood and get a small fire going. We gathered up dead scrub oak from around our surrounding area and got to work setting up the kindling.

I reflect on this moment sometimes because it seems when I’m car camping and my survival doesn’t depend on it, I usually need several tries to get a fire going. It amazes me that in a place where my hands, arms, and legs were long past numb, and the wood was wet, that we managed to get the fire lit the very first time.

In no time, we had a modest, but warm fire. At this point the weather began to clear quickly and we were able to see blue sky again. The combination of warm sun, a warm fire, and food cooking raised our spirits greatly.

It is important in this type of situation to keep your spirits up. I’ve heard this from other people in similar situations but didn’t understand how important it really is. Keeping your spirits up and maintaining a will to continue and survive is as important as finding shelter and food. It will provide the motivation and energy to do the hard things that you need to do in order to get home safely.

The View From Up There

I decided to follow the trail further a bit and see what we had ahead of us. It lead up a slope steeply above our campsite. I slowly followed it in the snow until I had reached the crest. From there, I could look west into the canyon, and look east into the Water Pocket Fold. This was a gorgeous view. The storm had cleaned the air and the remaining clouds cast an incredible light on the distant mountains, canyons, and rock formations that stretched for miles in front of me. It’s a picture I regret not being able to take. This view took my breath away and I decided, that in absence of a camera, I would take a picture with my mind. I spent several minutes standing in the snow, slowly gazing up and down what lay before me. I tried to burn this view into my memory. At this point in the trip, it meant so much to me to be able to see this.

The wind began to blow a little and I began to get cold again. I decided to head back to camp and tell Matt about what I’d seen and about the landmarks I was able to make out from the hill.

More Weather

We ate our food and began drying out our clothes. We found that cotton jeans and tennis shoes don’t dry out quickly. In fact, Matt placed his shoes too close to the fire and they began to melt a little.

We also found that our clear weather was a fleeting blessing. The strong fast wind that blew the clouds away just ninety minutes earlier blew in a new thunderstorm from the north west. We packed up our gear and took shelter in the tent just as the hail started to fall. At first, it looked like tiny snow balls but grew to be the size of peas.

This weather also quickly passed, but put our fire out. Matt got out of the tent and went to get the fire going again. I was exhausted and still very cold and decided to stay in my sleeping bag until I warmed up.

I slept briefly but awoke uncomfortably soon after. I realized I wasn’t getting any warmer. This was a surprise to me as I was in a Marmot Helium sleeping bag. I had gone on a backpacking trip the year before to the Kings Peak in the Uintah mountains. While sleeping in this same sleeping bag, I had awoken several times in the night because I was too warm and sweating, despite sub freezing temperatures outside. I wasn’t generating enough heat.

I decided to sit with Matt by the fire and warm up there.

As darkness began to fall we finished our dinners. I realized I had run out of water and began melting snow in my cooking pot and refilling my reserves.

Matt and I talked about life, work, kids, and houses, and many other things. For a few hours, it almost felt like we weren’t trapped on a mountain and that we would just wake up and drive home the next day. We couldn’t escape reality forever though, and eventually started talking about plans for the next day.

We looked at our various maps that we had brought. We tried identifying land features that we had passed and compared them with the map. It’s amazing how accurate you think a hand drawn map can be when you really need it. We figured we were a few miles off from where the trail starts winding back toward the canyon floor. The next day, we decided we would continue and try and make it back to the truck.

We wondered if our families had followed the instructions we had left. We also wondered if the Park Service would listen to them or just figure that we thought the place was extra pretty and that we’d stay an extra day.

As the night wore on, the wind began to pick up and the temperatures began to plummet. We decided that we’d better go to bed so that we’d have energy the next day to attempt our escape.

Of Real Men, Cold Weather, and Snuggling

Sleep came more easily for me this time. I didn’t really dream much. Within a couple of hours though, I awoke to a strange sound. The wind had really picked up and was pushing sub freezing air right through our tent. It was whipping through the trees loudly and making them creek as they swayed. Matt was on the side of the tent taking the brunt of the wind and was shivering violently. His 20 degree down sleeping bag had met its match and had been crushed. Matt was wearing everything he had and was still shivering. I donated my coat to his cause, but it didn’t seem to help.

I tried to sleep but the continuous stream of cold air through our tent took its toll and I began to get cold. The moon came out like a sick joke and fooled us into thinking the night was about to end. It’s freezing blue light never got any brighter and eventually left us again in darkness.

The night seemed to linger, unwelcome, for hours. I turned every few minutes, trying to find a position that my back would agree with. Eventually the dim light of a sunrise began to creep over our tent. Matt awoke very early and started to get our fire going again. I tried unsuccessfully to stay warm in the tent. As morning developed, I gave up and emerged.

Our gloves and other clothes were still frozen, although dryer than the night before. Matt’s shoes were also frozen on the insides. Upon checking our water, we found that it had frozen overnight despite being in our tent. This was frustrating.

In an effort to avoid melting our water pouches on the fire, we found a nearby scrub oak tree and hung the pouches in the sunlight. We used the warmth from our hands to warm the joints and valves in the tubing so that we could get water through. We would go back and periodically check to see if they had melted enough to get a drink.

Getting Gone

After eating a terrible breakfast, we decided we should get going earlier than later and packed up the sleeping bags and tent. We were very exhausted from the previous day and the cold had robbed us of both sleep and energy. Both Matt and I had a hard time stuffing sleeping bags, rolling up the tent, and packing everything in our bags. The thought of getting out of here tonight drove us to do what we needed to do.

I remember taking the first few steps after we had everything packed, and feeling my legs quiver a little in response to the effort I now required. We climbed the first hill, and went over it.

We continued on the trail for a few miles. We walked along trails that were just several inches wide and laid out along a steep grade. We walked up steep slick rock. All of this made me very nervous, especially considering the previous day’s experience. I would stop and Matt would tell me it would be alright and help me through it. He would walk along in front and show me where to go. I got it in my head that if I just follow him, I’d make it.

To this day, thinking about the heights and grades makes me shutter.

After what seemed like three or four miles, we came to a place where the trail wandered across the face of another steep grade. The trail was narrow, and covered in snow. The shadow of the ridge kept the sun from melting it. Both of us were hesitant to continue at this point. We took our packs off and took a break. The scariest part of this was that we didn’t know where the trail would go after it got to the ridge. Would it simply follow the ridge line for a few more miles?

I decided to go out as far as I could and take a look. I walked out as far as I dare and realized this trail would be unpassable. The cairns marking the trail stuck up out of the snow. I could see that they suggested a trail that went forward a little further, but then required us to go nearly straight up the face to the top of the ridge.

Matt, feeling nervous at this point, confirmed this by asking me to come back before I slip and fall off the mountain.

Now what should we do? On one side of the trail, we saw a sheer cliff, terminating at the base of the canyon. On the other side, we saw a steep grade that would certainly kill us if we managed to slip on it. We decided to stop and wait.

Message in a Bottle

The Impassible Hill

The Impassible Hill

Matt got out his phone and powered it up. Only 4% of his battery life remained and his phone was begging him to charge it. He decided to try and get a text message out. He had reception, but the text messages wouldn’t ever send. The tiny radio signal just wasn’t enough to find a friendly tower in the miles and miles of country that lay in front of us.

We then tried holding the phone over the cliff of the canyon with hopes that the wireless signal would bounce fortuitously and find a cell tower. With 2% battery life left, a message got through. It was the first message that we were able to send since we realized the danger we were in, the day before. The message was simple and short. I don’t remember exactly what it said, but in essence, it was something like, ‘Send help, on top of big cliff on south end of canyon. Need helicopter.’

We quickly received a response back asking for our GPS coordinates. Ironically, for the life of us, we could not get that stupid phone to give us those two numbers. Matt had the genius idea of taking a picture and trying to pull the GPS location from the picture info. This would have worked had we more battery life. The GPS simply didn’t have enough time to get a lock. With the last of the battery power, we sent a text message that essentially said the battery was nearly dead and that we wouldn’t be sending any more.

What we didn’t realize was that on the other side of the text messages, our families now had scenes from movies going through their heads about climbers that got stuck in slot canyons and cut their arms off to survive. This was not our intention but it certainly didn’t help their emotional situation.

Knowing though that the text message had made it out, and had been responded to lifted our spirits greatly. People now knew we were in trouble, and alive. We planned to spend the night and get rescued by morning, or in an ideal situation, get rescued that night.

How Do Mirrors Work, Anyway?

We began combing through our gear, trying to find something that would function as a mirror. After trying my glasses, both of our phones (all of which have non-reflective anti-glare coatings), the bottom of a Pringles can, the foil on a Pringles can, the best reflective surface we could find was the face of Matt’s compass. I hadn’t used a signaling mirror since Boy Scouts and decided to practice quickly signaling stuff. I realized that I wasn’t going to be signaling a lot with it – I couldn’t aim it right. Matt felt the same way when he tried.

We saw jets flying thousands of feet above us, totally unaware that we were there. Every time we’d hear a noise, we’d optimistically get up and look around. We took turns looking into the canyon at the trail we had walked on carelessly before the previous day. Were there new footprints down there? Had somebody come in after us? We couldn’t tell at that distance. A few hours passed like this.

Finally, I heard a rumble from far away to the south of us. I got up to look for the source but the snowy ridge line was in the way. I waited a little longer and realized it was a small aircraft. Matt heard it too and we both stood. The plane appeared dramatically and flew directly above us. We ran around waiving our arms trying to signal the pilot through the opaque floor of the cockpit. Written in the wings in big bold letters were the words ‘RANGER PATROL’. This was our search plane and they were looking for us. It flew north and eventually disappeared from view.

I remember watching survivor shows about some guy stuck somewhere and seeing rescue vehicles fly over without spotting him. In one particular one, I remember that it took the rescuers two weeks to find a guy after he saw the first search plane. I wondered if that’s how it would be for us.

After several minutes we heard the plane again. “Good.” I thought.¬†They’re searching the general area. If they keep going in circles they were bound to find us.

After a few passes like this, the plane eventually flew level with the ridge line. I took my red coat and ran north along the ridge in the direction the plane was flying, violently waiving my coat. At this point, the plane changed its behavior and began flying tighter loops high above us and at elevation. We weren’t sure if they had seen us still and we wanted to be sure. We continued jumping around trying to get attention. We ran out of energy finally and lay down on the ground and began to speculate about what was going on.

If they had seen us, wouldn’t they just report our location to a helicopter and go back? Or crud, how much will the helicopter cost? Where would it even come from? The nearest city with more than a thousand people was Moab. I don’t even know if they’ve even got a helicopter.

“I think I heard something…”

After waiting about 45 minutes, Matt heard a faint whistle off in the distance. He wasn’t sure if it was a whistle at first or just the wind. He got up and wondered in that direction and saw the silhouette of another person. He shouted to me and we got our stuff and hurried over.

Our rescuer was named Jessie and she worked for the National Parks Service. She seemed relieved to see us. As I approached, I stupidly asked “How’s it going?”, to which she replied, “I’ve been better.” This was followed by quickly with “What were you thinking hiking this trail in February?”

I really didn’t have a good response. I figured this is one of those times where you take your lumps, thank your rescuer over and over, and don’t say anything else.

She explained how our wives had called the Parks Service the night before at 4pm, (right on time), and reported us missing. She had been up the night before worrying about us sleeping in that crazy storm. When people get stuck in these canyons, they usually have some sort of injury that makes them immobile. A storm like the one we had last night usually finishes people off in that situation.

She explained that she was up at 5:45am that morning to drive out to the trail and track us down. She had just hiked 10 miles in hard terrain and cold weather to find us. All of this she did during President’s Day weekend.

She asked if we needed water or food, and I thankfully gulped down one of Gatorade drinks that she packed in, without taking a breath. Matt was also very thirsty and gulped through his quickly as well. The calories were very welcome.

She spoke with her supervisor on the radio and explained that she found us and that we weren’t injured. They then tried to figure out if they wanted to fly us out in a helicopter or not. Jessie thankfully said that she didn’t feel comfortable continuing on the trail we were on, or walking back.

I realized at that point, that she had to have gone over the same crazy snow covered¬†slick rock¬†that we had. Matt and I asked her about it and she said that she had radioed in a few times to see if they had found us yet because, despite the better gear and formidable experience, she didn’t feel comfortable going over some of the terrain. Her manager had told her not to do it if she felt like it would endager her life.

I imagine that this type of decision is something that rescuers have to grapple with frequently. Officially, your priorities are 1. Your safety, 2. Your team’s safety, 3. Rescuing people. However, the idea that somebody needs your help can sometimes color your judgement and may inspire¬†courage that you normally don’t have. I don’t know if this happened with Jessie or not, but I know she continued anyway, and I’m glad that she found us.

Considering the terrain and the late hour (it was well after 4pm at this point), it was eventually decided that they would bring in a helicopter. It would come from Page, AZ and would take about 30 minutes to get there.

We sat down with Jessie and talked about our experience. She looked at our jeans and tennis shoes and told us we were really unprepared for this type of hike. We talked about the type of gear we need to get for this sort of thing next time we attempt it. We talked about her job and experience as a ranger. She had just transfered back to this park after working in Montana for 6 years. She was happy to be back.


After some time, we eventually could hear the sound of a helicopter in the distance. Jessie was asked to help find a landing zone and we walked to a clearing and marked it with orange garbage bags.

The helicopter landed and the pilot jumped out and asked if everyone was alright. After a brief conversation, the helicopter ferried us back to our cars. He lifted about 15 feet straight up in the air, and then zoomed aggressively off the side of the cliff, dropping swiftly. I could tell this guy loved his job. The sudden lack of gravity together with my new found terror of heights caused my stomach to turn.

As we approached the cars, he flew past, then banked hard to turn around, and then softly landed the helicopter. It was at this moment that my dreams of ever becoming a pilot went away. And I was okay with that.

At that moment, being on the ground and seeing the truck, I knew we’d be alright. Matt and I got in the truck, (which started), and followed the rangers back to the station where we gave an account of what had happened.

While we were writing our stories, we heard about the emotional roller coaster our families had been on over the last 24 hours. Members of Matt’s family were volunteering to fly patrols, one had volunteered to fly into Utah and help look for us.¬†My dad, brother and his friend Danny had come down and were ready to head out the next day to start looking for us. Our wives had been worried sick and had been in constant communication with the Sheriff’s office about how the search was going.

After we finished, we went out with my family for pizza in Torrey. We told our story in great detail and talked about what it was like to be in that situation. We talked about what we would do differently next time so that we don’t get stuck or almost die. We talked with our wives on the phone and let them know we were okay. It was over. We were safe, and going to go home.

Me, Jessie and Matt at the Visitor’s Center

Click for the full gallery

Two Column Div Layout (with a left nav)

My first website was built in the 90s as a Starcraft fan site. Like most 15-year old’s websites, it didn’t go anywhere. I remember building the entire layout using HTML tables though.

The world has changed since then, and I still struggle to remember exactly what I need to do in order to build a basic, two-column layout. I gut tells me to go back to tables. The rest of the world says to use divs. So, here is how you do it with divs. This is very rough and probably doesn’t work in all browsers. I’m mainly putting this in here for my benefit.

The three main components you need here are:

  • A container div that holds the two columns
  • A left column
  • A right column

Here is some example code:

<div id="container">
  <div id="leftColumn">Here is some content</div>
  <div id="rightColumn">Here is more content</div>

The styles that make this work look like this:

html, body {
  height: 100%;
  margin: 0px;
  padding: 0px;

div#container {
  width: 100%;
  height: 100%;
  overflow-y: scroll;

div#leftColumn {
  float: left;
  width: 300px;
  background-color: #000000;
  height: 100%;
  overflow-y: scroll;

div#rightColumn {
  margin-left: 300px;
  background-color: #ff0000

The key things to know are:

  • float: left on the leftContainer makes that div hug the left side.
  • Setting the width of the leftContainer determines how wide your left column will be.
  • If you don’t set a margin-left inside of your rightColumn, the rightColumn div’s background will actually extend behind the leftColumn div.
  • overflow-y: scroll in the leftColumn div makes it so that the left column has a scroll bar. You must also have height set to 100% in that div for it to work.


Ubuntu 12.04 Mod Proxy Install and Configuration

A common task you need to perform when you first install JBoss, Tomcat, WebSphere, or some other Java Application Server is to create a reverse proxy. This channels incoming traffic from the usual HTTP port 80 to the usual JBoss port 8080 (or 9080 if you’re on WebSphere for example). This is how to do it.


1. You’ve got Ubuntu 12.04 up and running
2. You’ve already installed Apache
3. You have root access (preferably through sudo)


1. Install required packages

sudo apt-get install libapache2-mod-proxy-html
sudo apt-get install libxml2-dev

2. Create symbolic links to enable mod proxy in Apache

cd /etc/apache/mods-enabled
sudo ln -s ../mods-available/proxy_http.load .
sudo ln -s ../mods-available/proxy.load .
sudo ln -s ../mods-available/headers.load .

3. Load libxml2.so by opening /etc/apache2/mods-enabled/proxy_html.conf and add the LoadFile line as shown below

# Configuration example.
# First, to load the module with its prerequisites
# For Unix-family systems:
# LoadFile /usr/lib/libxml2.so
# LoadModule proxy_html_module modules/mod_proxy_html.so
LoadFile /usr/lib/x86_64-linux-gnu/libxml2.so

4. Load /etc/apache2/sites-enabled/000-default to configure the proxy. Add the following:

# This excludes this directory from the proxy. Content in this directory will be loaded through Apache instead of redirecting the request to port 8080.
ProxyPassMatch ^/directory_with_files_served_from_apache(.*)$ !

# This redirects everything except the above exceptions to JBoss.
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/

Make sure this code is outside of tags. Generally, these lines should be part of the VirtualHost tag and not part of any child tags.

5. Restart Apache

sudo /etc/init.d/apache2 restart



Ham Radio Update

Baofeng UV-5R Handheld Radio

My new radio

After a certain harrowing experience (which I’ll discuss in a future post), and the urging of some fellow co-workers, I studied and took the amateur radio exam at BYU.

I passed with a 34/35 and got my technician level license. I made my first contact the next day. It’s been three weeks since and I’ve had a blast. I bought a Baofeng UV-5R dual band radio from Amazon and it’s made for a capable first radio.

I’ve been going all over trying to hit repeaters and getting on nets. My goal is to have the capability to communicate with somebody regardless of where I am. The radio lets me do this, even in places where I don’t get cell phone reception.

I’ve also found that its fun to get on and just talk to people from all over. I’ve joined the UARC and have been lurking on the 147.76 repeater out on west mountain.

I’m hoping to test and get my general license next week. Then I can start looking at a good base and talk to people all over the country.

UPDATE: I was granted my General license on 12/13/12. My call sign has stayed the same.  Now I just need an HF radio.

A 2012 iPad Owner Buys an Android Tablet…

The day has finally come. I think I’ve messed with my Galaxy tab to talk about what I like about each, and what I don’t like.

This is what I use my tablets for – just so that you know if anything I say below is a waste of time for you or if its actually useful.

  • Browsing the web
  • Sifting through my email
  • Taking notes
  • Another screen – with a web page or something for reference
  • Social Networking
  • Listening to Music

iPad Is Missing Apps

The iPad is missing a bunch of apps that I use on a regular basis. A lot of these apps are unsurprisingly from rival Google. The apps that Google does provide tend to suck. If I could glare at apps, I’d be glaring at the lame excuse for an app that Google Voice and Plus are. This isn’t Apple’s fault though, but the Android tablets have decent versions of these apps. Just sayin’.

The Galaxy Tab Keyboard(s) Are Lame

Every tablet keyboard I’ve tried on Android has been a painful experience. They all use some kind of gimmick, but none of them actually work.

Apple’s keyboard, when I first started using it came off as annoying, because I was stuck with it. I wanted the option to choose a lame keyboard if I wanted. I soon found that I could type 60-70 wpm on it though!

I haven’t been able to get anywhere near that with Android keyboards because none of them shape the on screen keyboard to match a real keyboard. Probably because they’re trying to build one app that fits all the various Android tablet form factors.

The iPad Doesn’t Look As Cool As the Androids

I really like having a launcher, widgets, and animated backgrounds. The purpose of a widget is to allow you to do something simple without actually opening an app. Something quick.

The animated backgrounds look sweet. This one is my favorite.

There are lots of different app launchers that all offer various features like customizing the background color, hiding built in, uninstallable apps that I never use, etc. When Tron had come out, I had a Tron theme for ADWLauncher, with Tron icons and wallpaper.

The iPad Is Far Better With Touch

Man, where to start. Gestures.

The iPad uses gestures like crazy. To switch apps, I take four fingers and swipe the screen left or right. None of this “hold down the home button for a second, then choose my app” waiting crap. If I want to leave an app, I take my four fingers and collapse them. If I want a mini launcher to show up at the bottom with music controls and apps, I use four fingers to “pull” it up.

The screen is much better with my Wacom stylus as well. Using the Autodesk Sketchbook app, I’ve found the iPad is far better at dealing with input from the stylus. My lines are smooth and more accurate. There is still a long ways to go in this department for Apple, but I think they do it best.


Apple wins. The keyboard by itself is probably what pushed things over the edge for me. The high-res screen is awesome, but its not as big of a deal for me as the keyboard. I’ve managed to work around the lack of apps by using apps on my phone or finding 3rd party apps that don’t make me want to scream (but cost money).

Am I way off? Start a flame war in the comments. I’m ready for you. With my iPad. And 60-70 wpm…

Here is my advice to Google for a tablet that I would buy:

  • Make it so I can type on your keyboard. Seriously. This is a big deal. The “buy a bluetooth keyboard” response is lame. I might as well haul a laptop around at that point that does more.
  • Take more advantage of gestures. Make up your own. If patents are in the way, find a new way to control things or fight the patents in court. You’re not using touch very well to control a touch device.
  • Improve the screen. Higher resolutions, better touch sensitivity. Samsung is kind of doing this with the Note. Keep going in this direction. If it was just this and the keyboard, I’d use the Galaxy tab for everything. (I’d miss gestures still, but I’d live).

My advice to Apple:

  • Make it possible for developers to customize their tablets. If I’m in your Developer Program, I’m obviously more technical than Grandma and could really take advantage of more options.
  • DO THIS: Swipe Selection
  • Loosen the controls on your App Store. I could write an entire post on this. To sum up, Safari is not a very good browser. Its barely above Internet Explorer in my book. I’d rather use Firefox or Chrome, (or possibly Opera even). Websites render correctly in those. Especially the annoying websites at work.
  • Put a GPS in the WiFi version. Seriously. I’m taking my Galaxy Tab backpacking because of this. Its really annoying.