Fasting and Travel: A Report From the Field
I’ve been noodling with intermittent, morning fasting recently, and just put it to practice on a trip to Greece. Here’s my experiences with both: I hope my anecdotes are helpful, and shed some light on an experience which others may be considering.
Food
Food is a finicky little problem for me. Every meal, every bite, is a joyous little moment in my day, one of visceral delight and pleasure. Deriving experiential pleasure from caloric ingestion is a very tricky thing to navigate: I’ve learned I must anticipate this when I plan a meal, its ingredients, and its size, and need to be present for every bite. Without imposing a heavy-handed, highly cognitive self-regulation during a meal, every nibble, even when I’m full and sated, will earn a stamp of approval from my naïve and error-prone mental arithmetic: on its own, each bite brings immediate happiness, and incurs a small, abstract, longer-term cost, so I nibble my way from “sated and full” to “regret and sadness”.
I did a small project with two meditation group friends on being more mindful of one’s habits, and my odd tendencies of food consumption came to mind. I evaluated some changes to my environment and behaviours which could be introspective, or perhaps affect a change directly. Intermittent fasting has been one of the more interesting ones.
My first fasts have been in the morning: rather than eating breakfast, I stretch out the period of foodlessness from dinner the night before through to lunchtime. In practice, it’s simple: in the morning, I pick a time to eat lunch, around 12:30 or 1 PM, and take a moment to plan out a healthy meal. Once that’s figured out, I make a cup of black coffee (importantly, no milk or sugar) and go on with my day. (I don’t drink much coffee, but I’ve found a good half or full cup of coffee helps keep me energized and distracted from my grumbling stomach.)
I’ve been surprised and impressed by my brain and body’s reactions to the fasts. They feel clarifying and simplifying: there’s no meal preparation or cleanup, and having my lunchtime menu and time planned out helps silence my brain’s normal angst and perpetual hand-wringing about hunger and food: “Am I hungry now?” “When did I eat last?” “Is it ok to eat now, or should I wait?” “Should I snack, or wait and make a full meal?” “Rice pudding is an acceptable breakfast, right?” “I don’t really want to take the time to cook, but I’m hungry…” Also of significance: my body’s hunger subsides an hour or two after my usual breakfast time, and it doesn’t seek revenge at lunchtime and come roaring back.
I’ve done a small morning fast for a few mornings while working at home, and during a couple of travel days on the road. I’ve found it easier than I’d expected, and a very calm experience. It reminds me, in some strange ways, of meditation: it’s a very deliberate removal of a stimulus from one’s environment, and in its absence, there’s a bit more space and free airtime for other things.
Around the same time as I began my fasting project, I realized I might have a trip from San Francisco to Greece on my schedule. I’d wanted to try a fasting-oriented approach to coping with jet lag, and this was great practice: the fast I’d need to do while traveling would be at least 12 to 16 hours, possibly longer, and I’d be awake for most or all of it. Greece is 10 hours ahead of San Francisco; during a trip to Uganda last summer, also 10 hours ahead, I suffered from jet lag for several days, I was suddenly very interested and motivated to try something new.
The rough principle behind fasting during timezone travel: by removing the day’s normal food schedule cadence, you upend your body’s day and night rhythms. When you break your fast in your destination in the morning, and sync up the rest of your day with the new time zone’s food schedule, your body, hungry for food and eager for stability, takes the hint about the change in time far more easily than if you’d continued eating on a normal schedule. As I explained this to Patrick and Maja: normal international travel is confusing to your body. You wake up, eat breakfast, lunch, then dinner after dinner after dinner, a snack, another dinner, one last dinner, and then go to bed. Fasting keeps it simple: wake up [loss of food signal] off the plane breakfast lunch dinner bedtime!
(More reading on jet lag and fasting: a write-up from Harvard Business review on the original research, a bit in Harper’s Magazine, Jezebel with a handy timezone calculator, and the obligatory Lifehacker article.)
So: here I am in Greece, three days after my arrival, and I feel pretty great. Here’s my little story, a few anecdotal data points, from which someone can perhaps draw some inferences or plan out their own fast:
My departure, travel to Europe, and arrival in Greece
I ate my last meal in San Francisco at 10:30 am Pacific: I had a regular night’s sleep, and ate a small breakfast with a small espresso. I fasted for 13 hours, skipping lunch in SFO and dinner on the plane, slept less than an hour on the plane, and ate breakfast shortly before landing in Frankfurt. (Frankfurt is one hour behind Greece, nine hours ahead of SF, and this meal was provided around 8:30 am local, 9:30 am Athens, 11:30 pm San Francisco)
I crash-napped briefly on my next flight, from 3 to 4:30 pm local time (6 to 7:30 am PST), and ate dinner in the airport around 8 pm Athens time. I slept fitfully that night, but did get around 8 hours of rest, from 10:30 pm to 6:30 am (and I caught a pretty delightful sunrise!)
I ate on a regular schedule on my first full day in Greece: a substantial breakfast with a tiny cup of coffee at 8:30 am, and a large lunch at 2 pm. I snacked again at 3:30, and that was my last food for the day. At 6:30 pm, just as the light was fading for sunset, my body crashed hard, probably from the lingering sleep deprivation and general time zone nonsense, and I went to bed. (This was 8:30 am PST: perhaps my body had some fuzzy, lingering memories of sleepy weekend mornings it was trying to recreate.) I woke up at midnight, fairly awake and pretty hungry, and had to keep myself entertained until sunrise and breakfast. So, in sum: 5 hr 30 min of sleep.
I had breakfast at 8:30 am on that second, very insomniac, day, totaling up to a 17 hour fast. I ate on another normal schedule that day: coffee with breakfast, espresso at 11 am, lunch at 1:30, and dinner and drinks around 7:30–8 pm. I was sleepy in the early evening, but stayed up, and crashed into my bed hard at 10 pm. I slept pretty soundly until church bells woke me up at 7 am, for 9 hours of sleep.
In Review
My daily energy has felt quite completely normal from the morning through daytime hours until 6 pm. Even today, my third full day here, my body felt drained and sleepy right around 6. (Then again: I get yawny right around 9:30 pm on a normal day at home, so maybe I’m just a bit early of that mark.)
My sleep has been weird: I slept real funky that first night, had a bad night on the second, and I’m not sure if last night’s rest was the start of a better trend, or a post-insomnia correction.
My appetite has been in sync with the usual local mealtimes. It’s nice to be hungry when places are open, and aside from night two, to not wake up to a growling stomach.
What I think has been effective:
I’ve avoided an unnecessary amount of caffeine. I’m happy to go to bed a bit early: 8 or 9 pm is fine by me, as long as I get more than five or six hours of rest.
I’ve avoided drinking for the first couple of days. It’s pretty normal to sober up while sleeping, and your body has a brief middle-of-the-night wakefulness episode as a result. If that were to occur while my “middle of the night” was actually “10 am Pacific time”, I’d expect to have a tremendously difficult time sleeping.
I’ve stuck to normal meal schedules. I woke up fairly damn hungry at midnight that second night, but I knew a 2 am snack would do more harm than good. I drank plenty of water and kept myself occupied until it was breakfast time, and I think that extended fast probably helped cement my body into the local timezone.
What I’d do differently next time:
I wish I’d done a longer fast during the flight out. If I’d skipped breakfast on my day of departure, my total fast from dinner in SF to breakfast in Frankfurt would have been 26 hours, instead of 13. I think this would send a much stronger signal about the time change.
I’d consider being less rested for my flight, or traveling during a different time of day. When traveling west to east and landing in the morning hours, you’ve effectively excised the origin time zone’s sleep hours from that day’s schedule. If I’d had my usual bedtime occur while on the plane, I’d have gotten three or four hours of rest, breaking up an irrationally lengthy day. (Going from 8 am wake-up in San Francisco to a 9 pm bedtime in Greece is a 27 hour wakefulness marathon. It’s pretty funky.) All things being equal, I’d prefer to sleep my way through a fast, especially if it’s more than 20 hours.
Initializing a view controller from a nib on iOS 8
What I’ve got:
- A UIViewController subclass
- A XIB for the view controller’s view, named “MyViewController.xib”
How I’m using it:
MyVC *vc = [[MyVC alloc] init];
On iOS 9, this works: iOS loads the VC’s view from the xib, and hooks up its IBOutlets.
On iOS 8, this doesn’t work. (Tested in the iOS 8.4 Simulator, and on an iPhone 5 running iOS 8.4 (12H143). This seems to be a bug in iOS 8.)
To work around this, I’ve added some shim code to my VC:
// When calling `init()`, iOS 8 doesn't load our xib. Make sure we do.
// http://stackoverflow.com/a/25152545/774)
convenience init() {
let className = String(self.dynamicType).componentsSeparatedByString(".").last
self.init(nibName: className, bundle: nil)
}
Easy enough! Now this class can be used elsewhere with the traditional simple allocation call, without the caller needing to know it’s backed by a xib.
Here’s a forkable gist.
This was the oldest link saved in my Safari’s Sessions tabs. From 2012. (I’m a hoarder.) Somewhere from Ghostly, I think.
Apple Chargers and iPhone 6s
tl;dr: The iPhone 6s charges at the same rate on Apple’s 5W, 10W, and 12W chargers. (It charges at 5W.) If you’re using the phone heavily while it’s charging, the 10W or 12W chargers can provide additional power, ensuring the phone charges at its max rate while being used. But unless that’s a common scenario (needing the fastest charge possible, while also using the crap out of the phone), I wouldn’t bother finding/buying a 10/12W charger.
Here’s quick bit of data about iPhone 6s charging on different Apple (and a third-party) USB charging bricks.
This started with Marco’s sloppily-worded headline (“Charge your iPhone 6/6S faster with an iPad power brick”), despite the source material only measuring charging a iPhone 6S Plus, not an iPhone 6s.
So here’s my totally unscientific, n=1 data sample, for my iPhone 6s.
My measurement scenarios:
- Max draw: the highest-achievable draw from the wall. To do this, I turned up the screen to full brightness and ran Geekbench’s processor benchmark.
- “Normal” draw: measured immediately after the device is locked, but before it steps into a lower power, idling + charging mode. This is, more or less: all the chips are on, but the screen is off.
- Average draw: the power draw level which my phone eventually quiesces to. This is the rate any ol’ phone, plugged into any ol’ charger, will charge at. (Ignoring iCloud backup or background fetch which use a bit of power for the processor and wifi/cellular connections.)
I measured:
My measurements:

Analysis (from a person on a sofa in their pajamas):
Regardless of the charger’s maximum rating, the iPhone 6s, when sitting with its screen off, just chillin’, charges the same on all chargers.
If the phone is under heavy load (e.g. screen on, streaming data from the network), the higher-watt chargers have the headroom to provide additional power for the processor’s power needs along with the normal current for charging the battery.
In other words: I’m going to hold onto my 5W chargers. I’ll continue to travel with one, and I’ll keep them scattered about the house. I already have one iPad-specific charging spot in the house, but I’m definitely not going to buy any 10W chargers for my phone: I don’t charge while I play games, so it’s not necessary.
If I need to use my phone while charging it, I’m probably running out the door, so I use a battery pack or a battery case. The Wirecutter’s reviews here are 👌 just the gosh-darn best, and their piece on extending your iPhone’s battery life is also fantastic.
My single biggest battery-saving recommendation for iPhone users: turn on Low-Power Mode. You can even do that with Siri by saying, “Turn on Low-Power Mode”.
Naming San Francisco General
Why is a San Francisco hospital named for a social media billionaire, when his wife works there as a doctor in pediatrics?
While Mark Zuckerberg’s Facebook stock bankrolled a $75 million donation to SF’s General Hospital, his wife, Dr. Priscilla Chan, is the doctor of the family. She went to med school at UCSF and did her pediatric residency there (and worked with friends of mine). She now works in pediatrics at SF General, and it should have been named for her instead: “Chan San Francisco General Hospital”.
A generation will grow up asking, “Who is SF General named after?” I do not want to have to speak of Zuck any more than I’m required to by law; I would much rather tell Priscilla’s story: she is, by all accounts, a kind, smart woman, who does not have to work for money, but works all the same, because she wants to help people.
users want secure apps and devices, but they don’t use crypto language when they ask for them
This post from a developer who worked on Google’s Allo included a great blurb about designing security for users:
Simply Secure did an awesome study where they asked a group of users what they think about secure messaging in mobile apps, and here’s what they found [emphasis is Thai’s]:
“After in-person, semi-structured interviews with 12 African-American New Yorkers about mobile messaging, we identify design directions to improve secure messaging.
We uncovered a contradiction between the participants’ concerns and the priorities of the developer community. Participants:
- Believe online/governmental surveillance is inevitable
- Worry about physical security of mobile devices
Developers should better communicate the value proposition of secure messaging through app store descriptions.
- Secure messaging and open source weren’t understood terms
- Participants proposed the term “blocking”
Secure messaging was assumed to mean auto-deleting messages from the device.
- Time-limited messages were the crucial privacy-preserving feature.”
In summary, he states: [copyedited for readability, emphasis is mine.]
To most users, what matters the most is not whether the NSA can read their messages, but the physical security of their devices, blocking unwanted people, and being able to delete messages already sent to other people. In other words, their threat model doesn’t include the NSA, but their spouses, their kids, their friends, i.e., people around and near them.
Cleaning out Xcode Simulators
The internet’s results for this are terrible, so:
For Xcode 7.3:
- Quit Xcode
open /Library/Developer/CoreSimulator/Profiles/Runtimes/- Remove any old Simulators you don’t like.
- Launch Xcode.
Attending a Meeting With the MTA Board of Directors in San Francisco
I just went to a four-hour MTA board meeting at City Hall. Here’s a few things you should know:
Before you go, look up the agenda for the meeting. Find out where your issue is in the schedule: is it early? late? dead last? (I got most of my inbox triaged by the end of the meeting.) (City Hall had pretty good T-Mobile coverage.)
When you arrive, check in with the person running the meeting, and register for public comment on the issue you want to speak about. It doesn’t matter when you register, so long as it’s before they vote, but I recommend doing it before the meeting starts.
If you want a seat in the main room, get there 10-15 minutes early.
Today’s meeting opened up with nearly an hour of vociferous complaints from taxi drivers about medallion prices and availability. I believe there’s always a general comment period preceding the vote-specific public comments. You could probably skip the first 30-60 minutes while everyone has their personal Two Minutes Hate.
For each issue up for a vote, they take a presentation from relevant city officials, if any, then take comments from the public in two-minute chunks, if anyone has registered to comment. After public comments, the board discusses the comments and presentation, may call up officials if they have additional questions, then eventually make a motion for passage or denial of the agenda item.
As you head up to speak, remember a few things:
- You have two minutes.
- Take a deep breath.
- Slow down.
(Some people made a point of stating, “I’m speaking in support of/in opposition of….” I don’t know if this is tallied up in any way, but I got the impression that the board cares to see how many people say, explicitly, “Hey, I’m in favor of/against this.” What’s up with that?)
I think there’s a way to attend and comment which requires less than an entire afternoon:
Look up the meeting agenda, know where on the docket your issue is. Come in before the meeting to add your name on the list for public comment, then go work at the public library or nearby coffee shop.
Watch the meeting live on SF Gov TV. (http://sfgovtv.org) Know where in the schedule your vote is, and head over just before it comes up for discussion.
Other things I learned:
They do read letters and emails they receive, though they get some really gnarly and unhinged ones. A letter of support or critique matters in the aggregate.
If there’s an issue which is a toss-up for them, show support or opposition with bodies. 10 or 20 people coming in person to speak is a big deal. In this meeting, the board went through several rounds of discussion amongst themselves and with MTA staff for a motion that would otherwise have been a quick up-and-down vote. They did so specifically because there was so much public comment about it, and because it was clear there was room for improvement.
Why did I go? To support a neat new traffic plan on Twin Peaks. It passed, by the way, and I got a smile and a nod from one of the board members as I left.
I also spoke with two of the board members during a quick recess and bonded with them a bit (mostly about the hundred taxi drivers). Building a relationship with the staff is likely the best way to get an idea of their concerns before the meeting and vote, and perhaps give you a chance to address them in the public comment period before their own intra-board discussion.
Democratic government access is a very simple equation: giving a shit + having the time. Most every lacks one or the other. None of this is news, but it was fun to experience first-hand. (And in the back of my mind, I’m thinking, “I care about transportation a lot. Maybe I should get more involved with this.”)
Flux, Redux, React, and iOS
Some stream-of-consciousness notes for my future self about Flux/Redux, React, and iOS applications. These might be useful to you too. Say hi on Twitter: I want to know what here was helpful, and what questions you have.
Takeaways so far
- Flux is Yet Another Data Flow model for building applications. Andrew’s post helped contextualize why this is important for web front-ends: they’ve lacked the structure which UIKit brings/imposes on iOS applications.
- This is to say: Flux is cool! I like the conceptual lines it draws around different parts of an application’s logic. I think they’re good lines. MVC, MVVM, VIPER: these are all just slightly different circles we draw around the myriad bits of work an application performs, and we group together the things which are most like each other to try and reduce conceptual and implementation complexity.
- But! I think Flux’s magic is not in anything it does: its magic is in React’s Virtual DOM.
The Virtual DOM
The Virtual DOM, and its diff calculations, is what makes this architecture work. The concepts in Flux, of dynamically-dispatched, loosely-bound updates, and trickle-down data (re-)calculation, that’s all great, but: it only comes together in the Virtual DOM, and that’s what transforms it into something that works, works well, and looks good. I think the Virtual DOM (and an iOS equivalent, a virtual/shadow view and view-model hierarchy) would make nearly any architecture we’re using today work much better.
The Virtual DOM helps insulate the application’s view-oriented layers from the hard work of calculating the changeset from old to new data. In my applications, I feel like my View Controllers (and their View Models) spend 80% of their code dealing with different cases of data source states and transformations. This Stack Overflow answer about the Virtual DOM discusses of the Virtual DOM’s perks in detail. I particularly liked one paragraph of their answer, so I’ve rewritten it with iOS applications in mind:
A virtual view and view-model hierarchy lets us write our code as if we were re-drawing the entire screen. Behind the scenes, we compute a patch which updates the view hierarchy to look how we expect. One side of the application declares exactly what it wants, and the virtual view hierarchy will calculate how to make the current views look like this. We don’t have to do manual view manipulation or get confused about previous state; we don’t have to re-render the entire window, either, which is much less efficient than patching it with deltas.
Hmm.
That’s exactly what I’ve always wanted.
While We’re Talking about Philanthropy and Non-Profits
Sue Gardner’s post about Wikimedia and fundraising is another good read. She talks about the impact fundraising has on an organization’s priorities, and how it’s at cross odds with organizational effectiveness.
Plus, I really liked this bit about donors and their inexperience in the problem domain. The New Yorker piece on the Ford Foundation also brushed up against this idea. (The trick: take donors’ money, not their advice.)
This effect is amplified by the presence of major donors, who are typically wealthy retired business executives.
That’s because major donors like to feel their advice is as useful as their money, and they have decades of experience of people taking their opinions seriously. But they can’t necessarily say much that’s useful about the specifics of helping victims of domestic violence or rehabilitating criminals or protecting endangered gorillas in the Congo.