Hi, I'm Sam.

I like to create software, make music, and write about technology.

Find out more about me.

On Managing Money

Posted in general and money

I generally suck at managing money. My usual attitude to paying for anything is "I need this, so here is the money." When people ask me how much things cost, I never know. This is stupid.

I've kinda of brainwashed myself into thinking I don't have a choice except to pay for this. Doing pretty well as a software engineer in San Francisco makes this a possibility. I realize how stupid this is.

Anyway, I'm starting to hopefully break the habit.

Progress

Monthly subscriptions seemed like a logical place to start. I had a ton of services I have been paying for and either not using at all or could easily go without. Here's a list of services I canceled or downgraded tonight:

  • Netflix - watching less TV now
  • Hulu - watching less TV now
  • GitHub - not using pay features
  • Zipcar - not using any more
  • Railscasts - really love, but can go without for now
  • Vimeo - not using any more
  • Flickr - not using any more
  • Dropbox - started using Rdio, so no longer need the extra space for iTunes syncing
  • Xbox Live - rarely use and can go without
  • Rdio - switched from a family plan
  • DNSMadeEasy - switched to a cheaper service

I was pretty proud of the big dent I made in my wasted spending. That's $930 in savings a year. Not bad.

Do It.

This is a great exercise. I just went through my bank statements and identified as many of these subscriptions as possible. The yearly ones are obviously harder to find, but you get the idea. Anyway, if you suck at managing money, this is a good place to start. Highly recommend.

UITableViewCell Silly Magic

Posted in development and uikit

Ever had a UITableViewCell's imageView not update when you set it's image in a callback or block? It's amazingly frustrating. I usually end up going over and over the code to make sure it sets it on the main thread, the image isn't nil, the image view is on the screen, etc, etc.

The Problem

UITableViewCells don't update when you set the imageView's image. UITableViewCell's imageView is magical and stupid. If you don't have an image in the imageView, it will nil it out and remove it from the contentView. When you set the image, it will cache it and do some silliness so your updates don't work.

The Solution

Make your own image view. Easy as that. Don't use the imageView property unless you want it to work exactly the way Apple uses it in Music.app for albums. For anything else, just make your own and add it to the contentView.

Trust me, you'll save yourself hours of frustration.

Always Initialize to Nil

Posted in development and objective-c

Here's an excerpt from a great blog post on why you should always initialize your variables to nil.

“Always initailize your object variables to nil, no matter what, because some day they may be captured by a block and if they contain junk when the block is copied you’re going to crash.”

It's just good practice, but this really sums it up. Thanks for the write up Ryan Perry!