Cramming infinite possibility into a finite life

AKA “renting versus owning.” Confession: I wrote most of this back in January 2009, but for some reason never bothered to finish the job and hit the “post” button. It’s time to correct that, as nothing in this post has really changed.

I have a bit of a collector gene in me. Not in the hardcore this ultra-limited sealed game is worth $2500 sense, nor in the next on 60 Minutes: this pack-rat has piles of paper decomposing on the floor sense, but more a I like this, so I’ll get a copy so I can enjoy it later sense. I have a goodly-sized collection of games, CDs, and (mostly anime) DVDs.

Problem is, I’m much better at buying these things than I am at actually enjoying them. I still have to play Final Fantasy VII, VIII, and XI; I still haven’t seen The Melancholy of Suzumiya Haruhi. (I did watch Cowboy Bebop, though… about six years after everyone else.) Thanks to my iPod and work, I have listened to the CDs I’ve bought—though some of them haven’t gotten as much play as they really deserve.

And as time passes, and as I start waking up somewhat stiff and sore, I’ve begun to recognize, on a more-than-intellectual level, that I won’t live forever. That understanding naturally leads to a bunch of questions—some more important, and then others like: How much time would it take to play all the games I have? To watch all the anime and movies I have?

This line of thought leads to a harsh test for buying the kinds of things I buy: Is this thing worth the time it will take to [watch|play] it? (How consistently I apply that test may be legitimately questioned, however…)

The above is one of many thoughts blowing through the desert wasteland that is my brain these days. And then, earlier today, I read a this is sippey.typepad.com post (linking to a longer one) about renting versus owning.

I have a huge bias for physical goods; I’ve had too many hard drives go bad, taking data with them (despite backups!), to trust that any bits I buy will always be around. But the argument here isn’t the usual DVDs/Blu ray discs will die out in favor of electronic downloads one that I hear (how are people who can’t be arsed to back up their own photos supposed to take care of a couple dozen movies?).

…(back to November 2009)…

I think my distaste for a rental society relates to power. Not the “I have stuff to display my import” sense of power (those who know me in person hopefully would agree that I don’t like to show off), but the “I don’t want others to have control over me” power. In a society where you own nothing, the people that do own the things have power over you so long as you want those things—and the RIAA and MPAA has clearly demonstrated what can go wrong if you let someone else make up the rules for use.

I like knowing that I can watch Kenichi whenever I want (fun show, BTW), regardless of whether or not Funimation—or the Japanese creator—has a change of heart about whether or not, or how, I should be watching it.

Top 60 Japanese words & phrases for 2009: I enjoy looking at this list every year.

Pulling back the curtain

GreyDuck‘s been curious about the random rotated image trick I’m using on the side here. I think the actual implementation is going to be a bit of a letdown for how fun (in my opinion) the results are.

First you choose a bunch of pictures, and determine every possible way you could order any three of those pictures. Then you fire up Photoshop and create every possible permutation, saving them as (approximately) 1MB .png images (be sure to use transparency), and then you use a little rotation script to choose one set randomly.

Voila!

Did I mention I have sixty-some images in use right now?

Rotating (as in “tilting”) images

Both Webkit (the rendering engine behind Safari and Chrome) and Gecko (the same, but for Firefox) support the CSS3 “rotate” transformation, so rotating images in those browsers is a one-line bit of CSS:

-webkit-transform: rotate(-5deg);
-moz-transform: rotate(-5deg);

Internet Explorer doesn’t support this (surprise), but does have a pseudo-CSS effect—the matrix filter—that does something similar (surprise!):

filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.99619470, M12=0.08715574, M21=-0.08715574, M22=0.99619470, sizingMethod='auto expand');

Use this matrix calculator to figure out the four values to use for the rotation you want. The “auto expand” sizingMethod tells IE to resize the bounding rectangle for the rotated image so that it isn’t truncated by the image’s original dimensions.

For kicks you can put a bit of a shadow on the images using another bit of CSS3… in Firefox and Safari, at least.

-webkit-box-shadow: 3px 3px 6px rgba(0,0,0,.4);
-moz-box-shadow: 3px 3px 6px rgba(0,0,0,.4);

Rotating (as in randomly selecting) images

The actual selection of the images is done by a small bit of PHP code:

<?php

$source_folder = 'rotating_pics/';

$pic_list = array(
'picA.jpg',
'picB.jpg',
'picC.jpg',
'picD.jpg',
'picE.jpg'
);

$lucky_pics = array_rand($pic_list, 3);

$top_pic = $source_folder . $pic_list[$lucky_pics[0]];
$mid_pic = $source_folder . $pic_list[$lucky_pics[1]];
$end_pic = $source_folder . $pic_list[$lucky_pics[2]];

?>

This just creates an array of picture names, uses a function to create another array containing three random elements from that first array, and uses those elements to store the image paths in three variables.

Those three variables are then inserted into the HTML (prior to being sent to the browser, natch) via basic PHP echo commands:

<div id="background_pic_1" class="side_pics" style="background-image:url(<?php echo $top_pic; ?>)">&nbsp;</div>

Everything else is just HTML and CSS formatting, and there’s nothing stopping you from digging through what I’ve done.

Again, nothing too hard—and the end result is kinda fun.

11/24/09 Update: I see I glossed over the single largest point of tedium: getting the file names in my array. On the Mac (I don’t know about Windows, but I suspect this won’t work as smoothly), you can select a bunch of files and copy them—and when you paste them into a text document, you end up pasting only their file names (separated by carriage returns). Using a program with column editing abilities (I like TextMate on the Mac, and Notepad++ on Windows), it’s a couple keystrokes to get them indented and the opening quote inserted.

I don’t have a slick way of getting the closing quote and comma at the end of each line, beyond copying that and then pasting down the line… but it doesn’t take more than a minute, and I figure it saves having my server run some comparatively big ‘ol “scan this folder for all pictures and then choose three” PHP script every time someone loads my page. (Admittedly, though, this site isn’t high-enough traffic for that to cause a problem.)

If I were really irritated, it wouldn’t take long to write a little Ruby or Python script to take the contents of a folder and generate the PHP rotation script automatically.

The real point of tedium, in my eyes, is trying to pick out pictures and crop them (flip them, etc.) so that they’re ready to be used. I haven’t come up with any fancy way of dealing with all that: it’s just the internet, me, and Photoshop.

Blog v3.0: Entangle!

My newest creation is alive! Against all odds, I managed to get this thing to look and act substantively the same in Safari, Firefox, and IE.

As you can tell, it gives its best impression in a much wider window than the old layout did, and takes advantage of CSS3 effects where it can. That said, the content portion scales down quite nicely (including pictures!)—you should try making the browser window narrow and see what happens, if you’re so inclined. (If you’re on a smaller screen and want to get a feel for its overall look, look for your browser’s “zoom out” command.)

The vertical bar next to my pseudo-tweets remind me of my days as a student, when I would emphasize important notes by putting a heavy line to the left of the text… ironically, the heavy line here is probably more indicative of a not-important piece of text.

Not that any of this text is important, really.

And now that I’ve had a chance to stretch my web-design muscles, we’ll see if I can get down to the dirty business of posting more regularly. Things have been happening, no matter what I mutter to the contrary.

(Props if you caught the Zegapain reference in the title. Guess what I’ve been watching recently?)

Japanese Fanta ads: more effective in 15 seconds than most U.S. ads are in 30.

I like girls. But now… it’s about justice.

HAHAHA

Absolutely Terrible video game dubs, courtesy of Andy. Watch this immediately.

Autumn sakura

Looking out my window this morning, I see the sakura petals oak leaves falling in picturesque fashion. The pacific northwest really is beautiful, when it’s not raining buckets.

Shit happened

Random guy rear-ended me earlier tonight, while I was stopped waiting for pedestrians to cross the street (I wanted to turn right, and they were crossing the street I wanted to turn into). He pulled over momentarily (?), and then drove off.

So I got to call 911, and had three (!) officers respond. That was complete overkill, as the collision wasn’t terribly high-speed—I heard the squeal of brakes before I felt the impact—and the damage looks mostly minor and cosmetic (crossing my fingers about that). I’m fine, as far as I can tell (still crossing my fingers).

The best part about being in an accident near campus on Halloween? Your witnesses are a drunk chicken and a drunk penguin.

The second-best part? You arrive at the party you were headed to, and after muttering something about being rear-ended a couple of your friends are all like THAT WAS YOU? Sounds like they were the ones crossing the street.

Check this 4chan thread

A spammer says what?

powered by wordpress