Digitizing my photos with ScanCafe

For about the last 10 years, I’ve been carrying around an overstuffed shoebox filled mostly with my old-school point-and-shoot photos from the 90s.  Like my CDs and DVDs, I’ve had a longstanding ambition to digitize them once and for all.

There are some good pictures in this bunch.  Not really for their photographic quality, but I’ve got about 6-7 rolls of film representing my trip to China in ‘92, and another 3-4 rolls from a trip to Italy in ‘93.  There are a good 100 or so photos of my road trip with Steve out to the Grand Canyon in ‘98, and there are a ton of single photos people have given me from plays and other various events I’ve been a part of.  (There’s even a handful of slides some photographer gave me from the infamous Summer of ‘97 at Camp Longhorn.)  I was never really a take-pictures kind of guy, but the photos I do have, I want to save.  Obviously.

I took my first step towards doing this about 3 years ago, when I bought a semi-fancy flatbed scanner that had excellent resolution and attachments to scan my negatives slides.

Since there are a ton of landscapes and travel-type photos in the lot, I wanted to make sure I could preserve as much of the original frames as possible.  I had no idea how much would be possible to keep, but I wanted the max.  I also wanted to do whatever I could to color-correct and remove dust and scratches.  Essentially it boiled down to a simple goal: digitize to the best quality possible, and restore what’s there.

This is totally more easily said than actually done.  I took a few sample prints and scanned them in.  I tried a ton of settings, using the automatic features like dust & scratch removal and color-correction.  Cropping was supposed to happen automatically.  None of it really worked all that great.  I tried using Ross’s photo scanner from a different manufacturer.  It was better, but it wasn’t really satisfying my perfectionist ambitions.

After screwing around with the store-bought scanners for a while, I came to the conclusion that this wasn’t going to work the way I wanted it.

Even if I could find a formula for getting great results out of my dusty and fading old prints and negatives, I still would have to spend a good while on each picture in Photoshop, removing scratches and dust and probably hairs and fingerprints and whatever else most of these photos needed.  But after a couple of hours of fooling around with a couple of sample photos, I realized that even a week’s worth of experience was not going to leave me confident that I’d done a good-enough job at this.

And the way I figure it, I want to do this once, and exactly once.  At the end, I need to be satisfied, or it’s a completely wasted effort.

I realized I wasn’t going to be happy scanning them myself.  So I sought out professional help.  I did a little research at first, googling up some results for “photo scanning service” and “professional scan photos” and the like.

After several hours of poring through user reviews and articles, I’ve decided to take a chance on a company called ScanCafe.  There are a good 4-5 companies that offer services like ScanCafe’s, but they set themselves apart by promising much better quality than their competitors, for about the same price.  They use many of the same professional scanners and software that the other major players use, but they have a single technician handle your entire order, personally reviewing the quality of the scans, and correcting for dust and scratches and color, basically giving a huge leg up on quality that you can’t get from an automated process.  Which they’re able to do, of course, by outsourcing the human labor element of their work to Bangalore.

I kind of recoiled a bit when coming across that fact.  But that’s just my natural concern at the distance involved; I’ve personally worked on projects with people from Bangalore, so I know that there are a ton of technically skilled and competent people in the city who’d be capable of doing the work.  And from the reviews and articles I read, it seems like the great majority of people are really happy with the results they’re getting back.

So I’m taking a little bit of a chance by having my memories shipped off to the other side of the globe.  But what I’m going to get back ought to make the risk worth it.

Several things I like about ScanCafe, so far: 1) Their website is very clear and easy to use. 2) Their ordering process and general business model make it easy to just throw my photos into a box and send it without having to worry too much about the details.

This is really important.  I have a ton of negatives and prints, and I’m not sure which are going to end up scanned better in the end.  But fortunately, I can just throw them all in a box, and then later, I can review the results, keeping only the scans I want.  (Subject to a 50% minimum, of course, but that’s totally reasonable.)  Part of me feels a little guilty for sending them an order that I know is going to be a little on the heavy side, but they really encourage you to just throw your stuff in a box and send it on, so that’s exactly what I’m going to do.

But in the end, I expect to spend only about $200 on the whole process — something that would have taken me a week or more to do myself.  I’m thrilled that this kind of thing is possible, and I’m excited to find out how it actually works out for my stuff.

I’m sending the box out tomorrow morning.  I’ll be following up with updates as they come in.

0-day

Advice

  • Bust your ass.
  • Pay attention.
  • Fall in love.

Django tip: URL redirect shortcut

Sometimes in a project, you need to perform a simple redirect, pointing one URL to another.  For example, in a current project, I want the / URL to redirect to /shop.  I don’t need any complicated routing; I just need to rewrite one URL to another. Should be easy enough, right?

Following the Django docs, the suggested solution is to create a custom view function that takes care of the redirection, like so:

from django.http import HttpResponseRedirect

def redirect_to_shop(request):
    return HttpResponseRedirect("/shop/")

Of course, you also need to reference this from your main URL conf, like so:

urlpatterns = patterns('',
    (r'^$', views.redirect_to_shop),
    ...
)

But this approach leaves me unsatisfied. I’m not particularly fond of writing special view functions just to handle specific cases — but more importantly, for maintenance reasons, I really dislike any solution that requires me to update my code in more than one place. Splitting this code up between views.py and urls.py might be following the idiom correctly, but it’s not necessary, from a technical perspective.

There actually is a simpler, more efficient solution that makes idiomatic sense as well. Since this simple redirect is all about changing one URL into another, it makes sense to keep this functionality completely within the urls.py file. And it can be done right within the URL patterns with a one-line lambda function:

from django.http import HttpResponseRedirect

urlpatterns = patterns('',
    (r'^$', lambda x: HttpResponseRedirect('/shop/')),
    ...
)

No need to write another function; no need to update your code in two places when you need to make a change. Everything is compact and in one place. And yes, the “x” is necessary — Django will pass the request object to the lambda function, so if you don’t have something there to represent it, you’ll get a TypeError.

That’s it!

From MySQL to Postgres

Slowly, I’m making the transition from MySQL to Postgres.

I’m not a database expert, but I’ve had quite a bit of experience working with them and designing them. For the first eight years or so of my experience working on the Web, my exposure was mostly limited to MySQL. But as I started playing around with Django, I decided to go with its authors’ recommendations and see what all this Postgres hoopla was all about. After a while, I noticed that it was faster and much less resource-hungry on my system.

Which is awesome. I’m on a VPS. I like to know that I’m running as lightweight a setup as possible. I’m a huge fan of efficiency.

So I got curious: could I port all my existing apps over to use Postgres instead? The problem is that MySQL and Postgres don’t exactly speak the same language. It’s similar in a lot of ways, but of course, computers are finicky contraptions that demand exact translations, with the exact characters it expects, in the exact format it wants.

For many of my old personal projects, this wasn’t terribly difficult. It was just a matter of writing a few scripts to export my relatively simple data into a format that Postgres would easily understand.

The first big challenge I came across, though, was in porting my MediaWiki installation over. My first instinct was to do as I had with my own projects: dump the SQL and transform it into Postgres-digestible code.

I googled and coded and googled some more, and after several hours of trying to get this to work, I realized it was a dead end. It then dawned on me that there was no reason to even attempt to do what I was doing. It made more sense to do an export of the data, to XML, and then import it into a fresh installation of the app with a fresh Postgres database.

There were a few gotchas, but it was basically very easy at that point. One hour worth of work vs six.

So the steps were pretty easy:

  1. Use the export script to export the data from the existing MySQL MediaWiki installation:

    php-cgi /maintenance/dumpBackup.php wikidata.xml

  2. Initialize a new database in Postgres.
  3. Set up a fresh installation of MediaWiki on a new path. Follow the setup wizard, using your new Postgres database information.
  4. After installation is complete, delete the Main Page that MediaWiki sets up for you.
  5. Copy the wikidata.xml file to the /maintenance folder in your new MediaWiki installation.
  6. Run the MediaWiki script to import the data:

    php-cgi /maintenance/importDump.php wikidata.xml

And that was it. Very easy.

I have a few more challenges ahead of me that I suspect will require a lot more hands-on work than what it took with MediaWiki. The main one will be a project I’ve intended to do for a while — converting a vBulletin installation to use a different forum platform altogether. There will be a lot of custom code. It should be fun.

I suspect that it will be complicated and may even be impossible to manage the various blogs I’ve created over the years. Half of them were built in Movable Type. Half are in Wordpress. I’d like to make my life just a little easier and pick one or the other. Movable Type supports Postgres natively, whereas Wordpress sports an unofficial plugin. It might work, but my coder-instincts are telling me not to get my hopes up too much. If the latest versions of Movable Type are comparable enough to Wordpress, I might decide to go nuts and move everything over to Movable Type instead.

We’ll see. For now, I have a few more important things to take care of before I embark on any strictly-maintenance-and-upgrades kind of work. More to come.

Dolla Tree

Dolla Tree Sign

i swear
thirteen times a day
some smart-ass jerk asks me why is there no R in your sign
so i stare them in the eyes
and i say

look
if there’s one thing i care about
one thing
it’s providing a good service
good products
to good people
and if there’s one thing i hate
it’s seeing people get ripped off
all spending their money
their hard-earned money
and getting less for it than they used to
it’s a shame
and it makes me angry
so angry

now you know and i know
that there’s an R out in that sign
but are you going to see me spend all kinds of time and money
to repair some dumb sign
that you and i both know what it’s saying?
because i could

but then you see
i’d have to raise my prices
to probably, a dollar five, dollar six

signs are not cheap, amigo

i am not
not
going to become one of those people
pissing money down the disposal
like it’s all plentiful
because it isn’t

not where i grew up anyway

i think they feel pretty bad after that
so they stop asking

i guess that’d be okay
if they ever came back

Photo by Jeff Young

Tech support

I don’t know if I’m getting better at what I do, or if technology is just getting easier, but I’ve noticed lately that it’s taking me far less time to accomplish what I set out to do, when I’m working on the computars.

Latest example:

I upgraded my server to the next full version up — sort of the equivalent of going from Vista to Windows 7.  But in the process of upgrading, postgresql — my database of choice — got bumped up a version as well, and in the process, the default character encoding was reset to SQL_ASCII.  Not UTF-8.  WTF, right?

So after a little googling, I found the remedies I needed: how to set the default locale in Ubuntu so that it uses UTF-8, and how to essentially wipe out postgresql’s default template and replace it with the one you want.

This pleases me because I got it done in about a third of the time it might have taken me two years ago.  That, my friends, is progress.

Jetsam

I’m running through about a terabyte of data from old computers and finding some interesting stuff.

For example, here’s a real gem.  I don’t know how this ended up as a Word doc on my machine (e-mail attachments from grandmothers probably).  Since the original author was apparently so excited that he had! to! write! everything! in! bold!, I’ve helpfully highlighted the amazing news below.  Enjoy.

Mars is going to be a second moon of earth for a day

Close-up of the Red Planet

NO ONE ALIVE TODAY WILL EVER SEE THIS AGAIN.

The Red Planet (MARS) is about to be spectacular! This month and next, Earth is catching up with Mars in an encounter that will culminate in the closest approach between the two planets in recorded history.

The next time Mars may come this close is in 2287. Due to the way Jupiter’s gravity tugs on Mars and perturbs its orbit, astronomers can only be certain that Mars has not come this close to Earth in the last 5,000 years, but it may be as long as 60,000 years before it happens again.

The encounter will culminate on August 27th when Mars comes to within 34,649,589 miles of Earth and will be (next to the moon) the brightest object in the night sky. It will attain a magnitude of -2.9 and will appear 25.11 arc seconds wide. By August 27, Mars will look as large as the full moon to the naked eye. Mars will be easy to spot.

At the beginning of August it will rise in the east at 10p.m. and reach its azimuth at about 3 a.m. by the end of August when the two planets are closest, Mars will rise at nightfall and reach its highest point in the sky at 12:30a.m. That’s pretty convenient to see something that no human being has seen in recorded history. So, mark your calendar at the beginning of August to see Mars grow progressively brighter and brighter throughout the month.

Share this with your family, friends, children and grandchildren!!!!!!!!!!!!

As Snopes helpfully points out, someone left out a key clause here — that Mars is only going to look that big with the aid of 75x power optics. Like a small telescope. Or binoculars. But not the naked eye.  Fools.

Clutter

Clutter impairs your ability to think.

It’s like cholesterol, clogging things up.

Relax.

“I was playing good and giving my team its best chance to win,” McCoy said, “but at the same time it was not fun. I was beating myself up. I kept digging myself deeper and deeper in a hole that I couldn’t get out of.” [...]

The people around McCoy say they didn’t notice a whole lot different about him. But McCoy felt it. He brooded. He didn’t reach out to his young receivers. He could feel his usually open personality closing up.  [...]

[But then] “The week after Oklahoma, I let myself go,” McCoy said. “Forget about everything. I walked up to Coach [Mack] Brown and Coach Davis and said, ‘As far as I’m concerned, we’re 0-0. This is going to be my first game. I’m starting over completely.’

Ivan Maisel, Colt McCoy overcomes worst critic to lift Texas Longhorns.

Return top

INFORMATION

Change this sentence and title from admin Theme option page.