I wanted to stop sleeping next to my phone.

The painting “Mobile Lovers” by Banksy always struck a chord with me. I know I spend a lot of time looking at my phone, and am wary of it being at the expense of experiencing real life. I think it’s a very powerful visual.

Source:Banksy Gives Controversial Mobile Lovers Artwork to Bristol Youth Club

One specific scenario in which I would really like to stop looking at my phone is in bed right before I sleep. There are countless articles about the damage it does to your sleep quality. However, like many people with operational responsibilities at tech companies, there’s the possibility that I could be paged at any time, and those pages come via my phone. Turning it off before bed is not a realistic option. When I wake up in the middle of the night, I will often check my phone to see if I missed anything important. Even with Night Mode on, this is still a fairly big bright light in my face, disrupting my ability to get back to sleep. Worse, I might see some distracting thing that lures me into needless latenight phone engagement.

The reality is I didn’t need all of my phone’s capabilities at night, I just needed to be able to receive critical notifications from specific sources. I knew I still wanted something next to my bed that I could glance at – but Not My Phone.

My idea – what if I had a low-light bedside clock that could show notifications on it? I had a spare Raspberry Pi that wasn’t being put to use. Maybe I could code something up between it and my phone, using Bluetooth or similar. As I started to poke around, I found a solution that was even simpler… a company called Pushbullet had already done 90% of the work for me – they built an app that lets you get your phone’s push notifications via an API. So… I grabbed a domain and notmyphone.com was born.

The case does somewhat resemble a homemade bomb

I picked up this cheap screen & case for the Raspberry Pi since it didn’t look too ugly in the photos. As I later learned, the photos don’t show the power cord, which sticks out the top and looks ridiculous. But, c’est la vie – it worked and can be turned down nice and dim. Since the Pushbullet API supports websockets for notifications, I was able to build an almost completely static site (it’s hosted on GitHub Pages) to serve the UI, and updates are sent directly to the client. The only dynamic part I needed was the OAuth login, which I just built as a Cloudflare Worker.

While I was targeting the 480×320 screen, it’s simple enough that it can really run anywhere, and you can easily test it out in the browser. I wanted it to be able to accumulate a few notifications (it’s coded to store the last 4) in case I woke up and missed more than one thing. They just stack up and the oldest one rolls off the screen as they accumulate.

A neat behavior the Pushbullet API enabled me to add was if you dismiss the notification on your phone, it also gets dismissed from the bedside clock. This way it’s not accumulating things you’ve already seen, assuming you’re away from bed when the notifications arrive. You can also fully customize which apps send messages to Pushbullet via their mobile app, so I’ve tuned it down such that I’m not getting LinkedIn notifications, etc. Only things I deem important enough that I want to see if I wake up at 2am show up on the clock.

Okay, so it’s not a beautiful work of art, but when I go to bed, I put my phone face-down without worry that I’m missing anything. When I wake up in the middle of the night, I can glance at the clock and see that all is well and go back to bed without unleashing a phone-screen’s worth of light into my eyes.

If this is interesting to anyone, feedback & pull requests always welcome. In building this I also developed a Sentry client for Cloudflare Workers to help me debug issues, which you might find useful for your projects. Fair warning: I’m by no means a JavaScript expert.

Facebook… it’s chilly in here.

This morning I read an interesting post from my friend Trevin about the election and wrote a comment in response. His post was thoughtful and not at all combative, in part expressing surprise at the low voter turnout and the makeup of voters, citing:

Clinton won 65% of Latinos and only 54% of women. Even more surprising, Clinton only won 51% of “White women college graduates”.

The comment I wrote in response is pictured below… but you’ll notice the red exclamation point next to it:
post-after

If you read the comment, I think it’s pretty clear that it’s civil… you might even go so far as to say that it’s thoughtful and furthers the discussion! But… you won’t see that comment on Facebook:

post-during

It was “deemed abusive or otherwise disallowed” by Facebook’s algorithms (it was too fast to be done by anything but a machine).

It reminded me of two things:

  1. Mark Zuckerberg calling it a “crazy idea” that the spread of fake news on Facebook influenced the election. Obviously this post isn’t about fake news, but it’s a conversation about how trustworthy polling is. And, Facebook blocked that conversation from occurring.
  2. Having some flashbacks to my time in China where it was well known that WeChat had certain keywords that would get you flagged or banned.

Of course, this could be just a bug. But, it was a good reminder to me that Facebook is not mine. Your Facebook wall is not a blog under your control. Your Facebook messages are not private communications between you and the recipient. Your speech and behavior within their walled garden are subject to their terms and conditions.

I have basically accepted the echo-chamber that comes from seeing things shared from people you already associate with and identify with. But, I’ve been increasingly concerned about digital redlining, and only recently have considered the fact that I’m not even seeing the “real” echo chamber, but some subtly modified version of it.

My China Year

Last year I spent about a third of my time in China. I didn’t post many pictures, I often travelled alone, and I had a difficult time succinctly summarizing what China is like. As a result, I don’t think many people know much about my time in China.

Roughly every 6 weeks I went to China for 2 weeks, throughout most of 2014. I flew Hainan Airlines a few times (which was nice because those flights are on Dreamliners) but ultimately settled in on a regular Delta route, and switched loyalty programs from United to Delta as a result of all of those 11-hour trips. Each time I visited, things got easier to the point where it became a routine.

Before leaving I’d swap out my regular wallet for my “China Wallet”. The flight to Beijing is about 11 hours from Seattle, enough to easily watch several movies. And, in my case, eventually get through most of the Delta movies worth watching and start bringing my own.

China Wallet & US WalletIn flight entertainment

China Standard Time is GMT+8, so it’s either 15 or 16 hours ahead of the West coast depending on our daylight savings. When you fly West to China you cross the International Date Line and lose a day. And, the flight itself takes 11 hours. So… what that boils down to is that when you fly there, you land the next day, a few hours later than when you took off. I always prefer to fly out in the evening so that as soon as I landed in Beijing, I could go to bed. When you fly back, you land the same day, a few hours before you took off. I liked leaving in the morning from China, and would land and go straight to work from the airport. Seeing two sunrises on the same day was strange at first.

Landing in BeijingThe Holiday Inn
My normal beijing breakfastMeat Cake!

My home was always the Holiday Inn Express Beijing Huacai. Truth be told, I really liked it. I got to know many of the people there, I loved the breakfast buffet even if it got tired after 10 consecutive days, and it really did eventually feel like home. On Christmas, I brought everyone candy canes.

It’s big

Having travelled mostly to Europe and South America, I really never appreciated this fact:
CK6aONG

That is to say, when I used to think of “the rest of the world” the places that came to mind are not actually the places that most of the world lives. There are countless mind-boggling facts about the scale of China (and India). There are 15 cities with more than 10 million people (more populous than New York City). There are 170 cities with more than a million people. The US has 10.

Beijing itself is built as a set of concentric circles (“rings”) around the center of the city. The center of the city is The Forbidden City and people don’t live there. I lived up near the green checkmark. To get from there to the forbidden city by taxi would take about an hour. I never felt like I saw “a condo building” – a building by itself didn’t even seem to count as meaningful residential construction. At a minimum, I’d see 4 identical condo towers, sometimes 8. It’s a big city.
Google_Maps

Information

This is CNN when doing a story about Hong Kong Protests

Yes, Facebook, Twitter, and Google are all blocked. The Great Firewall of China exists, and your only way around it is with either a VPN or a foreign SIM card. In fact, a regular VPN won’t even do the trick, you need one that supports additional encryption/scrambling because the GFW can block things based purely on encrypted traffic patterns. I used Astrill and it was great.

The TV in the hotel has a few English channels, including the CNN International channel. However, whenever they would do a story about China, the TV would go black.

In China, you’d use Baidu instead of Google, Weibo instead of Twitter, and WeChat instead of Facebook. You’d shop at Taobao (by Alibaba) or JD instead of Amazon. These aren’t perfect analogs, as the different services have different featuresets, but between them they cover the same sorts of things the US sites do for the western world. These services all operate within the rules of the Chinese government, and implement the required censorship and monitoring. In China you have a vastly different view of the Internet than the rest of the world.

The pollution

Quite bad. People asked me about the pollution… at times, it was quite bad. This is a photo taken from the window of my hotel one morning. I didn’t wear a mask, but many people did. Fortunately, being a 2-block walk from work meant I could stay indoors when the air got this bad.

There are some exceptionally clear days, but overall I think Beijing has a smell to it, that I eventually got used to. The people who live in Beijing and other big cities are aware of the problem and don’t like it. Children get sick and some people choose to move their families to less polluted towns.

The language

Mandarin is by far the most-popular natively spoken language on Earth.

Unfortunately, it is hard to learn. Since it doesn’t have a phonetic alphabet, you basically have to learn how to speak and how to read as two independent activities. Foolishly, I focused on learning how to read, so I had a decent shot at parsing menus. This came in handy when I could point at things, and was useless when I needed to say them out loud. I used Memrise for this, and it was pretty fun. The Chinese characters have interesting origins and it’s fun to try to come up with mnemonics for some of them. For example: 牛肉. 牛 looks a bit like a cow with it’s head over a fence, and means cow. 肉 looks like 2 steaks on a pan, and means meat. Together, it’s the word for beef.

I did not to a good job of focusing on learning the language. I know many people who have done it, but for me it was difficult to prioritize particularly given how often I was coming back to the US.

The food

I tried to eat adventurously. The only thing I really wouldn’t go near were the spiders. Here are some of the more unusual things I ate:

Rabbit Heads

Rabbit Heads

Snails

Snails

Yes, you can order a skewer of spiders. Or centipedes. Or silkworms. At other booths they had scorpions. And starfish.

Tried scorpion (but didn’t touch spiders)

Jellyfish

Jellyfish

Chicken feet.

Chicken feet

Pigeon

Pigeon

Some food seemed adventurous initially, like the fact that virtually all fish is served whole, but it just became normal. I loved the Chinese food. It bears almost no resemblance to American Chinese food.

Spicy Fish

Spicy Fish

Zongzi

Zongzi – traditional food of the Dragon Boat Festival


Baozi

Steamed Buns (Baozi. My favorite.)


They're like pork sliders but on flaky English muffins. Awesome.

Chinese Hamburgers


Hotpot

Hotpot


IMG_20141022_135423

Spicy beef (or pork)

The people

I met a lot of fantastic people in China – both expats and native. On only one occasion did someone come up and ask to take a picture with me, and that was when we were in the Forbidden City on the weekend. People in big cities like Beijing see plenty of foreigners these days, but The Forbidden City is a tourist destination that attracts people from all around China (you can compare it to people from around the US going to Washington, DC).

The most challenging parts of interactions were (obviously) the language, and the customs. People are generally forgiving that I don’t know their customs, ex. sometimes I’d forget and offer/accept something with one hand instead of two. Similarly, I’d find myself forgetting that they don’t share western customs – holding a door open, saying “bless you” when you sneeze, etc. It’s different enough that I never really felt like I was fitting in. Unlike Shanghai which is uniquely international and pretty easy for Westerners, Beijing is a very Chinese city. Most people don’t speak English. Of the people who do speak English, most don’t speak it much better than I speak French (ie. they learned it in school but don’t have much excuse to use it). So, that makes a lot of interactions hard.

I eventually did a fine job at navigating the “happy path” of interactions, but I would get in trouble if things went off course. For example, I can pay a bill at a restaurant, but trouble strikes if they have an issue with the credit card. Or, if I’m checking out at the grocery store and they ask me anything other than “do you want a bag?” by pointing at it.

The sights

Unfortunately I didn’t see much of the country overall. Virtually all of my time was in Beijing, with the exception of one weekend in Shanghai, and one trip to the Great Wall. The urban and rural parts of China are drastically different, and I wish I’d had more exposure to the rural parts.

ShanghaiInteresting BuildingSunrise in Wangjing
The Great WallBeast
Summer Palace

Protip: Discover Cards are compatible with China Unionpay. It’s the most compelling reason to get a Discover Card.

It’s different here

It’s always hard for me to summarize what it’s like in China. One thing that really struck me is that people didn’t look at me as “American” – I was just “Western.” In other words, the differences are so vast that knowing I’m from the West is enough to have a feel for my general worldview, my common customs, the food I typically eat, the fact that I probably don’t speak Chinese, and probably do speak English. Relative to China, Westerners are alike and the differences between Western countries are minor.

I was fortunate enough to get one of the newer 10-year visas before I stopped traveling for business. I hope I’ll have the opportunity to make further use of it.

Posted in me |

On Traveling Cross Country by Train

A few weeks ago I spent a week and a half traveling across the country by train. I enjoy traveling. By that I don’t just mean “going somewhere” – but the whole act of traveling, including long plane rides, airports… the stuff that many people dislike. Though there’s some burden to having to be somewhere at a given time, for the most part the whole act is decision-free. You get on a (plane/train) at X o’clock. You sit in your seat. You can read a book, watch a movie, or use the computer. It’s hard to explain why having a tightly constrained list of options feels so freeing. But, anyone who feels burdened by endless decisions can probably understand what I mean.

California Zephyr Route

California Zephyr Route

I decided to take Amtrak’s California Zephyr train, which starts in Emeryville, California and ends in Chicago, followed by the Capitol Limited which starts in Chicago and ends in DC. I started the trip by spending a night in Sacramento, boarded the train, and made a 1 night visit to Denver, 1 night in Omaha, 2 nights in Chicago, and 2 nights in DC. In each city, I booked hotels but otherwise made no plans.

When you ride a long-distance train (versus a commuter) you have two options: a Coach Seat, or a Roomette. I tried both: got a roomette for my longest leg (30 hours from Sacramento to Denver) and coach seats for the shorter legs.

RoometteWatching Dajarleeing Limited on a train
Ready to depart

The Roomette is designed for two people, so it’s quite roomy. As seats, you’d be sitting facing one another. As beds, he two seats slide down and fold together, and the second bed is the “top bunk” which folds down from the ceiling. It’s comfortable, private, and comes all-inclusive with meals in the dining car. Each sleeper car probably has a dozen rooms, there are multiple bathrooms and showers per car, as well as an in-car attendant (similar to a flight attendant) who sleeps in the car as well.

Steaks on a Train Train meals are considerably better than most domestic flights’. They have a dining car with a kitchen, so the food is cooked to order. The menu is small, though. In 2-3 days you can easily go through all of the breakfast, lunch, and dinner options. The dining car also requires all tables are seated with 4 people, so if you’re traveling alone or as a couple, you’re guaranteed to be seated with other passengers.

Coach Seats The coach seats are not remarkable, again unless you compare them to airplanes. They have considerably more legroom than even a domestic first-class plane seat, recline much further, and there’s an outlet for every pair of seats. The best part though, is that if you’re on an overnight trip, they somehow seemed to find a way for every passenger to get 2 seats. I never had a neighbor for a “redeye” trip. So, you can kick up the legrests on both chairs and make a pretty decent bed.

Surely the sights on the train vary based on the route you take, but here are a few examples of mine… riding though Colorado, and then a sunrise trip leaving Omaha:

While you’re reading, or watching movies, or writing code, you can always look out the window and watch the scenery change.

In each city, I tried to see the kind of sights, and eat the kind of food, that the city is known for. Sportswise, I saw a Rockies game in Denver, a Bulls playoff game in Chicago, and a Cubs game at Wrigley. I had a “Helton Burger” at Coors field, Nebraskan steak in Omaha, a few deep dish pizzas in Chicago, and a Half Smoke at Ben’s Chili Bowl in DC.

Most of the people on these long-haul trains are retirees who enjoy the rumble of the train and aren’t in a rush to get anywhere. Everyone’s quite talkative during dinner, curious where everyone else is from, going to, etc. If you spend time in the “view car” – which is a car with bigger windows, designed just for watching the scenery, you’ll likely find the same type of travelers looking to chat. On the lower-level of the view car is the “snack car”, also known as the “bar car.” I didn’t spend much time there, but I did meet an aspiring hip-hop producer who spent the better part of his journey there.

Some people asked me if it felt lonely. I was somewhat surprised that it did not. I don’t credit my fellow passengers for this, either. I think it’s because -though many stretches of the country don’t have cellular service- you’re still mostly connected. It’s not at all like a long plane ride in that way. If you have a funny experience, you can call or text back home, and get a response. Though you may be away from your friends and family, you’re not disconnected. The balance between “getting away” while still “being in touch” was something I really enjoyed. During the times you are offline, you can take that as your cue to read a book, or watch a movie, or look out the window and doze off. The brevity of your list of options is as calming as the options themselves.

Gmail’s new scrollbars subtly prevent me from sending mail.

In the last 2 weeks, I’ve noticed on several occasions I’ve thought I’d sent mail only to find it sitting as a “Draft” in Gmail. I began to think there was a horrible bug in Gmail and was having flashbacks to the days of figuring out why Outlook would leave mail stuck in your outbox.

Today I figured it out. It’s the scrollbars.

When you start replying to the message, assuming you scroll down a little into the body (which I seem to do often on my laptop’s screen, but less often on a desktop screen) the “send” button scrolls off. But, it’s not obvious that you’ve lost the send button, because there is still a top row of buttons. I wind up, subconsciously, clicking the “back arrow” button as the closest thing to “send” or “reply.”

If the scrollbars were the traditional browser-standard ones, it would be obvious to me that I’m in a frame that had scrolled down. For example, it’s obvious inside the message pane itself. As it stands now, I don’t even notice that a row of buttons has scrolled off of the page, since only part of the page is scrolling, and it’s doing so very subtly.

Bob Saget is a Bore.

I went and saw Bob Saget’s standup last night at The Moore, and it was one of the least laugh-inducing 45 minutes I’ve ever sat through. His opening act however was fantastic – I’d definitely recommend checking out Ryan Stout, who should have a Comedy Central special coming out soon.

For those who don’t know, Bob Saget’s standup is known for being dirty and edgy – in stark contrast to his persona on America’s Funniest Home Videos and his character Danny Tanner on Full House. The problem is, although his material is marginally dirty it’s not actually edgy or interesting. He spent more time warning us about the offensive things he was about to say, and very little time saying them. He was coasting on his reputation as a screen star for the whole time, without providing the audience with any clever or original material. His act included:

  1. A series of jokes about the movie Titanic. Yes, it’s 2009 and evidently that passes for topical, relevant humor. He even made a joke about how predictable the ending was. That joke was tired even before the movie was released… 13 years ago.
  2. He must have thought that edgy Titanic material was quite funny, because he made callbacks to it throughout the rest of the set. It was brutal. Just as I hoped we were going to move past it, he kept bringing it up again.
  3. A number of jokes he told which “his father told him as a kid” which were funny, but they weren’t his. They’re just old jokes. He repurposed them by wrapping them in a story about how young he was when his father told them to him. So, picturing a young kid hearing them was, I suppose, the originality he added.
  4. A few anecdotes about “Uncle Jesse” and Dave Coulier which might have been amusing if they were bigger stars, but it’s tough to be captivated about a story about how some B-List stars got offended by Bob Saget’s zany antics.
  5. His whole act was a little Robin Williams-ish, in that he was talking a mile-a-minute, and wouldn’t stay on topic. He’d start telling a joke, then it would remind him of something else, and something else, and you almost forgot what he was trying to talk about by the time he got back to it. Perhaps that was for the best, because there was no punchline to be found in any of it.
  6. He made a lot of mistakes. He would mispronounce a word, and then make a joke about how that’s not a word, and laugh at himself, and we were all supposed to laugh along with him. I wouldn’t normally think this was a big deal, but I found it oddly smug. When Robert Plant sings a lyric incorrectly, that is funny. He’s a legend, and when he slips up it’s amusing because he’s so great that you know you’ve witnessed a one-off mistake from an amazing musician. However, when a guy gets up there and tells a series of boring jokes, and then screws them up, there isn’t a joke there. Laughing is like an acknowledgment that he’s earned the right to screw up, based on his prior comedic success.

Anyhow, if Bob Saget comes to town I’d recommend skipping him. But, keep your eyes peeled for Ryan Stout. His jokes are brutal and hilarious. A few drunk fans even heckled him, and his responses were scathing and well-delivered.