Monthly Archives: October 2011

Libraries

On Saturday, I got to visit the public library in Marengo, Iowa, which is the most beautiful library I have ever seen. Rather than a concrete filing cabinet for books, the Marengo library is a warm and inviting environment, a veritable temple to books.

I am a huge fan of libraries. They provide a center a learning accessible to anyone. At a time with college costs $30,000 a year, anyone can go to a local library and check out a book for free. Or, in these days, they can go there to use the Internet to access actual courses from schools like MIT. Of course, you can also check out sleazy detective novels and space operas.

Some authors claim that every book checked out of a library is a potential sale lost. The publishing industry has even hired lobbyists to push this idea on politicians. I believe this opinion is poppycock.

As a fiction author, I see every book checked out of the library as an opportunity to make a new fan. Again, I fall back on a simple concept. I would rather build a following that sell a few more books.

The other wonderful resource that libraries contain are the librarians themselves. Librarians are far more than clerks who stamp books. They are well-educated professionals. They are champions of free speech. They cherish and support the written word. More importantly, the provide a non-profit motivated voice in an every-increasingly profit motivated industry.

Back it up.

This message is for those few people on Earth who don’t know about Dropbox. The dark times have ended. A new day has dawned. You no longer have to live in fear of data loss.

As a writer, one of my biggest fears used to be data loss. I constantly worried that I was one accidental click away form destroying a book. Sure, I had a USB drive where I backed everything up. But what if I lost it, or I didn’t remember to copy everything to it for a week? And what if I worked on something on the USB drive and then forgot to transfer it back to the master copy of my laptop?

The solution to this is Dropbox. Like many of its competitors, the Dropbox service that gives you free (2GB, but you can pay for more) space in the cloud. However, there’s a big difference. Dropbox has clients for Linux, PC, Mac, iPhone, and Android. It will also let you share files of any size with anyone.

Here is a picture of a dog jumping hurdles linked from my Dropbox account. Woof. Woof.

The other thing I like about Dropbox is the ease of use. Once the program is installed, there is a folder called Dropbox in your “My Documents” folder. Copy your writing to that file, and it syncs to the cloud. It even does a limited amount of revision history. Then you can just use your files like you always have. Dropbox takes care of all the tricky business.

BEEP BEEP BEEP

Have a laptop and a desktop machine? Set up both, and Dropbox will automatically sync them when they are connected to the Internet. Want to collaborate? Have your co-author install Dropbox and share a folder with you. I even use Dropbox to help my friend Jose with his wine store website.

I’m not claiming Dropbox is perfect, or even that they don’t have some competitors who are doing good stuff. I’m just saying that I find it a good way to back up and share data, and if you’ve never heard of this type of application, you should try it out.

It’s the way it’s done

I did something very unhealthy just a moment ago. I nearly got into an Internet argument. Of course, the argument was on something I’ve come to hold dear: grammar.

Now, I’m not saying I’m the greatest grammarian in the world. Without the aid of a computer, I probably wouldn’t even try to spell grammarian, but just because I’m not skillful in an area doesn’t mean I would throw it under the bus to feel superior. For instance, I know very little about the internal workings of modern automobiles, but I usually don’t argue with my mechanic, even when he explains the reason my car vibrates over 80mph is that my break rotors are warped. I might be skeptical, but I figure he knows more about it than me. (He was right too. One turn on the lathe and the wobble went away.)

So, back to my budding Internet argument. I found a handful of people on Google+ arguing that “it’s” should be used as both a possessive pronoun and as a contraction. I simply stated the difference in that “its” was it’s own word like “his,” not the possessive form of “it.” Of course, I had to add that there was one exception to the rule: one’s. This in English after all. We can’t have a rule that works consistently.

They wanted to disagree, saying that “his”: is a new word, unlike “its” which adds and “s”. Of course this is wrong. Just because “it” and “its” look alike, doesn’t mean they are the same word. The verb “Tune” and the noun “Tune” look alike, but that doesn’t make them the same thing.

Still, language is malleable, and English is evolving, but let’s put that all aside and look at it this way: English is difficult. The rules are contradictory and change not only between dialects but also between style guides. Unlike so many other rules, “It’s” vs. “its” is clearly defined everywhere in the English-speaking world. It’s the same whether you pick up the Chicago Manual of Style of the Oxford University Press Guidelines. The rule might be a little tricky, but it’s unambiguous. In a language where almost nothing makes sense. We have hung this one issue up to dry. It’s done. Finito. Kaput.

The King of Pop

One difference between writing Science Fiction and Urban fantasy is the ease of using pop culture references.

Writing Urban Fantasy means being able to reference Internet Memes, make jokes about Jay Z, or even reference popular franchises in the same genre. One of my favorite Remo Williams moments was the time he jokingly introduced himself as Mack Bolan.

Pop culture references in far-future science fiction can be trickier. One way to create a pop culture item is to take concepts from our time and make obvious analogs, like Slurm in Futurama. It’s a sugary sweet drink with many things in common with Coca-Cola. This gives the reader a point of reference and give the author legal indemnity.

Another tactic you can use is putting together weird combinations of corporations. Tyree Campbell likes to do this in his Nyx series, where an enemy might be armed with a Kellogg-Feuer Ray gun. Actually, this method has some plausibility. For instance, over the years, Remington has made rifles, typewriters, shavers, and jewelry.

Of course, you can always make your own pop culture references. However, to do so, you have to build up a context throughout the story you are working on. This is hard work, and may only be accomplished over a series rather than a single book. A good example of this is Terry Pratchett’s Discworld series, which for the purposes here can be considered Science-Fiction as it is alternate Universe. While Pratchett relies heavily on analogs to our society, he has also created several of his own, but you wouldn’t get them. You have to be there.

 

Out of the Quagmire

Every time I slog through the middle of a book, I think I will never finish. Yesterday, I added 1500 words to my rough draft, and for the first time, I think I can see the light at the end of the tunnel.

I’m told other authors feel this “muddle in the middle” as well. As long as I can’t share in the prestige and remuneration of my more successful colleagues, it’s nice to know we have neurosis in common.

jQuery adding jpeg icons and preview.

Over a decade ago, when I started in my current job, I started out by building a portal page for the organization, with easy links to useful resources and applications. Today, it has grown to a full content management system with commenting, a file store, a notifications system, and a trade sheet. It has also gone through three major revisions as I moved from straight HTML, to a simple framework, to a complex framework, to a simple framework of my own devising. Maybe I’ll blog about my framework someday.

In an effort to beautify my CMS, I decided to put icons next to the filenames for knows types of files (and a generic one for unknown types).

I did this via this piece of jQuery:

$(‘.file[href$=”.jpg”]’).prepend(‘<img src=”images/icons/jpg.png” border=”0″ /> ‘).removeClass(‘unknown’);

For people who can read jQuery, this is pretty simple stuff, but I’ll walk through it. The $(‘.file[href$=”.jpg”]) tells jQuery that what follows will be applied to all elements with the class “file” and an href attribute ending in “.jpg”. This would find elements like the following:

<a href=”documents/image001.jpg” class=”file unknown”>This is image 1</a>

The method call .prepend(‘<img src=”images/icons/jpg.png” border=”0″ /> ‘) adds the call to the image of the icon, changing the element to this:

<a href=”documents/image001.jpg” class=”file unknown”><img src=”images/icons/jpg.png” border=”0″ /> This is image 1</a>

Finally, the .removeClass(‘unknown’) removes the “unknown” class. When I get done will all the “known” file types, I’ll apply a generic image to items with that class.

A little more complicated trick.

Next, I wanted an easy image preview that didn’t require me to create thumbnails on the server. Originally, I tried an image preview jQuery plugin which I didn’t like, but then I remembered I was already using the clueTip plugin. I wondered if there was a simple way to use clueTip as my image preview.

I came up with this script:

$(‘.file[href$=”.jpg”]’).each(function() {

$(this).attr(‘title’,’image preview|<img src=”‘ + $(this).attr(‘href’) +'” width=”200″>’).cluetip({splitTitle: ‘|’,width:’220′});

});

This uses the same selector as above, but instead of chaining all the methods,  I used the each() method to pass each object to a function. I did this so I could refer to each object matching the selector as “this“. There might be a way to do this manipulation without “this”, but “this” was the way I did it.

The rest is pretty easy. I put this string in the “title” attribute of the href:

image preview|<img src=”documents/image001.jpg” width=”200″>’

Then I call clueTip with teh splitTitle option, which tells it to take the title and use “|” as a delimiter between its title and content. The result looks like this:

All-in-all. I think this is a much more engaging interface than a list of text links. One weakness of the preview, however is the lack of a thumbnail, so the previews will load slowly. Of course, if I had thumbnails, I probably wouldn’t have bothered doing it this way.

Be Curious

For today’s class, we’re going to watch YouTube videos.

We’ve seen it in a movie. Someone tried to fire a gun. Someone else take it away, says, “The safety was on,” and hands it back. It’s a nice device for showing the character’s cluelessness with handguns, but does it really work that way? Let’s say my character has a Glock.

Personally, I don’t know much about guns, but there are many people on YouTube that will teach you about them. Say you wanted to know how a Glock safety worked, you could watch this video:

[youtube http://www.youtube.com/watch?v=-7sJrZB4r_Q]

So, now I know. Glocks have a safety system that’s integrated into the trigger. There’s no little switch on the side. There are some guns that still use those switches, but many don’t. Sadly, the lack of a safety on the gun doesn’t stop writers from using this ancient gag.

Let’s go one further, something you can’t look up in Wikipedia, will a Glock fire after being dragged behind a truck?

[youtube http://www.youtube.com/watch?v=z_vu2xEN7kA]

I can’t believe someone actually did that, but I’m glad I didn’t have to. Oh, and I know it wasn’t a fluke, because I can give you a second opinion.

[youtube http://www.youtube.com/watch?v=QOvFSTYcb7c]