‘Twas Not the Code’s Fault, But the Coder’s

Last Thursday, Beckoning Chasm asked if his Dredmor picture was going up at On the One Road to Ruin.  Not an unreasonable notion by any stretch of the imagination, but one problem hampered it: I don’t have a fan art page.  Making one is easy peasy, but, heh, because I don’t have a fan art page that means I don’t have a link to a fan art page on my navigation bar.  Which means,  heh heh, I have to go through all of my pages and put one in each existing page templates.  Which means, heh heh heh, more working with HTML.


Actually, that’s not true.  I like mucking with HTML and CSS.  While half my time working on the stuff deals with me scanning through tutorials, when I finish, I tend to like what I see.  This is a hold over from the old blog site, where mucking about was a daily thing (ask anyone who was there.)

It’s just sometimes I screw up and it gets frustrating.  Especially since everything was working so well on my Devil Box.

Which leads us to today’s tale of Cullen stupidity.

At the top of the page in the header section is a sample banner.  Through means I don’t remember how, I set it up so that each time a visitor hits a page, he or she finds a random image (the cameo on the left) and a random subtitle (the banner on the right) with the actual title located in-between.  It’s really cool.

Now, last time I mucked with HTML I learned how to save a JavaScript separate from the main set of code, so, as I recall it (and I might be wrong here) it loads a little quicker.  Also, as the subtitle appears on all the pages, I can add and subtract from it with one hit, instead of having to hit multiple pages.

Cool beans, right?

Now for right or wrong I have it in my head to do the same with the cameo side (i.e. set up a separate .js file) to speed up load times (or, at the very least, give me one less bit of JavaScript to go through as I work.  So I work my little code monkey magic, get it to work real nice on my Devil Box, then transfer it over to my site.

It doesn’t work.  No image.

Thus a very tired Cullen vents with bad poetry, then goes to bed.  As is his wont.

Next morning I go through everything, and surprise surprise, the problem isn’t in the cameo.js.  It’s in the HTML of very page itself.

See, I had to make one simple change to make the new file work.  And, instead of cutting and pasting the earlier banner.js code, I tried rewriting it from scratch.  Big mistake.  That allows CULLEN STUPIDITY into things.  And as we know, CULLEN STUPIDITY is not only about as easy to fix as it is to do, it’s also almost as embarrassing as walking out of the house with a giant hole in the crotch of your pants.  And by almost I mean I wish I’d done the crotch thing.

Here.  Let me show you the code and see if you can spot what I didn’t.  You don;t have to know HTML to get this, kids.  Just remember that a perfect example of how to do it right sits JUST A FEW FREAKIN’ LINES AWAY!

A good hour I spent staring at that, not seeing it.  Now that I’ve found it, it’s so obvious, it hurts.

Now, there is a second possible error up there.  Not sure either way.  However, let me give you the answers to the test.  I know everyone else out there caught it just like that.  I know that it’s a stupid rookie error for a Writer in general, if not a code writer in specific.  Give me just this one moment to pretend that there is actually someone as dumb as me out there.  Somewhere.

Circle #1 is the one that caused all the problems.  You can’t expect the program to understand what you meant to say. All it knows is what you said.  And I clearly said “tect” and not “text”

This is the whole advertisement box fiasco all over again.  You can’t imagine how happy I am to learn I’ve learned NOTHING AT ALL!

Circle #2 I don’t really know if it’s an error or not.  “javaScript” might work just as well as “javascript”.  That IMAGE SCR would work just as well as image src, for instance.  But I took no chances.

Also?  That was the mistake I saw first.

Anyways, you head over to the site, everything is working fine.  Just fine.  Refresh and a new image will appear.  There aren’t a lot of them and I did arrange some repeats in the cameo, but it’s all set and ready for business when I get more cameos/subtitles made.

Except, well, you know, I decided to replace “tect” with “text” by means other than cut-and-paste:

For the love of Anguirus, WHY?  WHY WOULD I DO THAT?

I’m surprised my site works at all.

Which site?


So to answer you initial question, Beckoning Chasm, I hope to have your fan art up on a fan page by this Sunday (September 19) at the latest, baring any unforeseen circumstances.

And if on Friday (September 17) the World Wide Web crashes and burns, you’ll know I just tested out the new navigation bar.

Jesus H. Christ.

FUTURE CULLEN sez:  There is a third mistake shown in that first code that I clean forgot about, but did, in fact, correct.  See if you can spot it.


One Reply to “‘Twas Not the Code’s Fault, But the Coder’s

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s