Follow Me on Twitch
I’ve been streaming games I’m playing on Twitch a fair amount lately. If you’re into that sort of thing, you can follow me there.
I’ve been streaming games I’m playing on Twitch a fair amount lately. If you’re into that sort of thing, you can follow me there.
It’s a couple of days back now, but Flying Meat has released a new version of their fantastic image editor: Acorn. I’ve used Acorn for my work and personal projects since version 1.0 in 2008, and it’s incredible to see how far it’s come while still keeping the simplicity that made it so appealing in that first version.
Gus is a friend – so don’t tell him I said this – but to me he’s always been the epitome of the one person indie who’s both a world class developer and also a fantastic designer. Check it out.
Nothing fancy. Just a tiny little extension method that makes doing this in Swift slightly nicer.
import UIKit
public extension UITableView {
public func deselectSelectedRowAnimated(animated: Bool) {
if let indexPath = indexPathForSelectedRow() {
deselectRowAtIndexPath(indexPath, animated: animated)
}
}
}
I’ve used Crashlytics for beta testing my new app, including their lightweight analytics-thing Answers. It’s cool in that it shows you the most relevant data, but I was never going to be able to sell it as a replacement for Flurry or Google Analytics (which I loathe). Today they announced Answers can do event tracking, and on top of that it looks fabulous. The web UI makes it really easy to see and add the most common kinds of things I’d actually want to track, and the iOS SDK looks like it was made by people who have written Cocoa before.
Hopefully Twitter can keep from fucking this up.
Occasionally you need to a show a view controller as part of a UINavigationController
stack where you want the navigation bar hidden. Unfortunately, hiding the navigation bar breaks the swipe right to go back feature.
You can fix it by doing this in your viewDidLoad
method:
navigationController?.setNavigationBarHidden(true, animated: true) navigationController?.interactivePopGestureRecognizer.delegate = self
I made this NSManagedObjectContext
extension so that I could delete all of a users data when they log out of the app I’m writing. The alternative was to delete the sqlite file itself and reinitialize my Core Data stack, but that seemed potentially more problematic and less safe.
The two instance methods on NSManagedObjectContext
for deleting objects are:
func deleteAllObjects(error: NSErrorPointer)
func deleteAllObjectsForEntity(entity: NSEntityDescription, error: NSErrorPointer)
I also included a convenience initializer for creating a new context with a parent. The way I use the deletion methods would be to create a private queue child context, block out the UI while this is going on with an activity indicator or something, and then call deleteAllObjects(_:)
on the child. If there’s an error, you can just throw away the child context, and otherwise save your main context and commit it back to the store. Like this:
func deleteEverything() {
let mainContext = self.managedObjectContext
let workerContext = NSManagedObjectContext(parentContext: mainContext, concurrencyType: .PrivateQueueConcurrencyType)
workerContext.performBlock {
var error: NSError?
workerContext.deleteAllObjects(&error)
if error == nil {
mainContext.performBlockAndWait {
mainContext.save(&error)
}
}
if let error = error {
println("Error deleting all objects: (error)")
}
}
}
Here’s the code for the extension:
https://gist.github.com/collindonnell/4d082298a86e0f1d1a51.js
Kourosh Dini wrote the book everyone using OmniFocus should read called Creating Flow With OmniFocus. Seriously, I can’t recommend it enough. Another thing I recommend is listening to the most recent episode of Mac Power Users where they have Kourosh on. He talks about how he does GTD, and a little OmniFocus specific stuff too. I’ve kind of fallen off the wagon a bit lately, and this has made me decide to get back on and get my system in order. I should stick a task in my inbox to remind me to blog about that.
Apple News And The Open Web | Bitsplitting.org:
I’m optimistic that Apple’s News app will be a strike against centralized services such as Medium, Twitter, and Facebook. A strike against signing over content to a 3rd party mediator for the sake of a greater chance at connecting to an audience. Apple may not be the world’s best technology company when it comes to either storing data or building a social network around it, but they are damned good at building a captive audience of delighted users who trust the company to provide access to a variety of 3rd party content.
Calling iMessage an impressive social network is a bit of a stretch considering my messages still sync across devices in seemingly any order. I don’t know if the News app is going to pull anyone who’s dedicated to RSS away from it, but it might be great for those who aren’t.
Ben Kuchera writing for Polygon:
The real story though, or at least the lack of story, is that the Kinect is well and truly dead.
When the Xbox One launched you couldn’t buy one without a Kinect. Microsoft knocked it out of the park with their E3 announcements today, but missing was any mention of the Kinect. They’re also dropping the price on the Xbox One bundles which don’t come with it, but not on the ones that do. I don’t know if “dead” is the right word, but it’s certainly on life support.
Having used an Xbox One both with and without a Kinect, I think it’s kind of a shame that the Kinect hasn’t done better. Without it the Xbox interface is kind of hard to get around. With it, it’s great. I use the voice commands to pause video, raise or lower volume, use the snap feature, and go to apps all the time.
I don’t see how anyone who’s used an Xbox One both ways could not prefer having a Kinect. That’s not enough though. It’s still not strictly necessary, expensive, and doesn’t make the games themselves any better (which is the reason people buy game consoles). Microsoft had a cool thing that they did a bad job making a case for, and now it’ll probably just kind of fade away until it’s axed in the next console revision.
Oh well. We’ll always have this bullshit vaporware promotional video of the first Kinect from 2009:
[youtube www.youtube.com/watch
I’ve used Core Data in most apps I’ve written since 2009, and I’ve felt for a long time is that the documentation was pretty lacking and out of date in a lot of places. I haven’t read it yet, but Apple has updated the Core Data Programming Guide today to “reflect current best practices and APIs.” I’m hopeful that things are getting a little better, but there’s apparently no reference to Swift, so, who knows.
Tools and Toys is a website run by the incomparable Shawn Blanc which is sort of like if The Wirecutter and a regular blog had a baby. They publish just the right amount of content that you can keep it in RSS without getting overwhelmed while still getting a lot out of it.
These nylon bands from Monowear look pretty sweet. They remind me a lot of the bands I used to wear with my Timex. The site doesn’t say if they’re using the Apple lugs or not, but if they (otherwise I’d be scared of causing some kind of damage) are I’ll definitely get one.
All of the punctuation in Swift looked pretty weird to me until recently, but now that I get it, I’ve really learned to appreciate how great the syntax actually is. The way I think of it is this: if you’re using ?
, you’re asking a question, and when you use !
you’re asserting that you already have the answer. Of course, for the second case, you need do need to be sure or your app will blow up.
So, for example:
if let foo = dictionary[“foo”] as? String { … }
Is the value for the key “foo” a string? If so, assign it to the constant foo.
delegate?.objectDidSomething(self)
Do I have a delegate, and can it respond to objectDidSomething:
?
managedObjectContext!.save(&error)
I know that managedObjectContext
is not nil.
let foo = bar as! String
I know bar is a string, so nothing will go wrong casting it.
Kind of old now, but I really like this post from the August issue of objc.io. The two things that stood out for me was that it used XCTest instead of a third party testing framework, and that it gives real examples of how to approach which tests to write. I’ve been totally totally on board with the idea of unit testing for a long time, but my biggest hurdle has always been knowing what to test. Thinking of what tests to write in terms of Given-When-Then pattern they go over has given me some new ideas.
On my most recent project, I decided to try going Swift from the start. I did the same thing when I started working on a rewrite of the Lovely app around the end of last summer, but found the tools too immature then. This time I’ve spent about a week with it, and everything seems is working out fine (so far). I’ve tried to keep up reading about the language itself, so the syntax hasn’t held me back much. One difference between now and the last time I really dove into Swift is that either something in my brain has clicked regarding optionals, or the language changed a bit over the past six months to make optionals align with my brain more. I still can’t what the debugger commands are.
The other day on Twitter, I was part of a discussion comparing Swift to Objective-C. My feeling is that Swift isn’t better, but some parts of it are delightful to me, and I like it. For example, method overloading in Swift is pretty great, and I’m looking forward to doing interesting things with enums. Better though? In some ways, but not in others. Colin Cornaby pointed out that the ease of dropping down to C in Objective-C comes up a lot, and that C++ compatibility is pretty much a requirement for a lot of apps. I think he’s right.
The way I look at it is this: Objective-C didn’t have to be “broken” for Swift to be a great language. I don’t expect Objective-C to go anywhere in the near future, and that’s a good thing.
Over the last few months I’ve become a tiny bit obsessed with Zelda games. I’d never really played one before last summer, and now I want to play them all, except maybe “The Adventure of Link” because I hear it’s terrible.
Given that the hardware I have is a Wii U and a 3DS, there might be a few that I won’t be able to play, but I think I’ve collected all that I can. Maybe someone can let me know if I’m missing any though.
Here’s what I’ve acquired so far – new, used, or Virtual Console – broken up by platform it ass originally released for:
NES
SNES
Gameboy
Gameboy Color
Gameboy Advanced
Wii
DS
3DS
Wii U
My plan is to play them all in the order they were originally released in (not the date a remake was released), excluding the ones I’ve already beat. Now that I look at it though I’m realizing this is going to take forever.
All of my experience writing web apps have been to learn or test an idea, or something that I decided wasn’t such a great idea after all. For a long time I’ve wanted to come up with something useful enough to want to publish, but simple enough that I thought I could get it done in a reasonable timeframe as my first project. I think I’ve thought of something.
Neither Xbox Live, Nintendo Miiverse, or PlayStation Network gives you a way to find your Twitter/Facebook friends. What I’m thinking of doing is making a site (probably using Django) which lets you login with Twitter and/or Facebook, enter what someone would need to find you on any of those gaming networks, and then use that information to find your friends who’ve done the same on the site.
I’m imagining that as far as web apps go, this is a pretty simple one. In my mind it’s just social login, a form to enter your Xbox/Miiverse/PSN usernames, some API calls to get your friend lists, and some database queries to match it up to users of the site. Am I missing anything here?
I haven’t posted in a while due to a bunch of reasons, and I’d like to get into a rhythm again. I thought I’d start by sharing the kind of unique way I have my media stuff running through and Xbox One.
I’ve played a bunch of games on the Xbox since I got it in November – and a bunch of them have been great. But the Kinect and HDMI in are the unique part I wanted to mention. My set up is that I have a Kinivio HDMI switcher with a TiVo, Apple TV, and Wii U going into it, and the switchers output plugged into the Xbox. The Xbox can control be setup to control TV functions, and with the Kinect it can do those with voice commands (“volume up/down”, “mute”, “pause”, etc). Since I have everything running through my Xbox, I can keep using those commands with any of my other devices.
Having a bunch of things running through this specific HDMI switcher works especially well because it automatically switcher to any input that start getting a new signal, so I rarely have to manually switch inputs.
The only downside is that I have to have my Xbox One on to use anything else, but in practice that hasn’t been annoying at all.
Been working on a new version of an app of mine called Closeby that I haven’t touched since iOS 6.
A few thoughts about the process:
Maybe I’ll post some before and after screenshots when I get a chance to work on it more.
Brent Simmons is not only a friend, but one of my favorite Cocoa developers. His blog is the most indispensable about writing software I read. Omni is one of my favorite Cocoa development companies. Can’t wait to see what they do together.
I’m super excited to be opening up 360|iDev min October 6th in South Carolina! I’ll be giving a talk about the design patterns, processes and tools we use to make our iOS app at Lovely. I’ve also seen a lot of the other speakers before at 360iDev proper, and they’re all wonderful.
What if... in a few years from now, we figure out a way to make deep space travel possible. What if... the first interstellar spacecraft to be built is commissioned by the US Navy and its design is inspired by a science-fiction TV show from the sixties... what would it look like?
[youtube www.youtube.com/watch
Neat! I don’t know why there’s so much emphasis on guns though. Who is it supposed to be shooting at?
About three weeks ago – on a whim – I went and bought a new Nintendo Wii U. The Wii U hasn’t sold great, but Nintendo games are what I grew up on, so it seemed like a good way jump back in. I hadn’t really played a lot of video games since I was a kid, but Mario Kart 8 looked awesome, and maybe I could get some of my work friends to come play it with me. I also bought a copy of the latest 2D Mario and a Zelda game too.
Turns out it’s great. Not only have my friends come over a few times for some Mario Kart, but I think I sort of forgot how fun video games can be. I liked it so much I also went and bought a 3DS XL, which is also fun (my favorite game for it so far is The Legend of Zelda: A Link Between Worlds).
If you haven’t played any games in a while, maybe give it a shot. I was pretty sure I was “not a gamer,” but I was totally wrong. It’s a blast, you can do it with friends, and it’s a nice way to get away from programming or whatever you’re doing without fully turning off your brain and receding into a vegetative state.
The first thing I always want to do when a new application is move to ~/Applications
. In the past I used Hazel to automate this, but it works just as well with an Automator folder action.
Here’s the actions I set up to do this in Automator:
And here’s a screenshot: