Nesting try-catch Blocks in PHP

I was recently presented with an interesting problem on a client's project. We have a Web application which, via an API endpoint, triggers work for a background process, and the background worker then updates the status record when the work is complete with the final URL where the Web application can retrieve the result (in this case, a dynamically generated PDF form). I've had a few cases where the worker process struck an error, but caused a conditon that was hard to diagnose.

Read more

Epic Road Trip 2017 (Day 14)

Epic Road Trip 2017 (Day 14)

Just like that, it was back to the desert heat of the Valley of the Sun. I spent the ride, which was anything but technical, pondering the trip and what I’d seen. There were so many great experiences this trip that it was hard to pinpoint a favorite. The bear on Day 5 and the bison on Day 6, as well as the entire trip through Glacier National Park are certainly top of the list. I'm already considering a return to some of these parks to spend more time soaking up the amazing scenery.

Read more

Epic Road Trip 2017 (Day 12)

Epic Road Trip 2017 (Day 12)

In Rock Springs, I had planned to stay in a hotel and, given the weather of the previous day, I was glad I did. After meeting some other fellow bikers, I decided to stop a little early today in Grand Junction. The days started out with another section of Highway 191 known as the Flaming Gorge Scenic Byway.

Read more

Epic Road Trip 2017 (Day 11)

Epic Road Trip 2017 (Day 11)

After waking up to the sound of the river and preparing a quick breakfast and some tea, I broke camp and continued down Highway 93 and out of the Salmon River Valley. It breaks into a wide valley after the town of Challis, which was my first fuel stop for the day. Here, I began riding the section of Highway 93 dubbed the Peaks to Craters Scenic Byway and the very broad valley heads toward Craters of the Moon National Monument.

Read more

Epic Road Trip 2017 (Day 9)

Epic Road Trip 2017 (Day 9)

Today was my full day in Glacier National Park and, with my wife who flew in for the weekend with me, we drove the Going-to-the-Sun Road. Yes, drove, since my wife had joined me and we took the car rather than the bike. For the day, at least, I was a fellow explorer. We met a number of bikers along the way that were enjoying spectacular views of broad, U-shaped glacial valleys.

Read more

Epic Road Trip 2017 (Day 8)

Epic Road Trip 2017 (Day 8)

I set out from Choteau, but misinterpreted some detour instructions I had received around the construction on Highway 89. I didn’t want to ride for miles on loose gravel and dirt, so I stuck to the paved sections of highway. This mistake educated me on just how sparsely populated the state of Montana really is.

Read more

Epic Road Trip 2017 (Day 5)

Epic Road Trip 2017 (Day 5)

Today started early, so I could walk down to the lake and catch the sunrise. It turns out, first light, and sunrise aren’t nearly so close together in the Tetons. I forgot how long the sun can be blocked from shining on a mountain valley in the Rockies. Nevertheless, I sat on the shore of Jackson Lake basking in the colossal shadow of the Tetons. When the light finally crested the mountains on the eastern side of the valley, all the cracks and crevices really started to show.

Read more

Epic Road Trip 2017 (Day 4)

Epic Road Trip 2017 (Day 4)

Today, I made it to the first of two places that were a big reason behind this trip. I hadn't been to the Grand Teton National Park in years and I've been looking forward to spending a couple nights here so I could enjoy a full day of hiking. Who knew I'd actually need to have my bear spray in hand at one point.

Read more

Epic Road Trip 2017 (Day 1)

Epic Road Trip 2017 (Day 1)

Well, I survived the first three days of Epic Road Trip 2017. My phone, however, did not. More on that later. So far, I’ve visited the North Rim and Bryce Canyon National Park for the first time and enjoyed an awesome stretch of highway called the “All-American Road” - that’s Highway 12 in Utah that winds through the Grand Staircase-Escalante National Monument (another first).

Read more

Epic Road Trip 2017 (Day 0)

Epic Road Trip 2017 (Day 0)

I thought I’d give a little more detail on this trip ahead of time - before I start the actual trip and posting all the awesome pictures from the adventure. At the time of writing, it’s T-minus 6 days until I leave. At this point, I don’t really remember where I originally saw the idea, but as soon as I did I was on Google Maps figuring out the route. Highway 89. Arizona to Montana. FIVE National Parks.

Read more

Devil's Highway Shakedown

Devil's Highway Shakedown

At the end of June, I took my shakedown ride to make sure everything was in place. Back in April, I had the first real test ride with this configuration and found a few things lacking. This time, I was prepared. I set out from Phoenix toward Safford so I could tackle the Devil's Highway a second time. The first time, two years ago for the shakedown before Epic Road Trip 2015 to Seattle and the Pacific Coast Highway, was awesome, but wet and I was ill-prepared that time. This year, the rain held off until later and was much lighter.

Read more

Epic Road Trip 2017 (Prelude)

Epic Road Trip 2017 (Prelude)

It's that time of year again, when the temperatures in Phoenix soar and the highways out of the Valley and leading to higher elevations (and cooler temperatures) slow to a crawl (especially I-17, but that's less of an issue for me since I don't touch the Interstate system with my moto tires if I can help it). In 2016, I made a shorter trip with friends that took us along the South Rim of the Grand Canyon and through Monument Valley before we arrived in the mountains just north of Durango where we could enjoy the windy goodness that is the Million Dollar Highway. That experience taught me two things. First, I REALLY needed to get a new seat on my Fury. Second, hail is hell on a motorcycle.

Read more

Have Fury, Want Saddlebags?

Have Fury, Want Saddlebags?

I did it! After a lot of trial and error, I found a set of luggage that works with my 2013 Honda Fury. The sissy bar and bags held up for the Seattle trip, but I didn't like them for long-term. After a lot of hunting, I discovered Saddlemen. I've got a great Saddlemen Sport Tunnel Bag that fits perfectly on the Fury's pillion seat. Add to that a set of standard Honda drop bars mounted using a modified mounting brackets for the EZ Brackets system, I was able to get an awesome set of throwover saddlebags. I'm all set for my next road trip - this time to Durango, CO!

How to Road Trip with a Honda Fury (Part 2)

How to Road Trip with a Honda Fury (Part 2)

I thought I would update my set up for the Honda Fury and I love it when my hobbies intersect. After getting some great information from a guy I met while I was checking out Avenue of the Giants in Northern California. He rode a Honda Fury, as well and was outfitted with saddle bags and a tall windshield. After I returned, I started doing some more digging.

Read more

Epic Road Trip (Day 16)

Epic Road Trip (Day 16)

Today was one of my longer days of riding. I started the morning in Eureka, California and wound down the Pacific Coast Highway (with a slight detour onto the Avenue of Giants) 246 miles to Novato, California - a north Bay area town slightly further than my original planned stop in Petaluma.

Read more

Epic Road Trip (Day 14)

Epic Road Trip (Day 14)

Luck was with me and the wildfires in northern California didn't force me to reroute. Today, I traveled 231 miles from Astoria to Coos Bay, Oregon along Highway 101. From here, I start the long ride down the coast from Astoria to Santa Barbara, picking up Highway 1 after I cross the Golden Gate Bridge in San Francisco. But we'll talk more about that later.

Read more

Epic Road Trip (Day 4)

Epic Road Trip (Day 4)

Day four took me from Lake Tahoe, CA to Klamath Falls Oregon, a total of almost 300 miles. It was a whole lot easier than the previous three days, but the scenery was no less spectacular. It was interesting to watch the mountains change from the solid, steep granite mountains of the Sierra Nevadas to the black, cratered, volcanic remnants of the lower Cascades.

Read more

Epic Road Trip (Day 3)

Epic Road Trip (Day 3)

Day three had me completing the first crossing of the Sierra Nevadas, then looping back across the same mountain range for a second time through the Sonora Pass. Tioga was relatively consistent in how steep and windy it was (which was both), but Sonora was a much more gentle climb which finished off with a very steep and challenging ascent and descent. In retrospect, I probably should have found another way around rather than crossing these two high, challenging passes.

Read more

Epic Road Trip (Day 1-2)

Epic Road Trip (Day 1-2)

After getting my first motorcycle, I knew it would only be a matter of time before I decided to road trip more. I started with some day rides on the weekends and it's culminated in what I have come to refer to as “Epic Road Trip 2015”. Probably not as epic as it could be, but its 99% back-roads, 1% freeway/Interstate travel, and absolutely and entirely fun.

Read more

How to Road Trip with a Honda Fury

How to Road Trip with a Honda Fury

I had my first test ride at the end of June when I tackled the Devil's Highway in Arizona's White Mountains. Two days, 550 miles, and elevation ranging from 700 feet to nearly 11,000 feet. The fact that it rained on the Devil's Highway aside, it was a great ride and good first test. To start, here's what I ended up with:

Read more

Continuous Deployment with Ansible & Codeship

If you are a developer and you like to automate the boring stuff as much as possible, these are two tools I highly recommend. I recently stumbled across a very strange problem that took some creative Googling to resolve. The problem occurs when I tried running my Ansible playbook (using Ansible 1.7.1) from the Codeship custom script to deploy my application.

Read more