Answer Finder

I’ve had some version of this site up and running since 2003, when I became frustrated with how difficult it was to search through previous columns I’d written for IMDb. 1

Unlike most blogs,2 many of the 1,000+ posts on this site are still highly relevant today. They’re answers to reader-submitted questions, and most of the questions haven’t changed. It’s often difficult to find these older entries, however, and the chronological blog format doesn’t help. I’ve struggled to find ways to make it easier to dig around.

The category archives at the bottom of (almost) every page are a start. Clicking on Education, for example, will take you to a listing of all the articles in that category, along with brand-new summaries — most of them written by Matt.

Another option is what I’m calling Answer Finder, which takes all the screenwriting-related entries and groups them together in a much more browsable interface. It’s an experiment, and your feedback is certainly appreciated. Two caveats:

  • There are known issues with Internet Explorer. In particular, the category box appears too far down the page. It’s a problem with IE’s box model, and if someone wants to grab the CSS and fix it, knock yourself out.

  • Some of the older entries have weird formatting, particularly with scrippets, because the specs have changed over the years. One by one, we’ll be going through old posts and fixing them. But if you see something wonky, feel free to note the URL in the comments to this post.

geek alertFor the truly curious, here’s how Answer Finder works. (You’re welcome to look at the source, of course.)

  1. Getting both categories and posts out of WordPress is more difficult than you’d think, which is why I’m happy to have found the plugin WP Categories and Posts.

  2. I hacked the plugin to make it generate DIVs for each category.3

  3. With a custom page template (an under-appreciated WordPress feature), I used jQuery to hide the DIVs, bind the category menu and place a session cookie to help you come back to the same place when navigating away.4

Let me know how the new page is working, or not working, over the next week. You may see periodic downtime or wonkiness while things get sorted out.

  1. Remarkably, they’re still running these, even though it’s been years since I’ve written a new one.
  2. I’m using “blog” in the 2009 sense of a series of short posts arranged chronologically, newest first. That is: a blog is a blog because of the way it’s formatted, not because of the content per se. It’s easy to forget that the term blog originally referred to weblogs, or online personal journals.
  3. When I say “hack,” I really mean it. It works because it works, not because I really understand it. PHP makes baby Jesus cry.
  4. jQuery, by the way, is awesome. It lets a barely-programmer like me leverage a lot of CSS knowledge. And I have new respect for JavaScript, which is more Pythonic than I was anticipating. Given the speed boosts in the new Safari and Google Chrome, I’m looking forward to seeing what ambitious ideas will be coming down the pipe in 2009.
  • Digg
  • Facebook
  • Reddit
  • SphereIt
  • StumbleUpon
  • Twitter
March 2, 2009 @ 11:32 am | Comments (18)
Filed under: Geek Alert, Meta, QandA, Scrippets

18 Responses to “Answer Finder”

  1. Paul Ramos

    Hey John, Have you looked at possibly using Drupal as the engine for your site? I’m just getting my feet wet in the Drupal world now but from everything I’ve seen it’s very robust and easier to configure than mambo or joomla. Yes it runs on php but with the number of pre-made modules out there you probably(hopefully?) wouldn’t need to touch it. Anyways, you might want to give it a look as a solution to your search/answer finder issue. Here’s a link http://drupal.org

    Just out of curiosity, what do you like about jquery over other javascript libraries like the prototype/scriptaculous stack, mootools stack, or the yahoo yui stack?

  2. Karen

    I originally found you through the Yahoo columns — thanks!

  3. Stardog

    Changing the “div.category” to “width: 368px” from 400px makes it fit in, but it looks a bit thin.

    div.category { width: 368px; }

  4. Stardog

    The “if IE 7″ conditional was stripped out of my comment…

  5. sandofsky

    Good work on the code. It’s cleaner than stuff I see from full time developers.

    Tip: You can jQuery(function(){}) instead of jQuery(document).ready(function(){}). I find it easier on my eyes since I use it so much.

    @Paul

    In my experience, jQuery has the most elegant design. Its syntax is clean, it’s designed around plugins, and it doesn’t patch any core Javascript objects.

    I haven’t done a recent comparison, but aesthetics aside, the other frameworks were larger and slower.

  6. Kristan

    “PHP makes baby Jesus cry.”

    LOL. Good, then I don’t feel like less of a person for getting frustrated with it sometimes too.

  7. Nima

    Hey John,

    I think your AnswerFinder is a great idea. A couple suggests for your consideration:

    1. I think a Search box would be very helpful. Also, Wordpress allows you to create a special “search.php” template that is called for search results, which you can customize like any other page specific template. I would suggest modifying it to give results like you’re seeing on the AnswerFinder — the post title and description — instead of the the standard running list of full posts.

    2. I think a “John’s Picks” category would be nice. Maybe the top 5-10 articles you think would be most useful to aspiring screenwriters (possibly the ones you think everyone should read?).

    3. I don’t love the cookie that keeps your spot. It’s a bit disorienting for a web UI, because you expect to see a fresh page on a new load. Maybe it’s just me, though.

    4. Your categories list begs to be turned into a jQuery Accordion (http://jqueryui.com/demos/accordion/). Warning: jQuery UI is like crack to a web geek!

    Great work, John.

  8. John

    @Paul:

    What sandovsky said. jQuery seems very clean and pretty compact/focused. But I haven’t really messed around with Prototype and the others. I’m sure they have selling points as well. I only wanted to learn one, and most of the recent momentum was swinging towards jQuery.

    @Stardog:

    I’d love to be able to give IE people the same sized column. If you want to Pastie what you’ve done, others can experiment.

    @sandofsky:

    Thanks, and I swapped out the ready handler.

    For those who want to see a nicely-colored version of the jQuery, it’s here:

    http://pastie.org/405133

  9. Cybermoniker

    Coming down the pike? Yes? Turnpike?

  10. John

    @Cybermoniker:

    Pipe or pike:

    http://eggcorns.lascribe.net/english/437/pipe/

  11. Erik Harrison

    Gah, you probably don’t care. But -

    • You’re recreating the jQuery object unnecessarily at the tail end of your code there. temp is already a jQuery object, passing it in as the constructor just returns the object you’ve already got. Since you only call it once, I’d kill the object entirely. You don’t need it, you can just do jQuery(this) where you are doing jQuery(temp) now. (line 24).

    • If you do want to reuse the same selector over and over again in your code (like it looks like you started to do with the temp object), I always create the object just like you do, but start it with $, since that’s similar to the jQuery shortcut function. Anything with a $ in front of it in my code is just a repeatedly reused jQuery object.

    • You’re not using the $() shortcut. Sad. Once I got used to it, it made code much easier to read.

    • PHP does make baby Jesus cry.

  12. John

    @Nima:

    1. I switched search.php to use roughly the same layout as archive.php, and yup: much better. Thanks.

    2. I have top picks in the sidebar of every page. They’ve probably become invisible to you.

    3. Without the cookie, it gets really disorienting when you click through to read a full article. This restores the “normal” feeling of navigating back.

    4. I am not a fan of the accordion, particularly for such long lists. But the jQuery UI is really impressive.

    @Erik:

    WordPress uses the $ for its own purposes/libraries, so most places highly encourage you to use the long version. For me, just learning, it’s also been helpful in reminding me when I’m using the library…

    …without needing to, like in line 24. (Fixed). Thanks.

    I’m sure I’ll be using the $ for the next project.

  13. Nima

    You’re right John, my eyes don’t usually head that far East on your site. My bad.

    Search results are now awesome, btw.

  14. Tom Corwine

    I like it.

    Also, it works great on Firefox for Linux, in case anyone cares.

  15. Paul Ramos

    @Sandofsky & John: Those are good things to know about JQuery. My experience with javascript stacks has mostly been in the prototype/scriptaculous world. Since I’m getting into drupal development I’ll be looking into jquery more.

    @everyone: I concur, PHP does indeed make the baby jeebus cry.

  16. Pristine

    Sorry, what’s Pastie?

  17. John

    @Pristine:

    Pastie is a site that lets you paste and share chunks of nicely-formatted code:

    http://pastie.org

  18. Pristine

    Thanks John. I thought that you could actually paste the code and see the output in real time there.

 

About

This site is run by screenwriter John August. Mostly, he answers reader-submitted questions about the craft, but occasionally he goes on tangents that run far afield of writing and filmmaking. You'll also find info on past, present and future projects.

Follow Me

On Twitter: @johnaugust

Ask a Question

If you have a question about screenwriting or my movies that hasn't been answered, by all means ask. There are a few guidelines to follow.

Featured Articles

101: Some screenwriting basics


There are more than 900 articles on the site. You can find category archives at the bottom of every page.

Read Me

  • The Variant
  • A new short story available for download, Kindle and iPhone.

Feeds