Oct 14, 2015


I don't tend to bring you breaking news, dear gregable readers, but I hope to bring you perspective. Last week, AMP html was introduced to the public. Most of the news coverage mentioned that it was designed for improving web page speed (especially mobile), provided a subset of html, and called attention to comparisons between Apple News or Facebook Instant Articles. I spent some time working on AMP html, working on a validator for the AMP html spec. I have some personal perspective on the initiative and it's promise.

One of the important features of an AMP html page is the requirement to not allow Turing complete languages (JavaScript in our case). The problem, as I see it, with JavaScript or similar runtimes within HTML, is that they cannot be statically analyzed. In many cases, this makes safe general optimization severely limited.

As a simple example, HTML is insensitive to repeat whitespace. Two consecutive whitespace characters or one are rendered the same in HTML. A general optimization strategy would then be to strip repeated whitespace before delivering html content over the network, since this would strictly save bytes and reduce load time. JavaScript makes this optimization unsafe. Any general optimizer cannot assume that the JavaScript code is also insensitive to repeat whitespace in the HTML document. Perhaps the JavaScript encodes character offsets into the document or takes the hash of the contents of an element. Stripping whitespace, while unlikely, has a non-zero chance of breaking this execution in some way. With JavaScript dispatched with, one can safely optimize away repeat whitespace before sending a document over the network. This is just one simple example, far more optimization opportunities are available with AMP.

AMP continues along this path further. HTML allows for document re-layout based on data that comes from a remote resource. For example, with a basic tag such as <img src="foo.png" />, there is insufficient information to determine the dimensions of the image element until the foo.png resource has been loaded. The browser is forced to render the page with a random guess as to the image dimensions and then re-render again once the dimensions are known. This causes additional CPU to re-perform rendering each time a resource is loaded as well as moving elements around that the user may be interacting with, an annoying experience. AMP disallows html constructions with this re-flow effect, replacing them with web component versions such as amp-img which require dimensions in the original document. On mobile devices with limited CPU and slower network connections causing resources to arrive over a longer period of time, the value provided by these constraints become more pronounced.

An astute scholar of HTML might notice that the complete removal of a Turing complete language is unnecessary to achieve these goals. If appropriately constrained, a Turing complete language (JavaScript or otherwise) can still play a role without constraining general optimization. For example, JavaScript execution that occurs only after document load, which cannot access the original resources but only the final rendered document, and has a lower priority than interactive execution, should not have any problems. HTML doesn't provide this mechanism today though, and AMP has no way of augmenting existing browsers to allow it. Still, this allows room for future possibilities.

AMP has promise, certainly as a way of delivering static content, maybe even more. 

Aug 11, 2015

Elkhorn Slough Kayak Trip

A few weekends ago, I went down to kayak in Elkhorn Slough. I've probably kayaked this area about half a dozen times in total since moving to the bay area, but very few people seem to know about this gem.

The most unique thing about the Elkhorn Slough is probably it's concentration of endangered sea otters. Roughly 5% of California's population of sea otters live in this relatively small slough. Nearby Monterey Bay Aquarium, which does lots of work to protect these sea otters, will release rescued otters into the slough and monitor the population here closely. Simply visiting the harbor area with some binoculars will virtually guarantee sightings of several otters any time of the year.

In addition to otters, the slough is home to a number of other wildlife species, some permanent and others migratory. I generally see my fill of seals and sea lions, as well as several large birds such as pelicans. Occasionally you'll see some blooms of large jellyfish in the water.

The slough is easy to reach. About an hour's drive from San Jose, it's located halfway between Santa Cruz and Monterey along California's coastline adjacent to a little town named Moss Landing. If you've ever driven past the area, it's distinctive for two massive cooling towers from a power plant rising out the flat coastal landscape. On a clear day, these towers can be seen from either Monterey or Santa Cruz.

Visiting is easy and you can see a good deal by foot, but I'd recommend exploring in a kayak. There are two kayaking outfitters in the moss landing harbor, and I've gone out with both depending on the day:

Kayak Connection: $35/single, $55/double kayak. Has a small parking lot for customers use. Has dock access for the kayaks, which makes getting in and out a little more finicky, but also doesn't require wading into the water from the shore.
Monterey Bay Kayaks: $30/single, $60/double kayak. Must pay for parking in the moss landing harbor. You launch your own kayak directly from the shore.

I've never bothered with a tour or anything, just a kayak rental for a few hours. The slough is long and narrow making it both impossible to get lost in and also impossible to miss anything. The protected waters are very calm, so the brief kayak training offered as part of your rental is more than sufficient for a complete beginner. They will also outfit you with life vest, spray skirts and jackets, etc. Wear comfortable clothes that can get a little wet, but no special clothing is needed.

I've also never bothered with reservations except for a large group. Only once have I shown up and one of the two outfitters was out of kayaks for the day, but the other still had plenty.

The outfitters will walk you through all of the logistics when you arrive: where to paddle, when to return, how far to go, best places to look for wildlife. However, if you want a preview, here's a map of the slough:

The kayak outfitters are located on the northeast shore of the harbor which is on the west side of this map, near hwy 1. To make navigation easy, just plug one of the two outfitter's addresses into a GPS. The north and south parts of the harbor only connect via Hwy 1 which is a pain to enter, so don't get off onto the south harbor at Moss Landing road, just turn directly into the north harbor area, where you'll see signs for Kayak Connection, the Yacht Club, and some shop selling pots. If you want a place to eat however, the south harbor has several restaurants.

The slough itself can be kayaked about 6 miles each way if you have the time and inclination, though you must return the same route. Rough mile markers are pretty clear (a bouy around mile 1, a dairy around mile 2, etc) and will be pointed out by your outfitter. For a more relaxed adventure though, most of the wildlife hangs out pretty close to the ocean, so you need not go more than a mile to see what you came for.

If you have the luxury of selecting your date and time, you may want to select a time when the tide is going out. This way you'll end up working a bit harder as you enter the slough, but can float on out when you tire and want to return. Also, sometimes the afternoon will present light winds working against you when returning, so having the tide working for you will help. If you give one of the outfitters a call, they can tell you about the tides and winds for the day you'd like to go out and give you relevant advice.

Jul 28, 2015

May 27, 2015

Green River Canoeing

Last week I embarked on a canoe and began a 52 mi trip down the Green River for 5 days. Each night, we'd make port off to the side of the river wherever we found a good harbor, set up camp, and then repeat the next day.

This was my first time on a boat trip longer than a day. While I had the backpacking dialed in already, the seafaring I wasn't as sure about.

The trip started at the boat ramp in Mineral Bottom on the Green River in Canyonlands National Park where our group of 5 put in two canoes filled with pack supplies and one kayak. We floated and paddled all the way down past the Confluence with the Colorado River where we were picked up by a jet boat run by Tex's Riverways.

Day 1
Logistics for the trip were different than your normal backpacking trips. This stretch of the river is very calm, so canoes can be loaded up with lots of beergear and floated down river. Each of our two canoes could supposedly carry 1,400 lbs, so we were able to bring two coolers, large stove, cast-iron dutch oven, tables and chairs, portable toilet, ~30 gallons of water, etc. Tex's rented us the boats and much of the gear, as well as arranged transport to/from the river. Then they gave us a few pointers and told us they'd (hopefully) see us again in 5 days.

A NPS ranger at the boat ramp also ran through a few rules and regulations:
  • Driftwood fires allowed, but only in metal firepans. A firepan was required whether or not you planned on having a fire.
  • All human waste must be carried out, though peeing into the river is also allowed. Yes, if you live in the southwest, I urinated into your water supply.
  • Only about 10% of the archaeological sites in the park are marked on maps, and they'd like to keep it that way, so disable geotagging of your photos.
  • Must carry an extra paddle, extra PFD, first aid kit, vessel repair supplies (apparently a roll of duct tape was sufficient), and bailing device (cut in half detergent bottle with handle worked for us).
And off we went, fresh and clean at Mineral Bottom.
We had maps of the whole river with us. Devon from Tex's gave us some great pointers about where to find campsites and a few points of interest along the river. I was able to keep up with the turns and canyons in the river and knew exactly where I was. However, as we approached areas where we wanted to pull out of the river I was unable to find any port to exit the river. The river was running high and the riverbanks were right up against what seemed like an impenetrable wall of Tamarisk.

Tamarisks denying all access to the river shore
We passed several areas where I knew there was supposed to be a campsite and didn't see any spot to pull out of the river. Eventually Jim caught up to me (I was in the lead boat) and explained that the access points were very narrow breaks in the trees that you could hardly see until you were right on top of them. I had already passed several and had traveled much farther downstream than we planned for this first day.

Eventually we found a tiny rock ledge where we were able to pull up all 3 boats and we settled in for the first night with some delicious sloppy joes and smores. Our spot was across the river from the area known as Potato Bottom. There were no clouds in the sky by the time we were sleepy, and not a single bug flying around, so we didn't bother pitching tents. I just watched shooting stars until falling asleep.
Rock ledge dock right below camp.
First night campsite.
Day 2

When we had first checked in at Tex's before the trip, they asked us if we could do them a big favor. Apparently they put a group on the river the day before our departure but they had forgotten to give them their cozy canoe chairs. We were entrusted with finding this group on the river and delivering canoe chairs. We were told where to expect them to be camping, but when we arrived at that point on Day 1, they were no where to be found. In fact, we hadn't seen anyone else on the river the entire day. Today was a bit less secluded.

Along the way, we met several boaters who we inquired as to their canoe chair situation. None of them were the group we were searching for. Some folks camping on the shore told us that they thought they saw a group matching our description that had passed along that point hours before us.

We also passed up the 'party boat' who were planning on continuing all the way down to lake Powell. Despite flying a pirate flag on my canoe, we were unable to convince these guys that they had too much beer and should jettison some.

For lunch we pulled into Anderson Bottom, an interesting feature geologically. It's a canyon that the green river used to flow through until it eventually eroded the wall in between it's sections and became shorter. Up to the north was a narrow slot canyon which we headed out to. Unfortunately it was flooded, preventing us from exploring into the canyon.

Anderson Bottom which the Green River long ago flowed through.
Along the hike, we saw a few other hikers also exploring the same area. We got their attention and were surprised to learn that they were the group missing canoe chairs. They had camped at a different campsite along the same bottom from the one we pulled into and were out hiking as well. Everyone was surprised how lucky we got to find them during this one random hike we made for lunch. They apparently were veterans, having done this trip several times. As we were to hear from many others we met along the route, they took a longer trip: 11 days. They gave us some tips on where to camp for the night, an easy-access canyon named Holeman a few miles further down the river.

Shallow water in Holeman Canyon made for easy loading/unloading of the canoes for the night.
For dinner, we made a charcoal fire and grilled up some steaks! That night was by far the warmest on the entire trip. 80F or so, and a tiny bit of rain forced us all into our tents. Worse were the high wind gusts that would blow the fine sand up underneath the tent fly and through the tent mesh. I decided to bury myself in my roasting mummy bag to hide from the sand. I didn't sleep terribly well that night.

Day 3

We all had agreed that the Day 2 was rushed. We took too long getting up, taking down camp, progress on the river was slow due to upriver winds, we didn't make as much river distance as we had planned putting us slightly behind schedule, and we had gotten into camp later than we wanted. On Day 3, we reversed the trend. Up early, quick packing, on the river before 10am.

I'm going to leave out locations due to the photos I'm going to post. We decided to do a hike / scramble up and out of the canyon a bit. We ended up in an area of historical interest with lots of petroglyphs that were not on the map. The excitement of finding these on your own really makes them far more special than those found behind rails and signs and next to parking lots.

Day 4

As we were on a 5-day trip, we would be exiting the river tomorrow morning. We had to be packed and pulled out at a suitable spot below the Confluence with the Colorado River by 10am the next morning. Rather than try to rush it on the last morning, we decided to camp somewhere tonight that we could be picked up from in the morning. Fortunately we didn't have too many miles to go.

Our exploration today ended up being Water Canyon. On the way in, we ran into a small family of bighorn sheep.

Water Canyon was aptly named. We saw more water in this canyon than the rest we had explored combined. It wasn't flowing that much, but there were little pools everywhere we could have filtered from. Fortunately we had brought plenty of water and didn't have to mess with getting more from these pools.

Along the way, Katie spotted a layer of fossil bearing rock. I got a bit distracted taking photos and looking at the fossils.

Large brachiopod found under a waterfall ledge. Sunglasses for scale.
Long crinoid stem.

Back on the river for the final time...

Camp was on the Colorado river this time. The view was amazing, this photo doesn't do it justice. The only problem was that our spot was a bit overgrown.

Last evening on the river. I'm a little dirtier than when I started out, but no worse for the wear.

That night we finished our beers, cooked cornbread and chili. Dessert was dutch oven peach cobbler. We shared the site (and stories of the trip) with another group also exiting the river the next day.

Day 5

Pickup day. An easygoing, slow morning. We had to clean out the silt from our boats and pack up for Tex's to pick us up in their jetboat. We got to jetboat up the Colorado river for two hours. Not too eventful.

Pro-tip though from someone who learned this the hard way. Regardless of the ambient air temperature, the jet boat ride is cold. It moves pretty fast and the wind whipping past you pulls all the heat out of your skin. Do not pre-pack your only jacket within a dry-bag within another dry-bag that gets thrown on the jet boat in an inaccessible place. Have warm clothing handy for the ride even if it's 100°G or higher outside.

Sep 16, 2014

Mission Peak - Residents victory over hikers

"Mission Peak Fremont CA" by Kevin Collins from Alameda, California, USA - Photo from Wikipedia
This week marks my 40th trail hike up Mission Peak this year. A planned summer mountaineering trip to climb Mt Rainier got me interested in Mission Peak. It's steep climb and nearby access made it the ideal training hike. As with most training, I needed to exercise regularly, which for me meant weekday evenings. My standard plan was to hop off of work, drive over to Mission Peak, and climb the mountain for 2-3 hours with a rewarding break to watch the sunset at the top. Sure, there's always a gym, but I never could stand the monotony of walking up a stairmaster. Mission Peak, being outdoors with fresh air and beautiful views was a treat as much as good exercise.

There was really only ever one park that met all the necessary criteria of being within a reasonable drive, a good climb, and most importantly - being open late enough for me to go after work. In Mission Peak's case, the park hours are 5AM - 10PM. Peninsula parks all close at sunset. The next closest park, Henry Coe, open 24 hours, is a ~2hr drive in traffic one way.

My weekly climbs up Mission Peak paid off. I got in shape enough to summit Mt Rainier in July. Along the way, a few coworkers started joining in and carpooling with me after work, all of them feeling great about the exercise and fun they were having.

I write all of this saddened after reading a poorly researched article on SFGate this morning describing how East Bay Parks has decided to change the opening hours on this one park in response to complaints from homeowners living nearby the park entrance. The new seasonal hours are posted on the East Bay Park's website and are seasonal rather than the flat 5AM-10PM before:

Sep 29 – Oct 31: 6:30am – 7:30pm
Nov 1 – Feb 1:   6:30am – 6:00pm
Feb 2 – Mar 7:   6:30am – 6:30pm
Mar 8 – Mar 29:  6:30am – 8:00pm
Mar 30 – Aug 30: 6:30am – 9:00pm

Even for the 5 summer months of the year, this park is now open for 2.5hrs less every day. My evening weekday hikes will simply become impossible in 2 weeks.

Most parks and communities are spending a lot of effort trying to get folks outdoors and exercising in their community. East Bay Parks has succeeded in doing just that with Mission Peak but now seems to be doing everything it can to keep people away.

The main issue is that the park entrance has a relatively small parking lot, with only 42 parking spaces, while on the busiest of summer days there can be 500 cars parked, mostly on public side streets. All of the usual issues that come when homeowners in suburbs see increased traffic around their homes are at stake. These issues aren't without any merit. You can view the main arguments in this summary video by the Vintage Grove Neighborhood Watch Group

My thought is that many of the issues pointed out in this video are incredibly rare. I've parked on these streets more than most people and have not once seen a driveway or fire hydrant even partially blocked. Generally people park on streets here as or more respectfully than in other places.

This is not a park where people bring their family and a picnic that they roll out on the nearest picnic tables. There are 2 picnic tables in the park, nobody uses them, and everyone there is there to hike at least part of the way up a very steep mountain trail. Once in the park, there is no way that even a radio at full volume would be even audible from the nearest homes. Flashlights are far away dots. 

Many of these homes are set far back from the roads inside high walled communities in an area code where the average home price is $2 million. Here's one of the views from the nearby sidewalk: Google Streetview. Many of these homes are fairly deeply hidden behind gates. Certainly the ones affected by weekday traffic fall into this category. If the weekend traffic really does spill further out into the community (I've never observed such) as in this video, then some of the further away homes are a little closer to the public roads. However, the weekday night traffic (times affected by the new curfews) spills only onto Vineyard Ave which has a sum total of only 6 homes along it, all moderately set back from the road.

This is the kind of activity we want more of in the Bay Area. People getting out into nature, getting healthy, and having fun. At Mission Peak, people are doing this by the thousands. There are numerous social groups that hike the mountain together. The Wings of Rogallo Hang Glider group flies off the ridge. At night, REI teaches nighttime photography classes. I've also seen folks using the park for amateur astronomy or doing a night hike to simply watch meteor showers. Much of this is about to end.

I worry that a hundred or so wealthy homeowners would like this gem of a park to be a kind of private park for those who live nearby. Since it's public land, paid for by tax dollars, this isn't possible, but there are things being done to make it more difficult for the public to use. Shorter hours are a big step. Other proposals are to require resident permits for any street parking, limiting public parking to the 42 spots inside the park parking lot. There are proposals to charge entrance fees, with passes for locals for reduced rates. You can get a feel of the desire for this to be a quieter more private park even from the video text:
  • "Hiking up the lower trail, I've got lots of company"
  • "The majority of these people are first time hikers on mission peak"
  • "The majority of these hikers are NOT from Fremont or East Bay"
  • "Counting sensors at the trailhead have recorded 6,000+ hikers in a single day!"
  • "Its popularity attracts hikers from all over the Bay Area"
One of the proposals by the East Bay Parks was to build more parking inside the park, away from residents. Proposals included two different options for building parking with 250-300 spots in each. A pdf showing the parking area proposals is posted online. This idea was brought up after the 2012 summer season. The Fremont city council unanimously supported the idea. The local residents opposed it. This suggests that the residents aren't strictly interested in the parking, it's just an easy issue to get public support on. You can read summaries of the public comments here, here, and here. Essentially there is strong support from hikers and users of the park for more parking, and strong negative comments from locals who oppose any type of increased access to the park.

As for concerns about shortcuts and erosion, the trail restoration programs by local schools and biking groups have been working. The erosion of the trail is decreasing while the number of visitors is increasing. Here are some aerial images from Google Earth. The left side shows an image from 2011 and the right side shows an  image from 2014. Click for more detail.

Bottom of the trail, note the clear parallel bootleg trail to the left of the main trail receding.
A little further up, in 2011 there is a clear bootleg trail running up to the bench in the upper right hand corner of the image. In 2014, it's invisible except from the air.

The same trees as seen at the top of the previous image are now at the bottom of this one. As you can see there were tons of trails taking short-cuts up switch-backs. Most of these are gone. There is some new erosion along the rightmost curve in 2014, but it's just feet away from the main trail, mostly it's the trail spreading out more than a new trail forming.

A little higher up. Most of the bootleg trails are gone. There is a new one that started forming on the upper left switchback, but it's also already been repaired, signs posted, and I've seen almost nobody using it any more, it should hopefully be restored over time. Just a reminder that this needs continuous attention.

So that none can say I'm picking and choosing my photos selectively, these images cover the entire trail. This last set shows the peak at the very top where erosion has not been effectively controlled thus far. The official trail is the one to the left which doesn't actually go all the way to the peak. It's less popular than the bootleg trail which the ridgeline with better views. Most hikers aren't actually aware of the official trail as there is no clear signage at this intersection and the official trail doesn't visually appear to be headed up the mountain from what a hiker could see. This can and should be improved with a maintained trail to the top of the peak, probably along the ridgeline where hikers prefer to go. Lastly here's a video showcasing some of the restoration work. It's done by volunteers under EBRP's supervision, groups are often organized by social media (grr @ 'selfie mountain' reporters):

Similarly with trash, there is virtually zero anywhere on the trail when I hike. I regularly see volunteers on my hikes picking up any trash they do find. I do the same many times. As a result of this attention, the park is more pristine than many less busy parks. There is some trash tossed out along the roads / parking, but it also doesn't seem to accumulate. I've not observed anyone picking it up, but I suspect it's happening as there is always going to be some trash. There is graffiti especially at the top of the peak, but it doesn't build up as volunteers spend hours regularly scrubbing it off the rocks.

Not to mention that none of the above: traffic, parking, trash, noise, curfew violations, erosion, emergency request, etc are reduced by decreasing hours. Those things happen during the day as well, and in far greater volume.

The trail is quite safe, even at night. The large numbers of people hiking it in the evenings ensure there are plenty of people around to help. I've helped carry a large dog down the trail that had collapsed. Folks are quick to offer water to others who look like they could use it. Cell phone coverage is great, and the trail is a fire road 95% of the way to the top, making it possible to access in an emergency. This can't be said for many of the other parks in the area, or even other trails to Mission Peak. The trail that EBRP is directing people to after dark, Ohlone College, has a lengthy portion in a dark, densely forested valley adjacent to a minimally used road in the middle of nowhere. It seems like a fairly dangerous stretch of trail compared to the Stanford Ave trail:

The trail from Ohlone College passes through a more dangerous,
 densely wooded area, behind the ridgeline. It's also less of a workout
and offers poorer vistas along the way.
I've climbed Mission Peak from Ohlone College. It climbs more gradually, behind a ridge with less views until nearing the very top. It's a great alternative, but isn't as nice of a hike. It's less safe - at night, I was the only one on the trail. The parking lot near the trail at Ohlone College is not that large or that empty. Ohlone College has expressed disinterest in encouraging hikers to use their parking lot for hiking up mission peak at the current time.

This isn't just about Mission Peak. Other popular bay area parks should have later opening hours as well, which would serve to take some of the load off of this one. A great example is Rancho San Antonio managed by the Midpeninsula Open Space District.

People from around the bay area love Mossion Peak. I hope that some of these changes are reconsidered in the future.

Aug 17, 2014

Using Nest to push solar savings further

I've received a lot of thanks for my residential solar financials post which goes into quite some detail on how the financials of installing solar work for a PG&E customer.

There is a way to get even more summer power savings out of solar using a programmable thermostat, which I haven't talked about. For me, I really like the nest thermostat, but any thermostat that can operate on a schedule would work.

I talked about this a bit in my prior post, but if you install solar and use power from PG&E you will invariably want to switch rate plans to the E-6 Time of Use plan. The essential idea of this plan is that you pay more for power than before on summer afternoons and you pay less for power the rest of the time. This makes sense for PG&E as hot summer afternoons are when the grid is stressed the most due to homes running non-stop air conditioning. On a hot afternoon, PG&E may actually be losing money on the power being sold (they make the profits up the rest of the year). Solar customers produce more during these times though, so want to be selling their power at these rates and buying at cheaper rates at night.

The base tier rates (as of 2014) are the following:
  Peak:         30.661 c/kWh
  Partial Peak: 19.134 c/kWh
  Off Peak:     11.456 c/kWh
Winter (no peak in winter):
  Partial Peak: 13.573 c/kWh
  Off Peak:     11.890 c/kWh

The schedule for these rates (as of 2014) is:
  Summer (May - Oct):
  Peak:         1pm-7pm  M-F
  Partial Peak: 10am-1pm
                7pm-9pm  M-F
                5pm-9pm  Sat-Sun
  Off Peak:     All other times

  Winter (Nov-Apr):
  Partial Peak: 5pm-8pm  M-F
  Off Peak:     All other times

The winter differences aren't that significant, but the difference between peak and off peak in the summer is nearly 3x the price! So, by simply programming one's thermostat's default schedule to account for this, you'll save money. You can see my summer schedule here:

Solar optimized Nest thermostat schedule for time-of-use PG&E rates.

M-F, my wife is often home in the morning, so I leave the thermostat set at 74 until peak time at 1pm, when it turns off (80). If you leave in the morning, it would be ideal to disable it earlier, at 10am. After peak is over at 7pm, I start cooling down the house a bit, and then further at off-peak at 9pm.

Weekends are similarly set up to avoid running during partial peak, except than an hour before the partial peak, I pre-cool the house a bit so that it'll stay cool into the afternoon. I don't know if this pre-cooling actually saves me money or not. It would also definitely depend on the level of insulation in your home, more insulation would make it work better.

Of course, if I'm home and feeling warm, it's super easy to set a more temporary set point that'll override this schedule. I can walk over to the thermostat or change it from my phone if I'm feeling lazy. However, it's rare that I remember to bump the temperature up if I'm heading out for the afternoon and won't be around so this works well as a default.

Aug 2, 2014

Mt Rainier

Last week I spent 6 days climbing Washington's Mt Rainier. This was one of my first introductions to glacier mountaineering, and as such me and my buddies decided to take a longer trip and learn some skills along the way. The most common route up to the summit of Rainier is a two day, 1 night trip. We took longer, but learned a lot of new skills along the way with IMG's glacier skills seminar.


Mt Rainier, at 14,410 ft is only 100ft shorter than the tallest peak in the lower 48 (Mt Whitney in CA), but Rainier's trailhead starts over 1,000 ft lower. In addition, Whitney does not require travelling over glaciers to summit, which makes Rainier much more technically challenging. As IMG says, "you will want to arrive in the best shape of your life".

My main training regimen consisted of climbing a small peak in my city's backyard named Mission Peak, a 2200 ft climb over a distance of about 2.5 miles. I climbed this once a week after work, as the park was unusual in that it was open until 10pm. If you are in the bay area, this is a fun trip to do in the evening. It's a popular trail, lots of folks try to catch the sunset from the summit, so it becomes a bit of a party at the top.

In addition to the weekly stroll up Mission Peak, my co-conspirators on Rainier also planned several longer weekend outings which were a mix of adventure and training: backpacking in Trinity Alps and Desolation Wilderness, snowshoeing in the Tahoe mountains, and Ice Climbing in Lee Vining. Jeremy documented many of these trips as well as our Rainier trip over at rainier2014.com.

Day 0, Gear Check

Before spending 6 days on the mountain with IMG, we met up at IMG headquarters to do a gear check. Our guide, Ian, met us there and had us lay out all of our gear and we went through each piece one by one. Due to the amount of gear we did need to take, he had us all pare down our extraneous gear to just the essentials. Everything else was left behind. I added back in a few luxuries that evening: a small inflatable pillow, some down booties, and my 2lb DSLR camera. In addition, we added in a few pounds of group gear such as tents, pots, fuel, and food. Ian then went over some basic skills such as blue bagging (bagging/packing out all waste) as well as answering our questions about the next day and the trip as a whole.

Gear check at IMG headquarters.

Day 1, into the Clouds

A backpack in the the clouds.
Next morning, we were up bright and early to shuttle to a trailhead near Paradise visitor center and begin our climb. It was a pretty short hike to the first camp, only about 2 miles made a little harder by the fact that our packs were quite heavy. The weather was inside clouds and walking on snow, so we wondered how one would navigate in such terrain with few landmarks to go on. When we got to camp, the guides gave us a crash tutorial on setting up 4 season tents in the snow (hint: it involves shoveling out a flat spots and burying anchors in the snow) and we got to work getting settled in. The photo below was taken the next morning when the clouds finally cleared, we had no idea there was a view to be had from camp until day 2!

Camp 1 with Mt Adams in the background

After this we got to work learning how to walk efficiently on steep snow, practicing on the side of a ridge near camp. We had a bit of a scare when Matt post holed through a thin ice layer with one foot, but nobody was hurt. Next, we learned how to self arrest with our mountaineering axes. This is an essential skill - imagine you fall and are sliding down steep slick ice, how do you maneuver yourself to catch your axe on the snow and arrest your slide without having the axe rip out of your hand or rip your face open. We practiced arresting from all possible falls: head first, feet first, face down, face up. This was a ton of fun as it's basically a lot of sliding downhill in the snow. I wish I had some video but the clouds were too dense and I didn't have enough time.

Day 2, onto the Glacier

The next morning, we took down camp and moved up off the snowfield and onto the Paradise Glacier. We had nice blue skies the whole day, which made for some fantastic views both along the hike and at camp.
Panoramic from just above Camp 2. Click for a larger view.
When we got onto the Paradise Glacier, it was time to learn how to work as a rope team. Crevasses are large vertical holes in glaciers that can drop tens or hundreds of ft, which is not something you want to fall in. The problem is that the tops of the crevasses can get covered in thin layers ice and snow so that you can't easily see the crevasses, but you can still break through the layer ice below your feet. To mitigate this risk, we travel on glaciers with each person spaced out 40 or so ft from the person in front of them, but attached via a rope and harness. If one person falls, the others on the team arrest on the snow and then rescue the fallen team member. This particular training built on what we learned on day 1. We practiced this today on the way to camp - tying into a rope, maintaining good distance and communication with the other rope team members.
Take a close look at the ice cave formed by the Paradise Glacier, behind and above the camp.
Distances are deceiving, that was farther away and much larger than it looks in this photo. I think you could have driven a semi through that cave.
This time the area for the camp was a bit steeper and required a lot more digging out of a flat area for tents. We also were going to stay at this camp for two days, so we spent a little more effort making it comfortable, cutting out some steps in our terraces as well as cavities for gear and so forth. That evening we were treated to a lesson about glacier geology. One of our guides had done their master's work on the subject and gave us a little introduction to the basics, while standing on a glacier!

Day 3, 'Rest' day

Today we weren't planning to move to a new camp. This was nice timing as we awoke to unexpected rain at about 4am. We did not get a break from lousy weather until after dinner. Warming up was to one of the best breakfasts of the trip, hot bacon and cheese bagel sandwiches.

Despite the weather, we had stuff to learn! Most of today was spent doing technical work on knots and ropes. Much of this could be done inside the group cook tent with a little storm protection, but whenever the rain abated a bit, we'd run outside and do some more practice there as the tent was a tad crowded.

The final goal for today was to be able to go from an arrest position on a rope team with a member in a crevasse to building an anchor in the snow, transferring the load to the anchor and then building one of various pulley systems to safely pull the victim out of the crevasse. At the end of the day, we got into pairs and practiced exactly this. Unfortunately due to poor weather, we didn't actually get ourselves into a crevasse, but we simulated it on some steep terrain. 

In addition, today we went over some advanced navigation techniques with a map, compass and altimeter. We discussed in some detail how you would navigate in whiteout conditions where angles to distant landmarks were not available.

Finally, after dinner, the clouds parted for a little while giving us some fantastic views of the valleys below with clouds floating through. I captured this series of images which ended up being some of my favorites of the whole trip.

Day 4, Moisture Control

Today, the plan was to take down camp and move up the mountain to Muir Camp. The weather set us back again this morning. We awoke to thunder and lightning. At one point the count between the flash and bang was only a second or two, so it was largely over top of our heads. Rather than get an early start, shelter in place was the plan. Plastic foam pads and staying low to the ground was the safest bet. Walking across a flat snowfield swinging steel ice axes was not. Even if not for the lightning, we small marble sized hail was coming down on our tents.

After the worst of the storm stopped, we decided to get moving. The weather was likely to stay all day, so there was no sense in waiting. The rain was still coming down sideways, but we broke down camp and hiked up to Muir in our storm shell layers ("battle armor"). Unfortunately even gore-tex doesn't 'breathe' or evaporate moisture if it's soaked on the outside. Thus, any sweating we did on the way up just stayed in our clothing and soaked it out too.
The Gombu hut and toilets at Camp Muir

Muir Camp delimits, at least psychologically, the point between lower and upper mountain. Above Muir, we'd be travelling exclusively on rope teams and not for training. For most teams, Muir Camp is the end of day one and the camp from where makes a summit attempt. Muir is also quite lavish - there are a few small structures with bunk beds, an evaporating toilet, even a place to discard used blue bags. We all shared some bunks inside the Gambu hut, named after Nawang Gombu, a nepalese mountaineer who guided on Rainier until a few years ago.

Our focus that afternoon was on getting clothing dry. We ran rope lines throughout the Gombu hut and hung up the most critical clothing. Very little dried completely, but it was no longer dripping wet when we put it on the next morning. 
Bunks inside the Gombu hut, approx -160°G (20°F)
That evening our guides made us some absolutely fantastic burritos for dinner. Apparently pan frying a burrito in olive oil is crazy delicious. Aside: Olive oil is also a super backpacking food. In addition to simply being healthy, it weighs in at a whopping 230 calories an ounce (candy bars are only 100-150 calories/oz). It's stable at a variety of temperatures. It can be added to almost any food and that food magically tastes better. You can use it to loosen jammed up zippers or other gear. It even has useful properties when applied to blisters or sunburns. As a high-fat food, your body must spend a little energy to break it down, which helps you stay warm, so it's great before sleeping.

That evening we spent some time going over rappelling setups and self-climbing rigs. I feel guilty, but I wasn't fully engaged with this lesson. I was cold, wet, and fairly tired. We also learned a bit about altitude related illnesses, but this was fairly familiar stuff to me as I had some first hand experiences on Kilimanjaro.

Day 5, Ingraham Flats

The clouds were still rolling around the next morning, but the rain had dropped down to lower elevations. Climbers coming up from below were soaked, but we were seeing more and more sunlight as the day progressed. We were in pretty good spirits. Today's plan was a short walk up to our final campsite at Ingraham flats. We had plenty of time, so we did a little extra practice of some of our rope and crampon skills.

Early in the afternoon we headed up to the Ingraham Flats. The Ingraham Flats is a campsite on top of the Ingraham glacier. It has an amazing view, one of our guides put it in his top 5 camps worldwide. I can easily see why. Look at the photo above for the camp tents. You can see them on the glacier near the upper left hand side (yellow/orange pixels). The area is apparently a flat part of the geology underlying the glacier and is not prone to crevasses opening up.

Surprisingly, we didn't have to carry tents up to Ingraham Flats, we left those behind at Muir. The tents at Ingraham were buried intentionally under several feet of snow. We dug them out of the snow and set up camp for the last time. The guides have an agreement with the rangers that they can leave tents out at Ingraham for the season as long as they are only set up and visible when they are actually occupied. Another team was coming in the day after us, so we didn't have to tear down the tents.

The rest of the day was short and restful. As soon as camp was set up, we laid down on our sleeping bags. We got up for an early dinner and went to back to bed with several hours of daylight remaining.

Day 6, Summit Bid

The mountain had seen 2 full days of full on storm weather, including hail. Nobody had been on the mountain above camp Muir since our Day 2. Big changes in weather mean big problems. I think most of us expected that the summit would be unattainable due to weather conditions, but we were going to climb as high as we could until it was no longer safe to go further.

Summit day started with a early start around 12:30am. For several hours we were climbing with only our headlamps, but still in a rope team and full climbing gear. At several points our guides continued to be surprised that the rain had made it as high as it did as well as surprise that we were still making progress. There was no visible trail ahead of us. At a few points, we'd have to stop and the guides would go ahead with shovels and cut a small ledge for safety.

I began to really struggle with breathing the last 1,500 ft of elevation or so. The air was thin, I was getting tired and having trouble keeping up with the rope team. Eventually, with some significant help from the guides and team, we made it to the summit of Rainier. We were the first team to summit in 4 days, followed only a few minutes later by several other teams who had gained on us due to the trail we had been cutting.

Photo of our crew on the mountain, I'm on the left in the orange helmet.

We didn't stay at summit for too long as the plan was to descend the entire mountain by mid-afternoon. We downclimbed and glissaded our way all the way back to the parking lot by about 5 in the afternoon. When all was said and done, we had been going for almost 14 hours with only short breaks. I was sore, exhausted, blistered, and all smiles. We said our goodbyes to each other at IMG headquarters, and again over beers.

Jeremy signing the 2014 summit board back at IMG headquarters.

Jun 26, 2014

Temperature Scales

While recently travelling in Europe, I repeatedly needed to convert between published temperatures in Celsius and familiar numbers in Fahrenheit. It got me thinking a bit about temperature scales.

With distance, the multipliers between units at different scale makes a strong argument for metric units. Temperature doesn't have this problem as there is only one unit on each scale (degrees). There is no argument to be made for preferring one scale over another except based on which memorable numbers correspond to real-world values.

Most everyone knows that Celsius is designed around 0° and 100° lining up to water freezing and boiling points respectively. However this definition isn't sufficient for lab purposes. Water freezes and boils at different temperatures depending on pressure and impurities. The technical definition is at one standard atmosphere of Vienna Standard Mean Ocean Water.

Far fewer people know that 0° and 100° in Fahrenheit also correspond to specific real-world values. 0°F corresponds to a temperature when a brine is made of equal parts ice, water, and ammonium chloride. Such a brine, interestingly, is a frigorific mixture, meaning that it stabilizes to a specific temperature regardless of the temperature that each component started at. Thus, it makes for a really nice laboratory-stable definition of a temperature. Similarly, 100°F was initially set at "blood heat" temperature, or the human body temperature. While not super precise, it was a fairly stable value. As good as anything in the early 1700s.

Today, we can produce very specific temperatures in very controlled environments. We hardly need to use water, ammonium chloride, or blood as the master keys to our temperature scales. How could we improve temperature scales if we were to reinvent them today?

I present one possible suggestion. Most people primarily use temperature for measuring ambient air temperature for purposes of assessing comfort level. Why not build a temperature scale around the notion of comfortable air temperature?

0° in this scale then can be centered at a very comfortable room temperature. Something around the area of 70°F / 20°C.

-100° and +100° could then be at the limits of human comfort ranges. Something around the area of 40°F/5°C and 100°F/35°C respectively.

Now, the phrase "tomorrow it will be twice as cold" can be represented reasonably in mathematical terms - simply double the current temperature and you'll know tomorrow's temperature, a feat that didn't always work so well with older temperature scales.

We need a new symbol for this new scale, so as not to confuse anyone (more than necessary). I propose °G, pronounced "degrees Gregable".

Jun 25, 2014

One Year of Solar - And a tale of how PG&E ends up the big winner

Last year around this time, I posted about the theoretical financials installing solar panels on my house as well as some real data from the first month of the system live. It's been a year now, and I have solid data about what our system looks like for an entire year.

Net Grid Usage

Here's a scan from my latest PG&E true-up bill showing the last 12 months of power usage / charges. As you can see, in the winter months I was using more power than I was generating and was paying $10/month or so for the power that my panels couldn't provide. However, in the middle of the summer I was generating enough power to end up with a $30-$40 credit each month. After one year, I had accumulated $100 of power credits*! This is much better than my estimates of the panels covering about 85% of my power costs during the year.


While PG&E can only tell me net power, SunPower gives me data on how much power I actually produced.

Our estimate was around 4,830 kWh / yr, but we actually produced 5,806 kWh (20.2% higher). 

Why did we produce more? My guess would be the dry year we've had in CA, leading to a statewide drought. Fewer rainclouds equal more sunlight.

PG&E Credit (*)

So, did PG&E cut us a check for $104.74? Unfortunately No.

The accounting you see in the first image pays me retail rates for the power I generate. My generated power gets sold to my neighbor by PG&E at say 12c/kWh, and PG&E then pays me 12c/kWh for that power (hand waving as their is tiering involved).

However, this accounting is only used to determine a credit that can be used against charges later in the same year. In order to be paid, PG&E re-does all of the accounting. They start over, charging me retail rate for the power I buy, but paying me wholesale rate (4c/kWh I think) for the power I sell them. Under this setup, I'd end up having to generate 2-4x what I use in order to break even. I'm nowhere close to that, so the "cut Gregable a check" accounting is zeroed out.

On top of this, even though my monthly bill is $0 and PG&E is profiting from the power I put on their grid, PG&E now charges me $5/month minimum for being connected to that grid. Thus, I still paid PG&E about ~$60 last year for electricity rather than PG&E paying me ~$100. I buy natural gas from PG&E too, but the power credits don't get to count against those charges either.

I'm happy with the results of my install, and knew all of this up front, but still feel like this sets up bad economic incentives. This particular setup means that someone installing solar really wins the most if they install less than the amount they will need, since over-generating results in benefiting only the power company. Even if my roof is a better spot for panels than my neighbor's, the incentive is for me to put less panels on my roof and them to put some more on theirs, rather than the more efficient distribution.

Right now, power companies seem to be trying to fight solar by adding minimum monthly charges and getting permission to pay less than retail rates for the power they buy. This is even after the fact that the solar production is often at times when PG&E pays more for power wholesale than they charge retail. I personally think power companies should be able to charge some type of distribution cost to solar users for generated power, but they should continue to buy the power at (discounted) retail rates even to the point of cutting the solar user a check. Allowing the power companies to have both advantages has an effect of subsidizing fossil-fuel power generation at the cost of solar customers.

Feb 18, 2014

Network Aware Sheetfed Scanner

A little over 3 years ago, I posted a question asking about a consumer product available for scanning to a network drive.

These days there are plenty of options, so I went out and bought an brother MFC-7860DW. I hadn't researched this heavily, so don't consider this a review. It's a scanner/printer that can handle wifi (handy where I wanted to put it), print duplex (yay), and can scan via ADF (automatic document feed, aka sheetfed) straight to a pre-configured FTP location. I overlooked one feature, duplex ADF scanning, which I wish I had.

Now that I have a scanner that uploads to a local FTP drive, I wanted more. I wanted to then automatically upload to a Google Drive folder. Google Drive has very good automatic OCR of all text in uploaded scans, is accessible anywhere, and it's much better than an FTP directory in terms of usability. I can even load documents on a cell phone app.

I started a small project that would monitor for new files on the FTP drive and then upload them to Google Drive. I thought this would take an afternoon, but 600 lines of code later and I'm only now feeling done with the project. I did throw in learning go as part of this, which didn't help things.

The project is here if it inspires anyone: https://github.com/Gregable/ScanServer

One of the big issues I didn't think about initially was that scanned files wouldn't be instantly "complete". It would take several seconds between a file being created and finished uploading from the scanner. If I started processing the file too quickly, I'd get a partial upload. If I slept too long, I'd add too much latency to the whole process. I wanted to largely be able to look at the uploaded file seconds after scanning it so I could verify that it looked right before disposing of (shredding) the scanned document, so latency wasn't a great idea.

Another issue was scanning duplex. I thought it should be possible to scan two single-sided documents and have my script merge them. As it turns out, this is possible, though tricky. If you flip a multiple-page document over, the page order is reversed. As a result, you need to interleave pages backwards. Something like:

  1. Front doc, Page 1
  2. Back doc, Page 3
  3. Front doc, Page 2
  4. Back doc, Page 2
  5. Front doc, Page 3
  6. Back doc Page 1
My scanner had the ability using buttons to select different filename prefixes for uploaded docs, things like "laser", "receipt", "estimate", I ended up choosing one of the prefixes to indicate duplex docs. I then had to think about error cases. What if a user accidentally scans only the front half as duplex and marks the back half as single-sided. Or vice-versa. In these cases, I wanted to upload the document as two single-sided documents. What if I saw two duplex documents come in, but they had different numbers of pages. In this case, I wanted to treat the first one as a single-sided document, but keep the second as potentially the first side of a duplex document that might come next. What if I saw a single duplex document come in and nothing followed? In this case, I wanted to wait 15 minutes to see if I got the other side of the duplex document, and if not give up and treat it as a single-sided document. These cases were fun to work through.

Ultimately, I had fun implementing this with go channels and goroutines. I had one goroutine in a loop monitoring for new ftp documents and managing waiting until they seem to be "finished" uploading before outputting the document to a channel.  I had another goroutine sorting out the duplex / single-sided issues, creating merged documents from duplex uploads, and handling the user error cases above. This goroutine spit out the documents to be uploaded to Drive into another channel. A third goroutine uploaded to drive and spit out to a "final" channel which cleaned up any temporary files created and echoed success messages to the console.

I also moved this little project over to a raspberry pi. As a result, I don't even need a computer running to have this setup going which considering the ~3W power draw of a raspberry pi makes it a no-brainer to leave running continuously.