Damn The Machine

Recently I placed an order with Amazon for a few goodies. The shipment arrived today. I got this cool Star Trek Star Chart book. (Ok, maybe it’s pretty geeky, but it’s also cool.) I’ve always been curious how it all fits together. Where’s the Federation–Romulan border? In fact the Federation also has borders with the Klingons and the Cardassians. Where are they? Sure it’s all a fantasy, but I have a great Atlas of Middle Earth which I love too. Those kinds of things always fascinate me.

I also bought the new Gun ‘N Roses Velvet Revolver album. I was extremely disappointed when I saw the sticker on the front proclaiming that it was protected from copying. I hate that stuff. It needs to go away. So after several choice expletives, I slide the CD into my laptop, and held my breath…

All I can say is, you gotta love the Mac. iTunes had no problem ripping the CD. Despite the so-called copy protection on the disc I was able to make my own personal digital files. I didn’t even have to hold down the Shift key to bypass the protection. (I’ve read that’s the way around it.) And I didn’t have to touch those stupid pre-ripped DRM-filled WMV files on the data portion of the CD.

The big thing that bugs me—well, the second big thing, the first is the copy protection itself—is that Amazon makes no mention on their website that the CD has the protection. They have a huge database with all kinds of field associated with each product. I really feel that they should make a note of the albums that make use of this. If I had been in a record store, I would have been able to see the sticker and decide if I wanted to buy the album. Online I had no such warning.

It all worked out, so no harm done I guess. But the big lesson of the day? Sucks to be a Windows user. 😛

Quickly Adding Smilies To Movable Type

When I did some upgrades to my website a week ago, I added in support for smilies. I used Lisa’s excellent tutorial to set them up on my site. I’d suggest you do the same. I can offer one extra bit to make things go a little faster.

Download one of Jason’s Basic Sets of 17 smilies to use on your site. Create a directory /images/smilies in the root level of your weblog website and upload the 17 GIFs there. Then use the two blocks of code I’ve provided below instead of Lisa’s code and you’ll get Jason’s Basic Set working without any extra typing. Pretty easy.

Use this code instead of the code in Step 3 of Lisa’s Tutorial, and use this code instead of the code in Lisa’s Step 7.

Of course you might be the kind of person who needs “special” smilies, in which case you’re on your own. But if you want to get the basic 17 going quickly, this should help.

Update 6:30am — I had to remove the code from the post and insert links to text files with the code. With smilies installed on my site, it was substituting the smiley graphics themselves for part of the code! Too smart for my own good sometimes—or maybe too dumb—still trying to figure out which.

Instant Karma’s Gonna Get You

I stopped by Barnes & Nobles this morning and picked up a couple of books on writing style—the AP one, and Strunk and White. I figured it couldn’t hurt if I refreshed my memory on the best ways to put things to paper (or screen, as the case may be). Maybe gussy this place up a little bit. Comb its hair, and slip on a nice button-down shirt.

On the way back to my car, a very pregnant woman in the garage asked me if I thought her battery was dead. I told her to turn the key. When I heard the rapid click click click, and saw the lights flash in time on her dashboard, I said, “Yup, it’s dead.” That’s when I noticed her elderly mother in and young daughter in the car. None of them spoke English very well.

I showed her how to put her car and neutral and I rolled it out of the parking spot. I pulled up my car next to hers and got out my jumper cables.

I spent nearly 2 years driving a 1977 Jeep Grand Cherokee—a car which I nicknamed “Penance”. (That’s a story for another time.) It was definitely a tempermental old thing. If I got one thing out of my experience with Penance it was an appreciation for all the things that could go wrong with a car. I’m not too bad with the jumper cables now. And I’ve learned to always carry those along with a random assortment of tools, rags, and a first aid kit in my car.

So I went to hook up the jumper cables and I immediately saw another reason why I like my Honda CR-V much better than the Toyota RAV-4, which the woman was driving. My Honda has its battery right out in the open. Easy to get to. The Toyota’s battery is up in the corner, nearly under the windshield covered by the big piece of plastic that you have to remove 6 plastic screws from. It’s real pain. Especially since we were partially blocking traffic in the Burbank Media Center garage.

But I finally got that off and hooked up the cables, attaching the last black cable to her engine block like I was taught all those years ago when I took my first driver’s ed class. We waited 5 minutes and she tried the ignition. More clicking.

“Damn!” I thought, and my mind immediately went to the burned out alternator that I once had to replace in Penance. This might not be as simple as I thought.

A man wandered up. My car was blocking his and he wanted to leave.

“Not working?” he asked.

The woman turned the key again but the car just made clicking noises. The man walked over to her engine and moved the black clip from the engine block to the negative terminal on her battery. She turned the key again and the car immediately sprang to life.

Everyone was saved. The woman had a working car. The man was able to get out of his parking spot and I was covered in dirt from a car that had not been washed in a while. Perhaps I got a few extra points of karma for that one.

One final note on all of this…

The woman offered me $5 for helping her. Of course I refused with a “Just glad I could help.” But there was a little voice of annoyance in the back of my brain.

Take notes people:

When someone helps you, the proper thing to do is to offer to compensate them. And as the helper the proper thing to do is the politely decline. However this all falls apart if the helpee doesn’t offer proper compensation. That’s the game.

“But you wouldn’t have accepted any amount of money from her, right? So why be annoyed?”

Because there should still be a proper value to things. If I had said, “Sorry, I can’t help you.” Or if I didn’t have jumper cables, she’d eventually have to call a towing company to give her a jump. It would have probably cost $40 or $50. So in my book, a proper amount to offer someone who helped you with a jump would be like $20. I still would have refused it—even if it was $50. It’s simply acknowledging the value of the help that someone just gave you.

When I lost my cell phone, and eventually realized that I had dropped it in the cab I took to pick up my car from the repair shop, I gave the cabbie $40 for returning it to me. And I made him take it. I might have given him more if I had it on me. The phone cost me $100. It would have cost me at least that much to replace it. He did me a huge service by just meeting me at a certain place and time to return the phone. There was value in the help he gave me, and I showed a proper appreciation for it.

So there you go. Your little polite appreciation lesson of the day brought to you by Uncle Jon.

Getting Ems And Ens To Work In Smarty Pants

This one’s painfully obvious when you think about it. Unfortunately I had get the author to explain it to me.

The default behavior of Daring Fireball’s excellent plug-in Smarty Pants is called mode “1”. In this mode you can get an Em-dash ( — ) by typing two dashes next to each other ( -- ). You cannot get an En-dash at all. You need to run Smarty Pants in mode “2” to have both active. Then you get an Em-dash ( — ) with three dashes next to each other ( --- ) and an En-dash ( — ) with two ( -- ). Here’s the extra little (non-) tricky bit that I wasn’t picking up on:

If you run Markdown and Smarty Pants together by using the pull-down menu in your Movable Type entry page, then you don’t need to make any changes to your templates but Smarty Pants only works in mode “1” the default behavior. If you want to run it in mode “2”, you need to add smarty_pants="2" to any MT tag where you want it to kick in and you need to set the pull-down menu to Markdown only. It’s the “and” part that I missed.

Now it’s all running great for me. I just have to go back and update my entries. For those of you who don’t know what the whole deal is with the Em-dash and En-dash, this is a great resource.

Thanks John for helping me out with this.

Qualification: You Are An Organic Meatbag, Master.

Knights of the Old Republic is perhaps the greatest game I’ve ever played. I literally spent a month last year trying to finish it. I was in the middle of doing the sound for a movie, I think it was “Honey”—might’ve been “SWAT”, but I’m pretty sure it was “Honey”. On a normal night, I don’t get home until 8pm and I’m usually off to work at 7 or 7:30 the next morning. Sometime during that short period of time, I try to catch my 8 hours of sleep too.

So there I was, working on this show during the day, staying late when I had to, working the occasional weekend, and every single second of free time outside of that, I was playing KOTOR. Every night when I got home, the Xbox was fired up, and I was fighting against the Dark Side like the good Jedi I was. Needless to say I wasn’t getting my 8 hours for that month. And there were a few weekends too—3 if I remember correctly. I’d have to stop occasionally for food, or do laundry, or things like that but otherwise it was about the Force.

Awesome game. So much fun. And the plot twist! Bioware, the makers of the game, always puts a cool twist in their plots about 2/3 of the way into their games. I didn’t see that one coming. It rocked my work.

So how cool is that I read today over on Wil Wheaton’s site that he auditioned for Knights of the Old Republic 2? Oh that would be the greatest thing ever if he got the part. Here’s my letter to Bioware:

Dear Bioware,

You rock. I have played nearly every one of your games. The Baldur’s Gates were awesome. Of course Neverwinter Nights is the best thing to happen to D&D since D&D was invented. But the greatest of them all is Knights of the Old Republic. You need to put Wil’s voice all up and down the sequel. That would kick ass. It was cool to hear Neelix in the original. But come on, we’re talking Wesley here.

So keep making great games and I’ll keep playing them. And don’t forget Wil. He rules.

Love,

Jon

And since I’m on the “my mind is making strange connections” trip today, the funny thing is Wil joked about the new game being called “KOTOR2: Electric Boogaloo”. Of course that’s a long standing joke about the name of any sequel every since the real one “Breakin’ 2: Electric Boogaloo” came out. “Honey” the movie I was working on when I played the original KOTOR game is based heavily on the storyline of “Breakin’ 2”. Not that this is really saying much. Neither are particularly good. But “Breakin’ 2” does have Ice-T doing Old School before he went all Gangsta and before he went all L&O:SVU.

Ok, it’s probably just me. But I will say this: Han did shoot first.

Truly, Truly, Truly Outrageous

The iTunes Music Store has a new music Tuesday just like every record store in the US. Tuesday is the day that the new albums come out. Ever since the introduction of iTunes 4.5, Apple has offered a free track for download on Tuesday. Sometimes it’s rock, sometimes hip hop but it’s always free.

Today I popped over to the iTMS to see what they were offering up and momentarily I was in shock. The free track this week is “They” by Jem.

“Sounds normal enough to me.” I’m sure you’re all saying. But I am not always up on the new Top 40 pop bands. I don’t listen to the radio that much. (I have had my stints with Indie 103 here in LA but the point of that station is that they don’t play the same stuff that everyone else plays. I can hear my Ramones and my Clash, and a lot of other bands that don’t get a lot of airplay anymore.) Consequently I was unaware of the existence of an artist by the name of Jem.

“Still,” you say, “that is hardly an unusal experience.”

Then let me explain. When I was a kid in the early 80s after Reagan deregulated children’s televsion and made it possible for cartoons that were basically one big commercial for toys and other merchandise that parents could buy for their kids—like Strawberry Shortcake, Masters Of The Universe, and Transformers—there was a cartoon about an all-girl rockband, called “Jem and the Holograms”. They did amazing things and were in a constant struggle against their rival band, The Misfits. (No, not that Misfits. But that would be a pretty sweet children’s cartoon. 🙂 ) Or something like that. I never watched it. That was definitely a “girl’s” cartoon and as a 10 year old there’s a distinct line between what a girl can do and what a boy can do.

“Again, not that big of a deal,” you continue. “Yes, twenty years ago there was a cartoon about a singer named Jem and now there really is one. Strange but no biggie.”

You’re probably right, but there is one little extra personal twist to this story. My middle name is Eric. My initials are JEM. And for those who my have forgotten, there is no torment like the torment that 10 year olds can inflict on each other. (Except for maybe the torment that junior high kids can inflict, but that’s another story.) Here I was 10 years old with the initials of JEM and there’s a cartoon about a girl named Jem. Oh the taunting! (Nearly as bad as the taunting that two other students got—a girl named Reagan, and a boy named Ronald. Since of course we all knew who our president was. Kids can come up with the weirdest things to be mean to each other about.)

Anyway, it was a weird feeling seeing that song. And then when I listened to it I was extra surprised to find out that I knew the song from somewhere. I’ve definitely heard it more than once and I never knew the secret connection.

Oh, and this is more than a little disturbing.

Using Another Weblog For Link Lists

In the course of the most recent redesign of my website, I setup the various link lists on my site—Your Blogs, Favorite Sites, etc.—as separate weblogs that are fed into my main weblog. Anyone who has gone in and updated the templates in Movable Type knows what a pain it can be. By using a separate weblog for link lists with one entry per link, it is very easy to make changes to those lists.

The proper way to do this uses PHP. If you can’t run PHP on your server, you’ll need to modify this process slightly. Plus it won’t be quite as easy to keep things up to date. You’ll need to rebuild your site every time you want new links to show up.

I got the idea for my link list from two places, vova’s “Manage Your Link List as a Blog” thread in the Movable Type support forums, and Mike James’ “Sideblog ‘Interesting Links’ setup HOWTO”.

These are both rather old topics and very likely someone has already come up with the same ideas I’m pushing pixels about right here, but just in case, I’m writing this. My version of the link list uses great ideas from both places with a little extra twist of my own. Here’s how I did it:

  1. Make an includes directory on your website. This process will create one or more files that will be included into your webpages. For the sake of being organized, I created this folder to keep these files separate. I called my folder “inc” and put it in the root level of my website with the permissions set to 755.
  2. Make a new weblog. In my case, I called it “MFTI Links”. Set the “Local Site Path” to the new includes directory you created, and the “Site URL” to your website’s URL, plus the includes directory. You can ignore the two Archive settings. But you should set the correct Timezone. Save your changes.
  3. In the Preferences screen of your Weblog Config, use the following settings: Default Text Formatting to “Convert Line Breaks”, Default Post Status to “Publish”, Number of Words in Excerpt to “0”, Preferred Archive Type to “No Archives”. Make sure all boxes in Publicity and Comment Configuration are unchecked. Set Allow Comments Default to “None”. Save your changes.
  4. In the Archive Files screen of your Weblog Config, delete all archives. Save your changes.
  5. Delete all your templates. Go to the “Templates” screen. Delete all Index and Archive-Related templates.
  6. Create categories for each of the different types of link lists you want. I created a category called “Blog” for my “Your Blogs” list and one called “Favorite” for my “Favorite Sites” list. Make as many as you want.
  7. Back in the Templates screen, make a new Index template for each category you just created. vova’s idea was to create one template and include all categories in it. This means when you insert your link list, everything is together. Sure it’ll be sorted with headings, but everything winds up together. So in my case you’d see “Your Blogs” and the list and then immediately below it, “Favorite Sites” and the list. If you create individual templates for each category, you can put them where ever you want. My “Your Blogs” list is in my sidebar while “Favorite Sites” is on my About page. As an example, my “Your Blogs” template is called “Blog Links” and the Output File is “bloglinks.php”.
  8. Use this code for the templates:
    
    <h2>Your Blogs</h2>
    <ul>
    <MTEntries category="Blog" sort_by="title" sort_order="ascend">
    <li><a href="<$MTEntryBody convert_breaks="0"$>" 
    title="<$MTEntryMore remove_html='1' $>"><$MTEntryTitle$></a></li>
    </MTEntries>
    </ul>
    

    Obviously you should change this to whatever is best for you. Probably the two most important things would be to put whatever title you want to the list between the <h2> and </h2> tags, and to change category="Blog" to whatever your category is.

  9. Make some entries into your new weblog. This is the format:Title = Name of the webpage (i.e. Monsters from the Id)
    Primary Category = The category mentioned above (i.e. Favorite)
    Entry Body = The URL of the webpage (i.e. http://www.idmonsters.com/)
    Extended Entry = The title that shows up when you hold your cursor over the link (i.e. Jon Michaels’ Weblog)
    Excerpt = An optional number or letter for sortingThis last one is where my method really differs from the other ideas people had. In the code listed in step 8 above you’ll notice sort_by="title" and sort_order="ascend". This will display the list in alphabetically my the name of the webpage from A to Z. Changing the sort order to "descend" would list the links from Z to A. If you removed the code sort_by="title" entirely, the list would be sorted by entry date. The final option is to use the code sort_by="excerpt". This would allow you to order the list in anyway you wish. Use numbers or letters to rank importance. Want your friend’s site to be the first on the list? Put a “1” or an “a” in the Excerpt field.
  10. Add the PHP include to your main weblog’s templates. Use this code:
    <?php include('<$MTBlogSitePath$>inc/bloglinks.php');?>

    Change the “inc” to whatever directory you created in step 1. Change “bloglinks.php” to whatever you called the Output File in step 7. Then put the code in your sidebar or where ever you want the link list displayed. Make sure to include it in all necessary templates.

  11. If your site uses PHP files (with the .php extension), you’re all set to go. Rebuild all the pages and you’ll be up and running. If you have HTML files (with a .html extension) you’ll need to make a change to your .htaccess file. (Or create one if you don’t have it.) It should be sitting in the root level of your website. Open it in a text editor (or create it), and add these two lines:
    DirectoryIndex index.html index.htm index.php
    AddType application/x-httpd-php .html .htm 

    This will let you process PHP code in your HTML files.

If you can’t run PHP at all on your site, you’ll need to rework this whole idea. Probably using the <$MTInclude$> tag. And as I mentioned, you’ll have to rebuild your site every time you want new links to show up.

More Site Changes

I said it would be back, and it is. I’ve brought back my Monsters from the Id title graphic. In that previous post I said I wouldn’t bring it back until “all the bells and whistles” were in place. Well, as anyone who does their own website probably knows, all the bells and whistles will never be in place. But I did do some major upgrades.

First you will notice that the “My Links” section is gone and replace with “Navigate” at the top of my Sidebar. “My Links” has now moved into the brand-spankin’ new About page that you can access from said “Navigate” section.

I’ve also redesigned how my Archives work. I took the references to the monthly and category archives out of my Sidebar and put everything under a master Archives page. I’ve changed my monthly archives and category archives to only show the 40 word excerpt of each post. You can click the link for the full post. The main reason for this is that pages were getting too big. I’ve only been running this site a few months. But 50+ posts in my “Musings” category where I tend to get a little long-winded, made a huge page to load. What would it be like in a year? So all the data is still there, it’s just not duplicated on many different pages. Those you coming in looking for a specific item that you searched for on Google or another engine, can simply type in what you’re looking for into my search box and you should get the same thing.

I also added in the Referrers page that I talked about in my previous post. Less then 24 hours after putting it in, I had to make some major changes to it. For one thing I wasn’t stopping the bot spam that I first got. Vibehosting.com is now on my nemesis list. I had to implement both the BotWhack and IPWhack from this page. Even though I talked about how cool it was that it could track all pages at my website, I decided to shutdown referral tracking on “The Donnas — Rock ‘n’ Roll Machines” and “Right Turn Clyde”. Neither of those sites have been updated in about 4 years, but since they’ve been around that long, there are links to them from everywhere. They get much more traffic than this little weblog. I might setup a separate referrer tracker for them at some point but for now, I’m really just interested in Monsters from the Id.

I setup a very cool link list system using a second weblog and PHP. It’s based on a couple different methods that other’s have used with a few little changes of my own. I’ll write about the specifics at some point so others can make use of it. The long and short of this is basically no different for the end user. It just makes things much easier for me to add and delete links in my “Your Blogs” list and my “Favorite Sites” list. Plus I new and slightly more dynamically exciting list should be showing up in the not too distant future.

And what would any site be without smilies. I had to do. I’ve mentioned before—I can’t remember if it was in a comment on this site or someone else’s—that I try not to use them too much. I try to write in a clear manner so that my tone in inferred through my words. But obviously that’s not always possible. So the occasional smiley might be called for. Plus I turned them on for Comments. That’s more of a “stop in and have fun” area. People should be able to make cute faces. This too I did slightly different from the way that’s mentioned on other sites. I’ll post something on that as well.

But wait! There’s more! I enabled Markdown and Smarty Pants in the comments. That’s right folks! Now you too can benefit from the easy markup that is Markdown.

So enjoy all the new fun. I do have a few other tricks floating around in the back of my mind that might just pop up here one day.

Where Did You Come From?

It figures. I don’t know whether it was Murphy or the previously mentioned “narrative convention” but the very instant that I installed Dean Allen’s excellent Refer scripts to keep track of referrals to the various pages of my website, I was referral porn spammed by a passing bot. I have now made some changes to the scripts to reduce referral spam. Hopefully that helps.

Oh well. For those of you who might be interested there are some links to what is probably some hot stuff in my new referral page. At some point later today, I’ll update my various MT templates to include a link to this.

There are a couple of very cool things about these scripts. The first is that they are not a plug-in to Movable Type. This means that they’ll keep track of all pages on your website—even ones not served by MT.

The second cool thing is that by making a simple change to your .htaccess file (which the installer explains) you don’t have to insert any new lines into your webpages. Apache and PHP will take care of everything for you. Nearly instant on.

The third cool thing is that it only uses one table in a MySQL database so you can easily configure it to add the table into your existing MT database. (My ISP only allows me a limited number of MySQL databases. I wasn’t sure I wanted to use up one of those just for referrers.) Just make sure you don’t use one of the existing MT table names.

As you can probably infer from the text above, Refer requires PHP and MySQL to run. If your ISP doesn’t allow those things, you’re out of luck. Sorry.