Monthly Archives: April 2005

Optimization (not SEO though)

The software that I use for maintaining the BME site has become quite robust over the past few years. As I'm going through emails, the software opens a browser window and instantly displays a custom gallery of all that user's submissions and so on; it's very useful for both getting a reminder of who I'm talking to, and for catching double submissions (I do fingerprinting, but that only catches some since people often send almost identical pictures of the same thing years apart).

Anyway, in order to do this, it has to do a pretty resource intensive build before starting up. The build involves mostly text searches of very large text arrays, and is the only thing in my current maintenance codebase that I'd consider “slow”… As of yesterday, doing the load of all submissions from 2002 on took 6:45 to complete. When I'd initially written it the databases were much smaller, so it wasn't a big deal and I didn't bother to write it efficiently, but a 6:45 hole in my work schedule is surprisingly debilitating.

That said, I knew I was going to have to optimize it in the future, so it wasn't too hard to fix since it had been designed for upgrades. I added a caching scheme for the searches (so it doesn't repeat searches that it's done recently), and tested it on a few cache sizes, eventually settling on caching the previous five searches — this cut the load time down to 1:53, which is back into bearable territory. By the end of the year I'll have to do one more fix, which is making the database sort itself periodically during the load process to allow for binary searches (the input data is in totally random order).

I used this technique on the search engine build routines, and it cut the build down from something like six or seven hours to about half an hour (!!!)… I figure it'll cut the load on this down to under a minute, even with a much larger database. Thinking about optimization is a lot of fun… If it interests you as well, check out the 256 bytes demos archive.

Welcome to Picton

I'll mention that the quality of amateur photoshoots that have been getting submitted to BME/HARD by younger (as in 18 to 35) readers really keeps going up all the time. Thanks to everyone who's having fun with it. I may be totally deluded, but I really think it's a good “sign of the times” that people feel free enough to put this stuff out there. It's not as if we don't all do it.

It's crazy to think about it, but I've been drinking heavily now (on and off) for over 16 years. Because I did a partial grade skip in school, I had friends that were a little older than me, so I was exposed to alcohol a bit earlier than I should have been. At age fifteen I was hooked on vodka — I think that's all I drank until quite recently actually. Not only did I enjoy the effects, but I think I have a bit of a Russian-mystique-fetish, where I fantasize that Russia is this real no-holds-barred place where anything goes and people don't really care if they live or die. Getting photos like the ones below from friends in Russia chopping off fingers after a night of drinking help me maintain that mirage.

The sad truth of the matter is that I think I may have entirely fabricated the “drinking vodka” part in my mind… I actually have no real reason to believe that other than the stereotypes that rule my fantasies.

Getting back to my own life, I'll tell you a story that sort of sums up the small town growing up experience. Keep in mind that I kicked my Korsakoff's syndrome into high gear by my mid teens so this story may be only partially accurate, but I believe this took place as I will tell it. It actually involves several other IAM members, but I'll keep their names out of this entry.

if i am good i could add years to my life
i would rather add some life to my years
life is really what you make it they say
i can't even make my mind up today

My brother was having a big field party on our parents farm, which meant that a couple hundred of his friends would arrive from as far away as two hours drive and gather around a large bonfire to drink themselves silly and screw farm girls under the stars. I was living in Toronto at the time and had a similar drive myself, although I was the passenger in the car, cutting up sheets of acid and wrapping them individually to sell later that night.

Tearing through the small town of Bloomfield, Ontario at well over the speed limit my heart dropped into my stomache as the cop walked up to our window after pulling us over for speeding. Would he notice that I'd just brushed hundreds of hits under the seat? Would he catch a glimpse of the tinfoil and wonder what it was for? “You boys know how fast you were going?”

It wouldn't be the first time that my friend in the driver's seat would talk us out of a long stay in prison, and not long afterwards — without even a ticket issued — we were on our way to the party.

After selling maybe thirty or forty hits to various gino-jock friends of my brother's, an old friend of mine approached me looking to buy I think five hits. He'd already finished off one bottle of whiskey and was well into his second, but I never was the kind of guy that told people to take it easy and still am not. So a few seconds later I was twenty dollars richer and five hits of very high quality acid were starting to be absorbed by his body… It turns out the combination didn't sit well with him though.

Probably due more to the booze than the LSD, he approached some homophobic Markham macho dude and I guess made some move on him that this guy interpreted as “gay” and got himself punched and threatened… My friend, not particularly a fighter (although I knew him from not only “the gifted program” but also seven years of Judo), uncharacteristically escalated the conflict, pulled a pocket knife on the guy, and tried to cut him — my brother and a couple friends quickly grabbed him, carried him toward us, threw him in the back of our car and told us to get lost before he got himself killed…

It sort of sucked because it meant we were going to lose our dealing profits from the night — we'd hoped to sell a few hundred hits — but friends do come first.

Initially we drove to a big graveyard about fifteen minutes away and sat among the stones hoping he'd relax, but the combination of alcohol and acid wasn't sitting well with him. “I need to see Leah,” he told us. Leah had been my girlfriend throughout highschool, and I think I was still dating her when this story took place, but my drugged friend had also dated her for a while (it was a small town so most interesting people had hooked up in one way or another).

She still lived with her parents, but it was only about eleven at night so we drove there and got her. My friend was really a slurred mess at this point. We dropped the two of them off at the playground of a nearby elementary school and my dealer friend and I went for a moonlight walk to let them talk, hoping she could calm him down. It turns out that he tried to molest and rape her the whole time we were gone, but he was so immobilized by the various substances that she was at no real risk.

I don't really remember what happened over the rest of the night, although I do remember my brother stumbling out of his tent at the field party after a rendezvous with who knows how many girls, and shouting at the top of his lungs, “MY DICK FEELS SO GOOD!”

I know, none of that was a particularly interesting story, but welcome to life in a small town.

Now that's a funny tattoo

Willie: Go, go back to the tent!
ALF: It's too dangerous out there, I had to kill a fifty foot snake with my pocket knife!
Willie: There are no fifty foot water snakes in the backyard.
ALF: I'm telling ya, it was bright green and it spit water! Thhft! Thhhft!
Willie: That was my new garden hose.
Alf: Oh, no wonder it was sucking on the spigot!

Porn: Hookers for wimps?

In the current issue of TIME magazine, they have a long article (worth reading for both film and porn buffs) on both classic porn. As is pointed out by Bacchus, the opening lines are a bit of a shocker if you think about what's really being said:

In hotel rooms where pornography is available, two-thirds of all movie purchases are for pornos; and the average time they are watched is 12 minutes. The image instantly summoned is of the traveling businessman who wants a smidge of sexual exercise before retiring, but who is too tired, timid or cheap to summon a call girl.

Now, others are opining about how horrible it would be to be Mary Corliss, wife of the author, since he appears to be saying that he thinks a guy that watches porn instead of calling a prostitute is copping out — I think Rachel would take out a hit on me if I ever wrote a comment like that! However, what I found much more interesting is the comment it makes about sexual attitudes. After all, this isn't writing on some cheesy porn blog — this is TIME magazine!

It's one thing for pornography to have mainstreamed to the point where it can be written about without denouncement and moralizing it to death, but the fact that comments saying that it's not only as normal but better to patronize an escort service than rent an adult video can be nonchalantly dropped in a mainstream magazine really blows me away. I think it's probably a good sign for where society is going, but while on one hand the sexual permissiveness of a culture is a good mark of its freedom and liberty, sexual permissiveness also spikes right before the demise of a complex society.

NO RELIGION ONLY GOD

From the New York Times

International gay leaders are planning a 10-day WorldPride festival and parade in Jerusalem in August, saying they want to make a statement about tolerance and diversity in the Holy City, home to three great religious traditions.

Now major leaders of the three faiths — Christianity, Judaism and Islam — are making a rare show of unity to try to stop the festival. They say the event would desecrate the city and convey the erroneous impression that homosexuality is acceptable. [They describe the festival as] “the spiritual rape of the Holy City. This is not the homo land, this is the Holy Land.”

Look at these smug bastards joking about the queer menace:

It is of only minimal satisfaction to me that the Pope will soon be burning in hell, or at an utter minimum for y'all atheists, dead. I'd have been perfectly happy if an assassin had managed to kill that homophobic murderous bastard years ago — and followed it up by burning Vatican City to the ground. The fact that the one time religions in the Middle East are able to get together and agree on anything is in unity of hatred should tell you something about the evil black heart of organized religion.

I think the thing that made me angriest about the war on Iraq is that Saddam was a wannabe USA-style Playboy. He wasn't fooled by promises of harems full of virgins in the afterlife — he knew the secret was a few slutty cheerleaders after a night of partying and heavy drinking. Seriously though, the reason Iraq was invaded was because it was modernizing and Westernizing. As I've mentioned before, if you looked at downtown Baghdad five years ago, it might as well have been Philadelphia — same advertising on the bus stops, everything. Now, that doesn't mean I'd be moving from Fourth and South to Al Khulafa and Al Thawra, but it's a hell of a lot better than living in Tehran.

I have nothing but contempt for religious regimes. If it weren't for my general and overwhelming pacifism, I'd have had no real complaint if the warmonger nutcases in America had said “let's bomb Iran, and when we're done with that, we can unload our remaining nukes in downtown Dubai.” As far as I'm concerned, any country that puts people in prison for the “immoral act” of public affection (I'm talking about a man and a woman kissing, not two dudes screwing on the street or anything explicit) deserves every errant cruise missile that happens to eliminate one of their mosques.

Has religion — any religion — ever helped anyone? Doubtful at best. Hell, I'd go so far as to say that religion hurts God. The fact of the matter is the singular issue that religion has been able to unify on and achieve if you look at the whole of human history is the advancement of hatred. Good going Jesus, way to flex those omnipotent muscles. You and Ganesh must be proud of us humans.

Sign me up with Gay Satan, at least he loves the cack and believes in personal freedom.

My mother tried to raise me Anglican — I was even baptized I think — and always wanted to drag us to mass, but thank Dog my father had the common sense to play a lot of Dungeons and Dragons with my brother and I, and make sure the Satanic Bible was left lying around the house.

On a vaguely related note, Attila has been updated and, assuming my code works, now writes a log file (mostly useful for debugging purposes, but also good if you're doing a set of bulk downloads and want to return to the site you got a file from), handles cached files and 302 redirects (ie. less broken downloads), and also does a little bit better skipping of damaged and missing downloads. The new version (v0.91) is at the original download site. If you like it, send me something off my wishlist!

Bug reports are appreciated…