Words and pictures and stuff

Main menu

Monthly Archives: August 2011

Post navigation

I was going to spread the word today that fuego is selling an authentic mask used during the production of Aliens vs. Predators back in ought-4. I figured that someone out there might know a movie collector who would be interested in shelling out a pretty hefty price for it.

Well, that’s moot now. The thing went before I could even start pimping it out. The copy fuego wrote for the listing, together with the signed photo of the actor wearing that very mask didn’t hurt I’m sure.

This blog has several layers of protection from the evils of the outside world, but those layers don’t always get along. One problem that I had is pretty common among CloudFlare users, and the documentation provided by the relevant players has a hole in it – a key nugget of information that can make all the difference.

The nugget follows in due course.

My first line of defense from ne’er-do-wells and miscreants is CloudFlare. They stop most of the bad guys before they even reach my site. Still, for some sorts of attacks, when there’s doubt it’s better to let the bad guy through. It may turn out to be a good guy.

A program called Bad Behavior is my next line of defense. It sits on my server and quickly spots liars and weasels. For dangerous-looking attacks, that’s the limit. But, when there’s doubt and the site itself is not at risk, Bad Behavior will let the attack through.

At this point, ‘attack’ means ‘comment spam’. Everything else is stopped before it reaches this stage. Most of the comment spam has been stopped as well, but some has been given the benefit of the doubt. That’s where Akismet comes in. This layer spots the rest of the comment spam, and it can be much more aggressive since it doesn’t actually delete the spam, it puts it into a bin for future review. So, legitimate comments can be rescued by an alert blog admin.

It works pretty well. Three spams actually got through all the layers last week, the first time any have gotten through in quite some time. Somewhere, a spammer popped a bottle of bubbly.

So comment spam is pretty well thwarted. Hooray! Unfortunately, for a while I had a pretty big problem. Search engine robots were being denied. I fell off Google and Yahoo! and all the rest, and traffic to this site dwindled.

Note: according to this article, Bad Behavior has been updated to avoid the following problem. Yay! You should still install the CloudFlare plugin and the Apache module if you are able.

Here’s what was going on:

Googlebot said ‘hey, muddledramblings.com, show me page x’.

The request must get past CloudFlare. No problem. They see it’s the real Google bot and pass the request on to my server.

Bad Behavior is next. They look at the incoming message and see something that claims to be a Google bot but It’s not coming from Google. It’s coming through CloudFlare. Bad Behavior says, “You are a lying sack of dingo dung and a false Google bot. You are obviously evil and you may not pass.” Google is shut out. The other legitimate robots are cut off as well.

This problem is pretty easy to fix, but not quite as easy as WordPress admins would like to hope. CloudFlare has code that you can install on your server that will straighten the whole problem out. Basically it tweaks incoming messages so that the original source appears instead of CloudFlare. This bit of fix-it code is available as a WordPress plugin, so you can install the plugin and rest easy.

But that’s the thing that tripped me up and is not explained in the docs. In the case of working with Bad Behavior, the WordPress Plugin is not enough.

The catch is that Bad Behavior does its magic before the CloudFlare plugin can do its magic. So, even with the CloudFlare plugin firmly installed, Bad Behavior will reject Google bot and all his pals.

There are two simple solutions: 1) Install the CloudFlare Apache module, which kicks in before anything else is run. This is preferable to the WordPress plugin anyway, because it’s a system-wide solution. 2) If you don’t have that level of control over your server, turn off Bad Behavior. It’s a shame to lose that layer of protection, but not devastating; there’s some overlap between what CloudFlare stops and what Bad Behavior stops. You still have two layers and your own alert management to fall back on.

It’s a delicate moment, as Agatha and Deek try to forge a working relationship that doesn’t lead to them killing each other. Deek’s not that good at delicate moments (to put it delicately), and he would much rather discuss bears. Agatha is annoyed, and Deek barely escapes with his life.

I’m trying not to fall into the “I hate you so much I must like you” trap with these two, but its steel jaws are open and waiting for my careless step. It’s a fun formula, dating back to the dawn of courtship, so it’s not inherently evil. It’s just… not this story.

So here’s a fragment of the scene. There are some other bits in the scene I was tempted to share, but this part stands on its own pretty well and isn’t too long. It’s a little bit edited because Agatha’s physiological reactions would be distracting without the context that came before. She’s not human, after all.

Agatha leaned back and studied Deek as he returned to his pancakes. “You seem very blasé about it.”

“About…?”

“About my people hunting and killing you.”

“Oh.” Deek scratched his head. “I dunno. I’m not pissed off at bears.”

“Bears?”

“Yeah. Bears eat people, right?” He swirled a slice of his pancake stack in the lake of syrup on his plate.

“Bears are stupid animals. We are far more dangerous than bears.”

“You ever fought a bear?”

“No, but—”

“There you go, then.” He gestured to show the argument was closed. “You call yourself some kind of badass bear slayer, but when it comes time—”

“Deek, I could kick a bear’s ass with one hand tied behind my back.”

Deek smiled. “Uh, huh.”

“I could.”

“You wanna go to the zoo and prove it?”

“I— no! What the hell are we talking about bears for, anyway? Who gives a shit about bears?” Agatha looked up to see the waitress standing over their table, holding a steaming pot of coffee. The woman’s lined face was set in a frown as she glared over her reading glasses at Agatha.

Deek positioned his cup for a refill. “Apparently she doesn’t like bears,” he said, his eyes arched in an apologetic shrug. “I happen to think they’re all right.”

The waitress threw him a ghost of a smile. “Am I in the presence of another bear afficianado?” he asked.

“Bears are all right,” the waitress said. She filled his cup but didn’t seem to notice Agatha’s. She left on squeaky shoes to visit the next table.

“I can’t believe you don’t like bears,” Deek said.

Agatha pressed her palms against the cool formica. “Deek. If you say that word one more time—”

“Bear?”

“Yes. Bear. If you say ‘bear’ one more time, I will kill you. Not just the metaphorical kill or the hyperbolic ‘kill’ people generally use at times like this, but I will really, truly kill you. Do you understand?”

Deek raised his hands in surrender. “All right, all right. You’ve got some kind of aggro thing about… animals that shit in the woods. No need to get all bent out of shape.”

I don’t think I’m giving away too much to say that Deek says the forbidden word one more time.

One of the world’s most famous corporate icons resigned yesterday. I had my head deep in code when I started hearing the word ‘resigned’ buzzing around the office, but I had stuff to get done. It was my sweetie who actually gave me the news that Steve Jobs had resigned as CEO of Apple.

My first thought: I bet his badge still works. This was confirmed when I read his resignation letter; he will continue to be an Apple employee. The elevators in Infinite Loop 1 are not safe yet.

My second thought: A man who played a huge role in shaping what computing is these days is very sick. Sick enough that he has accepted that he will not be up to running Apple and smart enough to move aside gracefully and let the people who have been running the company continue to do so without uncertainty.

I hope he’s ok. That had to be a monumental decision, not just to let go of the reins but to accept that his own health might not improve. I hope Tim and Peter and the rest had a chance to sit and have a quiet beer with their boss one last time, a chance to think about all they’ve accomplished.

Harlean (who is a fiction) has an ambitious shooting schedule set up. There are several magazines asking for submissions for Halloween spreads and contests, and she figures it’s time to get her fictitious face in them.

I am moderately less fictitious, and my role in all this is to take pictures.

Today’s shoot was zombie-themed, and we had a prop brain, of course. Once the serious shooting was done, I experimented a bit on myself, going for over-the-top dramatic lighting and (surprise) a bit of silliness.

Braaaaains!

What they call low-key lighting, even though the key light is totally dominant.

Braaaaaaaiiiiiiinnnnns!

Hey, there’s a light up above the set, may as well crank it up and take off the diffuser. (“Diffuser” is a fancy word for “piece of paper”.)

Braaaaaaaiiiiiiiiiiinnnssssssssss!!!!!!!!!!

The logical conclusion of the sequence, shot with only a light above and behind. I was going for that back-alley distant-streetlight shadow-dwelling hyphen-using brain eater look here.

Brains.

This was actually the first shot I took. The light doesn’t hit my face right, but I like my expression. So let’s justify putting it here by making it black and white and cropping it down to a head shot.

Over the years, the technology behind this blog has gone from cave-dwelling stone-knives-and-bearskin static pages to cloud-city jet-packs-and-lightsaber dynamic yumminess. That transformation starts with WordPress but does not end there. Not by a long shot.

I started the Muddled Media Empire using a tool called iBlog, because it was free and worked with Apple’s hosting service, which I was already paying for. iBlog’s claim to fame was that it didn’t require a database – every time you made a change it went through and regenerated all pages that were affected. Toward the end, that was getting to be thousands of pages in some cases, each of which had to be uploaded individually. When iBlog’s support and development faltered, it was already past time for me to move on.

WordPress is an enormously popular Web-publishing platform. It comes in two flavors: you can host your blog on their super-duper servers and accept their terms of service and the slightly limited customization options, or you can install the code on your own server and go nuts. I chose the latter, mainly because I wanted to be able to touch the code. I’m a tinkerer.

So I signed up for a cheap Web host and set to work building what you see now. At first things were great, but after a while the host started having issues, and the once-great customer service withered up and vanished. So much for LiveRack. I think they just didn’t want to be in the hosting business anymore. I moved to iPage.

iPage was cheap, but I was crammed onto a server with a bunch of other people and sometimes my blog would take an agonizing time to load. Like, almost a minute. Then there was the time a very popular Geek site linked to my CSS border-radius table and iPage shut me down because the demand on the server was too much. Ouch! My moment in the sun became my moment at the bottom of a well.

I set out to find ways to make this blog more server-friendly and more user-friendly at the same time. Step 1: caching. WordPress doesn’t store Web pages, it stores data and the instructions on how to build a Web page. So, every time you ask to load a page here, WordPress fires up a program that reads from the database and assembles all the parts to the page. The thing is, that takes longer than just finding the requested file and sending it back, the way iBlog did. Caching is a way for the server to say, “hey, wait a minute – I just did this page and nothing’s changed. I’ll just send the same thing I did last time.” That can lead to big savings, both in time and server load.

I looked at a few WordPress cacheing programs and eventually chose W3 Total Cache, because it does far more than just cache data. For instance, it will minify scripts and css files (remove extra spaces and crunch them down) and combine the files together so the browser only has to make one request. It will zip the data, meaning fewer 1’s and 0’s moving down the pipe, and it does a few other things as well, one of which I will get to shortly.

I installed W3 Total Cache, and although some settings broke a couple of javascripts (for reasons I have yet to figure out – I’ll get to that someday), the features I could turn on definitely made a difference. Hooray!

But Muddled Ramblings and Half-Baked Ideas was still way too slow. I continued my search for ways to speed things up. I also began a search for a host that sucked less than iPage. (iPage was also starting to have outages that lasted a day or more. Not acceptable.) I decided I was willing to pay extra to be sure I wasn’t on an overwhelmed machine.

I’m not sure which came first – new server or Amazon Simple Storage Service. S3 is a pretty basic concept – you put your stuff on their super-duper servers, and when people need it they will get it really quickly. Things that don’t change, like images and even some scripts, can live there and your server doesn’t have to worry about them.

This is where W3 Total Cache earned my donation to their cause. You see, you can sign up for Amazon S3, and then put your account info into the proper W3TC panel and Bob’s Your Uncle. W3TC goes through your site, finds images and whatnot, puts them in your S3 bucket, and automatically changes all the links in your Web pages to point to your bucket instead of your own server. (Sometimes I find I have to copy the image to my S3 bucket manually, but that’s a small price to pay.)

Now a lot of the stuff on my blog, like the picture of me with the Utahraptors the other day, sits on a different, high-performance server out there somewhere, and no matter how overwhelmed my server happens to be at the moment those parts will arrive to you lickety-split. Amazon S3 is not free, however – each month I get an invoice for two or three cents. Should Muddled Ramblings suddenly become wildly popular, that number would increase.

About that server – the next stop on my quest for a good host was a place called Green Geeks. I wanted to upgrade to a VPS, which means I get a dedicated slice of a server that acted just like it was my very own machine. There is a lot to like about those, but my blog just wouldn’t run in the base level of RAM they offered. I upgraded and reorganized so that different requests would not take up more ram than they needed. Still, I had outages. Sometimes the server would just stop freeing up memory and eventually choke and die. Since it was a virtual server in a standard configuration, logic says it was caused by something I was doing, but all my efforts to figure it out were fruitless, and Green Geeks ran out of patience trying to help me figure it out.

The server software itself is Apache. At this point I considered using nginx (rhymes with ‘bingin’ ex’) instead. It’s supposedly faster, lighter, and easier to configure. But, I already know Apache. I may move to nginx in the future, but it’s not urgent anymore.

During the GreenGeeks era I came across another service that improves the performance of Web sites while reducing the load on the servers. I recently wrote glowingly about CloudFlare, but I will repeat myself a bit here for completeness. CloudFlare is a service that has a network of servers all over the world, and they stand between you the viewer and my server. They stash bits of my site all around the world, and much of the time they will have a copy of what you need on hand, and won’t even need to trouble my server with a request. About half of all requests to muddledramblings.com are magically and speedily taken care of without troubling my server at all. They also block a couple thousand bogus requests to my server each day, so I don’t have to deal with them (or pay for the bandwidth). It’s sweet, and the base service is free.

Unfortunately, it was not enough to keep my GreenGeeks server from crashing. Once more I began a search for a new host. I found through word of mouth a place called macminicolo. Apple employees get a discount, but I wasn’t an Apple employee yet. It was still a bargain. For what turned out to be the same monthly cost of sharing part of a machine at GreenGeeks, I get an entire server, all to myself, with plenty of RAM. I’ve set up several servers on Mac using MacPorts, and I knew just how to get things up and running well. It costs less than half what a co-located server costs anywhere else I have found (Mac, Windows, or Linux). (Co-location has up-front costs, but in the long term saves money.) So I have that going for me.

The only thing missing is that at GreenGeeks I had a fancy control panel that made it much simpler to share the machine with my friends. I do miss that, but I’m ready now to host friend and family sites at a very reasonable cost.

So there you have it! This is just your typical Apache/WordPress/W3 Total Cache/Amazon S3/CloudFlare site run off a Mac mini located somewhere in Nevada. Load times are less than 5% of what they were a year ago. Five percent! Conservatively. Typically it’s more like 1/50th of the load time. Traffic is up. Life is good.

The plastic covers over my headlights are becoming opaque. Not the best situation. There are products out there that promise to restore that plastic to its virtually-invisible former self, but as far as I can tell all those products simply polish the surface of the plastic. It seems to me the damage is cause by ultraviolet radiation and likely goes more than skin deep.

Still, I’d like to believe the commercials that say they can restore my headlight covers to their former optic glory. I just don’t want to spend the precious cash dollars to find the claims to be bogus. Is there anyone out there who can either a) explain or b) attest to the worthiness of these products?