The Problem With iOS GitHub Component Examples Lately

blog-githubI’ve started to notice a disturbing trend lately, iOS Github examples that flat out don’t work nicely outside the example code.  Here are the typical problems:

  1. Non-ARC code
  2. No Storyboards
  3. Sample project megalomanic focus
  4. inaccuracies and generalities

Non-ARC code

Seriously. Some people are not paying attention. If you have some C code flying around, great, that makes sense. But a plain vanilla component that doesn’t, where the sample code or component does it’s own (usually flawed) memory management, is just asking for trouble. Stop it.

No Storyboards

Again, not paying attention to what Apple is recommending and promoting. If you’re going to share, most developers, especially new ones, will be doing storyboard projects nowadays. Figuring out out how to get something out of a storyboard is a lot easier than how to get it in.

Sample project megalomanic focus

I actually resent having to deep dive into a spaghetti AppDelegate. It is common that the example is complex hyjinx designed to avoid ARC and storyboards. Is it so hard to show a real world implementation? I don’t think so. To offending developers: How many posts do you need to yourself and on StackOverflow asking for some rational context? Your component will be a part of an app, not the focus. Take a look:

When a real world sample is posted, with obvious and useful implementation, it’s great. It also makes you look like a complete jerk. inaccuracies and generalities

If you’ve run into one of the previous three, you are very likely to get this as a bonus. My favorite is the commentary of how you would generally do this in storyboards, which are pretty much always completely wrong. Many also stress compiler settings to turn off ARC compiling for the sacred component class. People really read this stuff, and follow your directions, in sone vain hope that they can get it to work. Don’t write about stuff you haven’t actually done.

The Point

These things waste time. When I’m trying to help someone, and they give me a link to a hot mess of a component, it makes me very cranky. When I see something cool I may want to experiment with myself, and I see this stuff, I want to ask what their problem is.

I’ve reached the point where I don’t remotely respect anyone’s code in these samples. 90% of it is just crap. (Steve Jobs would not hesitate to agree) I just dive into the real meat of the class alone. From there I can get down to the real essence, and see if it’s even a good idea what’s going on or not. That’s fine for me, because I can figure it out. So…

Why am I blogging about this? The newbies are attracted to these components like a moth to the flame, and they are left hanging, and give up. What a shame. It shouldn’t be that way. Here’s my message:

If you’re going to post components, and encourage people to use them, have the courtesy to make them usable!


Category(s): Apple, iOS

Comments are closed.