Digital Photo Recovery

I just discovered PhotoRec, a tool for recovering digital camera images.

For the non-geeks, a quick basic background…. When you save a file, it writes it to various blocks on the disk. Then it makes an entry in the File Allocation Table, pointing to where on the disk the file is. When you delete a file, the entry is removed from the File Allocation Table. That’s really all that happens. The data is still there, but there’s nothing pointing to where on the disk it is. This has two implications. The first is that, with appropriate tools and a little luck, you can still retrieve a file that you’ve deleted. (Whether this is comforting or distressing depends on your perspective…) The second is that, with no entry in the File Allocation Table, it’s seen as “free space,” so new files saved to the disk may well end up getting that block. It’s technically possible to recover stuff even after it’s been overwritten, but at that point it’s much more complex and much more luck is involved.

Last night we went out to dinner… We took lots of photos, but some were deleted. So I figured PhotoRec might recover them. So I gave it a try.

The filesystem shows 163 photos. After running PhotoRec, I have 246 photos. What’s odd is what photos I have. It’s not the ones from last night. They’re scattered from various events, and several are from almost two months ago.

This does leave us with an important tip, though: if you delete an essential photo, stop. Each subsequent thing you do to the disk increases the odds of something overwriting it. In a camera, just turn it off. Taking more photos seriously jeopardizes your ability to recover anything.

In my case, I didn’t have anything really important… I just wondered how it would work. And I got strange results for recovered files. (Which has me wondering a lot about how its files get written out to disk, actually.) But it’s good knowledge for the future. (By the way, PhotoRec runs under not just Linux, but also, apparently, Windows, and most any other OS you can imagine.)

Understand?

I had to read this headline about eight times before I understood it: Boyfriend on roof punches weaving driver.

And even after the eighth time, my mental image still didn’t match what I found when I read the story.

Actually, even having read it, I’m not sure I understand it. I mean, I understand it, but I don’t understand it. Why was he on the roof? Why was he punching her? Why didn’t she stop? Why was the car’s air bag inflated? (And a second “Why didn’t she stop?” is in order here.) And tell me “She eventually stopped the car and hit him with it, police said” isn’t unclear. It’s yet another, “I understand… the words” case. We can infer that she stopped the car, and then started it again to hit him. But it seems like poor reporting all around to rely on the reader to make these assumptions.

Arresting Firefighters

This is wild. The fire truck pulls up to a car crash on the highway, and parks the truck to “shield” the emergency workers as they extract a victim from the car. The cop yells at the firefighter driving the fire truck to move so as to not obstruct traffic. The captain, who was actively working on the patient, yells for the fire truck to stay put, pointing out that they very deliberately parked that way for the safety of anyone involved. So the cop pulls the guy away from the patient and arrests him.

Of course, not all firefighters arrested are innocent.

Cold War

Anyone who’s learned about the Cold War will be familiar with the chilling fact (no pun intended…) that we came very close to a nuclear war.

But after reading things like this article, mixed with other anecdotes, I’m left wondering how on Earth we didn’t go to war… Accidentally. Both the U.S. and the Soviets, on multiple occasions, “detected” launches of nuclear weapons by the other, and came within seconds of retaliation before someone noticed something out of the ordinary.

Fortunately, the U.S. was very thorough the first time around, and quickly proved that the first “attack” they witnessed was caused by some guy inserting the wrong tape… In the case of the Soviets, the only reason they didn’t launch a counter-attack after their own false alert, it seems, was because the guy who was supposed to press the button disobeyed orders and went with his gut. (And boy are we glad!)

And there’s a further set of coincidences, really. After a flood of nonsensical data, officials discovered some problems. Apparently, one detection system was alternating between reporting some 2,000 incoming missiles and 0 incoming missiles. Because of the conflicting data, they turned to alternate systems, which also reported 0 incoming missiles, and it was traced to a hardware malfunction, with the 2,000 number just happening to match, by sheer luck (or lack thereof), internal checksums.

So they wrote some code to compare results from multiple systems. And not more than a few months later, the problem with the training tape occurred, when one of the systems began reporting more believable numbers of incoming missiles. (Apparently, a steadily increasing number.) The data “made sense,” but, because of the newly-implemented code to compare with other systems, they realized that it was just one system, and quickly isolated it to a case of someone sending “training data” as if it were live data. It’s almost a case of two wrongs making a right–had the first error not occurred, the safeguards wouldn’t have been implemented to catch the second error.

Oh, and there exists a slightly-creepy website dedicated to the Russian who decided to trust his gut over the myriad indications that we were attacking

World News

Several things of note have happened in the past 24 hours:

  • In Pakistan, the PPP and the PML-N, the former being Benazir Bhutto’s party and the latter being on with apparent similarities, won by a landslide in elections, which were a remarkably peaceful event. There is already talk (albeit just rumors) about the possibility of the impeachment of dictator Musharraf. It’s far too early to know the full effects, but some are suggesting that this is a very good sign for democracy.
  • Fidel Castro has stepped down. The article is quick to note that this doesn’t mean that democracy is around the corner–a new leader will be appointed by Cuban parliament, only because Castro said he didn’t want to be named as the next leader. Possible replacements are reported to be Castro’s brother, with some discussing the possibility of a surprise appointment of a “generational gap” leader, Castro’s current VP (who is 56).
  • Kosovo has declared its independence from Serbia.

Languages

I’m learning German. You could stick learning in air quotes, though: I have a million more important things on my plate, and my strategy of playing it in the background while I work, rather than “language through osmosis,” seems to result in nothing but me becoming distracted and irritated.

I signed up for Live Mocha tonight, a neat (free) online service with language lessons. And I decided that learning languages is neat. I learned Spanish in high school, but never enough to be fluent. What’s interesting is that podcasts and VoIP are playing a role, as people can chat in real time with other speakers, and language lessons can be put onto iPods easily.

I’d like to work on picking up a little more German. After that, I’ve come across a decent number of pages in Polish and Slovak (which, to an untrained completely oblivious eye, look similar), not to mention French. And my interest in the Netherlands continues, so Dutch continues. (Not to be confused with Deutsch, the German word for “German.”) Learning either Chinese or Japanese would be helpful, as would Arabic. (Unfortunately, none of these languages really have anything in common, unlike the Romance languages, and supposed similarities between German and Dutch.)

And after learning all those, I’ll move onto Luxembourgish.

Televisions

LCD and plasma TVs are becoming increasingly popular, costing between $1,000 and $3,000.

If you have that budget in mind, something I’ve wanted to do for a long time suddenly becomes viable: buy a projector and mount it on your ceiling. Of course, only the very high-end projectors will do the 1920×1080 that 1080i and 1080p do, but 1024×768 is very doable for under $1,000, and the difference in resolution shouldn’t be all that noticeable. And then you’ve got something like a 100″ screen. Wow-a-wee-wow!

The caveat, of course, is that few (if any?) projectors include tuners, so you’d have to set up a PC for that, something like a Mythbox. But one can be put together for around $500, and that naively assumes that you don’t already have a spare computer with a tuner card or two.

Deal of the Day

I just saw this link on a site I frequent: a Compaq laptop, dual-core chip, 1 GB RAM, 80 GB disk, 15.4″ LCD, DVD burner, and integrated wireless… $300 after rebate ($440 before). (Of course, I had no idea that HP still makes Compaq-branded machines?)

For the same price, they’ve got a desktop system… It’s “just” an Athlon (with no apparent details?), but it comes with 2 GB RAM and a 250GB disk… Plus DVD burner. (Throw in a tuner and you might have a nice Mythbox?)

CompUSA has a 22″ LCD (Acer, 1600×1050) for $200, although it seems that the deal ends today. (I thought they went out of business?)