Archive for June, 2014

Parlez-vous Swift?

So here I am ready to make an iOS app from scratch, except that I have no idea how make iOS apps (or apps of any other kind, for that matter). But I do know that you need to program in Objective-C, a language developed largely by NeXT in the late 80’s, adopted by Apple in the early 2000s, and used today mostly to make apps for the iPhone. So I bought a couple of books and set to work learning the basics. 

Every year, just as summer is getting under way, Apple hosts their World Wide Developers Conference, where they lay out their current thinking on the best way to make apps. There are new technologies introduced, lessons available, and for those of us who can’t take a week off to fly to San Francisco, they put videos of everything up on line. Knowing this was coming up, I thought I could focus on learning the basics of the Objective-C language, as the higher level elements were likely to change.

Then Apple upended everything. Objective-C, they said, is no longer the only way to make apps for their devices. Swift was a brand new language created in secret by small team inside Apple. It was modern, they said, and apps built using it would be less likely to crash. 

That’s all well and good, but I was just starting to get a hang on the old way! Did I now need to start from scratch? How would I even do that? Swift was brand new, and the only way to learn it was an ebook that Apple released that was clearly aimed at people with a better understanding of how computing worked. 

After spending roughly a week paralyzed with indecision about which path to take, I picked back up the book I had been working on. For the time being, I’m making this app the old fashioned way. A couple of points factored in to this decision. 

  • Swift is really new, and was created by a very small (though I’m sure very smart) team inside Apple. Now that there are hundreds of thousands of developers poking around through it, I’m sure they’re going to find bugs. And I’m sure that Apple is going to fix some of those bugs, meaning that the language is going to change quickly. Behaviors you can expect today might not apply a year or two down the road. That could cause problems that I’m not confident I’d be able to detect. 
  • Objective-C is old. In some sense, that means it’s creaky, and there are some difficult concepts to grok that are papered over in newer languages like Swift. But it also means that it is well tested, and that it’s peculiarities are well documented. If I have questions, it’s pretty easy to google the method names I’m working with and find explainers, and other people who have had the same issues. Answers are abundant, and if I can’t find them already existing online there are tons of people with experience working with these technologies that I can ask. 
  • I already have the books.
  • Swift and Objective-C code can live side by side. Apps are written as smaller files that are compiled and combined into that neat little icon on your phone. You will be able to Objective-C and Swift files together in the same app to solve different problems. That is exciting because it means I can start today in Objective-C, and then start adding Swift files in the future once I see that it is starting to mature, and I won’t have to go back and redo everything I had already built. 
  • Swift is clearly the future, but Objective-C is not yet the past. It’s still being used by Apple itself for most everything, and likely will be for years to come. That means it’s not going to go away any time soon. I don’t think we have to be afraid of Apple coming in next year and saying that all submissions must be Swift-only. This is going to be a slow transition, and the end state is going to be a world where Swift is the preferred, but not only language.  

So on a beautiful Saturday like today, I am hashing this around in my head, and I think I’ve finally convinced myself. Now that I’ve gotten this off my chest, I can go enjoy the day.

Categories: Computer Blue Tags: , , ,

Why This Blog?

Right now you are reading this blog. Your reasons are your own. My reasons for writing, however, effects us both, so I thought I’d lay them out here. 

This has always been somewhat of an aimless blog. I started writing some slice-of-life essays, added some recipes, and throwing in some bits about computers. Because there was no focus, I never really new what to write about, and as such I posted rather infrequently. Most of what I wrote I found myself putting out on Twitter. I lacked the attention span for long form blogging. Meanwhile, I never saw much traffic because who was the target audience, anyway?

But now I’ve got a new project, and as such the focus of Nothing Was Delivered is going to change some. If you’ve followed me before, I hope you’ll find the new content interesting. If you found your way here because of the is new content, I hope you enjoy it, and please check out the back catalog, so to speak. 

Here’s the deal. I’ve gotten bored lately. I had a band, which fell apart. I thought about starting a new one, or striking out on my own, but haven’t felt inspired. I’ll leave the details for a separate post, but ultimately that was something I had done, and I wanted a new challenge. 

So a while ago I started poking around with programming. Like many Americans, I sit in front of a computer most of the day, and when I’m on the go I have my iPhone with me. The power and flexibility of these devices constantly amazes me, but I realized I had no idea how they worked, at a basic level. We all know that computers see 1’s and 0’s, but how the hell does that translate to all the things that go on on these screens? 

In particular, I was interested in Apple’s ecosystem. I started reading Apple rumor sites, which lead to technical descriptions that I couldn’t make heads or tails of. I also stumbled on some Apple centric podcasts, which lead to others that were less fan sites and more developer focused. I would sit through the technical bits of shows like Hypercritical so that I could get to the more general discussions of Mac OS X or iOS. Eventually, I started to pick up some of the low-level lingo, or I would Google some phrases, and eventually these parts didn’t seem so scary. I found the book Code, by Charles Petzold, which gave a good fundamental explanation about what was going on inside these machines. I started to see technology as a puzzle that I could figure out, given time. 

Now I have a project that I want to work on (more on that another time), and wanted to document it. This is mostly for my benefit, as I’m pretty much teaching myself as I go along. I have no formal training, though I’ve bought some books and completed some tutorials online. I figured if I had a place to think through these problems out loud as I come to them, they would be easier to work out. 

I also thought I could offer a bit of a different perspective from many of the tech and Apple centric blogs. Sure, I’m as much of a white dude in his thirties as most of the other writers in this sphere, but I’m coming to this as someone that has very little idea about how this technology works. There are many wonderful writers that are very knowledgable about Apple’s past and present, and therefor able to give insightful context the changes this industry is seeing. I wanted to approach this as someone who has never been to a WWDC, hasn’t witnessed the evolution of Apple’s APIs over the last several decades, and in fact just learned what an API was recently (in layman’s terms, my understanding is that it is short a series of code snippets that an operating system creator or platform vendor gives that allows other developers access to more complicated technologies e.g. GPS APIs on a smart phone that let apps get your location without writing everything from scratch). 

So that’s the new focus. There will still be more general purpose writing. In fact, I hope that by getting in the habit of writing more, I’ll be even more likely to turn to blogging to get out whatever I have on my mind. I do think that the food posts are going away. I actually intend to spin those off into a separate blog at some point. 

I’m rather excited about having a new direction. Here’s hoping that this blog will keep me honest. 

Categories: Computer Blue Tags: