2013-04-08

necrodev: xwd

On my main computer (I have three, for various reasons, the most salient being that I am an incredible nerd) I have a folder called "webdesign". This folder contains everything I have ever created using HTML, Javascript, and other web technologies.

Since I have been doing this for over ten years, there is a lot of stuff in this folder. Much of it is unfinished, because generally speaking (as I mention in the altastic faq), my creative process goes like this:

  1. Have an idea for a page.
  2. Make a rudimentary plan and produce a working version using the knowledge I have at the time.
  3. Learn the very next day that there is a much better technology I could have used.
  4. Decide to redo the old page using said technology.
  5. Suddenly have an idea for a new page that wouldn't have been possible without the new technology.
  6. Work on the new page, putting the old page on hold for the moment.
  7. Forget entirely about the old page.

Once in a while, though, I go back through all the myriad folders within folders and see if I can find something to salvage.

The other day, I was writing a worksheet for one of my advanced students, attempting to explain how cryptic crossword clues work. Something must have sparked a connection in my brain, because I suddenly remembered that several years ago I had tried to create a crossword generator. It was a very simple affair - the user entered words and clues for them, and Javascript attempted to fit the words together in a crossword shape.

I thought this would be a good resource for teachers, and I was right, because before long I discovered that someone had already done it. That, plus the fact that I had a lot of other work to do, convinced me to drop the whole idea.

This was, by the way, before I was using any object-oriented code in my Javascript. If you examine the code (and I advise you to do so if you want a laugh) you'll see things like this:

function foo () {
  window.bar = true;
}
window.words = new Array("apple", "banana", "mango");
window.clues = new Array("A fruit that in Japanese is a Beatle.", 
  "A yellow fruit.", "A very irie but messy fruit.");

Oh, be quiet. I was clearly aware that object-orientation would help things out, I just didn't know how to do it. So I made everything a property of the window object. It's technically object-oriented, if you just... oh, all right. I sucked. Let's move on.

Even though it's now ancient, I think it still has potential. I could severely trim down the code, maybe use AJAX to hand off some of the processing to PHP... so watch this space.

I do love discovering things like this, because there's often huge nostalgia value in them. The word list, for example, mainly contains words I thought Japanese junior high school kids would be able to understand. I kept needing to add more, though, which eventually led to me just pulling words off the top of my head while I coded. See if you can guess what show I was avidly watching at the time:

  • colt
  • dean
  • samuel
  • winchester
  • yelloweyes

You can also tell how old it is from the fact I didn't call it the Crosswordinator. I'll be sure to rectify that if I do manage to create a working version....

Anyway, here it is. It opens in a new window because the size is not fixed, so it'll mess up the blog page layout. Enjoy! Hours of fun for the whole family!

No comments:

Post a Comment