Plutor

RHCE

Yesterday, I passed my Red Hat Certified Engineer exam with flying colors. I’m willing to call it a legitimate certification. The entire test was hands-on troubleshooting (“Here’s a machine that won’t boot. Fix it”) and installation and configuration (“Here’s bare metal, and a four page description of how we want the machine setup. Go”). It’s very indicative of the kind of work I do on a daily basis, so it’s far more useful than a multiple-choice test would have been.


Front page broken

Eris (my webhost) is doing some rolling OS updates, and I’m having some problems with the front page of Plutor.org. The blog portion still works, but the “links” will be missing, as will my most recent Flickr photos. I’ll get it working as soon as I have a chance.

Update 6 Sep: Fixed. Perl wasn't finding my custom modules, but now I'm not sure how it ever saw them.

Update 7 Sep: I've updated to MT 3.2, and I'm hoping that this will simplify some stuff. I'm going to be doing some ongoing cleanups over the next few days when I get the time, like making a master RSS feed, and maybe moving moblog stuff to a dedicated MT blog, so that it can be commented on.


Free (as in water)

I’m at Red Hat training this week in Westford, MA. The water bottles here have the logo on them, along with the following in tiny print: “Free (as in water)”. Geek humor at its best. (Read about Gratis versus Libre for an explanation of the joke.)


72k miles

This morning, on the way to work, my car’s extended warranty expired. I’ve driven 72,000 miles since I bought it on 26 April 2003. In those 845 days, I’ve averaged 85.2 miles per day. Every time I calculated it, I got about 27 miles per gallon, which means I’ve used roughly 2,666 gallons of gasoline, or 3.1 gallons per day. I filled up my 20-gallon tank at least 133 times — although probably more like 150 times (once every 5.6 days) since I usually didn’t wait for it to empty completely. When I purchased my car, a full tank of gas would have cost me about $34 (roughly $1.70 per gallon in Waterbury). Now, that same tank costs me $52 ($2.60 per gallon). Based on my rough eyeballing, I’ve probably spent approximately $5,000 on gas since I purchased my car.

Update: Wow, my eyeballing was ridiculously accurate. Based on some real historical gas prices, I've spent $4954.02 on gas.


Divisibility

I love math. Not just complex math, but arithmetic, too. I simply adore mathematical shortcuts. That’s why I spent the last couple of days finding shortcuts for divisibility tests:

  • 3 - Sum of digits is divisible by 3.
  • 4 - If the last two digits (tens and ones places) are divisible by 4. You can simplify this test by subtracting multiples of 2 from the tens place.
  • 7 - Remove the digit in the ones place. Double it, and subtract that from the remaining number. Repeat until you have a one-digit number. If that number is 7, 0, or -7, the original number is divisible by 7.
  • 8 - If the last three digits are divisible by 8. You can simplify this test by subtracting multiples of 2 from the hundreds place, and multiples of 4 from the tens place.
  • 9 - Sum of digits is divisible by 9.
  • 11 - If the alternating sum of the digits (first digit, minus second digit, plus third digit, etc) is divisible by 11.
  • 13 - Remove the digit in the ones place. Multiply that digit by 4, and add that to the remaining number. Repeat until you have a number less than 40. If that number is 13, 26, or 39, the original number is divisible by 13.

The rules for 7 and 13 can easily be extended to just about any number under 100 (and, in fact, the rules listed here for 3, 9, and 11 are simple variants). As long as you understand how those ones work, you don’t even really need to memorize anything.


Maximum concentration of ethanol

Have you ever wondered why grain alcohol like Everclear or Graves are only 95% ethanol (190 proof)? I have. I assumed it was an ROI thing. My theory figured the increased cost to distill the alcohol to such a purity would force up the price, which customers would not bear. Apparently, there’s a different reason altogether, and it’s a chemistry thing.

The yeast that creates alcohol dies at around 14% concentration. This is why beers and wines are rarely found even above 18- or 20-proof. In order to make stronger drinks, the water-alcohol mixture is distilled, which is really just another word for evaporating them. Alcohol boils at a far lower temperature than water, so if you collect the vapor and recondense it, you end up with a lot more alcohol than water.

But a funny thing happens as water is left behind. The more alcohol there is in the solution, the higher its boiling point (and the lower of that of the water). Somewhere around 95% or 96% alcohol, they converge, and the two liquids boil at the same time (at only 173°F). Simple distillation will not allow you to do any better.

So what if you need absolutely pure alcohol? There is an option. You can add benzene to the mixture. This changes the behavior of the solution, and allows the alcohol to boil away again. Unfortunately, benzene is terribly harmful, even in extremely tiny amounts. Bone marrow damage, a weakened immune system, severe liver disease, and a highly increased chance of cancer are some of the fates that would await you if you were unsatisfied with 190-proof grain alcohol.


The Time Traveler's Wife

Recently I finished reading The Time Traveler’s Wife by Audrey Niffenegger. I had been reluctant to pick it up. The cover and the summary on the back gave me this dizzy “romance novel” feeling, but my father-in-law recommended it. Finally, when I hit a thin area in my reading list (and M essentially forced me to read the first chapter), I decided to give it a chance. Five pages later, I was completely and irreversibly hooked. That statement is NOT an exaggeration.

The story starts quickly, and the first couple of chapters give you the goose-bumpy willies when some weird stuff happens. The characters are totally believable even if their situation is (literally) incredible. The book started off very engrossing, and as it got more serious and intense, I couldn’t stop reading. I averaged more than 100 pages a day for a week, the first time I’ve done that with a book in a long time.

Here’s my suggestion: go to the library or the book store. Read the first five pages. The book will either purchase itself, or you will put it back. Oh, and don’t do any research into movie deals until you’ve finished the book, or you’ll be sorry.


Goats extended info

Okay, I’m not sure if this is ridiculous, inspired, or over-the-edge. The surreal webcomic Goats has so-called “extended info” (the grey area below the strip) for each comic. This info includes the dialogue text, locations and props in each panel. Also, for each character that appears in the strip, it lists first appearance and the three storylines the character most recently appeared in.

This information goes all the way back to the very first strip.


Pi approximation day

Today is π (pi) approximation day. In a large portion of the world, the date is represented as dd/mm, or 22/7. Although 22/7 exceeds π, it’s actually closer to the true value than that of π Day is.

3.14159265358 - 3.14 = .00159265358
3.14159265358 - (22/7) = -.001264489277


John Roberts

I’m not entirely sure I’d vote to confirm John Roberts, Bush’s nominee for the Supreme Court. I definitely disagree strongly with his ideological views. On the Court of Appeals, he upheld secret military tribunals for terror suspects. As an attorney, he argued that Roe v. Wade “was wrongly decided and should be overruled.” He’s also argued against environmental regulation a number of times.

On the other hand, this might be the wisest thing I’ve ever heard a judicial nominee say: “Roe v. Wade is the settled law of the land… There is nothing in my personal views that would prevent me from fully and faithfully applying that precedent.” How strongly should political views influence Congress' decision to confirm a nominee? The Left has only a certain amount of power in the current administration, but if Roberts was denied or filibustered, could a different nominee really be any better? I can’t see Bush nominating someone centrist, but there’s always the chance he’ll nominate someone more activist.

Update: More selected opinions.


Wiki at work

Today, I gave an intro to wiki class at work. Ever since I moved the Unix group’s home page from a wad of hand-edited HTML files to wiki, it’s been a far bigger hit than I expected. There are now nine teams using wikis for their documentation or interested in migrating, and I expect there are probably a few more that will be converting soon. It’s great to be able to feel that I’m making a bottom-up difference at work, and that open source (not to mention Wikipedia) is touching a few more people who might not otherwise ever feel it.


EXIF tools

Almost all digital cameras (with the notable exception of all but the newest camera phones) support a JPG comment format called Exchangable Image File Format (EXIF). When you take a photo, a lot of nice details about shutter speed and aperture are saved along with the image (and a lot of confusing and technical data, too). Unfortunately, if you take photos with a film camera and scan in the photos, the data is all missing.

Luckily, there are a number of tools made exactly for such a situation. Exifer is a good freeware option, but there’s also MaPiVi, which is open-source and cross-platform. There are a ton of them out there, if you ask the right people.


Matthew 5:43-48

This post is going to be extremely unlike me. I'm going to quote the New Testament, and I'm going to say that it's an insightful passage that everyone could learn from:

"You have heard that it was said, 'Love your neighbour and hate your enemy.' But I tell you: Love your enemies and pray for those who persecute you, that you may be sons of your Father in heaven. He causes his sun to rise on the evil and the good, and sends rain on the righteous and the unrighteous. If you love those who love you, what reward will you get? Are not even the tax collectors doing that? And if you greet only your brothers, what are you doing more than others? Do not even pagans do that? Be perfect, therefore, as your heavenly Father is perfect." -- Matthew 5:43-48

That's an insightful passage that everyone could learn from. Strip out the weird "tax collectors" and anti-pagan parts, and you have the core of Jesus' message: Unconditional love. What's so damn hard about that?


Nothing Nice To Say

Last week, I was reading through some oldish posts on Websnark, and he pointed me towards “Nothing Nice to Say”, a hilariously tongue-in-cheek punk comic. I ended up reading all of the back strips and I liked it a whole lot. I added it to my daily reading, and thought “I should mention this on my blog”. Well, now that he’s done a guest strip for “Joe and Monkey” with Jerry Holkins from Penny Arcade, I thought I’d actually do it.


More precritic update

Precritic update: Batman Begins has 83% on the Tomatometer. If we had used my fancy scoring for our guesses, Nomad would get 2 points, and Manish would get 1. Chris and I were way too pessimistic.

Time to play again! Fantastic 4: the Tomatometer is here, for reference. The movie comes out Friday 8 July, and scoring will be done about 2 weeks later.


String to DOM

I was working on a Greasemonkey script yesterday, and I ran into a problem for a second time. I had data (in this case, XML, in the previous case, HTML) that I had retrieved via GM_xmlhttpRequest() (Greasemonkey's cross-site-capable and slightly more flexible implementation of the XMLHTTPRequest object). I wanted to grab some small piece of information out of the huge string, but the easiest way to do this that I could think of was with big ugly Regular Expressions. The data was goddamn XML, why couldn't I use DOM? The ideal solution would be if Greasemonkey added a responseDocument field to the data that it passes to the onload callback. Since the ideal solution is not currently available, I had to cobble something else together.

Update 9 Nov: I found a far better solution today. I can hardly believe it.

var xmlDoc;
if (typeof(DOMParser) != "undefined") {
    var parser = new DOMParser();
    xmlDoc = parser.parseFromString(x, "application/xhtml+xml");
}

Carrying change

Nomad refuses to carry coinage. I recall one time (likely apocryphal) he purchased a soda for $1.25 at a train station, and then put his change (all seventy-five cents) on top of a garbage can and left it. I can’t remember if I did the sterotypical thing and picked it up, but I’m sure I called it foolish.

But it got me thinking; is carrying change a waste of energy? If you carried a pocket-full of coins all day, could you purchase more calories of food than you burned carrying it? I thought about it for a while, and I couldn’t reason it out, so I decided to calculate it. The answer somewhat surprised me.

Coins are quite light. The U.S. Mint says that a penny weighs 2.5 grams, a nickel 5g, a dime 2.268g, and a quarter 5.67g. Figuring out how much walking “all day” is was difficult. I got numbers (for an average American adult) that varied from a quarter-mile to five miles. I decided to go with a middle-ground number, 2.7 miles. Looking at some numbers for calorie consumption during walking, I estimated that a person burns one calorie per pound of weight per hour of walking at 2mph. Once I had all of my data, the calculations were pretty easy.

The energy used carrying a penny around

Essentially what that means is that if you carried a whole dollar of pennies around for a day, you would burn almost three-quarters of an additional calorie. Even the least calorie-dense foods (like, say, Pepsi One) are enough to make it worth it, and some of the most calorie-dense foods (like the Big Mac) provide you with several hundred calories per dollar.

(Pennies require the most energy-per-dollar to carry. A nickel would cost 0.297 calories per dollar, and dimes and quarters both run a measly 0.068.)


Flickr Pro

A hundred thousand thanks to smackfu, my fellow MetaFilter user and Naugatuck resident. I added him to my contacts list on Flickr a few weeks ago to watch and see if he posted anything that might look familiar. Yesterday, I was greeted with this message when I logged into my account:

Subject: smackfu has given you a Pro Account!

smackfu wrote you a message: "Everyone I know on Flickr is Pro but you, and I have a free account to give away, so have fun!"

smackfu has given you a Flickr Pro account, good for one year. That means you can have all the benefits of Flickr Pro accounts: 2 gigs of uploads per month, unlimited storage, ad-free browsing, and unlimited photosets and features.

Check out his photostream.


Precritic: Batman Begins

Time to play precritic on Batman Begins. What will the tomatometer score for the movie be two weeks after release date? Release date is this Friday, June 17 Wednesday, June 15. As of this writing, the tomatometer is at 83% (with only 30 reviews).


Pink Floyd to Reunite

Pink Floyd will reunite for the Live 8 show in London on July 6. Not just the latest line-up, but Roger Waters will be there with them, as well. Let us hope that this concert leads to a cessation of hostilities and a comeback tour.


Revolution back-titles not free

So here’s the situation as it stands now. We know for a fact that there will be backwards-compatibility of some sort built into Nintendo’s Revolution console. We know (or at least are fairly sure) that online access will be free of charge. Unfortunately, we also thought that a huge number of first-party games would be free. We were amazed and incredulous, since that list included every Mario, Zelda, and Donkey Kong game ever made, as well as a number of other ground-breaking and phenomenal games like Gyromite and Goldeneye.

Sadly, it sounds like that’s not entirely true. Some games will be available for free to owners of certain other games, but let’s hope that Nintendo doesn’t go too far in the wrong direction with this. If Mario 128 (ooh, Brian’s gonna squirm about that) comes with every back Nintendo game, they’ll sell.. er.. okay, they won’t sell any more additional games. But they’ll get lots of love from the Nintendo community, instead of pushing away those of us who liked everything we saw about the Xbox 360.


Traffic

I reiterate my derisive laugh at LA traffic: ha-hah! It took me more than three hours to travel the 42 miles to work this morning, and for about twenty minutes of that, I was travelling at 70+ mph. My math tells me that that I was travelling an average of roughly 7 mph for the remaining time.


ANUS.doc

My wife just sent me an email with a file called "ANUS.doc" attached. It wasn't quite as hilarious as I was expecting:

The dentate line- location of anal crypts and draining of glands
Superiorly visceral afferents, therefore non-painful; columnar epithelium
Inferiorly somatic afferents, therefore painful; stratified squamous epithelium

Doctors have to talk about funny things like anal crypts and gland drainage, but they have to be all clinical about it. It's sort of a shame.


Bibliomation Global

It’s a little-known fact that with a library card in the state of Connecticut, you can take out books from any public library in the state. You also don’t even need to go to a library other than your local one to do it, and even then you don’t have to go until your book is in. Visit the Bibliomation global catalog and search for the book. If it’s in any of about fifty participating libraries, it’ll come up. Click the “Request Item” button to the right of your result and put in your library card bar code number.

It generally takes less than a week for your local library to get the book. They call the phone number associated with your account when they get it in, and you borrow the book for the lending library’s standard period (usually 2-3 weeks). I’ve got three different books out on inter-library loan right now. It’s easy, useful, and it increases the pool of available library books immensely.

(Note, also, that many libraries carry movies on VHS and DVD. Bibliomation includes these, but it’s sometimes difficult to tell what format the video is in.)


Birthday of scotch

Today in 1495, the Friar John Cor made almost 1500 bottles of scotch whiskey from fourty-eight bushels of malt and thus distilled the first recorded batch. Happy birthday, my amber friend.

(Also, happy birthday to my father-in-law.)