Archive for the ‘Uncategorized’ Category

Gorgeous

Dear TUAW:

Today, you called readers’ attention to a project that a hacker put together, displaying a Twitter feed on a functioning vintage Apple II computer. I agreed: pretty cool.

However. In this same post, you committed the most egregious violation of an onerous trend in tech writing that I have seen to date, so much so that I actually felt compelled to take screenshots and post supporting evidence, just to illustrate my point. See if you can find the flaw in the offending paragraph:

Here’s how it works. Modder Yergacheffe uses a PC for interacting with Twitter. He hacked together a PC-to-Apple IIe interface for moving data to the Apple from the PC’s USB port. Next, he wrote some custom 6502-assembler code that displays Tweets on the Apple IIe and also converts users’ Twitter avatars into those gorgeous, chunky lo-res graphics.

Check those last few words again, and then look at these screenshots from the video you posted:

Let me ask you: can you please explain how anyone looking at these pictures, and after seeing the giant anti-aliasing artifacts, the awkward palette, and the general blown-out-but-still-fuzzy feel of these magnified avatar icons, could come to the conclusion that these graphics are gorgeous?

I mean, really. Gorgeous. You used the word in conjunction with the word “chunky.” Chunky is certainly not gorgeous.

Gorgeous means overwhelmingly beautiful. It is beauty that inspires awe. To use that word is to say that the viewer is struck by its value, by qualities that set it apart from the boring and the mediocre. He will stop and take it in, to appreciate the beauty in its lines, its form, texture, its balance, its color. To create art that is truly gorgeous is hard; it makes the viewer pause and marvel about genius that created it.

“Gorgeous” is not something that can be applied to every piece of visual nonsense that uses 8-bit technology (or worse). It’s not a word to be thrown around when you describe yet another shiny contact list or map in another iPhone app. It’s not something you reflexively whip out whenever some new icon finds its way into your dock in OSX.

I love great design. But this word — it’s sacred. Words are sacred. It’s important to know what they mean because they are the atoms that make up the substance of the ideas that we communicate to each other. We can’t throw around superlatives all the time without making them completely meaningless. Everything can’t be gorgeous, or your favorite, or the Best. Thing. Ever. These words signify choice; they signify ranking. They say that you have evaluated the options, you understand the context, and you have affirmatively decided that this thing is superior in some way to the others.

It’s important that you don’t overuse these words. The problem is, there’s just nowhere to go after they’ve exhausted their meaning. How do you say that something is your favorite, when you’ve thrown the word out so much that everything is your favorite? Do you say it’s your favorite-favorite? Like, seriously, favorite? Like, I really mean, no seriously, guys, it’s really my favorite, it’s this thing I like better than everything else? How are we to understand what you really mean? What does someone think, when you tell them that their eyes are gorgeous, after you’ve used the same word to apply to this reddish dithered blotch of staggered pixels?

This trend of using “gorgeous” and “beautiful” to describe every bit of graphical output (especially that which is made for Apple computers) needs to stop. Your post today tells me that there’s just no further it can go.

Sincerely,
Matt

Desires or daydreams?

If I am unwilling to take responsibility for the attainment of my desires, they are not really desires — they are merely daydreams. For any professed desire to be taken seriously, I must be prepared to answer, in realistic terms: What am I willing to do to get what I want?

— Nathaniel Branden

Mes héros à Paris

Ben Franklin

Thomas Jefferson

On furlongs

a furlong is 660 feet.  there are 8 furlongs in a mile.

there was one furlong in American History X.

if that same furlong had been cast in 8 Mile,  there would have been 1 furlong in 8 Mile, not 8 furlongs in a mile.

so i’m pretty sure that’s why he didn’t get the part.

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

Return top