Skip to main content

Welcome to ZX81.org.uk

Tag: Programming

Learning Swift

Swift is a new programming language designed by Apple for development on OS X and iOS. I thought that I should try to learn it a little so I decided to convert a non-trivial collection of classes from one of my apps (www.cut) into Swift. I always find it better to work on a real project rather than just to play around with things aimlessly. Also, by re-working an old project, I knew that all the problems I would find would be language related rather than anything to do with the architecture.

NSFetchedResultsController and iCloud

This took me a while to figure out so I thought it was worth blogging about. The short version: I’m using Core Data with iCloud syncing and it works… mostly. When starting up for the first time — when there is already data in iCloud — none of the data appears in a table view, but restarting the app correctly displays it.

I know what you’re thinking: you’re not merging the updates into the right managed object context. Nope. Sorry. Thinking that was the problem is probably why it took me quite so long to track the real problem down!

What to do?

There have been a few blogs recently about people finding their true vocation and discovering that it’s not developing software. This is not a “me too” post. I do still develop software for a living and I don’t intend becoming a writer or anything else any time soon. But like most people (I assume) my career has taken turns that I never would have imagined when I started out.

In fact when I was at school I took quite some time trying very hard not to be a software developer for a living. I took geography rather than the rather more obvious (if you know me) chemistry because I wanted to be a pilot. I was so determined to keep programming computers as a hobby that I almost took woodwork instead of computer studies when I was fourteen.

Glitches

It started with this image. Or rather the glitch that you can see in the middle of the screen.

It’s one of the screens in a new app that I’ve been developing. There’s lots of hard stuff in there but this is the first problem that has really stumped me. What it appeared to be was this: a text view (UITextView) on a table (UITableView) showed a nasty glitch when you tried to place the curser in the text box.

My delicious.com bookmarks for February 8th through February 20th

  • An Attribution Failure Theory – “Credit is easy. Well, mostly easy. It might have been hard to get the format of citations right at first in school when we were writing papers, but the act of citing is easy. You just do it. Yet, people all over the Internet don’t.”
  • You Are Not Ruthless Enough – “Here’s the thing: you are not ruthless enough. You are certainly not ruthless enough to your objects, and you probably need to be more ruthless to yourself.” Programming Is Hard, Part 381.
  • You Will Never Kill Piracy, and Piracy Will Never Kill You – “The seven step, ten minute download process (which will be about ten seconds when US internet speeds catch up with the rest of the world) is the real enemy the studios should be trying to tackle.”

My delicious.com bookmarks for October 21st

My delicious.com bookmarks for October 13th through October 20th

Programming Is Hard

It’s hard to explain to someone who is not already a programmer the kinds of things that you have to do when building an application. The thing you’re trying to explain is often very abstract and the answer frequently would involve lots of code.

That’s why I thought this particular problem might make an interesting discussion. In talking about this very simple problem we can talk about the things that developers deal with every day and, hopefully, the process can be followed by most people who have used an iPhone (or, actually, any computer). You won’t be a programmer at the end but you might have a greater appreciation for what happens behind the scenes.

My delicious.com bookmarks for October 17th through October 18th

My delicious.com bookmarks for February 15th through February 26th

  • Tits and Apps – About most of the ‘sexy’ iPhone apps being pulled last weekend: “What developers see is that the App Store is a shaky foundation upon which to build a business. One day you’re prospering, the next day your app is gone. There are awesome iPhone OS apps that aren’t being built because developers don’t trust Apple not to yank the carpet out from underneath them.”
  • Infer.NET – Seen at the BCS/IET Turing Lecture by Chris Bishop. Looks interesting.
  • Sources offer peek at Adobe Creative Suite 5 for Mac – PhotoShop CS5: what do you do to the app that has everything? Not a lot, visually at least…