Hmmm...

2003-08-29 2:13PM

Baghdad Burning Hmmm...

More Programming Jargon Surfaces

2003-08-28 6:59PM

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?

Being Able to "Multi-Method" a Hash Reference and a Code Reference

2003-08-28 6:23PM

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.

Using Blogs as Link Filters

2003-08-28 6:11PM

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.

Why Rant Once about Kerberos and Solaris when You Can Do It Twice

2003-08-28 12:17AM

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

2003-08-27 12:19PM

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."

The Infancy of Another Virus Propogation Method

2003-08-26 5:47PM

To "infect" another user's computer, you need to perform to basic, generalized steps as a virus writer/deployer.

  1. Get the executable code onto the victim's computer
  2. Execute the code on the victim's computer

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.

Numbers Applied to the SoBig Virus

2003-08-25 7:29PM

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.

MS Using Linux

2003-08-25 1:47PM

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

How Much Red Meat in How Many Minutes

2003-08-24 3:23AM

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, Kerberos, and Libraries

2003-08-22 2:43PM

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.

Lazy, Unemployed Americans

2003-08-21 6:11PM

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.

CWRU Is Now Case

2003-08-21 5:59PM

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:

Because One Can Never Get Enough Perl Idioms

2003-08-21 5:41PM

Perl Idioms Explained - ${\$obj->method} and @{[sort @list]}

Someone should write an O'Reilly book called Perl Idioms Explained.

How to Subscribe to Slashdot Journal RSS Feeds

2003-08-20 3:07PM

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

(Golf) GoldBach's Conjecture

2003-08-19 8:43PM

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.

Copying Array Versus Array Reference

2003-08-19 2:37PM

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:

Boring Slashdot Easter Egg

2003-08-18 6:07PM

Has anyone else ever seen this -- /. Cheesy Portal

Thou Shalt Not Put SQL In Code

2003-08-14 12:23PM

For the longest time, I have done this very thing -- Stored Procedures for Java Programmers. I have a rule:

Thou shalt not use SQL

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.

Linkage: Perl Committee/Company Humor

2003-08-13 6:59PM

Via Simon Cozen in this blog entry:

Rotary Goodness

2003-08-13 5:53PM

Mmmm.... person enjoying rotary goodness -- Glenn Reynolds and his RX-8

New Perl-ism

2003-08-11 6:41PM

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.

Why I Enjoy Reading the Filthy Critic

2003-08-11 6:31PM

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."

Proof Positive: Perl6 Will Definitely Look Like Perl

2003-08-11 12:29AM

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.

Mighty Morphin' Opinion

2003-08-06 5:53PM

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.

Weblog API Flamefest Spillage

2003-08-06 2:13PM

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).

File Extensions on Blog Entries Do not Leak Implementation Details

2003-08-05 5:43PM

(... 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 Am Not the Only One Participating In "Bitch-About-Windows-Month"

2003-08-04 6:19PM

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.)

Gambling

2003-08-04 6:11PM

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.

How to Run a Crappy Blog

2003-08-04 4:53PM

Oh, if only I was witty enough to write something this good -- How to Run a Crappy Blog

Without RSS, It Falls Off My Radar

2003-08-04 1:03PM

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.

Just Some MS Bashing

2003-08-03 8:57PM

Three reasons why I hate developing on Windows (when I am, occasionally, forced to do so):

PHP5 Preview

2003-08-03 8:13PM

Excellent run-down of what is on tap for PHP5 -- PHP5: Coming Soon to a Webserver Near You.

I Don't Know

2003-08-03 2:57PM

It's just... just odd -- LITTLE TEENY HANDS (via Tim Bray in Data Potato Doo-wop Doo-wop)

Ooooh... She's Hungarian

2003-08-02 3:11AM

I did not know she was Hungarian. How could I resist now?

Sweet, soft Hungarian devil

URL Rules

2003-08-01 5:27PM

I concur, and I obey -- URLs week: Principles.

Nested Ternaries

2003-08-01 5:23PM

Ooh, this one's for a certain programmer I used to work with -- Poor Perl Idioms Explained (except not really)

Word to the Wise

2003-08-01 1:43PM

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.