UCWords

Every now and then I find that I need to do something that seems remarkably obscure, and am surprised to learn that PHP has a function to do it. I found myself cleaning up a really sub-par Wikipedia article, where someone had entered a massive list of things in ALL CAPS.

It’s easy enough to upper-case everything, or to lower-case everything. But what I really wanted to was to capitalize the first letter of each word, because they’re all proper nouns. It turns out that PHP has a ucwords function to do precisely this.

And thus this page, which I suspect will never be useful to anyone, was born. Enter text, and it’ll covert it to lowercase, but upper-case the first letter of each word. And in this case, the time required to write the script was less than the time it’d have taken me to change it all by hand.

Richardson

The LA Times has an interesting article in which Bill Richardson suggests that he had intended to back Hillary, but between her overzealous TV ads and a bunch of unceasing, rude calls suggesting that he “owed” her the endorsement because he was on Bill Clinton’s cabinet, he decided otherwise. The Clinton camp, of course, has called his loyalty to President Clinton into question, but Richardson was unphased:

“I was loyal,” Richardson said during an extended conversation over breakfast this week at the governor’s mansion in Santa Fe. “But I don’t think that loyalty is transferable to his wife… You don’t transfer loyalty to a dynasty.”

The Clinton camp, though, is still fuming:

Days later, just when interest in the endorsement seemed to wane, former President Clinton exploded in a rant about Richardson at the state Democratic Party convention in San Jose.

Computing

It looks as if we’re actually being charged $500 to take our school laptops with us (after paying $1,200 for the “Technology Fee,”) which has me scouting out prices: can $500 buy something better than this?

In the process, I came across this: a tri-core computer.

If you’re confused…. Me too!

Priorities

I find this image interesting for so many reasons.

The most obvious, and least interesting, one is that the laptop is engulfed in flames. It’s a Dell, and you may recall that stretch when a bad batch of batteries kept spontaneously combusting.

One of the bigger issues is the thought process. “Oh crap, my laptop is on fire. I’d better…”

I would think, “…try to extinguish it,” although, “remove the book practically on top of the flaming laptop” is valid too, as is, “…call 911 and get out of here!”

But instead, this guy thought, “…grab a camera!” I guess I’m glad he did, but it certainly wouldn’t be my reaction.

But above all else, what I find most interesting here is that he has a huge onion on his desk. I could see an apple, a nice snack for later in the day. Or maybe a pear. Or grapes. But this guy has an onion. A huge onion. Why? I refuse to believe that he intends to munch on it later in the day as a snack. It might be a decent ingredient in something else, except that he doesn’t seem to have anything else in terms of food. Just an onion. Why?!

She Ate All the Gherkins

The UK’s Mark Steel has a particularly humorous piece on Hillary’s problems with accidentally mis-speaking and making strange claims, because she says so many words:

Her next round of soft-focus adverts will probably feature her soothingly saying, “My fellow Americans, I drank a pint of walrus milk once for a bet. I speak fluent Eskimo. I once ate all the gherkins in Belgium. My brother’s got a yak in his loft. I fell asleep on a night bus once and woke up in Munich, and had to get a lift back on a camel. I used to live on an iceberg. I’ve got a waffle-maker that works underwater.”

Okay, so maybe it’s overly critical of her. But I can’t help but chuckle as I read it.

Oh my!

It seems that the strong wind today, April 1st, has caused this server to serve posts with some of the letters upside down! We are aware of the problem and looking into it. Expect it to be resolved around the conclusion of April Fools Day. In the interim, you can click through to the actual post, which isn’t affected by this strange bug.

XBox

One thing I find interesting about technology is that sometimes a trivial technological thing has huge differences to the end user.

I’ve been playing Grand Theft Auto a bit in my spare time, on the Xbox 360. After re-arranging some things, I’ve run into a strange problem where, when I power it up, it loads older game files, not the newest. I know exactly what’s wrong, but it’s kind of like the “roger tone” to “FRS” leap–intuitively understanding what’s wrong here borders on savantism.

When I rearranged things, I didn’t bother to plug the Xbox back into my switch. I think the cable it was using is out in another room right now. So the Xbox has no Ethernet connection. Are you seeing why my game loads really old saved data yet? Hint: the game doesn’t use the network in any way, shape, or form.

The Xbox, when it’s connected to the Internet, will grab the correct time via the web. (I’ve wondered about this, actually: is it using NTP? Is it syncing to time.windows.com? I’ve been tempted to try packet sniffing, but it would basically require ARP poisoning, which I’m reluctant to do right now, as both the Xbox and my laptop are essentially on the school’s network, so it wouldn’t be too easy to “safely” do it.)

For some reason, though, when shut down, the Xbox never runs a “systohw” call (or at least, that’s what it is under UNIX) — the system clock, which was just synchronized and is quite accurate, is never written to the hardware clock. So two weeks ago, when I booted my Xbox, it was March 14, 2008. I saved a game, shut down the console, and went to bed. And then I rearranged stuff and realized that there was no reason for my Xbox to be online, so I moved the cable to the common room.

So the Xbox, now booting with no Internet connection, thinks it’s November of 2006, since the software clock never got committed to hardware. And the game, not anticipating bizarre things like this, automatically loads the game with the newest timestamp. As far as it’s concerned, the game I saved two weeks ago is a year and a half “newer” than what I saved earlier today.

So there you have it — whether I have an Ethernet cable hooked up or not changes the year on my Xbox, which causes it to load old games. And it’s all because the Xbox, for reasons I can’t understand, never writes the time to the hardware clock. (To me, this is a bug, and one that would require adding one line of code.) And it shows something neat (or scary, depending on your perspective) about programming — trivial details (like whether you sync the hardware clock to the software clock when you shut down) manifest in entirely unexpected ways, like which save file my video game opens.

Geek

So my building here is one in a “set” of three dormitories. There’s a walkway, and another building on the other side of it. (And the third is to their side.) As I came back from class, I noticed a rope running from a room on the floor above mine across to the room pretty much opposite mine. It was extremely nice out today, so even those of us not creating improvised clotheslines (?) had our windows open.

We took a partial interest in whatever they were up to, but mostly about our business, just periodically looking to see what they were up to. We could also hear everything they were saying. So I sat at my desk working on something or other, when I heard a “roger beep.” I instinctively knew that it was from an FRS radio. It’s one of those silly noises they make at the end of a transmission. (As compared to things like MODAT [.wav] or MDC1200 [.wav], which are useful for ANI.) I’ve only ever heard it on FRS, so I “just knew.”

Of course, merely thinking, “They must be using FRS” because of a sound I overheard wasn’t geeky enough. So without missing a beat, I picked up my ASTRO Saber and switched to the “Zone” I’d created for the FRS band, and threw it into scan mode. A couple minutes later they transmitted again, and the scan stopped on Channel 2. Sadly, they didn’t discuss the actual purpose of the wire, only the difficulties they were facing on one of the ends.

It was tempting to radio back, “What exactly are you guys doing?,” but I didn’t want to blow my cover just yet. And besides, this thing puts out five Watts, ten times the power allowed on the band. (And the deviation/bandwidth is probably wrong, and it’s not type-certified…) Oh, and I think I probably have it set up to send an MDC PTT-ID.

It really concerns me how my mind works sometimes.

Nightmare Playgrounds

ExcerptMetaFilter, the parent component of my beloved Ask MetaFilter, is quickly earning its place as one of the sites I check daily.

A post there today links to a priceless photo gallery, Nightmare Playgrounds. They’re photos of actual playgrounds, surely designed by people who had disturbed childhoods and wanted to ensure that generations of children to follow would have the same.

What’s scary isn’t just the photos of the playgrounds… It’s that people actually thought it was a good idea to put these things in playgrounds. And that kids actually play at playgrounds with these freaky things in them.