Hmmm...
Baghdad Burning Hmmm...
You are viewing the archives of the weblog originally hosted at Alpha-Geek.com. This archive is only here for historical purposes and so that googlers arrive some place relevant when items on this weblog pop up in searches. If you are looking for more information about Jeremy Smith head to the main page of Alpha-Geek.com.
From RIAA Reveals Method to Madness
the [RIAA] disclosed its use of a library of digital fingerprints, called "hashes," that it said can uniquely identify MP3 music files
I wonder what algorithm they are using?
I've been mucking around with Class::MakeMethods. It's an extremely powerful (and complex) module. What I am trying to get it to boil down to is I want to have the ability to create a class that I can use as such:
use Foo;
my $bar = Foo->new();
# the next line creates a hash element in the class
# that is keyed via "baz" and has a value of "Hello, World!"
$bar->{baz} = "Hello, world!";
# after creating the aforementioned hash element,
# a subroutine reference is also created that can be referenced
# via that element like so
$bar->{baz}->("first argument", "second argument");
In my playing with the Class::MakeMethods module, I have found a lot of cool stuff. But, nothing, it seems, that will let me do the above. I am not even sure if it is possible.
If you want to know why I want this behavior, it's because I want the nice clean API to writing XML that Python has that I mention in a previous blog entry, XML::Smart... Not So Much.
It may be time for a PM post.
The gist of Bloggers as Filters is the act or process of using bloggers to filter the cream of the crop (relevant to the user of the aggregator who has subscribed to a certain subset of blogs) from the frantic news-generating and collecting machines such as Yahoo!, Wired, other bloggers, etc. such that one needn't subscribe to the actual news-generators/mass-link-collectors. Why not do both?
What I am thinking is that you open up your aggregator, and it has gone through and preened out all of the different links that have been linked from in the entries you have aggregated. You can open up a little summary window and see that 8 of the bloggers you subscribe to have linked to one particular story; 6 have linked to this other story; 3 have linked to this yet another story. Basically, just a way to bubble up oft-linked to news-articles/blog-entries. Obviously, an entry that is linked to and is actually in an RSS feed you subscribe to gets a bonus boost.
Have I mentioned before how much I dislike Kerberos and Solaris?
Kerberos has to be one of the most tempermental set of libraries and client utilities I have ever had the displeasure to have to toy with. Couple that with Solaris's seemingly neverending persistence to try and use its own busted-ass C compiler and linker instead of GNU's, and it's impossible to get these to work together.
It was easier getting Debian to authenticate against a Windows PDC and talk to a MS-SQL Server...
Okay, let's not go that far.
What I wouldn't give for some Chuckie software compilin' magic, right now. Sittin' in the leather chair, white "Player of the Week" T-shirt from High school, running shorts, red hat on backwards, cigarette dangling out of the side of his mouth, one eye closed from the irritation of the smoke, and a 97 line ./configure that just takes care of shit.
Ironing clothes is one of the most difficult tasks for me to perform. Everything works out fine if I am just quickly ironing a shirt or just a shirt and pair of pants in preparation to skedaddle out the door on my way somewhere. In terms of the entirety of my OCD, as long as I have another place to divert my mental focus towards or I have something that will preempt my current focus, everything works out fine.
However, if I am just ironing for ironing's sake because I, let's say, let my clothes just sit in a dryer for several hours allowing them to raisin-ify (<-- that should so be a word), it is an unaccomplishable task. It is like cleaning a pond. You will always make visible progress. There is always dirt to pull from the pond and there are always more wrinkles to remove from your clothing, thus signifying that you are making some sort of headway. But, the task can never be completed. You can continue until you are blue in the face, there will always be more dirt and more wrinkles.
You never know when to stop. What's an acceptable amount of visible wrinkling? Does this accepted amount change depending on the type of clothing or the material of the clothing? Does it change depending on the location upon the clothing in which the density of wrinkles is located i.e. is it okay to have more wrinkles on the inside crease of the trouser leg versus the front face? I needed to invent some kind of heuristic lest I sit there ironing my clothing until the sun rose again. So, I grabbed a beer; left the presence of my clothing; went on to the porch; smoked a cigarette; and arbitrarily invented the "Official J$ Ironing Process Completed Litmus Test."
To "infect" another user's computer, you need to perform to basic, generalized steps as a virus writer/deployer.
It is apparent that the most prolific way to accomplish step 1 is through email attachments. Email attachments are automatically downloaded. As a virus writer, you are halfway there. Step 2 can be accomplished by relying on the stupidity of the general populace (which is an unsurprisingly safe gamble) or exploit a "vulnerability/feature" in the victim's client software that causes the code to be executed without the victim's expressed intent via directed action.
To curb this, there are now 97 different kludgy ways to protect computers ranging from email-server stopgaps to firewalls at ISP gateways to personal firewalls to anti-virus software to patches upon patches upon patches that need to be applied to email clients to keep them up to date. All of this just to stop the two basic steps described above.
Well, good news for virus writers because people are coming up with another excellent method to propogate viruses -- RSS Enclosures.
Everyone knows about the SoBig virus that ran/is-running rampant across the networked-computer landscape. It filled your mailbox. Your email was slow to receive and slow to send. Bad stuff all around. But, I have some actual numbers from our email servers; and everyone loves statistics and graphs.
Let's see if I can beat /. to the punch on this one -- Yahoo! News - Microsoft Is Using Linux To Protect Its Own Web Site
I am not the biggest guy in the world nor am I the biggest eater. But I can go toe-to-toe with anyone on eating red meat prepared in the consumers choosing i.e. rare.
So, I have $20 riding on the fact that 140lbs. J$ can out eat a 200lbs. Mexican friend of mine when the meal up-for-grabs is dead cow.
Who wants side-bets?
By the way, if you have never seen me go tooth-n-nail on a New York strip, you're making a misinformed bet.
Silverware need not apply.
Solaris 8 is stupid.
Kerberos is stupid.
Can't load '/apps/pkg/production/perl/lib/site_perl/5.8.0/sun4-solaris/auto/Authen/Krb5/Krb5.so': symbol dn_expand: referenced symbol not found is fucking retarded.
What I wouldn't give for a Windows installer wizard right now where all I have to do is hit "Next" 37 times to get software loaded.
It has never been worded so eloquently -- Bob Speaks. Read this... definitely read this. It's funny; it's witty; and it's oh-so-true.
If you are going to refer to Case Western Reserve University with a four letter word, the administration would prefer you to use Case.

I would have really liked to have been at the meetings were all of the higher-up's quibbled over this just for entertainment's sake. But, there's more. I just love the wording they came up with explaining the change:
Perl Idioms Explained - ${\$obj->method} and @{[sort @list]}
Someone should write an O'Reilly book called Perl Idioms Explained.
It took a lot of hoop-jumping to figure this out, and I could not seem to find it on Google, so I am blogging it.
To subscribe to a Slashdot journal in your various RSS aggregators, you need to know the /. UID of the person. Then, you need to use this URL (substituting in the correct UID) to get to the RSS feed.
http://slashdot.org/journal.pl?op=list&uid=UID_OF_USER&content_type=rss
There was a Perl golf contest floating about concerning Goldbach's Conjecture, which basically states:
For all even integers n where n > 3, there exists two prime numbes p and q such that p + q = n
I cannot find the actual contest's web page anymore, but I decided to try my hand (poorly) at it anyways. I, also, used the brilliant (and famous) snippet from Abigail that takes an integer as an argument and returns an array of all of the primes beneath it.
The golf contest (if I remember the web page correctly) was to write a subroutine that took one even numbered integer greater-than or equal to 4 as an argument and return a string of the form p+q where p and q are a pair of primes that add up to form the original number.
My golf comes in at 92 strokes.
More idiomatic Perl. This is something I always forget, so I figured if I blogged about it, maybe it would stick in memory more.
You start out with two arrays@a=qw[1 2 3];
@b=qw[4 5 6]
Now, you want to create an array of arrays (AoA); so:@d=(@a, @b)
Nope! That's obviously wrong. That creates a one-dimensional array @d with the elements 1, 2, 3, 4, 5, 6. So, to get an array of arrays:@d=( [@a], [@b] )
But, that copies the arrays in. So, making changes to $d[0][1] won't affect $a[1]. Similarly, making changes to $b[2] won't affect $d[1][2]. Also, one should note, you have just used twice as much memory by copying the arrays. This is not a big deal unless you have sufficiently large arrays.
So, how do you create a two-dimensional array that references the original array. Nope. It's not:@d=( [\@a], [\@b) ]
That creates an array of array references. I want an array of arrays that are references to the original arrays. Here's how to do that:@d=( \@a, \@b )
Here's some Data::Dumper action of what everything looks like:
For the longest time, I have done this very thing -- Stored Procedures for Java Programmers. I have a rule:
That's a little misleading, though. The essence of the rule is that no SQL should be in any source code. Any and all SQL should be in stored procedures in the DB. Outside code (be it Perl, PHP, Java, etc.) should just call those procedures.
Highlighting some of the finer points in the article:
It doesn't matter to the Java code what the database schema implementation is, because our Java code just calls the procedure. We can change the schema and the procedure later to improve performance, but we won't have to change our Java code.
Stored procedures can help achieve logical separation in your code, which is nearly always a good thing.
The schema can be changed later without affecting the Java objects; when we've finished the application, we can design a good schema.
Via Simon Cozen in this blog entry:
Mmmm.... person enjoying rotary goodness -- Glenn Reynolds and his RX-8
Over at this node on PerlMonks -- Finding Hamiltonian Paths using the Regexp Engine -- Abigail's skills come shining through. But, I am not just highlighting this node for interesting problem and good code; rather, I just learned (or, shall I say, re-remembered) a new Perl-ism.
From SeaBiscuit - The Filthy Critic
[After winning a bet on a horse race] I can buy everyone a round at the Arvada Tavern. Though I'm unlikely to treat those bozos to anything. Instead I'd say, "Bartender, I just won a zillion dollars on a horse called ëLicking Stick! Serve me a shot for every person in here, and let them watch me drink."
Like any good Perl zealot, I keep up on Perl6 development. I read the perl.perl6.language mailing list. I keep up on Piers Cawley's P6P Digests. Any time an Apocalypse, Exegeses, Synopse, or other random Perl6 article (Perl 6 Design Philosophy) crops up, I quickly devour it. And, whilst taking in all of this information, I try to imagine what coding Perl6 will look like.
So, earlier today, I made my way to the local Borders and read the first 45 pages or so of Perl 6 Essentials. What did I glean from this reading? Well, the following is (from what I can tell -- there is no perl6 -c yet) syntactically correct Perl 6:
@a>>~^=<<@b~~%c
Now, if that does not look qualitatively and essentially perl, then I don't know what does. "What does it do?" you may ask.
Well, when I first read all noise - all the time, I was going to talk smack about it (it's what I do, I can't mess with my self-consummated mythos). Then, I read it again; and I was going to make mild fun of it. Then, I read it again; and I nearly wanted to do a line-by-line breakdown. Then, I read it again; and I nearly went after it with a Straw Man. (Shame on me; but few would have noticed -- people love straw man rebuttals.) Then, I read it again; and I started to see something in it. Then, I read it again; and I posted this.
It's kinda long, so I don't necessarily recommend reading it more than once.
The Weblog API flamefest is spilling out everywhere -- webservices.xml.com: A Weblog API For the Grassroots (check out the comments at the end of the article).
(... or, at least, leak no more implementation details than any other method.)
There has been a couple articles concerning URL's (especially pertaining to blogs). The first one, which I already linked to once, URLs week: Principles, and now, this one which discusses "future proofing" URL's -- Future-proof URLs in Movable Type. The idea of "future proofing" is explained in the entry, but basically, it boils down to abstracting away anything that is implementation specific i.e. using database identifiers or file extensions, etc. in the URL of entries (permalinks, mostly).
But, why not use '.html' extensions? What's wrong with them? Why are they so bad?
I did not even know August was elected as the National "Bitch About Windows Month," but apparently, it is -- How to install Windows XP in 5 hours or less.
I wonder where I am on my Windows installation half-life... I remember having to go through the same 147 steps. (Of course, I have about 147 steps to perform to install Debian; so I should not try to sound too anti-MS here.)
The deal comes through.

Not a bad hand; certainly something worthwhile. You toss in three large. Two others follow suit cautiously, and the rest fold. The flop comes down.
Oh, if only I was witty enough to write something this good -- How to Run a Crappy Blog
No Hugging, No Kissing Until I Get an RSS Feed -- it's true. I have, also, become that much of an aggregator snob. I have a really hard time remembering to read sites that don't get slurped up into Bloglines. It's just so damned convenient.
Three reasons why I hate developing on Windows (when I am, occasionally, forced to do so):
C:\> cd /usr/loc[tab]and have become bewildered as to why it did not do what I wanted it to do. I, usually, follow that up with typing
C:\> cd c:/someDir/someSubDirWhich thankfully, works.
C:\>perl -e "print \"hello\n\""versus
user@host% perl -e 'print "hello\n"'
Excellent run-down of what is on tap for PHP5 -- PHP5: Coming Soon to a Webserver Near You.
It's just... just odd -- LITTLE TEENY HANDS (via Tim Bray in Data Potato Doo-wop Doo-wop)
I did not know she was Hungarian. How could I resist now?
Ooh, this one's for a certain programmer I used to work with -- Poor Perl Idioms Explained (except not really)
On the box you are doing development on, do not be a user that has write access to the perl binary. Furthermore, make sure to never execute the following:
root@server% cat some_file > /usr/bin/perl
I feel dumb.