Stanley Kubrick Exhibition

Last Sunday I had the opportunity to check out the Stanley Kubrick Exhibition currently at the Contemporary Jewish Museum here in San Francisco. I’m a big Kubrick fan and seeing the props, correspondence, and equipment presented as sort of a journey through his career was really interesting.

If you’re in the area and at all interested in Kubrick’s work, you have until October 30th to go, and you definitely should. In the meantime, you can check out the Flickr album I created with some of the photos I took of the exhibit.

Stanley Kubrick Exhibition

In Praise of Non-Magical Pointing Devices

Last week I tried playing a game on my Mac for the first time in a long time. About a minute in I realized that a trackpad or Magic Mouse was not going to cut it. I needed something with actual separate buttons that click. The one I landed on, after reading a few positive reviews, was the Razer DeathAdder Chroma. Yes, I agree the name is ridiculous. I choose not to focus on that.

I like it for a few reasons:

  • It’s the number one gaming mouse on Amazon, but doesn’t look too much like a gaming mouse, which is good, because I couldn’t look at one of those and take myself seriously.
  • It only has two side buttons, which is just the right amount for me. I bound them to back and forward in Safari, Xcode, etc.
  • The driver software is fantastic for the tiny bit of tweakiness I want (assigning those side buttons), and also totally Mac compatible. You can even easily set different button configurations for different apps, and it will switch automatically.
  • It feels pretty good in my hand. The buttons feel nice and clicky, too. The Magic Mouse gives me hand cramps.
  • It was only $50.

The things I miss are interial scrolling and gestures. But those suck on the Magic Mouse anyway, and are easily fixed by placing my trackpad on the other side of my keyboard for gestures.

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.

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.

Functions as Factories

Cocoa at Tumblr:

Factories are a fairly well understood design pattern in software development. The benefits of using factories include:

  1. Abstracting constructors away from clients.
  2. Encapsulating data that clients do not need to know about.
  3. Allowing for more testable code by enforcing the idea of passing objects into initializers instead of referencing singletons directly.

This post will show the power of a few Swift features as well as of first­-class functions.

Dynamically Sized Table View Header or Footer Using Auto Layout

I’m trying to support Dynamic Type everywhere I can in my new app. Auto Layout and self sizing table view cells (buggy as they are) makes that a lot easier for the most part. Still, there’s other places that just setting up constraints and changing the font size of a label isn’t enough. The one I’ve just dealt with is a table view header (UITableView().tableHeaderView) with text in it. If I do nothing but set up my constraints and set the header view, the font size changing will just cause extra space to appear or my text to get cut off.

The solution was to override UIViewController().viewDidLayoutSubviews(), get the proper size of the header view based on it’s constraints, set the frame on the header, and reset it as the table header view.

It took me a little while to figure this out, so here’s what I did:

You Can Do This In Swift

This isn’t a hidden feature or anything — it’s just how optional binding works — but I guess what I didn’t get before was that this (responseObject’s type is AnyObject):

Could become:

So much better. So much code to delete now. Put this under the category of “things I can’t believe I didn’t get until now.”

UITableView Extension to Deselect Selected Row

Nothing fancy. Just a tiny little extension method that makes doing this in Swift slightly nicer.