Building Better Habits

These are my notes on an interview with James Clear: Designing Your Environment to Shape Your Behavior

  • Improving habits basically means overcoming your orientation toward immediate gratification to instead improve delayed returns.
  • To create habits that stick, you need to:
    • Make it obvious
      • This is the cue/trigger to remind you to do the thing
      • Design your office/home/desk/etc. to encourage the habit you want
      • E.g., don’t hide your fruit & vegetables in the crisper drawer, put them on the counter!
    • Make it attractive (the more attractive it is, the more you crave doing it)
    • Make it easy (the lower friction it is, the better)
    • Make it satisfying (he more satisfying it is, the more you want to repeat it)
  • The goal of doing these is to remove willpower from the equation
    • People who are successful in maintaining good habits are the ones who do not face temptations… not the ones who are magically more strong-willed
    • Willpower can’t sustain you long term
    • Resisting negative cues in your environment is very fatiguing
  • For negative habits (stuff you want to stop doing; “habits of avoidance”), do the opposite:
    • E.g., make it non-obvious—don’t tempt yourself by seeing it!
    • A few approaches to making the negative habit satisfying:
      • Replace the bad habit with a good one
        • This is important: you need some sort of reward for doing the new thing
        • It still needs to satisfy the same craving that you used to have
        • It can’t just be about having willpower to resist doing the original thing
      • Increase the friction massively to do the bad thing (remove the exposure to trigger yourself)
      • Make “doing nothing” more satisfying than doing the bad thing
        • E.g., instead of buying a coffee, every time you were going to buy one, put $5 in a savings account
        • Gives you a benefit for when “nothing happens”
  • For big, important, key areas of your life, you can start by making the habit really easy (and basic), and make it successively more difficult to get the “reward”
    • E.g., start with 1 minute of working out a day, scale up to 30 mins or whatever
    • Only applies to areas you want to be truly great
    • For most things, good enough is good enough (it’s not worth being the best flosser ever)
  • Reaching more abstract goals (e.g., write 25 blog posts this year) by shaping your habits
    • The key is to make it *feel* immediate and concrete
    • Give yourself a strong visual of your progress
      • E.g., start with two bowls, one full of paper clips; each time you take the action, you move one paper clip over; your goal is to move all the paper clips from one jar to the next
      • Habit trackers work the same way
        • Putting an X on the calendar is satisfying
        • Each X reminds you to do it again
  • Automatic habits (stuff you do without even being aware of it) can lead to really important routines
    • You want to make the first 2 minutes or so of your important routine effortless
    • E.g., if I get home from work and put on my workout clothes, going to the gym becomes automatic and easy; but, if I have to make a conscious decision to put on my workout clothes, it might not happen at all

The world’s shortest review of the 15-inch 2018 MBP

I just upgraded from a 2015 Retina MacBook Pro to the new 6-core 2018 model.

I had a lot of trepidation about upgrading, considering all the reviews trashing the “butterfly” keyboard since its introduction (Marco Arment went so far as to say the my old 2015 MBP might never be surpassed), plus the recent FUD surrounding thermal throttling in the 6-core model. (Edit: Apparently throttling has been fixed.)

Here are my thoughts on the change, obviously taken from the perspective of using this for full-time software development:

  • Oh my God, the power. I will never buy another laptop with fewer than 6 cores. The only metric I care about: full recompile times on X-Plane’s large C++ project dropped by about 40% compared to the 2015 model. (!!!)
  • Complaints about thermal throttling are massively overblown (probably subject to specific CPU+GPU-intensive workloads). I benchmarked 10 recompiles in a row and didn’t see any throttling.
  • The level of hardware engineering here is still unparalleled. It’s thinner than the 2015 model, prettier, and may have better battery life. (An apples-to-apples comparison with my 2015 model is no longer possible, of course.)
    • Related: The screen is (unbelievably) both easier to open with one hand and more stable when open. (Nothing irritates me more than a laptop’s screen shaking as I use it.)
  • USB-C is both great and terrible. (Charge from any port? Fantastic! Need an adapter for “old” USB? Ugh.) Obviously this will alleviate itself over time as more stuff goes “natively” USB-C. I may end up buying a Lightning-to-USB-C cable so that my phone can use the same power adapter as the laptop, which would be nice. For now, this travel-sized hub helps a lot.
  • The über-polarizing keyboard takes some getting used to, but I like it. (Which surprised me, because based on reviews, I expected to either love it or hate it.)
  • The Touch Bar is a useless gimmick if you’re the kind of person who obsessively memorizes keyboard shortcuts (which I am!). I’d much rather have a physical Escape key, but remapping Caps Lock to Escape works fine.
  • Touch ID on the keyboard is “just” fine. I use it, but I wouldn’t miss it if it weren’t there.
  • The oversized trackpad is also “just” fine. It’s smart enough not to be activated by resting my palms on it when typing, but having to go alllllllll the way to the lower right to activate a right-click is a bit annoying.

Overall, it’s still the best laptop I’ve ever owned, hands down—just like my 2015 model was when I bought it.


The Worst Bug I Ever (Nearly) Shipped

The year was 2014. I was wrapping up about a year’s worth of work on the X-Plane 10 Mobile release, and we were all set for a Christmas release. Timing this was difficult—we were pressed for time, and the App Store approval process takes an indeterminate amount of time; you submit a binary, then wait (in those days, at least 7, sometimes more than 14 days) and hope they approve it. If they don’t—if they reject the app for any reason—you have to go fix the issues they identified, then submit a new binary (and go to the back of the line).

To make matters worse, the App Store approval process shuts down entirely for about a week around Christmas. So, if we missed the December 22 deadline, we wouldn’t get the app out at all until the first of the year.

So, on December 16th, Chris (the project manager for the mobile app) called me. “Congrats,” he said. “We made it! They’ve approved us, and I’m going to go do a little bit more testing and then mark the app for sale.”

“Awesome!” I said. “I’ll do a little more testing as well.”

You can tell where this is going.

All the aircraft in X-Plane Mobile are sold separately, somewhere between $0.99 and $4.99. But, we offered two ways to try the paid planes for free: a 60 second trial flight, or a free 24-hour “unlock” with one catch: you had to post something on Facebook or Twitter about X-Plane in order to get the 24 hours of playtime. This whole “pay-with-a-post” thing was my brainchild… I had read about other apps doing it, and I had been 100% responsible for the implementation.

In my testing, I discovered that sharing to Facebook worked fine… but the app wasn’t actually unlocking the planes after you did so!

I had inadvertently introduced the most infuriating bait-and-switch imaginable.

I was nearly ill as I called Chris. I explained what happened—how my screwup was going to force us to have to pull the app, resubmit it, and entirely miss the Christmas release window. To his credit, Chris was devastated, but he didn’t berate me about it. Bugs happen, he said, so let’s just get it fixed ASAP and move on.

I got the one-line fix committed as soon as we got off the phone. Chris was able to contact Apple and explain the situation. As luck would have it, they took pity on us and went ahead and reviewed the fixed version of the app (without sending us to the back of the line). We got the app out the door the next day, in time for Christmas break, and we both breathed a huge sigh of relief.

Conference Talk Playlists for C++ & Game Developers

I’ve put together a number of conference talk playlists for my own “professional development.” This is a list curated by going through hundreds of talks in the GDC and CppCon archives.

I’ve tried to keep overlap between lists to a minimum. I’ve not watched everything (erm… obviously!), but in cases where I have watched a talk, I’ve only left it on the list if I actually got something out of it.

If you have your own playlists to share, by all means, drop a comment below!