Brent Harping on Swift Limitations

Brent is harping on limitations you hit when trying to use protocol oriented programming in Swift:

But these days we’re smarter: we use protocols. There’s no reason Folder and File should descend from the same class — they’re almost entirely different, and inheritance is a pain to deal with, so we use protocols instead.

And we’re happy. It works great.

Until you realize that, in Swift, you can’t do this.

I hit something like this yesterday. So no, it’s not just him.

How John Zeratsky Became a Morning Person

This post on Medium by John Zeratsky echoes a lot of what I’ve felt, and what I’m trying to get to. This part describes how I’ve been my entire life:

It didn’t come naturally to me. When I had to wake up early—for a meeting, an event, or class—it was like the vignette above. I struggled to get out of bed. Often I barely made it to my engagement on time. And that rushed, zombie-like morning loomed over my day like a hangover.

John also was motivated by the same thing I am though; the promise of how much more you can get done by being a morning person. Whether I like it or not, the world isn’t likely to adjust to my natural schedule, so if I want to get by in it, I need to figure out a way to change this about myself. Missing mornings — or being awake but useless for them — means I’m missing a couple hours every day I could be participating in the world, or doing something good for myself. The best part is that it worked for John, and he’s kept it up:

It worked. I traded a typical night-owl schedule—up ’til midnight or later, staring at a screen, writing, doing design work, coding—for an uncommon routine where I go to sleep early, wake up early, and get a lot of work done in those quiet morning hours.

If he did it, maybe I’m not hopeless.

Spreadsheets Are Cool

I’m not accountant, I don’t financially analyzing anything besides my personal budget, and I have almost no occasion in my work to ever use one, but I get excited about pretty much any time I can think of a use for a spreadsheet. There’s a lot of times where a spreadsheet can replace an app made to do the same thing. A lot of the time the spreadsheet will be even better, because it’ll be customized to just the fields you need. Plus Numbers/Google/Office all sync now — which isn’t at all a given with apps. And if something I’m tracking becomes cumbersome with a spreadsheet, it could turn into a great proof of concept for my next app.

Let me give some examples.

Sleep Journal

As I wrote about in my last post, I’m currently in the process of trying to fix my sleep schedule and become more of a morning person. The way I’m tracking that is with a Fitbit Flex I wear to bed and a spreadsheet that I keep in Numbers. Fitbit tracks most the data I need, but not everything (what time I put on my blue blocking glasses and misc notes). Also, leaving that data locked into Fitbit doesn’t help me if I want to analyze my habits overtime with charts, or if I want to share that data (in a future blog post, for example).

Commute Journal

To get from my apartment in the Sunset District (also known as Mars) to downtown San Francisco and back, there’s a few routes I can take, and I’d like to know which one is the best. What I’ve started doing is tracking my trips by using the iOS clock app and marking laps at points I want to track (when I get on/off public transit). This way I can track the average time each route took, how much time I spent walking versus public transit, and maybe if there’s a way to combine those segments differently to cut a few minutes off my travel time.

Car MPG & Maintenance

I don’t currently have a car, but I do have an RV. I track what kind of mileage I’m getting, and also when there’s maintenance done. When you’re driving around in a 27 year old vehicle, it’s best to stay on top of these things. If I see my gas mileage tank, I start to think there might be something up, and I take it in to get looked at before anything gets too bad. I used to use the app Gas Cubby for the same thing, but since it stopped being updated, Numbers has done the job just as well.

Fixing My Messed Up Sleep Schedule

Sleep has always been a huge problem for me. My issue isn’t that I don’t sleep enough, it’s that I can’t sleep at night or wake up. If you don’t have a problem like this, that might sound stupid, but I’ve been like this as long as I can remember (at least since junior high). I’ve talked to a doctor before who thought I might have delayed sleep phase disorder, but haven’t gone so far as to do a sleep study.

Things I’ve tried are a sunrise alarm clock, a blue light I shine on my face in the morning, and over the counter sleep aids. They all helped somewhere between not at all and marginally. Last night, I tried something new: blue light blocking glasses. During the day, blue light from the sun tells your body it’s time to be awake and you start producing serotonin. At night the lack of that light tells your body to produce melatonin, which makes you sleepy. That’s what directs your circadian rhythm, which makes total sense evolutionarily. Unfortunately we didn’t evolve with televisions, household lights, and iPhone’s that produce that same kind of light in abundance. If you’re around any of those things, your body won’t produce melatonin and it will be harder to fall asleep (I’m sure this affects some people more than others). This web page explains it in more detail if you don’t want to just take my word for it. Anyway, I bought some glasses block blue light that I can wear in the evening to my body does the right things.

They are also the nerdiest looking things I have ever seen:

Blue light glasses

Never having company over in the evening again aside, the first night appears to have been a success. I started wearing them when I got home from work and was able to fall asleep earlier (surprising since I only woke up 11 hours before), and woke up the earliest I have in months (an hour before my alarm!) feeling fine. It would be sort of amazing if a $20 pair of yellow glasses really does that much to solve a problem that’s been ongoing for most of my life. My plan is to track my sleep (I love any excuse to make a spreadsheet) for the next couple of weeks and report back with the results. I also bought a new bulb for my sunrise alarm clock, so I’m going to start using that again, and I’m going to stop drinking coffee except in the morning.

Excited to see how this goes.

Cultural and Unconscious Biases

This post by eevee is specifically talking about video games, but I think a lot of it is a good characterization of discriminating behaviors, why they persist, and what people who don’t get it (saying “other side” feels wrong), don’t get. This part kind of jumped out at me:

There are, of course, also cultural biases that tip the scales towards people who are white or male or cis or whatever. But even if you don’t buy that, it shouldn’t be a stretch to think that there really are overt cartoon sexists out there in the world who are just not vocal about it. Some of them might be judges or managers or politicians. Some of them might even make video games.

You might think of them as weighted coins that always come up heads. And therein lies the problem.

You have 100 coins. You flip all of them. 60 come up heads. How many are weighted?

10, you might think. And you’d be wrong, because 60 heads is entirely possible, so you can’t actually be sure any of them are weighted! But there’s a much bigger problem: which 10?

I pretty much refuse to believe there is any such thing as a “meritocracy”, because even people with good intentions have unconscious biases. Good intentions (we just want to hire the most qualified candidate) aren’t enough to do the right thing. You need to actively and conscientiously work against unconscious feelings that you may have never even been aware exist. It’s really hard and it takes a lot of practice.

A Reasonable Take on Gun Control

This article on Huffington Post lays out what I think is an extremely a reasonable take on gun control in the US, with action steps that don’t sound like they should be impossible (but probably are).

Here’s some common sense for you. I want gun ownership to be as boring and annoying as car ownership. I want you to go to some Department of Weapons and sit for hours. I want folks who own guns to prove their skill, their mental and physical health, and to be licensed and reviewed over the years just as happens with our driver’s licenses. You earn the right to own and drive a vehicle; earn the right to own and use a gun.

I take Adderall as medication for ADD. It works for me. Getting ahold of it was a pain in the ass, not just the first time, but every time. First I had to find a doctor who would prescribe it to me, which wasn’t easy, and once I did explain what I was feeling in such a way where they wouldn’t think I was looking to score (I tried non-stimulant medication first. it didn’t work). Then I had to get my insurance to pay for it. Having achieved those goals, I now have to take a physical prescription to the pharmacy every month. Also my doctor is in Oregon, and I’m in California. Since Adderall is a controlled substance, they won’t fill my prescription here. I fly to Oregon once a month to fill my prescription because that’s easier than going through the whole process of finding a doctor again.

There’s some potential for abuse of the medication I take (although much less since I take the extended release version). Anyone probably shouldn’t be able to just buy it over the counter. But for fucks sake, why is it easier to get a gun — who’s only functional purpose is to take another persons life — than for me to get medication that helps me stay productive and focused and was prescribed by a doctor?

Brent’s Post About Social Anxiety

Brent wrote a post that pretty much describes how I’ve felt my whole life. This part grabbed me:

I hated school even through my couple years in college. And here’s what that kindergartener’s fear turned into: the conviction that most people are likable, but that somehow I’m marked, and people can tell instantly, just by looking, that I’m not likable.

This feeling of being marked, of being obviously unlikable in some fundamental and obvious-to-everyone way, persisted into my early 20s.

The difference for me is that this feeling has continued to persist (I’m 30). There’s a few assumptions I’ve held onto for long enough that I don’t even have to think about them consciously:

  • None of my friends like me as much as I like them.
  • Others have a strong sense there’s something wrong with me.
  • If I ever really needed help, I’d be on my own because no one else deep down really cares what happens to me.

If someone as instantly likable and personable as Brent could have some of those same feelings, then maybe I’m not really all that bad either? I can’t believe I’m actually sharing this with other people.

Overcast 2

Overcast 2 by Marco Arment is now available on the App Store. I’m sure I use Overcast more than any other app on my iPhone, and I think people are going to really dig the new streaming feature. Since I think I’m one of the people for whom streaming isn’t really a big deal, my favorite feature is the ability to support Overcast by actively (and optionally) patronizing the app. None of the features are locked behind a paywall anymore, if you like the app, give what you think it’s worth. I’ve already done it.

Marco explains why he went this way on his blog:

80% of my customers were using an inferior app. The limited, locked version of Overcast without the purchase sure wasn’t the version I used, it wasn’t a great experience, and it wasn’t my best work.

With Overcast 2.0, I’ve changed that by unlocking everything, for everyone, for free. I’d rather have you using Overcast for free than not using it at all, and I want everyone to be using the good version of Overcast.

Auto-Incrementing Build Number Script

I got this from somewhere I can’t remember. I’ve been using it a while and it works very well. I have it setup so that it will happen whenever I archive a new build for beta or release. You’ll want to change those configuration names to whatever your configuration names are in your project.

Add a “run script” phase to your targets build phases with this script and put it just below “Link Binary With Libraries”.