Is It Okay to Be a Brony?

February 4, 2015

“Is it okay for grown men to like a show for little girls?” I get this question a lot as a brony, an adult male fan of the show My Little Pony: Friendship is Magic. It’s a question I have trouble answering—not because I don’t have reasons, but because each reason I give doesn’t seem to be enough for the questioner. I’m realizing that answering it requires digging down into the assumptions behind the question. So let’s do that. (As a quick note, the friends who have asked me this question aren’t judging me, but some people do judge. Either way, this is a valid question to ask.)

The surface level answer is found in almost every mainstream media article about bronies: is it okay to like a show with great animation? With awesome music? With a hilarious sense of humor? With heartfelt, uplifting storylines that contrast with the cynicism of most fiction today? But for the people asking me the question, this only draws the response “yeah, but…it’s for little girls.” It seems that to answer the question we have to go deeper.

Hopefully not this deep.

Hopefully not this deep.

What is the concern about grown men liking a show for little girls? The first thing that comes to mind, and one that my questioners may be afraid to say, is pedophilia. But the data (here and here) doesn’t back that up. In fact, the bronies I know hardly acknowledge that the show is for little girls at all. Plus, the people asking the question are mostly my friends, and they aren’t accusing me of pedophilia, so that doesn’t seem to be the main concern.

The next thing they may mean is, why would adults like a children’s show? But, of course, a moment’s reflection shows that this is hardly the first instance of that. Entire conventions center around adult fandoms of cartoons and anime. In a more mainstream sense, Pixar and many Disney films have significant adult followings. And, of course, C.S. Lewis’ Narnia books (if not the films) are beloved by adults as well as children. Lewis had critical things to say of adults who were leery of “childish things:” “To be concerned about being grown up, to admire the grown up because it is grown up, to blush at the suspicion of being childish; these things are the marks of childhood and adolescence…But to carry on into middle life or even into early manhood this concern about being adult is a mark of really arrested development…When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up.” (source)

But the concern about bronies seems to be more of a gender thing than an age thing. Is it okay for males to like shows for females? This, I think, is the heart of the issue. The idea behind this is that men have to like manly shows, featuring violence, sex, and drug use. The only humor they can contain is making fun of people, potty humor, and sarcasm. There may be a kind of gender-neutral show that is okay for both men and women to watch, but if a show diverges from that, it can only go in this direction. But who says this is what masculinity is? This is the narrow view of masculinity that bronies are rejecting. They’re saying it’s okay for men to value friendship, nonviolence, and positivity. (Not that MLP is 100% nonviolent.)

There is a darker undercurrent beneath the innocuous statement that shows for females are fine for females but not for males. There’s also a trend in our culture of looking down upon things that women and girls enjoy. Think about the disdain poured upon the Twilight franchise, as though men have never enjoyed anything less classy than Tolstoy. As @TotallyTrillian quoted on her blog in a post the creator of My Little Pony linked to: “As soon as teenage girls start to profess love for something, everyone else becomes totally dismissive of it. Teenage girls are open season for the cruelest bullying that our society can dream up.”

Men prefer sophisticated entertainment.

Men prefer sophisticated entertainment.

Even after acknowledging that grown men can like shows for children and for females, one objection may still remain: “but why does it have to be ponies?” The questioner is suggesting they would be open to all of the above but they prefer it not to be ponies. To respond with a Gandalf misquote: “so do all who live to see such shows. But that is not for them to decide. All we have to decide is what to do with the show that is given us.” What I mean is that, if there was a show that had awesome animation, music, humor, and stories, and represented the values of friendship, nonviolence, and positivity, but wasn’t candy-colored ponies, then a lot of bronies might watch that—but this is the show we have available to us. Lauren Faust didn’t create FiM to try to make feminine values as appealing to males as possible: she created it to appeal to little girls. And yet the message is so powerful it appeals to men despite the little-girl trappings that could be a stumbling block.

But honestly I don’t think the show would be as powerful if it wasn’t ponies. As it is, viewers can’t delude themselves into thinking they’re watching something gender-neutral: the femininity is unmistakeable. It forces the question to a head: are you as a man willing to embrace this outward form traditionally associated with femininity? Most men today think it’s okay for women to embrace outward forms traditionally associated with masculinity: military shooter video games, muscle cars, even sci fi and fantasy. Lots of men even find it sexy. If it’s not okay for men to embrace outward forms traditionally associated with femininity, then that’s a double standard. It’s saying that the things men like are “universal,” but the things women like are for women only. That might even be considered a step backward in terms of gender equality: instead of men and women being simply seen as different, men are “normal” and like normal things, and women are the aberration.

If you’re interested in reading more analysis of bronies, here are some articles and videos I’ve found helpful:

How about you: what do you think about the brony phenomenon? What questions have you asked or heard about bronies?

The Heart of Wreck-It Ralph is in the Small Choices

July 24, 2013

The second time I watched Wreck-It Ralph, a number of slightly strange choices they made in the story jumped out at me. It wasn’t that the choices were all that strange in and of themselves, but rather that they weren’t what you’d typically see in a children’s movie. As I thought about them, I realized that each of these small changes was essential to the story emotionally–specifically, essential to establishing Ralph and Vanillope’s friendship. I tear up every time I see Ralph diving into the volcano and hear him recite the Bad-Anon affirmation. But the reason it’s so emotionally impactful is because of all the small decisions the filmmakers made to bring you to that moment. I think this is a difference between a movie that only children watch and one that people of all ages can enjoy: children don’t necessarily notice this extra depth, but it gives it more substance for adults.

Here are all such emotionally-impactful decisions that I’ve noticed so far. Warning: spoilers for all the significant moments in the film below.

  • When Ralph breaks into the kart-making minigame, as well as later when he breaks into Felix and Vanillope’s cells, most films would have shown a zany action sequence. But such a sequence would have absolutely no bearing on the heart of the movie. The point of those scenes is that Ralph is using his wrecking ability to help a friend, and all that’s required to establish that is a wall and Ralph wrecking it. Anything else would have been superfluous to that point. Sure, it would have been a shared experience that would have built up Ralph and Vanillope’s friendship. But since the film isn’t mainly about friendship but rather about Ralph’s trying to find significance, it’s more impactful to have their friendship built in a scene where Ralph is creating something (i.e. the kart-making minigame).
  • In the kart-making minigame, Vanillope dispenses with her usual jokes about everything and simply says that she loves the kart. This is significant because of Ralph’s insecurity about whether he can to do anything but break things. This is his first glimpse that someone could see past his shortcomings–and, in fact, not even see them at all. Since this is where their friendship really starts, this moment wouldn’t have worked if she had made a joke about the kart; Ralph would have been crushed, as he already was when he first saw the kart.
  • In the scene where King Candy tricks Ralph into thinking that Vanillope’s life was in danger if she raced, it’s striking how sincerely he comes across. You don’t even see an aside glance of him making an evil smile, as you’d expect. But it’s most striking in the fact that he just gives the medal to Ralph. One would expect him to bargain: you can have this medal if you stop Vanillope from racing. But Ralph and Vanillope’s friendship has progressed to the point where he would never do something to hurt her. He had to be convinced that it really was for her own good, and for King Candy to offer him the medal just to “hear him out” was the only way to convince him of that.
  • The camera cuts away from Ralph when he first starts wrecking Vanillope’s kart, just showing her reaction. The scene parallels the earlier destruction of her first cart by the other racers, but in that case the destruction was shown from the start. But the scene functions on a totally different emotional level. The other racers had no relationship with Vanillope, but Ralph is her only friend. Whereas the first kart was only the symbol of her hopes to race, the kart is also the symbol of their friendship–so they couldn’t just show it being destroyed. The audience needed a moment to prepare themselves emotionally. If they had just shown the kart being destroyed from the start, the significance of it would have been devalued.
  • A typical movie would have “raised the stakes” by saying that Vanillope had to actually come in first place in the race to reset the game. As far as I can tell, the game-resetting is one of the few things in the movie that has no basis in the reality of video games, so it would have been just as arbitrary to say she needed to win. But if they had done this, they would have lost out on this priceless exchange:

    Ralph: “OK, remember: you don’t have to win. Just cross that finish line and you’ll be a real racer!”
    Vanillope: “I’m already a real racer. And I’m gonna win.”

    If Vanillope had to win to save herself from being a glitch, she’d be acting out of self-preservation. But that would rob her of the opportunity to actually have the motivation of a racer in that moment. Surprisingly, the race is more significant emotionally because she is racing to win because she wants to, not because she has to.

  • When the cy-bugs are approaching the exit to Game Central Station, Calhoun and Felix move behind the game barrier and leave Vanillope behind. This bothered me at first because it doesn’t fit with their character at all. But then I realized that it’s symbolic. She is the only one who is ultimately at risk. They are able to escape the game, but she isn’t. By reminding us of this visually, this narrows the focus to the character who is part of the central plot. Calhoun and Felix are secondary characters; the story is about Ralph and how he grows from seeking validation in externals to seeking validation in his friendship with Vanillope. If Calhoun and Felix had been stuck in danger, the message would have been diluted to a generic “save people in danger.” By emphasizing that it was only Vanillope who was in danger, the focus on the friendship is preserved.
  • When Vanillope finally crosses the finish line, she does it not under her own power but by Ralph pushing it. There is no surface-level reason why this needed to be the case; she didn’t have to leave her car because it was broken (if it even was), but because the cy-bugs were attacking. And Ralph has already played his central role in saving Vanillope. The fact that he pushes her across the finish line is, again, symbolic: it represents the larger reality that he has helped someone else to achieve her dreams, and that achievement wouldn’t have been possible without him.
  • Not only did King Candy steal Vanillope’s role and her palace, he stole her kart as well–that’s made clear by the fact that it fits into the “throne” in the palace. Yet at the end, when Vanillope re-inherets her role as ruler, not only does she keep her old outfit, but she keeps racing the kart she and Ralph made as well. A less subtle film would have used the King Candy kart to emphasize what she had accomplished, and would have shown Ralph hanging out in Sugar Rush to show that they are still friends. It actually bothered me on my first viewing that it’s unclear at the end how often Ralph and Vanillope get to hang out. But upon a second viewing, it wasn’t unclear at all: Ralph says “to be continued” about their name-calling banter, and Vanillope is racing the kart that symbolizes her and Ralph’s friendship. That’s all you need to see to know that their friendship continues.

Did you find Wreck-it Ralph as emotionally impactful as I did? What other subtle filmmaking decisions did you notice that contribute to the impact?

Why Does Privacy Matter?

July 18, 2013

In discussing recent concerns about the NSA’s surveillance programs and the Xbox One’s always-on Kinect, the most common response I’ve gotten is indifference. And it’s very reasonable to think that, if you already share lots of information online anyway and if you have “nothing to hide,” you shouldn’t need to worry about your privacy. However, there are still good reasons that you should be concerned about privacy, learn about the privacy implications of legislation, terms of service, and technologies, and speak up about concerns. Here’s a summary of reasons you should care, most of which come from this excellent Lifehacker/EFF article.

  1. The more systems your personal data is stored in, the more opportunities malicious individuals have to steal it for identity theft purposes. So you can’t say that you have nothing to hide–your personally-identifying information is something to hide.
  2. If your health insurance company knows everything about your behavior, they can find unjust reasons to deny your claims. Eat a “triple coronary bypass” burger at The Vortex restaurant one time? Funny name to you, pre-existing condition to them. Think about unjust trouble health insurance companies have given you or your friends in the past–the more they know, the more trouble they can give you.
  3. Thinking specifically about the Kinect, are you ever in your living room in your underwear? If photos/videos of you ever got out, they could be shared online and manipulated in a pornographic way.
  4. Even if you think the company you’re sharing your information with wouldn’t do anything bad with it, the government can easily get access to your info from that company. And the government does extensive investigations of everyone associated with suspected criminals. Are you sure no one on your Facebook friends list will ever be suspected of a crime? The more information about you that companies collect online, the more likely you are to be unjustly involved in a criminal investigation.
  5. Even if none of the above reasons convince you you need privacy, others certainly do for their own safety and the safety of their families: victims of domestic violence, targets of violence or racial or personal-moral reasons, political and human rights activists, whistleblowers, police officers, and public figures. By going along with systems that are gradually making privacy impossible, you’re inadvertently endangering these individuals’ safety.

If you want to learn more about privacy issues and what you can do about them, read the article I got most of these points from or visit EFF’s privacy page.

Genius Bar exchanges are not returnable?

December 9, 2012

I just had some trouble returning an Apple TV to the Apple Store. The store manager was eventually able to make an exception to allow me to return it, and I’m very grateful for that! But I also learned something alarming: if you swap out a device for a replacement one at the Apple Store, the replacement isn’t returnable, even if it doesn’t work.

Here’s what happened. I bought an Apple TV from my local Apple Store a few weeks ago. All the online streaming services worked great, but I mainly wanted it for AirPlay, the service where I can share my Mac or iOS device screen to the TV. AirPlay was unreliable, so I made a Genius Bar appointment to get it looked at. I checked in using the Apple Store app on my iPhone, but it seems like the check-in didn’t work, so my appointment was missed. Because of that, the associate I spoke with (probably a manager) was trying to fit me in and give me a quick fix. She said they can’t service Apple TVs at the store, so she took another Apple TV out of the box, gave it to me, and took mine. My wife was with me and realized this was a strange thing for her to do, but neither of us thought to ask her anything about it. I assumed managers were able to be flexible and it would all be OK.

A few weeks later, after we’d had the opportunity to try AirPlay on the Apple TV a few more times, we had the same problems, so at this point we decided to return it. We asked one Apple Store employee about returning it, but he said that when you swap out a device, you get a “repair part” which is not returnable. This of course was very surprising to me: if I swap out a device because it’s not working, why would it then be unreturnable? He said this was stated on the paperwork I signed. (In fact, I had not been given any paperwork to sign, but I didn’t remember this right away.) I tried explaining to him that this seemed like very bad customer service, and in fact seemed like a trap to keep me from returning the device.

He eventually spoke with his manager (a different one than in the first visit), then she talked with us and said she would do what she could. As she looked for records, it became clear that the original manager who helped me hadn’t done the exchange properly. She was eventually able to refund our purchase, and I thanked her and told her I would thank her publicly online as well. But I also asked some follow-up questions for my sake and for the sake of sharing with others. (She asked me not to share her name, but said it was fine for me to share this information.)

Here’s what I learned: Whenever you are getting diagnostic or repair work done at the Genius Bar, or getting a replacement (a “repair part”), the associate should always give you paperwork to sign. If they don’t, you should ask the associate to give it to you, to make sure things are properly documented in case you need it later, as I did. Also, if you are swapping out devices for a “repair part,” the document you sign does say that it cannot be returned. The manager said that the employee should encourage you to read the agreement, and that it’s only a paragraph long. But she said the employee would not necessarily point out to you clearly that the repair part is not returnable. She said she advises me in the future to ask to return the device for a refund and to buy a new device—that way it is returnable. It still bothers me that this is Apple’s policy—intentional or not, it feels like trapping customers into being unable to return their device.

My wife pointed out that, since Macs and iOS devices are serviceable in the store, this problem probably would only come up with secondary devices like Apple TVs. Still, it’s good to know to be cautious about this “repair part” policy and anything you’re asked to sign at the Genius Bar. It sours my opinion of Apple a bit—it doesn’t fit with what I would consider good customer service, and I can’t think of a good reason for them not to point out the potential problem.

Should Churches Close on Christmas Sunday? Part 1

December 7, 2011

This is the first of a three-part series entitled Should Churches Close on Christmas Sunday?  
Part 1: Reasons Given  
Part 2: Biblical Evidence  
Part 3: Mission and Strategy  
Part 4: The Extrabiblical
When I realized that Christmas falls on a Sunday this year, I said to myself, “Here we go again…” The last time this happened was in 2005, and, when some churches decided not to hold Sunday services on Christmas day, it resulted in controversy. It was a personal issue for me: my church, North Point Community Church in Atlanta, did not hold services, and one of the most-quoted critics was a professor from a seminary associated with my undergrad college.  
This year, Lifeway reported that 91% of churches surveyed are holding Sunday services, and this has raised some opposition to the other 9%—even the ones that are holding multiple services on Saturday the 24th. There are strong opinions on both sides, and unfortunately there’s a lot of talking past each other going on. In a three part blog series starting with this one, I’d like to make the case that it is Biblically permissible, and at times beneficial, for churches to not hold services on Christmas Sunday, as well as to solicit further Biblical discussion.  
I can certainly understand how the first impression can seem bad. Churches should gather faithfully every Sunday, right? And especially on Christmas. Oftentimes, though, just hearing someone’s reasoning can shed a lot of light. In the case of North Point, as well as many other megachurches, the reason they give is that they want to allow attenders and volunteers time to spend time with their families. In particular, many volunteer teams serve every Sunday, making the need for a break even greater. (NP actually always takes the Sunday after Christmas off for the same reason, meaning that this year they are off for two Sundays in a row.) A related logistical issue is that larger churches can require hundreds of volunteers to hold a service, and that many volunteers may not even be in town, let alone available to help out. (As to the possibility of holding a service with fewer volunteers, I’ll address that in a future post.)  
A pastor’s kid friend of mine made another point that the pastors themselves probably agree with, but may be hesitant to say. She said, we want to have our dad to ourselves on Christmas. When she said this, it clicked for me: being a pastor is more than a job, but not less. Aren’t we indignant about other jobs that force a parent to work on Christmas day? Yet it’s tempting to turn around and demand that pastors need to work on Christmas. You may have heard stories about pastor’s kids who have turned away from the church because of the excessive demands it placed on their dad. These stories show that we as congregations will either help or hinder our pastors in being good fathers. Many pastors are overworked as it is: we should be looking for ways to make it better, not worse.  
This issue forces us to decide if we really believe what a lot of us say: that our family should be more important to us than our job or our organizational ministry. And this isn’t just a platitude: the Bible even says that one qualification of an elder (including pastors) is that they are able to raise their children well (1 Tim 3:4). If that’s the case, then it’s unbiblical for congregations to insist that their pastors make a sacrifice of their family for the sake of their church ministry. For all of the impact my pastor, Andy Stanley, has had, setting boundaries to protect his family life has always been important for him. Whatever your opinion may be of him, this is one point we can all learn from.  
For some readers, these practical reasons may be enough to convince you that not holding Christmas Sunday services is a valid option. For others, however, it’s not a matter of practicality but of obedience. They may say that to not gather for worship on any Sunday, or on Christmas Sunday in particular, means elevating secular traditions, materialism, and a convenience mindset above God. They may also say that pastoring requires sacrifice, and this is a small one to make. So the first question that has to be answered is, practical considerations aside, is it categorically wrong to not hold church services on any Sunday, or on Christmas in particular? I’ll address this question in part 2 of this series.

Getting Quake II GWT Working on the Mac–Updated

November 9, 2011

Last year I posted about a port of Quake II to HTML5, to run in the browser. I’ve been keeping up with the minor enhancements to the project since then, so I figured I’d update my instructions for how to get it running on your Mac. It turns out that it no longer runs in Safari, even in the WebKit Nightly–but it does run in public release Firefox and Chrome.

  1. Install MacPorts and then run
    sudo port install vorbis-tools
    sudo port install lame
  2. Install Mercurial version control client
  3. Install the Apache Antbuild tool
  4. Check out the code
    hg clone quake2-gwt-port
  5. Build and run the server. It will take a while to build the first time, but will start up quickly from there on out.
    cd quake2-gwt-port
    ant run
  6. Start Firefox or Chrome and navigate to http://localhost:8080/GwtQuake.html. You should see a console.

If you have any problems, I can’t help you, so check the comments on these pages:

Essential iPad Apps–October 2011

October 11, 2011

Another friend of mine just got an iPad, so I figured it was time to update my list of essential iPad apps. If you have an others to recommend, leave a comment and I might try it out and add it to the list!

  • AppShopper [FREE]–lets you put apps on a wish list and alerts you when they go on sale. Great way to save money. It’s also the easiest way to e-mail or tweet links to apps.
  • Flipboard [FREE]–presents your Facebook, Twitter, and Google Reader content like a magazine, making it very fun to browse and read.
  • iBooks [FREE]–the best-looking and most fun to use ebook reader out there.
  • YouVersion [FREE]–has more free downloadable Bible translations than any other app, with every reading plan imaginable. Allows you to share notes publicly and follow others.
  • DropBox [FREE]–the easiest free way to sync documents between multiple computers and mobile devices. Syncs a designated folder automatically, so it’s literally zero steps to transfer files.
  • The Weather Channel for iPad [FREE]–the most extensive weather app.
  • Wikipanion [FREE]–iPad app for browsing Wikipedia and other MediaWiki wikis. If you use a Wikia wiki for video games or TV shows, it’s a must-have.
  • Facebook [FREE]–just released yesterday as of this writing. Smoother and more reliable than third-party Facebook clients.
  • Twitter [FREE]–again, more reliable than third-party Twitter clients, and has a nice column view.
  • Pandora [FREE]–listen to free personalized streaming music
  • Flixster [FREE]–my favorite app for movie showtimes and tickets
  • Helsing’s Fire Lite [FREE]–my favorite puzzle game on the iPad, with a very innovative light dynamic. The lite version only has iPhone graphics, but there is an HD paid version.
  • GoodReader [$4.99]–if you only buy one iPad app, buy this one. Full file system, viewing of PDF, image, and Office documents, access to FTP and DropBox servers. Essential for file management.
  • TypeLink [FREE or $5/yr]–obligatory plug for my app. Take notes and organize them using hyperlinks. Access your data on any device or on the web. Free for a basic account, $5/yr for an unlimited account.

Adding an Attribute to a Core Data Entity in Xcode 4

July 31, 2011

I wanted to add an attribute to one of the objects I manage using Core Data in my iPhone app. Because it’s a simple change, I wanted to use what Apple calls Lightweight Migration–automatically migrating the data when you make a simple change like adding a field.

I had to assemble the steps from a few different places to get it to work, partially because blog posts I found were for Xcode 3, and not even all the Apple docs have been updated for Xcode 4. Here’s the full set of steps that worked for me. For example purposes, I’m assuming your app is called YourApp, and the Core Data model is called YourData.

  1. Don’t make changes to the data model yet!
  2. Run your app in the simulator to make sure it has data set up under the current version of the entity.
  3. Select the YourData.xcdatamodel file and choose Editor > Add Model Version… The default numbering scheme (“YourData 2”) is probably fine.
  4. Select the new YourData 2.xcdatamodel file, select the entity, and add the new attribute. Make sure the right pane is visible (third button above “View” on the toolbar) and the third option within that pane is selected. Either set the attribute to be optional, or set it to have a default value–you have to choose one or the other for Lightweight Migration to work.
  5. Regenerate your model classes by selecting the entity, choosing File > New > New File…, then NSManagedObject subclass. Note: I first created my classes under Xcode 3, and at that time it put the .h and .m files inside of the actual YourData.xcdatamodel file (which is really a directory on the filesystem). Xcode 4 didn’t seem to give me this option, but that’s fine–to me, it makes more sense to store them with the other classes anyway. If you do put your new .h and .m files in a new location, be sure to delete the old ones.
  6. Select the YourData.xcdatamodeld file, go to the right panel, first option, and look for Versioned Data Model > Current Version. Set this to the newer version.
  7. In YourAppAppDelegate.m, find the persistentStoreCoordinator method, or wherever you call addPersistentStoreWithType:… You will probably be passing it nil for options:. Instead, pass this:

    NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:
    [NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption,
    [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil];

  8. Update your app to use the new attribute/property in your entity. You might want to make only small changes at first, in case something goes wrong with your auto migration.
  9. Run your app and test it.

I wrote these steps out after I finished, so please leave a comment to let me know if I missed something and you run into other trouble.

Is iOS 5 Beta Live?

June 6, 2011

Currently, Apple’s iOS Developer page is down, while the iOS 5 Beta is being posted. Here’s a quick Perl script that checks every 5 seconds to see if the page is back yet:

use LWP::Simple;
$url = "";
$size = length(get($url));
while( $size == length(get($url)) ) {
print "Not ready! time = " . time . "\n";
sleep 5;
print "Ready!\n";

UPDATE: or you can just pull up this web page.

Delegates, Protocols, and Optional Methods

June 5, 2011

In my iOS app, I have a lot of places where I show a modal view, and that view needs to have access to the view that opened it. To implement this connection, I’m using the concept of “delegates,” where one object has another object that it can call methods on. I created a protocol called ModalDelegate that defined the methods that these modals could call on their parent views. However, the way I implemented this caused a lot of compiler warnings. I just now figured out how to fix these, but the answers were difficult for me to find, so I figured I’d post them here.

First, it was my understanding that using id as a variable type was the standard Objective-C way to keep a reference to an object that can be of any class–the equivalent of the Java class Object, but more widespread in use. However, when I stored my delegate as an id, then tried to call a method on it, I received a warning that that method might not be defined. I could have cast the id to the appropriate type, but that seemed like it shouldn’t be necessary.

So, instead, I changed the type of the variable from id to ModalDelegate, the name of the protocol I created. This seemed intuitive to me from the way Java interfaces are used, and the compiler didn’t reject that variable naming. However, I got a similar warning: that method might not be defined. When I looked into it, I discovered that wasn’t the right syntax to use for a protocol at all. The right type for the variable was id <ModalDelegate>–in other words, an object of any type, but one that conforms to the ModalDelegate protocol. Also, instead of referring to @class ModalDelegate; in my header file, I needed to refer to @protocol ModalDelegate;.

The one remaining warning I was getting after this was that my classes weren’t implementing all the methods on the ModalDelegate protocol. The reason for this was that different views needed to have different methods called on them, and I didn’t want to have a separate delegate definition for each. So there were lots of methods in ModalDelegate, and each class that conformed to the protocol only implemented some of them. Of course, this isn’t how protocols are meant to work, but I didn’t see an alternative. But finally I found it: optional methods on protocols. I just add an @optional above all the methods that I want to be optional, and then the warnings went away. For my protocol, I actually wanted all the methods to be optional.

I don’t think this is a violation of the concept of the protocol, precisely because it removes all the warnings I had above. My modal view can call methods on its delegate without compiler warnings, because it knows it should have an id and that it may have a method of the appropriate type. The alternative would be to simply have an id and accept the warnings, or else use performSelector:withObject:, but those seem like overkill for the situation I’m in. The other alternative would be to implement each of the protocol methods and leave some of them as empty implementations. But all of these seem like overkill for my situation. With a protocol with optional methods, I’ve clearly defined for the compiler what I’m doing, and its lack of warnings assures me that I don’t have any typos.