Websites Are Fun

If you can read this, then the DNS server in your part of the interweb has updated to show the new home of DDoE. Thanks to everyone for the support, help, and suggestions. I ended up at Digital Ocean for a webhost, but there’s still a lot of work to do. For now I can make new posts (and by ‘I’, of course I mean ‘Jeff’), you can comment, and Google and can index.

Digital Ocean seems fine. I’m learning a lot about servers. The downside is that it costs a lot more than I was paying. DDoE is a labor of love for me. For you, that means you don’t always get posts as frequently as you might like (sometimes I fall out of love with it). But even love has a price and I’m feeling less amorous at these rates than I did with shared hosting.

All this means is that I’m going to do some money grubbing to pay the hosting costs (not my strong suit). I have affiliate ads now, but they don’t pay much. So I’ll be replacing them with some fixed-fee ads. I’ll also be pimping some products, selling RSS feed ads, and some other stuff. Reading and commenting will always be free, of course, because I’m not a douche.

Thanks for your patience over the last few weeks. Please use the comments on this post if the website seems slow or otherwise messed up. This is my first foray into running my own server, so I had to guess at how much RAM and stuff I’d need. If things feel laggy, I may need to adjust. Don’t forget, you can always email me at dick@kusleika.com to give me what-for.

And We’re Back

Kind of. A few days ago, my web host informed me that DDoE was using too many resources. I’m on a shared hosting plan at HostGator. Shared hosting means that my website shares a server with other websites and when one site hogs all the CPU, RAM, or disk space, the other sites suffer. So they shut me down.

We went through a series of steps to fix the problem, each taking about 3/4 of a day. They told me to uninstall a bunch of plugins that I don’t have. They told me to install the WP Super Cache plugin. They told me that too many search engines were crawling my site. They told me that too many people were reading my rss feed. And finally, they told me to uninstall all the other plugins I have. I could only make those changes from home because my IP had to be on a whitelist. After I made a change the would respond eight hours later, or so, that the change didn’t work. It’s a little disingenuous to call them “fixes” because all we did was shut stuff off until the resource usage went down. It’s akin to having an electrical device that’s pulling too much power and fixing it my throwing the main breaker. Here’s what you won’t be seeing on DDoE for the next couple days:

  • Comments. I used Akismet to filter out spam comments and it does a fabulous job. The number of spam comments I get every 15 minutes is mind-boggling, so until I get things sorted out, I’ve simply shut off comments.
  • A list of recent comments. I deleted the Recent Comments plugin so no list in the sidebar.
  • Search results. I added a robots.txt file that tells web crawlers not to come in
  • Properly formatted code. I deleted the CodeColorer.
  • Author list. I deleted the List Authors

All of these beloved features will be returning in a few days. Thanks to Bastien at ASAP Utilities and Chandoo for their support over the last couple of days. And also thanks to all the people who emailed and tweeted their concern and suggestions.

The next step is to move DDoE to a Virtual Private Server. With a VPS, I get a fixed amount of resources and if I use too many, only my site suffers. Researching hosts is pretty much impossible. There are a billion sites on “best web host”, but they’re all bullshit. Separating the wheat from the chaff is difficult. I’ve received many suggestions but, with all respect to those making the suggestions, I would have recommended HostGator a few days ago. If there’s a host you think I should look at, email me at dick@kusleika.com or @dkusleika on the Twitters.

I’ll have more to say once things are stabilized. I really don’t know if it was a bad plugin or if my site is just too big for shared hosting. I find it hard to believe that it’s too big. I get about 65k visitors a month and use 40GB of bandwidth. Alexa says my global rank is 300,000. As much as we like to hang out here and talk about Excel, we’re not exactly taxing the internet over here.

Inversely filter a Pivot based on an external range

Howdy folks. Jeff here, with a money-saving Christmas tip. Oh, and some PivotTable code.

I recently posted a routine to filter pivots based on an external range. My code worked out whether it was fastest to either:

  1. Hide all items in the field, then unhide those Pivot Items that matched the search terms; or
  2. Unhide all items in the field, then hide those Pivot Items that don’t match the search terms.

It worked out what to hide or leave by adding the Search Terms to a Dictionary, then trying to add the Pivot Items and catching any errors. In that first case where it unhides Pivot Items that match the search terms, here’s the code that did the dictionary check on the PivotItems – after the Search Terms had already been added:

…but that seems like overkill, because the only line we want to conditionally change is that If Err.Number <> 0 Then line. The rest of the block is just fine the way it is.

So how to conditionally change just that one line? Like this:

Boy, that was simple. Adding the 2nd logical effectively flips the If Err.Number <> 0 bit to If Err.Number = 0 in the case that bInverse is TRUE.

It works a treat: I tested it on a Pivot containing the things I’m willing to buy the kids for Christmas, and an external list of things containing the presents that the kids actually want. Suffice to say I set bInverse to TRUE, and saved myself a small fortune in a few milliseconds.

And there’s your Christmas tip. Ho ho horrible, I know.

Here’s the whole amended routine: