Archive for the 'Uncategorized' Category

Parsing Hex Strings in Swift

Saturday, August 12th, 2017

I want to turn the string “0x02 0x03 0x04” into an array of bytes ([UInt8]). Seems simple enough right? let hex = “0x02 0x03 0x04″ let components = hex.components(separatedBy: ” “) let array = components.map { UInt8($0) } But the UInt8 constructor that takes a string doesn’t understand the “0x” prefix to indicate hex strings. […]

OperationQueue and dynamic priorities

Sunday, May 7th, 2017

I had a question about OperationQueue that I couldn’t find an easy answer to: Can you modify the priority of an operation once it’s been added to the queue? My situation is that I have some background operations that are executing, but the user may choose to view one of these items interactively, and at […]

BufferBloat, or Gaming on DSL while Uploading

Monday, February 27th, 2017

If you find that when some device on your network is uploading data, the entire network becomes unusable due to excess latency, this post is for you. There's a term for this, BufferBloat, and it refers to the a phenomenon where your ping times increase due to excessive buffering at a choke point on your […]

Occasionally Connected

Thursday, February 16th, 2017

I think it's easy for people who have a reliable always-on internet connection to forget that much of the world does not. Even those of us who do may prefer not to use cellular data as much as possible. What I'd like is for the phone to sync as much data as it can while […]

Emotions by Hodelpa

Monday, February 6th, 2017

We went to the Dominican Republic for a week, and stayed at Emotions by Hodelpa. ([TripAdvisor]). Here’s some information about the hotel that you might find useful if you’re considering this resort for your trip. The place is always referred to as “Emotions by Hodelpa”. Hodelpa is a chain, and they recently bought this resort […]

Controllers vs Mouse and Keyboard

Sunday, November 20th, 2016

This was (and is, until tomorrow, November 21st, 2016) a free weekend in Overwatch, so you can download and play the game for free on PC, PS4 and Xbox One. I play a lot of Overwatch on the PS4, so I thought I’d take the opportunity to try it on the PC. I’m not very […]

More RAM Please

Tuesday, November 1st, 2016

Here’s my two cents on the new MacBook Pro’s, not that anyone is asking. This tweet sums it up: “I’m struck by the cultural divide between dismissive Apple defenders and people who buy an expensive mac for real work every four-five years” – @pinboard The main reason I’m uncomfortable dropping that much money on a […]

“Free” Photo Storage

Tuesday, October 25th, 2016

Google is giving free, unlimited, full-resolution photo storage to all customers of their Google Pixel phone, and giving unlimited storage of “optimized” photos to everyone. This is an attractive deal, and Google using the storage warnings on iOS in their advertising will resonate with a lot of people. I think this will be a real, […]

Determine form-sheet or navigation controller presentation

Wednesday, June 29th, 2016

I recently ran into a situation where I needed to determine if a view controller was in a form sheet, or pushed onto a navigation stack. A pattern I use for things like Settings in a universal app is to push the Settings view controller onto the stack, when on the iPhone, and wrap it […]

Writing with Tools

Saturday, November 28th, 2015

I have always wanted to write more. Every time I get the itch to write something substantial, there is a pattern that plays out. The first thing I do is think “I need to find a great app to write in” and get totally sidelined by downloading and trying out writing apps. This makes no […]