Sunday, April 24, 2016

Ben Li-Sauerwine 2016

My good friend Chris Gaiteri made this awesome photoshop for me, which obviously needs to be shared with the world.  Vote Ben in 2016!

Sunday, April 10, 2016

Goodbye, Google

Friday was my final day as a software engineer at Google.  It's been an exciting 3 years!  I discovered a bug so big that it made the news.  I wrote code that ground over multiple terabytes of data in parallel to help with business decisions.  I helped with the Google Code Jam competitions.  I even wrote internal services that monitored our internal code quality to help with keeping our codebase clean and manageable.  I launched brand-new products and made meaningful improvements to old ones.  Most importantly,  I worked with wonderful colleagues in an environment where I felt appreciated and respected and where I learned to be a better coder every day.

Google isn't by any means a perfect company, but the internal culture is such that one can be candid and open about problems and as such it is constantly improving.  I think that this is not only a lesson that other companies could stand to take an example from, but an example that could be followed in one's personal relationships as well.

So, why did I leave?  After 3 years, I felt that it was time for a new challenge.  I've joined a startup as a partner with two former colleagues.  I'll be making strategic and hiring decisions as well as design and technical decisions and working directly with customers and investors.  Overall, it's a chance to develop new skills besides just my technical ones, and that's pretty exciting!  You'll be hearing more about it soon (there's no attractive website yet,) but you can check out my newly updated CV if you want a hint!

Monday, April 4, 2016

French Polynesia Stories

Last week Simiao and I were on vacation in French Polynesia.  Ever since I first saw a picture of the ring-shaped islands in the Pacific, I'd always wanted to visit.  Is the water really so electric blue?  Are the little islets really so close together that I could swim from place to place?  Are there really coconuts all over the place that I can just pick up, crack open and drink the water from?

The answer to all of these questions is a resounding "yes."  We spent 2 afternoons in Papeete, 2 days in Moorea, and 4 days in Bora Bora.  All of the locations were charming, but we preferred the natural beauty of Moorea and Bora Bora to the city in Papeete.  Initially I'd wanted to stay in the over-water bungalows, but unfortunately those were all spoken for 3 months in advance so we stayed in garden units instead.  In retrospect, not only were the garden units less expensive per night, but the 30-second walk to the lagoon was so convenient that I think I'd stay in the garden units next time I visit too.  What's more, in one case, the garden unit included a private plunge pool which I think is a nicer feature than ocean adjacency.

A Lemon Shark on a snorkeling tour we booked in Bora Bora.  The black fish are triggerfish.  These sharks have attacked divers in rare occasions, but don't normally pose a threat to humans.
Mt. Rotui on Moorea appears on the French Polynesian 50 and 100 Franc coins.  The mountain is a former volcanic peak, and the ring-shaped reef around the island marks the original maximum extent of the volcano.  The dormant volcano is slowly eroding into the ocean, but the ring-shaped reef keeps growing and will ultimately be the only remnant in the distant future.
Spinner dolphins on Dr. Poole's dolphin tour.  Intriguingly, while our hotel donated to his research it did not advertise or help us book his tour:  the hotel gets a kickback for booking the penned dolphin experience at the Intercontinental.  I highly recommend contributing to his research by patronizing his tour.  Fun and educational, we found Dr. Poole's tour to be one of the highlights of our trip.
The welcome party at the Sofitel Private Island on Bora Bora.  The best feature of the private island is that both the best reef for snorkeling and the best place to see rays in the lagoon are actually easily within swimming distance using flippers from the island, though weaker swimmers might prefer booking a tour.

We saw no fewer than five octopi in Bora Bora.  Incredibly, they could change their patterns and shapes on demand to suit their camouflage needs.  They could change from a dark red to blue-green and would alter the white spots to look like whatever rock they were hiding on. 

Monday, February 1, 2016

How We Beat Motion Sickness in The Witness

When The Witness was finally released, I was really excited that Simiao and I would be able to enjoy a video game together.  Previously, the only games that Simiao could really get into were old-school arcade and Atari games, but I thought that this was right up her alley:  puzzle focused, not scary, and I trusted that Jonathan Blow would settle for nothing less than brilliant design in his games.

Much to my dismay, we quickly learned that like many others Simiao experiences motion sickness in first-person style games.  It took several sessions of experimentation to come up with a permutation of settings that worked to make the game playable for her.  In case you find yourself in this position, here's what we had to do to make the game playable for her:

  1. Play the game with the lights in the room on.
  2. Position the monitor so that she is sitting a bit further back from it.
  3. Set the field of view to 90 degrees.  While there is no field of view slider in The Witness, this was attainable by right-clicking The Witness in steam, going to Properties then Local Files, clicking Browse Local Files, then opening Local.variables in the data folder.  Under ":/misc", we added the line "fov_vertical 90" to achieve this.
  4. My monitor, the ASUS PG278Q, has a GamePlus button on it.  By pressing this button on the monitor, I am able to overlay a crosshair on the center of the screen in the monitor settings.  This unchanging, central focal point helped with her motion sickness.
  5. Finally, we used the amazing RivaTuner Statistics Server to cap the frame rate at 30Hz.  It installs in a snap, appears to be fully compatible with GSYNC and The Witness, and offers a simple means to control frame rate.  We set the Framerate Limit to 30Hz and it worked like a charm.

We did try some chemical methods without success.  Simiao tried taking Benadryl which works similarly to Dramamine for motion sickness, and we tried ginger tea to settle her stomach.  Though these were not helpful, the ginger tea was delicious.  I couldn't help to think while discovering the techniques that did and did not work for Simiao that games should include a "motion sickness friendly" graphics mode that would automatically apply some of these settings to a game.  It would be fairly trivial to overlay a cross hair, increase the field of view, and limit the frame rate to something more friendly to those affected by motion sickness.

Together, the five techniques listed above enable us to enjoy The Witness together, which is a beautiful and intellectually satisfying game to play.  Now all we need is some more free time to play it in!

Saturday, November 7, 2015

Yellowstone Stories

We saw more elk around human habitats
in Yellowstone than in the wild.
For our one-year anniversary, Simiao and I went hiking in Yellowstone.  I'd always wanted to visit this national park, and I've never seen so many alien landscapes in such close proximity to each other:  thermal features, beautiful canyons and waterfalls, wildlife, petrified trees, and black obsidian beaches. If you decide to go to Yellowstone, I highly recommend that you go in the first week of the off-season.  Lower prices notwithstanding, the size of the parking lots gave me an idea of what a zoo the park must be during the summer with traffic jams, impossible parking and screaming children.  When we went in the first week of October it felt like we had the whole park to ourselves.

These are a few of my favorite photos.  I do have more related to an awesome side project I've been working on for almost a year now, but it's still not ready and needs some more work.  It'll be awesome when it's ready, trust me!

A toothpick-like tree at the Grand Prismatic Spring.
Watching this spooting thermal feature at the Artist's Paint Pots was like watching a natural lava lamp.
A squirrel fattening up for the coming winter.
The obsidian beach at Yellowstone Lake, the world's highest alpine lake.
A trio of fluffy gray jays were stalking us around Yellowstone Lake.
A fiery sunset over Great Fountain Geyser, which declined to erupt for the occasion.
A tree grows on top of a petrified tree stump on an incredibly steep trail on Specimen Ridge.
A view of the Lamar Valley from Specimen Ridge.

Friday, June 26, 2015

Utah Stories

If you find yourself exploring a national park,
 please don't feed the wildlife.  Someone
further up the trail fed this
golden-mantled ground squirrel
a piece of hard candy.  It was eating
the wrapper along with the food.
Simiao and I recently took a vacation to Utah to explore Bryce Canyon and Zion National Park.  I've always loved the scenery of the American Southwest and I relished the opportunity to scramble around on some very photogenic sandstone.

My favorite hike was the Virgin River Narrows, and if you are considering doing this hike you should definitely rent neoprene socks, a pair of hiking sticks and water hiking shoes from one of the local outfitters.  You won't regret it.  I saw dozens of people struggling, slipping and falling along that trail.  My favorite scenery, however, was in Upper Coyote Butte, which I could have wandered around and explored for days.

The landscapes in Bryce Canyon, Zion, Coyote Butte and White Pocket are absolutely incredible.  I wish I could have taken a photo that would convey the beauty of the southwest.  Unfortunately, I don't consider myself a great landscape photographer, so I prefer to take pictures of things that perhaps not every single tourist that has ever passed through the park has seen.  I've included some favorites here.

Sunset over the hoodoos at Bryce Canyon.  Sadly, I forgot to bring my timer for this trip so I was unable to take star-trail pictures over the rock formations.
Plaintain Goldenweed over Bryce Canyon. 

I can't do landscapes, but I thought this tiny arch and bonsai-sized Juniper tree were a perfect microcosm of Upper Coyote Butte.  Note the Moqui marbles in the sandstone.
A Great Basin Spadefoot tadpole living in a puddle at Upper Coyote Butte.  Remarkably, there were also at least two kinds of shrimp living in this same pool, tadpole shrimp and clam shrimp.

We startled this Desert Spiny Lizard which preferred to glare at us from under a rock and behind a dead Juniper.
This Pallid-Winged Grasshopper didn't appreciate my picking it up for a photo, and repeatedly bit me until I shooed it off my finger.
The sandstone here resembled a tubular wave that was turned to stone by the gaze of a surfing Medusa.

Sunday, February 15, 2015

A 3D Printable Model of Cloud Gate aka "The Bean"

There are few works of modern art as beloved as Chicago's Cloud Gate, aka "The Bean".  It is interactive without having any moving parts, and indeed without being mobile at all.  Nobody at any age can resist engaging with their reflection in its curiously curved surface.

I started playing with TinkerCad because I wanted to use the 3D printer at work, a Makerbot Replicator, to print custom enclosures for my other electronics projects.  I thought that printing a model of Cloud Gate would be an easy way to learn to use the system before building my enclosures.  It turns out that I had it completely backwards.  To print an enclosure out of basic shapes (cylinders and boxes) is many times easier than designing your own custom surface for printing, and it took me a very long time to finally get it right.

I learned a few things about Cloud Gate as I worked on this model:
  • Cloud Gate as seen from above is not a perfect ellipse.
  • Wikipedia and all other sources including Anish Kappor's own website as the dimensions of Cloud Gate wrong.  In particular, the height of the arch.  You only need to stand under the arch to see that there is no way that it is 12 feet high.  At most, it might be 10.
  • It is not possible to continuously deform a sphere into Cloud Gate.  Its derivatives are discontinuous at certain points on the surface, so I had to resort to Bezier curves to model it.

I am 6' 1" tall.  There is no way that the arch is 12 feet tall.  If I put my hand straight up, I can come within a foot of touching the arch.
Once I finally got the right form for the equations that generate the model, it was simply a matter of tuning the constants that generate the surface to match Cloud Gate as closely as possible.  I'm confident that my current version of the model is close enough that, while certainly not an exact copy, nobody would be able to tell the difference even if I scaled mine to the size of the real thing and put them side-by-side.

The evolution of the model.  The earliest model was printed in 2 separate pieces connected with pegs before I realized that the model prints fine when it is printed upside-down with supports and a raft.
The underside of the models.  I think that they look better printed at standard resolution because the natural color PVA comes out shinier.

The model is well-balanced enough that it does not require a stand to sit normally.

End-on, Cloud Gate has an egg-like shape.
The underside of the model showing the omphalos, or navel.
I recommend printing the model upside-down using supports and rafts, 25% infill and standard quality.  The supports are straightforward to remove using a razor blade.  The higher infill is necessary because the flat surfaces have a tendency to sag a bit at lower infill, and the standard quality prints with a larger radius and gives a shinier result.

It's also pretty fun to take my shape generator on TinkerCad and play with your own variant of Cloud Gate by editing the parameters.  If I feel bold later, I may try having one 3D printed in steel then buffing it to a mirror finish for the ultimate desktop Cloud Gate.

Download the model or printable STL files here: