Using Date::Manip

Here’s a quick code sample to loop over the dates in a range with Perl’s Date::Manip. The documentation is voluminous and yet I found it difficult to understand; for people who learn best by example, here goes:

use Date::Manip;

#                    Y M W DDD MS?    'base'       'start'      'end' 
#@dates = ParseRecur("0:0:0:1*1:0:0","12/1/08","12/1/08","1/7/09") ;
@dates = ParseRecur("0:0:0:1*1:0:0","1 month ago", "1 month ago", "today");

foreach my $date ( @dates )   {
        #printf qq|%sn|, &UnixDate($date, "%B %d, %Y");
        printf qq|%sn|, &UnixDate($date, "%D");
}

The date formats (%B, %d, %D, etc.) are consistent with those documented in the date manpage.

Cell Phone Bill

I got my first full month’s bill with AT&T. Something tells me I’m not a typical customer:

  • Minutes used: 85 of 450*
  • Text messages sent: 3
  • Text messages received: 345
  • KB data used: 126,043

* This seems extraordinarily high to me.

Oh, and random crap added onto my bill?

  • Regulatory Cost Recovery Charge: $1.25
  • Federal Universal Service Charge: $1.72
  • 9-1-1 Service Fee: $0.64
  • NH State Utility Users Tax: $6.15

An extra $9.76 each month on top of their advertised cost.

The good news is that I have 405 rollover minutes. At this rate, I’ll have 81 hours left at the end of the year.

Photography

Just a quick reminder: while the MBTA appears to have actually outlawed photography on their property, it is, in general, not illegal to photograph trains.

But try telling that to the Amtrak police, who arrested a contestant taking photos for an Amtrak photo contest. Incidentally, the photographer has published the photos he was taking at the time, photos of the injuries caused by the police, and photos of his subsequent trips to the train station.

It seems that this isn’t the first time that Amtrak has run into problems with one hand not knowing what the other was doing.

Of course, today Fark also links to a Globe & Mail story reminded that most police officers are compassionate people. Emphasis, apparently, on the “most.”

Runs Cool Water-Cooled

I’ve been toying around with potential desktop computer configurations again. I love my Thinkpad but the screen is way too small, and there’s not nearly enough hard drive space. It’s got decent-enough specs (2GB RAM and a dual-core 1.83 GHz processor), though an upgrade’s always nice. So I’ve been toying with various configurations online, trying to stay around the $1,000 mark, including monitors.

I’m looking almost exclusively at the quad-core processors Intel produces, and what I’m finding in the reviews of Newegg is that they’re all capable of being tremendously overclocked. I think the Q9300 is the best bet right now: quad cores at 2.5 GHz, 1333 MHz FSB, and a 6MB L2 cache. At $250, it’s only $60 more than the Q6600, probably the most popular of the quad-core chips, but with a slower 1066 MHz FSB. I think the key in assembling a new system is to go for “leading edge, but not bleeding edge.” I can easily sink $1,000 into the latest and greatest “Extreme” processor, but, especially for what I do, it would just barely exceed something like the Q9300.

The other thing to consider is that, even though the Q9300 “only” has four 2.5 GHz cores (for a net of 10 GHz, even though adding them like that is probably improper), it seems that it will very easily overclock; from what I’ve seen, 3.2 and 3.6 GHz are both easy to obtain with anything in this family. All of the reviews, though, recommend a better heatsink for the processors, whether or not you’re overclocking. So that much was a no-brainer.

But I just ran into a “positive review” of the Q9300, saying that, if you water-cool* it, it runs very cool. And I’m not sure how to take that. Isn’t it like saying that, if you attach a rocket booster to a Ford Escort, it’s a very fast car? The more I think about it, the more puzzled I am. Of course it runs cool water-cooled. About the only thing better would be if you were one of those people who use liquid nitrogen to cool your processor.

* For the unitiated, “water cooling” refers to pumping water through copper pipes to dissipate heat off a processor, instead of the normal crappy little heatsink with a 75-cent fan. It’s quite extreme, and generally only used by people pushing their computer to its limits. It has nothing to do with spraying water on your processor to cool it, which is a very bad idea.

Chevy

Doesn’t their slogan, “The best is yet to come,” imply that one should wait on purchasing a Chevy?

It’s kind of like Microsoft’s “Life without walls” slogan, to which someone aptly pointed out: without walls, why would you need windows? It sounds like a good slogan unless you give it any thought, in which case it seems to suggest that the product shouldn’t be purchased.

I don’t think I’d do well in marketing.

Presidential Limos

Came across this Washingtonian article today.

It includes a sneak peak at what’s rumored to be the next iteration of the Presidential limo. First impression? It’s the ugliest thing I’ve ever seen. Yes, worse than the Pontiac Aztec.

But there are some neat facts (well, likely facts: it’s apparently a, “I could tell you, but then I’d have to kill you” matter) to go with the photo of the monstrosity that will carry our Commander in Chief. Like the fact that the armor is possibly eight-inches thick, to stop not only bullets, but bombs. And a reference to Bush’s limo breaking down in Italy, revealing a second usage of the decoy limos: spares.

Most interesting of all, though? No one seems to have ever seen a decommissioned Presidential limo. That’s probably because they’re rumored to be resting on the ocean floor somewhere. Which raises a couple questions in my mind:
– They’ve apparently been successful in discreetly dropping cars to swim with the fishes, where they’re never seen again. And it makes since, since the oceans are incredibly vast. But what is so secretive about these cars that they can’t just be stripped of a few components and put in the Smithsonian or Cadillac’s headquarters?
– What else have we sent into (permanent) hiding on the ocean floor? Surely, more than a few old limos.

But, of course, if I knew these answers, I might be the next thing deposited on the ocean floor. So I’m content speculating.