Sunday, June 30, 2013

Perl blog post #16

I had hoped the fact that the family was gone this week (camping) would allow me to get ahead on blog posts again, but, alas, it didn’t work out that way.  So I’m cheating a bit, by revisiting the same topic I essayed last week, since it seemed to stir up some strong emotions.  Toddle off to my Other Blog if you’re interested in seeing my rantings for this week.  This one doesn’t require any Perl knowledge at all, really; it’s more of a reflection of the nature of these sorts of debates on the Internet (such as they are).

Sunday, June 23, 2013

Perl blog post #15

Still recovering from a bit of a cold this week—I’m in that lovely phase where you mostly feel fine, except every once in a while you start hacking and coughing until you hock up a big ol’ glob of phlegm—which was my second week at my new job.  Not the most awesome time to get sick.  Here I am trying to impress folks with how intelligent and savvy I am and instead I’m wandering around with virus-induced zombie-brain.  Ah, well.  I’ll have plenty more shots at it.

Anyway, I did I a quick tech blog post this week.  Just a response to some other blog posts I read recently.  Head on over there and check it out if you’re into Perl.  This one doesn’t require any technical knowledge, but a bit of understanding of programming languages in general and their evolution wouldn’t hurt.

Sunday, June 16, 2013

Character Building

I fancy myself a writer.  I am, after all, in the midst of writing a book right here on this very blog, where anyone can read it.  Being an aspiring writer, I often ponder the various elements that one must master to create compelling literature.

Pacing, for instance, is one I struggle with a lot.  I tend towards a more deliberate (unkind version: slow) pace, and I have to push myself occasionally to keep from getting bogged down.  There’s also style (wherein I ponder if I’m being too verbose, or using too many adverbs) and setting (wherein I wonder if I’m describing things so thoroughly that people forget what’s going on in the action) and theme (which I have a bit of a love/hate relationship with).  But possibly the biggest one of all is: characters.

Characterization is one of the most important aspects of writing, at least in fiction (and, honestly, most non-fiction too).  Even if you write a story in which not a single human being appears, you will have characters.  Your animals will become characters.  Your haunted house, or old car (or haunted old car) will become a character.  As sick as I am of hearing some schmuck on a DVD special features video say “you know, the city itself really is another character in our movie,” it really can be true, when you’re writing.  We writers have a tendency to turn almost anything into a character—wind, diseases, furniture, electronic devices—and it’s because characters are so essential to a story.  If you’re a writer, there’s a pretty excellent chance that your reader is going to be a person, and they’re going to want to see a person in your story to identify with.  A person like them, or like someone they know, or like someone they’ve always wanted to know, or like someone they’ve always been afraid to get to know.  A character.

So, in order to draw the reader in, your characters needs to be as realistic as you can manage.  There are all sorts of tricks to achieve this.  You can base the character on someone you know, for instance; that’s always a popular one.  Or on some historic figure.  But of course the character will never be (can never be) exactly like another person.  They must have at least some qualities that are unique to them.  You will always have to, at least partially, make something up.

Now, as near as I can tell, there are two schools of thought on this.  This is not really an either/or choice, of course, but rather two extremes on a spectrum, with many people falling at either end, but many falling somewhere in the middle as well.  At one end are the authors who say “my characters do exactly what I tell them to and nothing more.”  At the other end are the authors who say “I just let the characters speak through me; I never know what they’re going to say or do until they tell me.”

The people at the first end tend to think of the people at the other end as New Age hippies spouting pseudo-mystical bullshit.  Contrariwise, the people at the far end tend to the people at the other end from them as fascist megalomaniacs who won’t let their characters “breathe.”  Given my belief in balance and paradox, it will not surprise you to hear that I think both camps are right ... and also that both camps are wrong.

Let’s pick on one of my favorite authors for a minute, Robert Jordan.  Now, please don’t accuse me of Jordan-bashing.  I’m not being facetious when I call him one of my favorite authors—I named one of my children after one of his characters, after all.  But that doesn’t mean I have to agree with everything he says.  Here’s something he said once:

The characters never surprise me. In terms of the book I am God. A writer who says that the characters take control is doing one of two things... either he or she is telling people what they want to hear because a lot of people seem to want to hear that the characters have taken over... or else, that writer is being exceedingly lazy and not paying attention. The characters NEVER really take over.*

As much as I respect the man, I have to say I think he was wrong here.  And, if you’ve ever been reading the Wheel of Time series and wanted to reach into the pages and strangle one of his characters for making the same stupid mistake for the fifth or sixth time in a row, I bet you’ve wished he was willing to let his characters surprise him too.

On the other side, some of my other favorite authors, including Anne Rice (after whose character yet another of my children is named) and Stephen King (who is my ultimate literary idol) have implied or even come out and said that they never know what their characters are going to say next, and they’re just as surprised as the reader by their characters’ actions.  This is a bit too much hand waving for me.  It goes beyond metaphysics and into prestidigitation.

Basically, what I want is a theory that does allow my characters to surprise me, at least sometimes, but is still founded on rational, explicable thinking.  I want to be in charge as far as I can be, but not so far that I limit the organic reality of my faux people.

And, after a lot of pondering, I think I’ve found such a theory.

Let me approach this from an oblique angle.  Imagine your best friend.  Do you ever have conversations with your best friend, in your head?  You know, practicing for what you fear might be a difficult topic, or daydreaming about the two of you doing this or that, or whatever?  Sure you do.  In those conversations, your friend will say, or do, different things, and those things are likely exactly what your friend would do or say in real life.  But it’s all in your mind.  You have the ability to predict, with a pretty high degree of success, how your friend is going to react in a given situation.  And you know why you can do that?  Because you know things about them.

You know he never got along with his parents and left home at 17.  You know that she had an older sister that she always competed against, even though the sister herself never tried.  You know that he was raised Baptist and is now an agnostic.  You know that she was raised atheist and discovered Buddhism and fell in love with it.  You know that he hates peas but loves asparagus; you know that, when she goes to an amusement park, she’ll ride anything except the rides that go around in circles, because they make her queasy.  You know that, when he gets drunk, he gets maudlin and sappy; you know that she harbors a secret disdain for women who “pamper” themselves with massages or manicures.  You know that, in middle school, he was a bully, which he looks back on with shame.  You know that, in high school, she considered herself dorky and unpopular, but that there were at least two different boys who were madly in love with her.

And it doesn’t actually have to be your best friend.  Anyone that you’ve known for a long time will fall into the same bucket: family, even if you don’t particularly like them; out-and-out enemies, for that matter; even co-workers, if you’ve worked together long enough.  If you know them well, you know what they’re going to say in response to this or that.  If you can’t do that, you don’t really know them that well, right?  And, sure, you’re occasionally wrong, but that just adds another datapoint that will make you more likely to be right the next time.

We know that knowing all these details makes us more able to predict with certainty what a given person will do, how they will react to a given situation.  But we don’t know exactly how.  We know that all these details feed into a complex mental model, a sort of simulation of the other person.  The friend that you had that conversation with in your head isn’t actually your friend: it’s just a symbolic representation of that person.  But it’s close enough that you can use it to have a conversation with, just like a real person.  And, most of the time, your mental model of the real person will react in realistic, appropriate ways.

So how does knowing that your friend hates peas help you predict that he won’t take kindly to the suggestion that he’s treating his girlfriend badly?  We don’t really know.  But it all feeds into it, somehow.  We know that some mental conditions make it much harder for certain people to do this.  We know that, just like anything that people do, some people are better at it than others.  But everyone can do it, to a lesser or greater extent, and it works.  And the fact that we don’t entirely understand it provides the element of mystery to it.  Sometimes your mental model of your friend will surprise you with her answers.  And yet you still know it’s right.

Now you see how we can apply this to creating fictional characters.  Authors are famous for inventing countless details about their characters that never appear in the actual story: “backstory,” we call it.  Why do we bother with this?  Because we’re building mental models.  Our mental models of a made-up person have a major disadvantage that models of real people don’t have: there’s no feedback loop.  With a real person, their actions in the real world are constantly helping us refine our models of them.  On the other hand, models of fictional characters have a huge advantage over models of real people: they can be complete.  No matter how well you know another person, you will never know everything about them.  There will always be some secrets, something held back ... even if the other person doesn’t mean to.  There just isn’t enough time for someone to tell you everything that’s ever happened to them or everything they’ve ever thought about when they were alone, even if they could remember it all.  But a fictional character can’t hide anything from their author.  You know all: their deepest secrets, their innermost thoughts.  You can make up as much or as little as you need to, and you can always add more later.

Of course, you have to be careful about adding.  If your character has already appeared in the story, and you go fiddling with their backstory, you might inadvertently change how they should have reacted to something that you already wrote.  You also have to consider that the experiences that happen them in your story (that is, the plot points) are now experiences that feed into your mental model of them.  In this way, your characters will grow as the story goes on.

And now you can see how you are in charge of everything, and yet your characters can still surprise you.  With my characters, I find myself having long imaginary conversations with them, and, yes, occasionally they do surprise me with their answers.  I don’t always know why they say this or that; I just know it feels right.  And sometimes they even do things which completely mess up my authorial plans.  And, when that happens, you better just go with it.  If you try to force them into the course of action your plot demands, they’ll start to feel fake to the reader.  The reader won’t even be able to put their finger on why; they’ll just throw down your book in frustration and cry “Frederica would never act like that!” and storm off in a huff.

You see, readers have mental models too.  And they’re not required to respect your plot.

So, in a certain way, it is like your characters are talking to you, but there’s nothing mystical about it.  There’s a perfectly logical explanation, and it involves you maintaining ultimate control.  But that doesn’t mean you get to put words in your characters’ mouths all willy-nilly either.  There are boundaries.  And there can be surprises.

* from an AOL chat, preserved by Theoryland of the Wheel of Time

Sunday, June 9, 2013

Perl blog posts #13 and #14

For only the fifth time ever, I missed a blog post last week.  I lost my driver’s license—actually, my entire money clip—and I was scrambling around, trying to replace everything before I had to get on a plane last Sunday.  So I have a reasonable excuse, I suppose.  Except for the fact that I had several posts all ready to go; all I had to do was get one of them up.  Ah, well.  My mind was fried.

Part of this was the moronity encountered when I was trying to replace my photo ID (which, you know, is sort of important for flying these days).  (If you were at YAPC with me, you probably want to skip this paragraph and the next, because I’ve already subjected you to this rant.)  Let’s start with the California DMV: the new driver’s licenses are all fancy and holographic, presumably to cut down on fake IDs.  But it means that, when you go to get a new license, they hand you a piece of paper off their printer.  Like a dot-matrix printer, even.  The fancy license gets mailed to you later.  Try convincing a TSA guy in Texas that the piece of paper printed off on 1980’s technology is your official state-issued ID.  But here’s the stupid part: there were 17 windows at the DMV, and, at every single one, there’s a thumbprint scanner.  Which scans your thumbprint and identifies you in real time.  Nice that I don’t really have to have much ID to get my ID, once I got my thumbprint in there in the first place, but the point is, you can afford 17 real-time biometric scanners, but you can’t afford one lousy holographic printer? really?

And then there’s Costco.  Your Costco card has your picture on it, and I actually read online that people had successfully used that with the TSA in a pinch.  So I went to get a replacement Costco card, just in case it might be useful.  They asked me for a photo ID.  I was tring to get a photo ID, I pointed out.  They said they couldn’t issue me a Costco card without a photo ID.  I pointed out that they already had my picture online: just bring it up on your computer and then look at me.  The lady looks at me and says: “But the picture is stored at the corporate headquarters.  It could take a few days to bring up.”  Seriously???  Have you people never heard of this little thing called the Internet?  I can get pictures from China in seconds, but you think it’s going to take you a few days?

And, after all that, the only person who really gave me any crap over not having a license with a picture on it was the dork at the cheap hotel I stayed at.  I even managed to get a rental car with my dot-matrix ID.  So that was nice.

Interesting side note: our best guess as to where the money clip went was that my youngest threw it away.  That’s her new thing: taking whatever she can lay hands on and thoughtfully putting it into the trash can, or recycling bins.  So helpful.

Anyhow, to make up for missing last week, I’ve posted not one, but two tech posts on my Other Blog.  So, if you’re into Perl, check out my post on notes in Vroom.  And you can also read about my experiences at YAPC 2013 if you like, and that one doesn’t require you to speak Perl at all.

I should be back on track starting next week.