Skip to main content

This is ZX81.org.uk

When to use -retainCount?

Preamble: In pre-Swift and pre-ARC days of development on Apple’s platforms, it was necessary to “manually” retain and release objects as you used and discarded them. One common, but incorrect, pattern that kept reappearing was the idea that you could use the retainCount method to ascertain whether an object was still being used.

## When to use -retainCount? Never!

There’s pretty much never a good reason to use -retainCount. Here’s a short and mildly abusive explanation why.

QA Mindf**k

When I read Rand’s recent post on QA I was pretty much entirely in agreement. A good QA team is a real asset to any project, especially large ones. However, a bad QA team can be a huge liability and cause problems for everyone.

Bad testers don’t understand the product they’re working on. They follow test scripts they don’t understand, write short, inaccurate bug reports and make no attempt to appreciate the context of any error.

Java and Yosemite

!["To view this web content, you need to install the Java Runtime Environment."](https://i0.wp.com/www.zx81.org.uk/wp-content/uploads/2014/11/Screen-Shot-2014-11-03-at-20.42.54-300x152.png?resize=300%2C152)
“To view this web content, you need to install the Java Runtime Environment.”

Ever since upgrading from OS X 10.9 to Yosemite (10.10) I’ve been getting the above error message periodically. As far as I know I have no software that needs Java to run.

When I asked on Twitter, the most common suggestion was that it was the Adobe updater. But I don’t have PhotoShop or anything else likely installed.

Furry

[![Furry: not in a cinema near you](https://i0.wp.com/www.zx81.org.uk/wp-content/uploads/2014/10/furry-202x300.jpeg?resize=202%2C300)](/blog/furry.html/attachment/furry)
Furry: not in a cinema near you

For some reason, when I saw the poster for the new movie “Fury,” I misread it as “Furry” and saw a beard on Brad Pitt that wasn’t really there. I’ve tried to correct these errors.

ShareEverywhere

![ShareEverwhere main screen](https://i0.wp.com/www.zx81.org.uk/wp-content/uploads/2014/10/iphone-3-home-200x300.png?resize=200%2C300)
ShareEverwhere main screen

I was so busy when it came out that I never quite got around to blogging about it here: I have a new app out! It’s called ShareEverywhere. It is built exclusively for iOS 8 and uses the new, built-in “share” functionality, allowing you to share to a good number of services from any app that uses the standard share button.

When I first wrote it, I wasn’t sure how many, if any, developers would build share widgets into their apps. Now that we know the answer is “a lot of them,” I still use ShareEverywhere because it beats having a dozen widgets hiding in your action menu. And there are still services, like Pinboard.in, that don’t have their own native apps.

How do I do “X” in Swift?

Maybe I have some duff feeds in my RSS reader. Maybe I have a few poor choices of people that I follow on Twitter. But I see links along these lines all the time:

How do you do something in Swift?

The answer is, almost always, exactly the same way you’d do it in Objective-C!

You want to do pull-to-refresh? Same.

You want to play with location services? Same.

You want to display one of the new UIAlertControllers? That’s the same, too.