Caches

Like most posters and readers here, I’ve been using computers for a very long time. One thing that’s always baffled me is people’s obsessions with clearing out caches.

I’m sure that there are some programs that do caches wrong, and never purge anything, so that purging caches is sometimes beneficial. But I question how many people even know what a “cache” is. People seem to think of “cache” as synonymous with “cruft,” as if it’s garbage that builds up and needs to be manually scraped off of your computer every few weeks so it doesn’t come to a grinding halt.

In actuality, caches help keep your computer running fast, by, well, caching often-used data so that it’s faster to access next time. Your web browser’s cache? That’s so that, next time you load a page, it won’t waste its time downloading content that hasn’t changed. The Windows Prefetch cache? That’s so programs load faster. The thumbnails cache? That’s so that Windows doesn’t have to manually process every 10-megapixel image, in a folder of hundreds, every time you open it.

There are some good reasons to purge your caches, like if you’re dangerously low on disk space. As my previous post indicated, every now and then, something will screw up the concept of “caching” and never remove outdated things from the cache. This is a bug, though, not how most caches work. Most things use either time-based caches (where anything that’s been in the cache for more than, say, a week, will get purged automatically), or size-based caches (where, when the cache reaches, say, 500MB, it will start removing the least-recently-used items). Thus caches shouldn’t be something you need to worry about much.

Another reason to clear out your caches would be if you’re getting weird behavior. This can range from the simply, “Why is Youtube loading in Swedish?” (It somehow got the wrong location data for you, and that got cached, though it’s really a cookie issue.)

But for performance? Leave the caches alone! It just amazes me how many people empty their web browser’s cache every time they’re done using it, and then wonder why everything is slow. It’s because, in their misguided quest to optimize their computer’s performance, they just deleted all the files that were there to optimize its performance. Even more ridiculous is all of the advice about cleaning out the Windows Prefetch data for performance. These people clearly have no idea what the Prefetcher is, because deleting all the files is about the worst thing you can do for performance.

Of course, this doesn’t mean that programs like CCleaner aren’t valuable. There is a lot of cruft that Windows and its oft-used applications build up that isn’t needed. But that’s really an entirely separate issue from purge all of your caches, all of the time, because CCleaner’s strength isn’t in purging caches, it’s in finding totally useless cruft on your filesystem.

Losing Disk Space on Vista?

I went to run a defrag in Vista last night (via Defraggler), and noticed that the most-fragmented files were hundreds of files, each hundreds of megs, in C:/ProgramData/ Microsoft/ Windows/ WER/ ReportQueue. A bit of poking around revealed that they don’t serve much of a purpose.

Rather than emptying the folder by hand (which is probably safe from what I’ve seen), you can use the Disk Cleanup tool (included with Vista, type “Disk Cleanup” in the start menu’s textbox and it’ll come up) to do it. I reclaimed 7 GB of space, which is a lot when you’re talking about a tiny ~55GB partition for Vista. In researching this online, I found a few people talking about their ReportQueue folders growing to hundreds of gigs in size.

CCleaner hadn’t detected this folder, though I’m not running the latest version, and I certainly don’t mind it erring on the size of conservatism when finding system-created folders that it thinks I don’t need.

Undercover

Nashua PD do a lot of patrols on their strip of Route 3, driving their trademark Chevy Impalas. Besides the fact that they just look like police cars, they’re seen driving them so often that I think most everyone who drives on Route 3 knows to slow down when they’re near an Impala.

In Boston, I was sitting on 93, not moving at all. A car went by in the breakdown lane. “What a jerk!,” I thought. A few seconds later, a Nissan pickup went by in the breakdown lane, driving even faster. “Now look what you started!,” I shouted to no one in particular.

Then some strobe lights on the back of the pickup came on, and I saw a guy wearing jeans and workboots hop out. “Is he a construction worker?! What the heck is going on?”

As I got a bit closer, I noticed that the guy in jeans and the baseball cap had a badge hanging from a chain around his neck (like you typically only see in movies?) and a gun on his hip.

That’s how you do it. You don’t drive an unmarked Crown Vic or a fleet of Impalas with a pigtail whip on the back. You drive a Nissan pickup and don’t dress like a cop. (But you also don’t do what some departments are apparently fond of, and try pulling people over with no real identification at all. Once I was past, I could see that he had ample blue lights on the front, in case the gun and badge weren’t convincing enough.)

I think it’s particular effective, too, because it communicates the message that there might be a cop watching even if you don’t see a black Crown Vic behind you.

Boston Politicians

I’ve been listening to various talk radio programs on my way into work, and most are based out of Boston, so there’s been a lot of discussion about the FBI stings that have been uncovering a lot of corruption.

One day it was about Boston’s Chuck Turner, and how he had announced that he was going to hold a rally after being accused by the FBI of taking a $1,000 bribe. The next day it was about how he held the conference, but, on the advice of his lawyers, didn’t actually talk about the merits of the charges at all. They had a few segments, where HE WAS SHOUTING, JUST A FEW WORDS, AT A TIME.

And last night on the way home? The most awesome , ever.

I have no idea of the merits of the charges against him, but have to say that this is perhaps the most hilarious outcome of corruption charges imaginable.

IMAP from Perl

I’m quickly finding it necessary to get back “into” scripting: I’d throw stuff together here and there, but it’s been a while since I wrote anything more than a dozen lines or so, and I haven’t done anything with Perl in far too long.

For a project I’m going to be doing, I just discovered something awesome: Perl’s Net::IMAP::Simple

This code doesn’t actually do much, but it’s still pretty neat how simple Perl makes it:

# Open the connection
$server = new Net::IMAP::Simple("$servername") or die("Couldn't open connection to server $servernamen");
print "Connected to $servername...n";

# Authenticate
$server->login("$user", "$pass") or die("Couldn't authenticate with server as $user : $passn");
print "Authenticated as $user...n";

# Get a message count (frivilous)
$message_count = $server->select($folder) or die("Selecting folder $folder failed.n");
print "Connected with $message_count messages...n";

# Print a list of all folders?
@folders = $server->mailboxes();
foreach $x (@folders) {
        print "$xn";
}

With a little looping magic, it should be easy enough to extract whatever’s needed from each message! (There are some more complex IMAP scripts, but, well, they’re not called IMAP::Simple…)

Pet Peeves

There are a few things that bother me a lot more than they should. The most recent example: the $35 activation fee every cell carrier seems to charge. It’s one of those things that seems reasonable enough, until you actually stop and think about it. They spend millions and millions of dollars to advertise for new customers, even though they’ve pretty much saturated the whole market. And when they finally get you to agree to pay $80/month, and enter into a long-term contract with them to ensure that you’ll still pay it, what do they do? Why, they demand $35 from you!

Especially with the way the economy is going, companies are doing everything they can to get new customers. They’re slashing prices and offering discounts all over the place. I could see, “Sign up for a 2-year contract and we’ll pay you $35!” as a good promotion. But “Sign up now for a 2-year contract and pay us $35 for the privilege of doing so?”

So I’ve decided that I’m going to treat it kind of like how I treat giving my phone number out to cashiers. My steadfastness will match my politeness as I say no.

AOL and Spam

One of the 7 billion mailing lists I’m on at work is one that’s set up with AOL’s Feedback Loop. When an AOL user receives e-mail from our domain and marks it as spam, we receive a notification that the particular message has been flagged as spam.

I was talking about this with some coworkers today. We don’t send spam. (And we use SPF and DKIM, so well-configured mailservers will reject spam that forges our domain.) We’re a social networking site. People manually opt into receiving notifications of certain events on the site. And when they get those e-mails, it flags them as spam.

This is a giant frustration, and for multiple reasons. For one, it means that I receive hundreds of messages a day. I think I’m going to start going through and unsubscribing (from e-mail) the people who flag our e-mails as spam, since they clearly don’t want them. But the bigger hassle is that it means that hundreds of people every day are unknowingly working to make AOL’s mailservers think we’re spammers.

So I mentioned that we should work on disabling e-mail notifications for these people, and the reply was that this isn’t necessarily so. Apparently, it’s very common practice for people to hit “Spam” to get rid of a message, instead of deleting it. Reading up on it a bit, it seems that this is a pretty common problem, though it’s hard to tell whether it’s isolated to AOL users, or if it’s just more obvious because they’re the only one that actually gives you those stats.

Discount VX-7s

Now that Yaesu has their VX-8R ham radio due to hit shelves, its predecessor, the VX-7R, is being discounted, and fast. It’s $285 at Universal Radio, and $275 at HRO. I’m a big fan of my tiny little VX-2R (and VX-1R!), but the VX-7R (and the VX-8R that’s replacing it) is a “full-power” HT, putting out 5 Watts. It covers 6, 2, and 440. The VX-7R also does 300 mW on 220 MHz, which isn’t much power at all (0.3 Watts), but it’s better than nothing.

I’ve had a passing interest in 6 Meter FM for a bit now. There’s the 53.07 MHz machine on Uncanoonuc, the big hill in Goffstown that’s home to all sorts of transmitter sites. (Indeed, so many that the noise floor forced them to move their receiver to another site.) 6 Meters can feature some tremendous range, and that’s before skip factors in. (It’s sometimes called the magic band because of its status in between HF and VHF.) Further north, there’s now the 53.77 MHz machine on Gunstock… And the NE Repeaters site lists a whole bunch more. Sadly, the one on Mount Washington appears to be off the air.

(Besides the fact that I don’t own a 6 meter radio and have no experience setting up repeaters, I have a certain urge to try to set up a 6 meter machine on Mount Washington. It’s problematic, though, because the duplexers needed to use the same antenna for simultaneous transmit and receive are enormous and not many were ever made… The same problem exists with antennas, so something like a DB420 folded-dipole array would be entirely unreasonable… They do make some verticals, though the linked one is the only monoband 6 meter vertical. (And, as a 2-5/8-wave vertical for ~53 MHz, it’s 21 feet tall.) The radios are the easy part, as the 42-50 MHz band used to be popular with public safety, back when all the mobile radios put out 100+ Watts and were build really solid. I’ve read of older radios (Mastr-IIs or Micors, for example) being brought into the 6 meter band with superb performance, and ~150 Watts out. I’d be very curious about how a 150 Watt repeater on 6 meters, with an antenna providing 6 dB gain, would perform on the summit of Mount Washington.

But first things first… I don’t have a radio that does 6 meters. 😉