Bad Music Justification

2007-01-12 5:13AM

Trope:

I occasionally read a... newspaper article where a man... owns up to the “guilty pleasures” on his iPod... The structure of [his] argument:

  1. I, the author, am an extraordinarily intelligent and cool person;
  2. But I do listen to music that is considered to be shit;
  3. However, this music (pick one):
    1. is actually good, and you, dear reader, are too much of a snob too enjoy it; or
    2. is not actually good, but despite my impeccable taste I deign to listen to it for amusement.
  4. In either case I am awesome.

Over and over I read myself into a froth, sketching a mental picture of the essayist as a scruffy fucksimper who suffers from chronic index-finger-swelling brought on by speed-dialing through all the music he shat onto his 500G jizz-hued iPod. After he gmails his guilty-pleasure opus to his editbot, who will rewrite it into a charticle...

Let that be known as the first good writing to have appeared on a weblog in 2007.

And, as I elected myself judge and jury on that ruling, I will now go and listen to I'm Bringin' Sexy Back 17 times in a row and resist finding it catchy.

Instead of Google

2006-11-13 12:23PM

As I was reading this recent O'Reilly Radar article Thoughts on the State of Search, it suddenly dawned on me that my use of Google has declined in the past 3-6 months by about 20-33%.

What has replaced it? del.icio.us.

For example, I was recently searching for some SNES ROMs (obviously, only for games I already legally own). Using Google to search for ROMs leads to a lot of spammy deadends. But, combinations of http://del.icio.us/tag/ and http://del.icio.us/popular/ got me where I wanted to go. For example:

I did a similar thing when I was looking for different XSL engines for Apache (simple engines that would take some XML, apply an XSLT to it, and spit out the results). I wanted to poke at a couple. Googling for Apache XSL engines turned up a lot of "noisy" results that I didn't want to have to wade through. http://del.icio.us/tag/apache+xsl had just the stuff I was looking for.

Ovid's Recommendation

2006-11-09 10:53PM

Ovid is looking for a contact at Yahoo! so he can recommend someone. I know, at some points, jr and Zawodny visited this site. So if I can help gather either of their eyeballs, I'm happy to help.

Ubuntu Blogs

2006-09-12 2:57AM

Are there any good Ubuntu blogs I should be following in the same vein as macosxhints.com?

Lazy Web, SPEAK!

Creating Embeddable Flash Movie Screencasts on OS X

2006-09-06 10:23PM

This is, honestly, the only way I could get this to work. If anyone has a better way, do tell.

First, I use iShowU to capture the audio and screen. This will save it as a Quicktime .mov ("h.264" ← whatever that means).

Then, I use iMovie to convert the .mov to an .avi. Why? Because ffmpegx chokes on the .mov file. Doing this in iMovie is non-trivial. You open iMovie. Drag the .mov file produced by iShowU onto its window. It will then spend anywhere from 30 minutes to 4 days "importing" the movie before crashing. After it crashes, repeat the process and pray.

Once you have the video in iMovie's clutches, you can export it as an .avi. Go to "File → Export", select "Quicktime" from the top menu, in the selection box for "Compression" choose "Expert Settings" and then hit the "Share" button. Another window will popup. Choose "Export" to "Movie to AVI" (hit the additional "Options" button if you've been trained for 4 years in A/V codec voodoo).

iMovie will do a great job in taking the ~35MB .mov file and producing a >500MB .avi file.

Once you have an .avi file, use ffmpegx to convert the movie to a .flv file. (Make sure to follow the installation instructions when installing ffmpegx.) Then, to convert it from .avi to .flv, follow the instructions at http://ffmpegx.com/flv.html.

Once you have a .flv, you will need an SWF wrapper. This one is good -- http://www.jeroenwijering.com/upload/flash_flv_player.zip.

To piece everything together, create a new folder "foo". Take the newly minted .flv file and put it in the folder. Take the flvplayer.swf file from the flash_flv_player.zip and put it in the "foo" folder. Create an "index.html" page in the "foo" folder. It's contents should look something like:

<html>
<head>
<title>Test FLV</title>
</head>
<body>

<object type="application/x-shockwave-flash" width="xxx" height="xxx" 
	wmode="transparent" data="flvplayer.swf?file=test.flv">
	<param name="movie" value="flvplayer.swf?file=test.flv" />
	<param name="wmode" value="transparent" />
<object/>

</body>
</html>

Again, if anyone knows of an easier way to do this, I am all ears.

Open Sourcing OSX Apps (Already Got 'em)

2006-06-22 3:13AM

I don't have anything intelligent to add to the discourse of Why Apple Won't Open Source Its Apps. I did just switch to Apple from a Windows laptop (where I primarily used open sources applications... well... besides the operating system). After getting the Macbook Pro, I immersed myself with Safari/Mail/iCal/iChat. I used Firefox. It was slow. I used Camino. It was much better. I used Thunderbird/GCalendar/Adium.

I've settled on using Camino/Thunderbird/Adium/GCalendar.

It would make no difference to me, as a Mac user, if Apple released Safari/Mail/iCal/iChat as open source.

Well, it would make a difference if after open sourcing these items they suddenly became way better; and tons of people wrote blog entries and articles about it and enticed me to switch back. But, right now, I prefer the open source alternatives (I doubt I am the only one). I just need a nice GUI and "just works" hardware/software that wraps around an xterm and the open source "productivity" apps I use.

OSX/Apple-hardware-and-quality is just my shell to a terminal window and open source software. I have no idea how that plays out in the ideas of Apple open sourcing some of their software; I'm just saying that this is how I am using it. It makes no difference to me what Apple does with the source code to their "productivity" software.

Bloglines Updates Atom Support

2006-06-21 12:59PM

Bloglines speaks!:

As we continue to develop new features, small and large, we also make necessary improvements to existing systems. Expanding our support for the Atom 1.0 syndication standard is the latest of these. You may notice duplicate posts coming from atom feeds as we make the switch from the old to the new atom parser. But have no fear, these duplicates will fade away and soon be a distant memory.

I can confirm that their handling of relative links and xml:base is fixed (my Tim Bray feed finally works). They're still getting tripped up on atom/entry/title and atom/entry/source/title (it seems that whichever one comes last in an atom/entry wins). Sam Ruby is tracking a couple more nits in Forward Motion!.

It's nice to see Bloglines back responding to people. Hopefully, they continue to do so. For an app that started from grassroots bloggers, it sure did clam up once Ask.com bought 'em. I thought it was going to get worse when I heard that Mark Fletcher left, but on the contrary, it seems to have gotten better. I was even able to find a blog of one of their workers – Paul's Journal – though he doesn't seem to talk about his $job too much.

Cheers, Bloglines, you may win me over again, yet.

Brand New Hotness

2006-06-16 1:41PM

Apparently, I didn't get the memo not to use macs anymore.

jeremys_macbook_pro_closed.jpg

jeremys_macbook_pro_open.jpg

Everyone should have two laptops.

jeremys_two_laptops.jpg

Ten Dollars for Tag Clouds

2006-06-08 11:31PM

$10 to get a downloadable O'Reilly "booklet" on Building Tag Clouds in Perl and PHP? Seriously? Is there an army of developers desperately seeking to make "tag clouds" out of weighted lists but can't figure out how to do it? If I didn't know better, I would think that they are trying to punk 37signals.

I haven't read it. Looking at the large cover image, it seems they managed to get 46+ pages of content on the topic of "tag clouds" (maybe they used those old high school paper tricks such as bigger fonts and bigger line spacing). So, it could be that it is filled with useful insight into all things tag cloud-ish; but I'll never know...

Update

It seems that O'Reilly has a section with about a dozen or so of these downloadable PDFs ranging in price from $5 to $10. I had never seen that before. (I still stand by my initial reaction when seeing the price tag for this one, though.)

Acura is the New "Old" BMW

2006-04-24 10:59PM

If you don't care about pretentiousness and how-will-this-brand-impress-my-golfing-buddies, this is true – Acura has been producing the best "BMWs" on the road.
Oh how I wish for the E31-chassis and the like... thank god for Acura.

The Dragon Tail

2006-04-20 8:51PM

Here is what The Dragon Tail looks like from a satellite.

One of these days I am going to make it down there so I can drive on that road.

1999 Miata 5-speed Gear Ratios

2006-04-15 5:05PM

I find myself always looking these numbers up. I'll put them here so I don't lose them.

GearRatiox
1st3.13613.485
2nd1.8888.118
3rd1.3305.719
4th1.0004.300
5th0.8143.500
Final Drive4.300

My Correspondance with One Lincoln D. Stein

2006-03-30 10:59PM

I think anyone who has worked in the software development field has probably gone through the "it must be a bug in the compiler/library" phase. The phase where your code isn't doing what it is supposed to be doing and you look at it and look at it and tweak it and tweak it, and finally you deduce, "the problem is that there's a bug in PHP" or "this is obviously DBI.pm acting up." You send an email to a list or post to a forum including your code that reproduces the bug only to learn that it is, actually, your own shoddy code. After doing this a dozen or so times, you finally reach the stage of humility where you know that there's something in your code doing something wrong. It's a growing pain. A nice lesson to learn — keep your hubris in check, take a break from the code, come back with a fresh mind, and take a clean stab at the problem before going off and declaring that there's a regex parsing bug in the perl binary.

Having learned that lesson, many moons ago, about two and a half years ago I was working on a small web app. I can't really remember what it was, but that isn't the important part of the story. I was working on a web app, and I kept getting bitten by some bug. I started believing that it was a bug in CGI.pm. But I knew better than that. Something as widely deployed and as widely used as CGI.pm isn't going to have a bug. Chances are, the bug was mine. So I took a break, smoked a cigarette, came back, and toyed with the code some more. No luck. I took another break. I came back, deleted the entire section of code, and started coding again. Same weirdness.

I started getting suspicious. I cracked open the source to CGI.pm and started digging. I know what you're thinking. This story is a harkening back to a glory day where I found a bug in CGI.pm. Well, it isn't. Well, it kinda is. Sorta. You see, the original bug I was looking for turned out to be my own shoddy coding. But I did find another bug.

Now, I had been coding Perl for the better part of 4 years at that point. I had risen from newbie to Pretty Darned Good, but I still wasn't completely sure. The offending section of code is as follows:

my(@pairs) = split("; ?",$raw_cookie);
foreach (@pairs) {
s/\s*(.*?)\s*/$1/;
.
.
.

It was in CGI::Cookie. To gain reassurance, I made the following post to PerlMonksWeird Regex in CGI::Cookie.

Everyone agreed; even the venerable Abigail agreed with me that it was a bug. Reassured by the community, I sent an email to Lincoln Stein. Yes, that Lincoln Stein, the author of many a perl module including CGI.pm. I was very humble in the email. I offered a patch. I posted the link back to the PerlMonks forum. I deferred to his guidance. But I knew that this was definitely a bug.

I was very uplifted after I sent out the email. It was my first major contribution back to Perl and to the open source community.

The email I got back, though, was not "uplifting." I couldn't find it in my email archive. I wish I could because the harshness would be better represented by direct quoting, but it went something like:

I don't know who you are. And I don't trust or accept random patches from people to code that runs in the wild with no reported problems in years and thousands of installations.

It was extraordinarily condescending. And it was quite a blow to my ego. For nearly two years, I never sent in another patch to any open source projects. I would find them from time to time. I would generate test cases that could reproduce them. I would code patches that would solve the test cases. I would get all ready to send an email with all of the appropriate material. But I wouldn't send them. I would remember Lincoln Stein.

The piece of code is still there in CGI::Cookie down there on line 56 of the source. So I guess it was never that big of a deal, but it made me never want to contribute. I eventually got over it and all. But I still remember it. I was reminded of it reading Sam Ruby's entry Cultivating a Community.

In hindsight, I understand Lincoln Stein's reservations; and they were well placed. He should have asked me for running code that ran into a problem. He should of asked me for test cases. But that's not what he did. He scared me away from contributing back to open source projects for a couple of years. Communities are important in open source endeavors. And most of the time, they are run by well-meaning, well-spoken, and nice, charasmatic individuals. If you happen to be a prominent figure in one, please strive to continue to be that way.

Blog Ambivalence and Why Spammers are Neo

2006-03-21 3:53PM

Taking a page from Dare:

Blogs Make Me Happy

Because the customers you dick over make you accountable for it.

Blogs Make Me Sad

Spammers.

And the spammers got me thinking. It seems that all successful tech ecosystems have to be susceptible to being gamed. Maybe there's a mathematical proof for it because it holds true time and time again. The original system must organically evolve to try and reduce the spam and preserve its original purpose. But as the spam keeps growing, eventually the system must change in a revolutionary manner and be reborn. It's usually reborn carrying some mistakes of the old system with it but changing enough that makes "gaming it" an entirely new endeavor. But the spamming eventually reoccurs.

What I'm saying is that it's the freakin' Matrix, man. And the spammers... the spammers are fuckin' Neo.

And, no, that revelation wasn't drug induced. It just sounds a helluva lot like it was.

I Don't Want Your Mega-Appliance

2006-03-20 2:53AM

Less Phone

The thing is, I’d be sick of the latest smartphone in a couple of weeks (and I’m not the only one). The day I’d get it I’d load a whole bunch of software on it. Show friends how I could IM on it or pull up a mini terminal window and make some changes on our server over the phone. But after a few weeks I just found myself using it as a phone. And smartphones are usually too bulky and clumsy for that.

I convinced myself I needed a smartphone when I really didn’t. What I really needed was Less Phone. A phone that made calls, picked up a strong signal, supported simple text messaging, and offered a dead simple calendar.

Yes. Small pieces loosely joined. It's not just for the Internet; it's for me, too. I want a phone that is a phone. I want a camera that is a camera. I want an MP3 player that is an MP3 player. I want a PDA that is... well... actually, I don't want one of those. Had it. Useless. No productivity gains. Moving on. I want a car that is a car. Would I would like them to all work together? Seamlessly? Sure. But I don't want something that sits in my pocket constantly invoking jokes of "so, are you happy to see me or is that a.... in your pocket?"

Oh, Bloglines...

2006-02-21 3:31PM

Google Reader: fixed. NewsGator Online: fixed. Bloglines: strongly not recommended to my friends and family anymore.

I've exchange a half-dozen emails with Bloglines technical support concerning their parsing issues. Each time they have given me courteous responses about how the issue has been sent off and assigned to an engineer who will investigate the problem and fix it.

I thought everything was to be all good.

However, the meat of the correspondances happened back in November 2005 and January. The issues are still there. I went and tried out Rojo and Google Reader because it was time to abandon the Bloglines ship. But both of those suffered interface problems. (Not problems with their service; rather, I much prefer the Bloglines UI to their own.)

Maybe I'll try them out again though. Oh, Bloglines, we had a really great run together (Found A Web Base RSS Aggregator -- Bloglines, Bloglines (Again) -- Now That's What I Am Talking About, This I Know: Bloglines Rocks). At most points, I would have been willing to pay for your service. But your lack of updates to your parsing issues has me concerned. And I know (from other people's blog posts on exactly this subject) that I am not the only one bringing it to your attention.

Update:

They've turned it around.

Thou Shalt Not Parse XHTML with an HTML Parser

2005-11-19 2:11PM

XHTML advocates considered erroneous

Here is a story for you. You are one of those people who does not care about this shit. You use XHTML 1.1 and think it is all nice and dandy. The website you created displays beautifully cross browser and you got some Google points through fan boys.

Ooh... okay, I admit it, I'm a moron. I shall mend my ways.

MySQL's Blackhole

2005-11-11 2:13AM

Read about this new feature in MySQL 5.0 – The BLACKHOLE Storage Engine – and tell me what was the point at which you were reading it when you finally went "ohhhhh, that's what it's for."

I sat there reading the paragraph:

The BLACKHOLE storage engine acts as a “black hole” that accepts data but throws it away and does not store it. Retrievals always return the empty set:

And I was thinking to myself, "WTF?" It finally dawned on me in the 4th paragraph as to why it would be useful.

(Feature found via Zawodny.)

Yahoo Maps: Lakewood, OH Hotspots

2005-11-04 12:19PM

Yahoo Maps Results for "Hotspots" in Lakewood, OH. Nice results! Turned up some I didn't even know about. The only pain in the ass, though, was finding a way to generate a link to the map. Had to end up using the "email this map to a friend" feature and sent it as an email to myself.

Human Readable Date in Atom

2005-08-11 9:59PM

Is there a way to include a human readable date in an Atom <entry>? I was hoping I could use the Dublin Core <dc:date> element, but the Feed Validator chokes. Apparently, <dc:date> must adhere to the W3C Date and Time Format i.e. 2002-10-02T10:00:00-05:00.

So, if someone wants to include a human readable date, what is one to do? Are there other metadata specifications I can leverage? Is there something I missed in the Atom Specification that allows one to do something like this?

ToRead List: Ontology

2005-08-10 4:59PM

Kicking and Screaming

2005-07-14 4:43PM
There is no use for RSS/Atom outside of weblogs.
Machine parseable versions of information on web sites have no useful deliverables.

Sometimes, I talk to people who get it. I can tell right away. Then, there are the people (in the tech industry) who mouth off quotes like that above. I feel bad for them (because, you know, I am such an empathetic person and all). They go off, usually happily reinventing wheels, firmly believing that they do get it; they just get it so well that they have foreseen that it is not useful.

One day, they will be dragged kicking and screaming towards the better practices. And, it's never really satisfying when that happens; because you've already moved on.

Podcasting + iTunes +del.icio.us: It's a Beautiful Thing

2005-07-01 4:29PM
del.icio.us/tag/system:filetype:mp3+programming
del.icio.us/tag/system:filetype:mp3+perl
del.icio.us/tag/system:filetype:mp3+ruby

This is the greatest thing since peanut butter.

Interview with the Author of Deploying OpenLDAP

2005-06-20 6:37PM

There are a lot of gems in this interview with the author of "Deploying OpenLDAP". I'll pick one out:

When I walk into companies that want to deploy LDAP, they usually want it for two reasons. A small company is often short sighted and wants to use LDAP as a phone book. That's it. They just want a web server with an LDAP back end that can be used to pop up extensions. I try to push them in the right direction and say that they should take some time to design a system that can be integrated with other applications. They usually bite.

Others want LDAP for single sign on. That's just a big buzzword with multiple meanings. They look at LDAP and SSO as the same thing and think it will be a magical solution to everything.

I try to convince people to deploy it for some small application, make it known that LDAP now exists in their company, and watch all their departments jump over each other to try to get access to it. There's so much out there that integrates with LDAP at all levels.

I find it easy to justify the deployment/use of a directory server by appealing to principles the target audience can already relate to. It goes something like:

"Having duplicate account and identity management systems rather than just a singular directory instance is like:"

For database people
Having redundant data in your database.
For programmers
Having redundant code.
For managers/administrators
Having your employees constantly reinventing the same frameworks and not being, at all, cost or time effective.

Playing with Interesting Interpretations of the Wiki Philosophy

2005-05-25 2:47PM

More things I need to play with:

What can I say, I am a sucker for animated little post-it thingies. Plus, I'll finally have a use for that damn USB drive.

Is There a PHP Library for Parsing HTML?

2005-05-07 8:05PM

Is there a PHP library that can parse HTML? For some reason, I cannot find a definitive one. Something like HTML::Parser for Perl or htmllib.py for Python.

I am having a hard time believing that one does not exist. I am assuming that my google-fu just isn't up to par to find it.

Misuses of GET

2005-05-06 4:59PM

This is why you use the HTTP verbs correctly.
People who (mis|ab)use GET get what they deserve.
People who don't know when to use GET and when to use another one of the HTTP verbs should read this.

[Update: Also, read I'm sorry, I can't kiss it and make it better. I tell that same thing to people who don't use a Directory Server for managing user accounts, authentication, and authorization. Time and time again, the response back is, "I can just use a simple MySQL table [or some such other thing] and be just fine." Time and time again, at some point in the near future, I see them bitten by all the problems a Directory Server would have solved for them.

Use standards.
Do the work up front that will save you work in the future.
YAGNI doesn't mean "Don't Do It Right the First Time Around."
]

Uninteresting Programming

2005-04-05 5:41PM

Someone (not naming names or linking or picking on people here) recently told me that programming wasn't interesting. It's not where the buzz is at in technology. It has floundered never to be resuscitated from the bit decay it has undergone. Programming's not sexy. (Well, I don't think anyone would actually argue that programming is sexy.)

To pontificate, he cited Ruby as the only remotely interesting thing that has happened in the field of programming. But, even then, he had no plans on using it or installing it on any server under his control.

I think he and I think about the concept of "programming" differently. I suppose he considers programming to be syntactically centered. Programming consists of some variable declarations, some conditionals, a couple of looping constructs, and the addition of some OO aspects to taste.

I don't think of programming as syntax. I think of APIs, and application frameworks. I look at CPAN, and I think it is great, but I think it could also get far better. I think of parrot and the possibility of all of CPAN running on it in such a way that I can call WWW::Mechanize from Python (or PHP or Ruby).

I think of REST when I think of programming. I think of interesting Javascript trickeries and new frameworks.

What got me thinking about this just now was reading Allison Randal's journal entry, Gooze and beyond, where she states:

I've wondered for a while if the future of programming languages is away from monolingualism and toward polylingualism. That is, instead of one language to do everything, we'll have a whole bunch of domain-specific languages. Each can have a clean and simple syntax to solve a specific set of problems because it's only trying to solve that set of problems. Of course, people will need some way to get these languages to work together. When you have a video processing language, a number crunching language, a physics simulation language, and a VR interface language, you'll ultimately want to tie them together to build your game.

Perhaps one future purpose of Perl (on Parrot) is in fact the same as its original purpose: the glue language. But now the glue language for languages.

This reminds me of something Paul Graham talked about in The Hundred-Year Language. That, in the future, we will use application-specific languages everywhere. We will design a new language that is specific to the problem(s) at hand. That we will use a meta-language to create the actual language we use to solve the problem(s). And, to some extent, that's nearly what I do now.

I think there's a lot of interesting stuff going on in "Programming." But, I think of "Programming" the same way I would think about building my own house. I would love to build my own house — from conception to planning to architecture to electrical routing to a finished product. I consider all the aspects to be inclusive. Sure, a hammer isn't interesting; but building a house is. I don't think of "Programming" as the hammer; I think of it as the entire process.

Update: brian d foy responds with some thoughts:

I say that programming is not meant to be interesting: it's what you do with it that counts… So, let's make it personal. It's not the passive "programming is boring", it's "I'm bored with programming". For a lot of people, programming is not the point, and it doesn't have to be the source of passion.

Anything Interesting Yet?

2005-03-01 2:03PM

One day, someone will do something interesting with all of these web services. Thus far, Amazon Light is the only one worth a darn. Or, have none of the interesting one's popped up on my radar yet?

Note: I am not including so-called new wave social services' web services like flickr/mappr or del.icio.us/extisp.icio.us.

First Apache

2005-02-27 6:11PM

From the history of hyperreal, the first Apache-served website:

in july of 1994, brian bought his own pc so he could move all the content off of the stanford site and have more control over the servers. it was also simultaneously a home for a new project he was involved in: a set of patches for the ncsa http server ('a patchy web server' ...get it?) the pc, a pentium 90, went under his desk at wired, was hooked up to their lan and was given a public ip address. he chose a domain name for it in honor one of his favorite techno tracks at the time: 'hyperreal' by the shamen. (specifically, the jack dangers remix of that song). the machine name, taz, was a reference to hakim bey's entry on every cyberpunk's essential reading list: 'T.A.Z. - the Temporary Autonomous Zone, Ontological Anarchy, Poetic Terrorism'.

Happy birthday, Apache!

Personal Use NAS

2005-02-22 6:23PM

I need a file server: something simple, running Samba, that I can throw files into. 200GB would be enough... for now, but I being expandable to a terabyte would be nice. Does anyone make a NAS device targetted for at home use?

Is my best bet to throw up a headless Linux box stuffed with some 200GB drives?

Yea, I could have googled this... or, I can just post it on my blog.

Filangy Invite

2005-02-20 12:41PM

A couple days ago, I asked for an invite to Filangy, a search tool that — as far as I can tell, thus far — allows one to perform searches over web pages they have viewed. Sounded interesting, and I wanted to play with it. But, alas, I had no invite.

Well, I received an invite from a Mr. Chirag Chaman, CEO of Filangy. This is a hearty thanks for the invite. I've gone as far as installing the toolbar (works with Firefox, by the way). Now, I am off to play with it some more.

What Does Perl Mean to You

2005-02-17 10:29PM

I'll bite. What does Perl mean to you?

How does Perl help you in your daily work?

We run several large systems at work that are written primarily in perl including Sympa, SpamAssassin, Movable Type. The metadirectory/provisioning-system that keeps our identity management infrastructure glued together and humming along was custom written in Perl. We have plenty of CGIs and glue scripts that are in Perl. Perl gets stuff done.

How could it help you better?

Get cpan.org and perldoc.com on stable (and faster) servers. CPAN is nice, but it has come time for something revolutionary to promote the good modules from the cruft. No voting systems. No 5 star ratings. No RT. Something revolutionary; as revolutionary as CPAN was in the first place.

Oh, yea, and could you make CPAN.pm use an external configuration file? I have problems with NFS-mounted home drives + NFS mounted drive of the perl binaries and CPAN modules; and it would be really nice if I could use a different configuration for when I am on Solaris boxes versus Linux.

If Perl is helping you, are there ways you could help Perl and other users of Perl?

Yes.    ...</snarky>

After You Write "Hello, World"

2005-02-11 11:53AM

This article rings true, Beyond Hello World, but it is the following quote that I found humorous and painfully accurate:

In Perl, much to the chagrin of the community, application #2 is a template language, which is why a CPAN search for 'template' turns up 2217 results... In PHP rather then building something so mundane as a template library, many people's #2 app is a CMS. Which is why "PHP" is synonymous with "bad CMS" in many people's minds, as novices tackle again and again the complex CMS problem.

I can't even begin to tell you how many homegrown mini-CMSs I have encountered. And, each time you try to take the users away from them and into a, albeit better, different environment; their interia always causes them to have to be pulled from it kicking and screaming.

The world is saturated with CMSs.

The 3 Stages of the Internet

2005-02-10 2:43PM

Throughout this post, I will be using the term "Internet" to refer to the World Wide Web. "Internet" has a better ring to it.

First, there was no Internet. This is Stage 0 (as it is Stage 0, it will not be counted). It was a horrid time. I can't seem to remember how people found phone numbers or directions or encyclopedic information or news or congregated with like-minded individuals on common sets of interest or, even, coordinated a night out. Frankly, I don't like to think about it.

Then... then, there was the Internet. And, it was glorious. You could sit down at a computer and access the wealth of information (and a bunch of geocities.com web sites).

Stage 2. Wireless Internet. The Internet was good, but you still had to sit down at a computer to access it. That was before wireless. Now, the Internet is all around us. The world is my connection. I no longer have to tether myself to anything to access the Internet. Right now, for example, I am sitting on my couch writing this blog entry with the Internet flowing around me and into my laptop. Nowadays, I won't even go to coffee shops and the like if they don't offer freely available and ubiquitous wireless Internet. I scoff at airports that don't offer wireless. University campuses that don't have wireless... luddites.

But, the Internet could do one better; it had one more trick up its sleeves. News aggregator software and RSS. Even with the power of wireless where I could access the Internet from anywhere, I still had to go to those web sites. Slashdot. Perl Monks. O'Reilly Network. OSNews. OSDir. Etc. There was probably over 50 web sites I regularly tracked. It was a hassle to collect all those bookmarks and remember to visit them and check to see if there was new content. Well, that happens no more. The Internet now comes to me! I track 150-170 web sites via my news aggregator, Bloglines (you can see the sites I track at http://www.bloglines.com/public/jms18); and it could not be better. This stage, Stage 3 of the Internet, has changed the way I use the Internet — even moreso than wireless changed it. I cannot be more of a proponent of news aggregator software. You will wonder how you ever used the Internet beforehand.

Bloglines isn't the only news aggregator software out there. There's a lot of them, and I have heard good things about NetNewsWire (Mac Only), NewsMonster, FeedDemon, AmphetaDesk, and NewsGator (requires Outlook).

In summary, in conclusion, and as a final note, give news aggregator software a try.

Cell Phones will be Primary Music Players?

2005-02-09 4:53PM

It's an interesting article, The iPod End Game. But, the following quote:

the cellphone is the going to be the primary music player of most people within a few years

I am not sure if I buy that. It's very rare that an all-in-one tool is successful. I can't imagine wanting to play music on my cell phone. What would happen when someone calls me? If I have my iPod-phone hooked up to my friends stereo, does that mean, to answer it, I have to turn off the music?

I guess I wouldn't mind if my cell phone was capable of storing music or even playing music. I just don't see it becoming everyone's primary portable music player.

No, Mazda, Don't Do It

2005-01-31 7:53PM

Mazda says it will increase efforts to fine tune vehicles to U.S. preferences

NOOOOOOOOOO!!!!!!!!!!!!

Mazda, here, sit down. I need to talk to you about something. No, really, we have to talk. I need to tell you about us over here in the States. It's not that we are "dumb," per se. It's just that most of us have different requirements in the cars we buy compared to other sectors of the world.

We have long places to drive; and our environmental conditions vary from the cold-struck North to sunny Florida and rainy Oregon. And, you know, things like heated seats and auto-dimming mirrors, and whats-thats and gizzets and whirly-thingamajiggers and etc. — they all have demand. We do require versatile cars that we can pack in our 2 kids, some groceries, an overnight bag for the wife, and still be able to pleasantly drink our Big Gulp's while barreling down the highway talking on our cell phones. We need these things. They are part of our lives.

That does not mean that you should do it. It's not your identity, Mazda. That's not what you are about. There is room in the market for you. Please keep all of you cars sports inspired. You do not need to make 3400lbs. cars that include a dry cleaning service in the back seat and room for 3 golf bags.

Mazda... Mazda... Mazda. Please, just don't do it.

Have you ridden in a BMW lately? Remember when BMW was driver-centric? No cup holders (or, at least, impossible to use cup holders). Rigid race-inspired chassis and suspension (remember the famous E31 and E36 chassis of the 90s). Pure drivers' cars. But, have you been in one recently? I have. The suspension feels mushier than my dad's Cadillac STS.

And, there's nothing wrong with that, Mazda. Pleasant rides that aren't jarring are nice. That's the route BMW took with their base cars.

But, that's not for you.

No no no, that's not for you.

Please, Mazda. You are the last car company for a person like me. A person who eschews most of these amenities because I just want to be a driver on the road. I don't mind tire noise. I don't mind the hum of an engine. I sit rigid in my seat. And, while I enjoy all of those creature comforts in other people's cars (furthmore, I would feel more comfortable knowing that every other car in the world had TCS and ASM installed... all except my car, of course); I need to know that there is, at least, one car company out there for me.

I am not the only one. (Via Autoblog)

Precendence for feed Pseudo-Protocol

2005-01-28 8:31PM

The feed:// scheme

I do not like this ugly hack as I have mentioned this before. But, it just struck me; we already have something in place for anchor tags that is meant for a person's client to interpret outside of a browser. jeremy.smith@gmail.com

<a href="mailto:jeremy.smith@gmail.com">jeremy.smith@gmail.com</a>

I realize it may be splitting hairs here to try and decide between:

<a href="feed://alpha-geek.com/rss20.xml"...

And:

<a href="feed:alpha-geek.com/rss20.xml"...

But, c'mon, at least one has set some kind of precendence.

Movable Type Plugin: MostActiveEntries v0.1

2005-01-20 5:39PM

Overview

MostActiveEntries is a Movable Type plugin that will create a container tag of entries that have been the most active (in terms of Trackbacks and comments) in a given period of time. Both the period of time and the number of entries referenced are configurable. By default, it will look for the 7 most active entries from the last week. Common usage would be:

<h1>Most Active Recent Entries</h1>
<ul>
<MTMostActiveEntries>
    <li><a href="<$MTEntryPermalink$>" title="<$MTEntryTitle$>"><$MTEntryTitle$></a>
    on <a href="<$MTBlogURL$>" title="<$MTBlogName$>"><$MTBlogName$></a><br />
    <$MTEntryCommentCount$> comment(s) and <$MTEntryTrackbackCount$> trackback(s)</li>
</MTMostActiveEntries>
</ul>

The source code for v0.1 is available at http://alpha-geek.com/mostactiveentries/mostActiveEntries-0.1.txt. The latest source code will always be available at http://alpha-geek.com/mostactiveentries/mostActiveEntries.txt.

Installation

Download the source code and place the mostActiveEntries.pl file in your installation of Movable Type's plugins directory.

Use

By default, MostActiveEntries will contain the 7 most active entries of the last week. This can be configured using the days or lastn attributes. Setting the days attribute can shorten or extend how far back the plugin will go to gather the entries. So, for example, if you set days to "3", it will display the 7 most active entries (assuming that there are, indeed, 7 entries posted in the last 3 days) in the last 3 days. Similarly, you can set days to "28" to get the 7 most active entries in the last 4 weeks.

Additionally, you can set the lastn attribute to configure the number of entries to gather. By default, MostActiveEntries gathers 7 entries; but that can be extended or shortened.

You can use both tags together to get, for example, the 19 most active entries in the past 37 days:

<MTMostActiveEntries lastn="19" days="37">
.
.
.
</MTMostActiveEntries>

Copyright and License

This source code is copyright Jeremy Smith (jeremy.smith@gmail.com), 2005. And, is released under the MIT License, which basically says, "do whatever you want with this code just don't come crying to me if it is broken or breaks something."

I've Seen This Before, I Think

2005-01-05 4:31AM

There's something here, and I can't help but feel there's a connection to something and, possibly, something else. But, then again, it could all be déjà vu.

Pillow Humping

2004-12-23 7:59PM

Install Crypt::IDEA on Solaris 8 isn't the most exciting blog entry in the world, and I would imagine, most people don't get past the first sentence or even the title before moving on in their aggregators or hitting another bookmarked URL. But, I get a warm fuzzy feeling down in my gulliwuts when I think of that poor chap wrestling with this same problem, googling to no avail as the only results returned are in Russian or Turkish with the only English phrases intermixed with the hieroglyphics are those that he kept seeing over and over again in his X window.

parse error before "idea_cblock"
parse error before "idea_cblock"
parse error before "idea_cblock"
parse error before "idea_cblock"
parse error before "idea_cblock"
parse error before "idea_cblock"

Well, I am here for you, fella:
http://www.google.com/search?q=%22parse+error+before+idea_cblock%22&btnI=I'm+Feeling+Lucky

And, speaking of those googlers that would find themselves at alpha-geek.com, I miss those wayward souls desperately looking for information on "pillow humping." You see, many moons ago, the front page of alpha-geek.com was a mini-aggregator/funny-ha-ha-ha page of myself and some of my friends who began experimenting with this weblog-doodad-stuff. On that page was the phrase "pillow humping." And, for several straight months, according to my logs, it was the top search phrase that brought people to the site. I was concerned for these people. What were they looking for? Were they confused 14 year old boys looking for tips? Worried dog owners whose pets had an unnatural affinity for the objects on the sofa? Bored middle-aged couples whose expirementations have taken a turn for the featherful?

But, the pages of alpha-geek.com have gone through many iterations; and the term no longer appears. I miss those people, though. I want them to come back. I want to help them out, but I just don't happen to be a well of information on the subject.

Regardless, welcome back Pillow Humpers! I don't have anything useful for you here but please know I wish you luck on your endeavors.

Sometimes It's About Integration, Not Innovation

2004-12-23 1:31AM

Apparently, Rojo is an aggregator, social networking tool, photo sharing application, and bookmark manager.

Why do some services have this tendency to always try to be everything? Why can't they just do one thing and do it really well? And, to supplement their offerings, provide easy to use integration spots for the other services that specialize in doing one thing well?

Sometimes it's more about integration than innovation.

Install Crypt::IDEA on Solaris 8

2004-12-14 5:59PM

Banged my head for a while on this. Here are the changes that need to be made to install Crypt::IDEA onto a Solaris 8 box. You will know that you need to make these changes if you begin running into any combination of the following two errors:

In file included from IDEA.xs:10:
idea.h:5: error: parse error before "idea_cblock"
idea.h:5: warning: data definition has no type or storage class
idea.h:6: error: parse error before "idea_user_key"
idea.h:6: warning: data definition has no type or storage class
idea.h:7: error: parse error before "idea_ks"
idea.h:7: warning: data definition has no type or storage class
idea.h:9: error: parse error before "in"
idea.h:10: error: parse error before "key"
idea.h:11: error: parse error before "userKey"
IDEA.xs: In function `XS_Crypt__IDEA_expand_key':
.
.
.

And/or:

Please specify prototyping behavior for IDEA.xs (see perlxs manual)
gcc -c   -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O \ 
    -DVERSION=\"1.02\" -DXS_VERSION=\"1.02\" -fPIC \
    "-I/apps/pkg/production/perl/lib/5.8.0/sun4-solaris/CORE"   IDEA.c
gcc -c   -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O \
    -DVERSION=\"1.02\" -DXS_VERSION=\"1.02\" -fPIC \
    "-I/apps/pkg/production/perl/lib/5.8.0/sun4-solaris/CORE"   _idea.c
_idea.c:8:20: endian.h: No such file or directory
make: *** [_idea.o] Error 1

In Crypt-IDEA-1.02/idea.h you want to add the line typedef unsigned short u_int16_t; right after the #define line. It should look like:

#include <sys/types.h>

#define IDEA_KS_SIZE 104

typedef unsigned short u_int16_t;

typedef u_int16_t idea_cblock[4];
typedef u_int16_t idea_user_key[8];
typedef u_int16_t idea_ks[52];

void idea_crypt(idea_cblock in, idea_cblock out, idea_ks key);
void idea_invert_key(idea_ks key, idea_ks inv_key);
void idea_expand_key(idea_user_key userKey, idea_ks key);

In Crypt-IDEA-1.02/_idea.c, change the line #include <endian.h> to #include <sys/types.h>.

After those changes, you can do the normal:

root@server:/some/dir/Crypt-IDEA-1.02# perl Makefile.pl
root@server:/some/dir/Crypt-IDEA-1.02# make
root@server:/some/dir/Crypt-IDEA-1.02# make test
root@server:/some/dir/Crypt-IDEA-1.02# make install

Trust me, if you need to do this, you will thank me for this write-up. And, I will thank myself one day, many years from now, when I have to recall this information and can just search my weblog (or, maybe, I will be able to search my entire digital space).

I Don't Want Desktop Search; I Want Digital Lifestyle Search

2004-12-14 1:19PM

The Toolbar of the New Millennium

What i want is a secure, centralized server (it has to be accessible from anywhere) that receives updates from the various devices, web sites and other locations of interest. It stores thumbnails and EXIF information along with some image analysis to determine what it is the picture might be of, and really does try to get the lyrics of the various MP3s it's storing. It scans (or even better, has hooks to) the various databases i've added to it so that it can do live queries. My databases change more often than the static content, and are also more likely to be compressed and externally unindexable, and yeah, i want it to be cross platform.

Debugging Large Perl CGI Applications

2004-12-09 11:43PM

I have to admit; I am a bit antiquated when it comes to my debugging. I rely on the venerable print methodology. Of course, when it comes to CGIs; you can't just go off willy-nilly print'ing to STDOUT unless you are sure the appropriate HTTP response headers have been sent lest you end up filling your error logs with "premature end of script headers". On a small, one script CGI, this is easy to ensure. On a much larger application (like MovableType), this is not as easily accomplished. Chances are, the place in the code you want to execute the print is far, far away from the actual construction of the HTML output and HTTP headers response. You could always print to STDERR in that situation, but I find the signal to noise ratio in there to be a little too high for my liking.

So, I usually print to a debug file. Of course, it's tiresome to be constantly typing:

open DEBUGLOG, '>>debug.output';
print DEBUGLOG Dumper($varNeedingToBeAnalyzed);
close DEBUGLOG;

Luckily, this is Perl. Via the magic of IO::All, this kind of thing is all too simple:

Dumper($varNeedingToBeAnalyzed) >> io("$0.debug");

That, obviously, can be sweetened to suit your taste. I recommend using this in conjunction with Data::Dumper::Simple (recently featured on the 2004 Perl Advent Calendar).

Does anyone else have any tips n' tricks on debugging large Perl web applications?

Weblog Hosting Services

2004-12-08 5:17PM

Are there any other major weblog hosting service providers out there, or does that cover all the players?

i-name

2004-12-08 12:37PM

Identity Commons has been generating some buzz recently in regards to their concept of i-names and the subsequent "WTF are i-names?" that follows. They even managed to get a Slashdot post. Now, Jon Udell is dropping their name and the people are responding. But, none of it really satisfactorily answer the question "WTF are i-names?"

i-names seek to solve the age old problem of assigning globally unique identifiers to humans. And, that's all an i-name is. You get an "i-number," which is a persistent identifier, and you get an i-name which is a human readable identifier. You link up the i-name to your i-number (like assigning a FQDN to an IP address), and there you have it.

What is it useful for? Any time you seek to join two sets of data together (like, taking two sets of identity information on a person and "federating it"), you need the two sets to share a common identifier that you can "JOIN" on. That's what an i-name/i-number gives. And, atop that, you can start building services like "login to Amazon and eBay and Slashdot with the same i-name-enabled credentials" or "personal contact gateways."

Regardless, here's what it boils down to, it is all unnecessary complexity. We already have globally unique identifiers: email addresses — jms18@case.edu, jeremy@alpha-geek.com, Hot_Chix0rs_love_me@hotmail.com — all of those are unique. Yes, email addresses can be reassigned; so can domain names or IP address. Yes, email addresses can expire; so can people (and domain names and IP address).

I do have something useful other than my jibber-jabber about unnecessary complexity. This is the presentation given at the Internet2 Fall Meeting. The presentation does a good job of giving a basic overview.

Two quotes come to mind researching this (the first quote, I can't find the exact text for, so I am paraphrasing; the second comes from the Udell article):

Any working complex system can be shown to have evolved from a working simple system

and

DNS Governance - the 4 bugs

the first bug was creating a structure which *needs* governance

the second bug was creating a monopoly to own the structure

the third bug was creating yet another monopoly to provide "governance"

and the fourth bug is not adopting distributed system technology to render the other three bugs irrelevant.

Threaded View in Aggregator

2004-12-06 11:43AM

From Blogs in the Yahoo Directory:

will someone build a threaded aggregator already?!

No shit.

The problem is, there's no good way to encode this-is-in-reply-to in RSS. I am subscribed to and lurk on the atom-syntax mailing list, and at one point, someone wrote a proposal for a Parent Link. Something that would look like:

<link rel="in-reply-to" type="application/atom+xml"
href="tag:jeremy.zawodny.com,2004:1.3198"/>

I think it might have gotten shot down, though. Reading through that mailing list archive, people suggested replacements. But, then, there seems to have been more posts regarding it. It's hard to say: between the Wiki and the mailing list, I have a hard time finding definitive "this is the conclusive consensus/status of this proposal/idea." On the PaceLinkParent page, it says that the status is "Open"; so I imagine they are still discussing it.

The equivalent of the In-Reply-To: email header is sorely needed. That is for sure. Then, aggregator authors can implement threaded views.

Blog APIs

2004-12-05 3:53PM

In Technical notes about external weblog editors, Brent Simmons — famed from UserLand Pike (renamed to Radio UserLand), NetNewsWire, and MarsEdit — discusses fixing Blog APIs. Interesting notes are in there.

And, while I am talking about Blog APIs, I should not miss the chance to point out TypePad's really nicely designed API.

Cleveland Stakes Claim in "Internet City" Moniker

2004-11-24 1:41PM

Cleveland goes high-speed

The mayor said that under its five-year agreement with OneCleveland, the city will pay $24,905 for its first year and an average of $18,000 a year for the next four years to access network. That's a total cost of just under $95,000, about 50% cheaper than what the city was paying for its former Internet connection with eConnect, Mayor Campbell said.

"Not only are we 4,000 times faster, but we are doing that at half the price," she said.

...

The city currently provides free wireless Internet access in the park space neighboring City Hall in downtown Cleveland. The city plans to expand that free access in stages to other public parks and spaces in the city, said Melodie Mayberry-Stewart, the city's chief technology officer.

The OneCleveland connection will enable the city to connect its high-speed, fiber optic network to city buildings, city recreation centers and safety district offices, she said.

More free WiFi is good... and, it's not regular broadband WiFi... it's ultra-broadband Wifi. I guess we can taunt Philadelphia and claim our electrons are faster than their electrons.

Livelines

2004-11-10 12:23AM

LiveLines Firefox Extension

This extention allows one-click Bloglines subscriptions to sites offering RSS feeds.

Will you people please stop! The last thing I need is yet another insanely easy way to subscribe to sites. I am going to drown in subscriptions. I just can't resist subscribing...

DNS Scales to the Internet

2004-11-09 3:21PM

Post-and-Poll

People who are designing message interchange frameworks that might need to become Internet-scale should consider this, and be careful of architectures that don't fall into one of these two baskets, because nothing else has yet been shown to work.

What about DNS? I don't think that one can generalize DNS into one of those two baskets, but it certainly scaled to Internet size.

I suppose one could argue that DNS follows a Post-and-Poll messaging framework, but then you have to ignore SOA and the hierarchy of .tld's and such. So, if DNS can be generalized into a "Post-and-Poll" style messaging framework, then an internal combustion engine could, too.

Alpha-Geek.com Server Issues

2004-10-29 7:23PM

The alpha-geek.com server tanked — hard drive failure. Chuckie busily rebuilt the server and recovered as much data as he could, which, thankfully, included the web root and MySQL databases. I just got finished polishing up the Perl install+modules+libs, MovableType reinstall, and a complete rebuild of the web tree.

We should be good to go.

SOAP and REST Do Not Have to be Mutually Exclusive

2004-10-22 10:37AM

From WS-HTTP talking about SOAP vs. REST style interfaces:

  • WSDL can describe bindings of operations to many different protocols, but most bindings are to SOAP.
  • SOAP can be transported across many different protocols, but most SOAP messages are transported over HTTP.
  • Individual SOAP messages may have many different headers, but most don't have any.
  • Each of the above statements is arguable, but one thing that is undeniable is that a large number of people have found "simple XML over HTTP" to be a sweet spot.

Later on in the comments Ole Eichhorn has a good quote:

This makes too much sense, it could never happen. Adapt a standard to real world examples? Learn from actual usage patterns to determine what the standard should contain? C'mon Sam, this is too reasonable!

Cell Phone Drivers Are Distracted by the Talking and not by the Lack of Free Hands

2004-10-18 5:29PM

From Hands free not safer:

For the past few years theyve all been advocating the use of hands free cell phones to stem the tide of 2,600 annual deaths linked to talking while driving. But new research shows that it is the act of talking that is the real distracter and not the one hand on the wheel.

There should be research on why it took "new research" to come to that realization. "New research" implies that there was antecedent research that came to an alternate conclusion. Those original researchers should be "fired" or whatever the action is that forbids researchers from researching and/or reporting those results as credible.

Of course, even with accurate "research" and results, there's that pesky little money thing:

Cell phone users can rest safe though. Harvard researchers calculate if cell phones were banned in cars there would be a loss of "$43 billion a year in lost economic activity about the same economic value of the lost lives [2,600 annual deaths] and injuries."

I really don't care if cellphone-talking drivers kill one another. I am just going to be hoppin' mad if one kills me. Well, I'll be hoppin' dead; but someone is definitely going to get an earful in the afterlife.

Open the First Box

2004-10-08 6:17PM

Here, solve this.

There exist two boxes. You have been told that tomorrow you will have a choice of whether to open the first box or both boxes.

Tonight a super-predictor (quite simply someone very good at making predictions, say with an accuracy of above 80%) predicts whether you will open the first or both boxes.

If she believes you will just open the first box, she places $1million in it. If she believes you will open both boxes she places $0 in the first box.

Whatever she predicts she will definitly place $1000 in the 2nd box.

Tomorrow arrives. Do you open the first box or both?

Solution: Open the first box.

Prediction
Action
 Open FirstOpen Both
Open 1st1 million0
Both1.1 million1000


The most likely scenario (by over 80% odds) is that she predicts correctly. Under that assumption, you are going to open the first box and get 1 million dollars or you open both boxes and get $1000.

The risk by opening up just the first box is that she guessed wrong (likelihood of less than 20% that she guesses wrong) and you get $0.

The reward of opening of both boxes is that she quessed wrong (likelihood of less than 20% that she guesses wrong) and you get 1.1 million dollars.

80% chance to get a million if you open just the first box. 20% chance to get 1.1 million if you open both boxes.

Open just the first box.

Trio of LDAP Links

2004-10-01 5:59PM

And people thought Directory Services were only useful for white pages and some modicum of authentication/authorization purposes. No, no, no... mark my words, LDAP is the next HTTP. Or, in analogy form: "1994 is to HTTP as 2004 is to LDAP."

As a corollary: "1999 was to HTTP as 2009 will be to LDAP." As in, ubiquity.

LTAP

2004-10-01 5:47PM

LTAP — Triggers for LDAP

LDAP directories are passive repositories that do not provide active monitoring and alerting facilities, i.e., triggers. LTAP adds active facilities in a portable manner to LDAP servers. Active facilities are necessary for LDAP servers to monitor accesses to directories and then take appropriate actions.

Hmmm... I just don't know. I am still of the opinion that if the answer to your inquiry is "I know, we'll put triggers on the LDAP server to fire off..."; you are probably asking the completely wrong question.

Screwing Up REST

2004-09-29 1:19PM

I like it when people screw up. Especially when they screw up in public and there is a flurry of commentary.

When people publicly screw up, it suddenly dawns on me, "damn, I probably would have fucked that up, too." Well, actually, it doesn't dawn on me until everyone else points out the screw-up. Thank God for them, and thank God for us, idiots.

[ Commentary at Vacant Space, For some definition of REST, and (amusingly) RESTagra. Informative juiciness here and here. ]

Managing "Changing of the Guard"

2004-09-28 1:11PM

In the comments on TeeJay's journal entry managing the perl websites, he and jacques talk about creating a group to ((assist)|(manage)) "Perl's Net Presence," which would include web sites like Perldoc.com and use.perl.org and, possibly, others. Sites that are, basically, a singular person's pet project that they do voluntarily out of love of the community. Sites who have an effective Bus Number of 1 but should have more people helping, in some way, to maintain it.

I think such a group is a great idea. I think it falls under the umbrella of "managing the changing of the guard." Providing a mechanism via which high profile Perl-Net-Presence-Widgets can come to pass into others' hands for day-to-day operations, new features and enhancements, an entire turnover of administrative duties, etc.

If such a group were formed, I would seek to become a member.

Bloglines Fat Client... Not Yet

2004-09-28 12:11PM

[

*Update:* It seems I am wrong about the lack of a mark read/unread functionality in the API according to O'Reilly Network: The New Bloglines Web Services. In the getitems call, feed entries that are pulled down are automatically marked as read on the server side; additionally, the XML returned (in OPML format) from a listsubs call has some Bloglines specific extensions including BloglinesUnread.

Good stuff!

(And, it appears, I should read the documentation more closely before blathering on about missing components of an API...)

]

Okay, earlier, I declared that a Bloglines fat client must be just around the corner with the announcement of their web services. Unfortunately, it looks like I may have jumped the gun.

Reading over their API Documentation, they have three basic RESTful API calls:

To create a Bloglines fat client, you would need a lot more methods. The top 3 that come to mind are a method to mark an item read, mark an item unread, and "save" or "clip blog" an item.

Then, of course, there's all of those persnickety actions one can do to their subscription list like reorder, reorganize, rename... I'm sure the list goes on and on.

But, it's a good step towards IMAP for Syndication (in comparison to POP3 for Syndication or Webmail for Syndication, which we have right now).

Yahoo Web Services

2004-09-22 6:19PM

Web Services You Wish Yahoo Offered?

LDAP (with DSML support). Shibboleth for Federated Identity (think Napster style federated identity like what they did at Penn State but for shop.yahoo.com or anything else).

Basically, I want to log in to Yahoo! with my Case credentials and have the site tailored to me and all of the metadata they can grok knowing that I am coming in with Case credentials.

Perldoc.com Sucks

2004-09-17 5:31PM

Okay, handwaving by the inflammatory title, perldoc.com is awesome. It's a great site; it's comprehensive; it's easy to navigate; it's all good stuff. It's an invaluable resource to all perl and aspiring-to-be perl programmers.

The problem is php.net. If there was never php.net, I probably would not even know something was wrong with perldoc.com. But, there is php.net; and php.net has raised the bar for programming language documentation web sites. And, once the bar has been raised, everything below seems suboptimal.

Try going to php.net/split. What happens? You are immediately whisked away php.net/manual/en/function.split.php — the documentation for PHP's built-in split function. Nice. Try php.net/mysql_connect, or try even more generic ones like php.net/variables, php.net/var, php.net/ldap. Heck, php.net/installation and php.net/configuration do what is expected. Php.net has DWIMmery.

Try perldoc.com/chop or perldoc.com/split404. That's not DWIMmery. That's not "make the easy things easy." I want to type in h-t-t-p-:-/-/-p-e-r-l-d-o-c-.-c-o-m-/-s-p-l-i-t and get taken to perldoc.com/perl5.8.4/pod/func/split.html... magically... whisked away to the appropriate page... goodness all around.

But, I don't mean to bitch and moan and suggest nothing. Perldoc.com runs on Apache, and that means we have the swiss army knife of URL manipulation at our disposal, mod_rewrite.

To get perldoc.com/split working as we want it to (and, flexible enough to handle all of Perl's built-in functions), we need some simple rewrite rules. First, turn on the engine:

RewriteEngine On

That was easy enough.

Next up, we need to make sure our rewrite rule doesn't collide with an actual page. For that, we need a conditional that says "only execute the following rewrite rule if this condition holds true." The condition itself should test and make sure the requested file does not exist.

RewriteCond %{REQUEST_FILENAME} !-s

The -s is a file test operator that checks to see if the requested file is a normal file of non-zero size (which is exceedingly similar to Perl's -s operator). The ! is the negation. So, that rewrite condition, in English, says, "only execute the following rewrite rule if the requested file does not exist."

But, we don't want to be rewriting everything typed in the URL. We only want to rewrite when the file we are rewriting to actually exists i.e. only rewrite perldcoc.com/split only if perldoc.com/perl5.8.4/pod/func/split.html exists. One more RewriteCond takes care of that.

RewriteCond /perl5.8.4/pod/func/%{REQEUST_FILENAME}.html -s

And, now with our two conditionals prepared, we can execute the rewrite rule to appropriately map the URL:

RewriteRule ^(.+) /perl5.8.4/pod/func/$1.html [L]

(The appended [L] directs mod_rewrite to not apply any other rewriting rules.)

So, now we can happily type perldoc.com/split and get sent to the appropriate page. But, wait, there's more. What about perlref, perlvar, perlfunc, etc. I would like to be able to type in perldoc.com/perlref and be taken to the appropriate page.

No bother. We can apply a similar set of rewrite conditionals and rules to make that happen, too:

RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond /perl5.8.4/pod/%{REQUEST_FILENAME}.html -s
RewriteRule ^(.+) /perl5.8.4/pod/$1.html [L]

There's one final rewrite rule to go, and this one might be a bit of an overkill, but it is still useful. If you type in something that absolutely does not exist on php.net's web site, it will take the trailing section of the URL and use it as a search term and take you to the search page. Try it out with php.net/umbrella — you get forwarded off to php.net/manual-lookup.php?pattern=umbrella, the search page. It would be nice if perldoc.com went that extra mile, too. And, it's easy enough with some rewrite-fu:

RewriteRule ^(.+) /cgi-bin/htsearch?words=$1 [L]

Putting it altogether, we have a nice little addition to perldoc.com's httpd.conf file.

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond /perl5.8.4/pod/%{REQUEST_FILENAME}.html -s
RewriteRule ^(.+) /perl5.8.4/pod/$1.html [L]

RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond /perl5.8.4/pod/func/%{REQEUST_FILENAME}.html -s
RewriteRule ^(.+) /perl5.8.4/pod/func/$1.html [L]

RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^(.+) /cgi-bin/htsearch?words=$1 [L]

I might, now, want to point out that none of the above has been tested in any way, shape, or form; and could be completely wrong. I just did the rules and conditionals off of the top of my head. But, I like to think of my brain as a "mostly accurate" Apache httpd.conf and mod_rewrite parser (I, also, like to think of it as a Perl parser); so I would say that the above rule sets are 97%+ accurate... or thereabouts.

Find an LDAP Entry that Lacks an Attribute

2004-09-16 5:29PM

I've just created a shiny new LDAP category, so why not toss a post into it (other than a token one-liner post).

LDAP search filters are much like a SQL WHERE clause except not. While SQL comes with AND, OR, NOT, LIKE; LDAP has &, |, !, and *. It shakes out like this:



SQL WHERE clause Equivalent LDAP filter
name = 'John Doe' (name=John Doe)
name = 'John Doe' AND age = '37' (&(name=John Doe)(age=37))
name = 'John Doe' AND (age = '37' OR age = '41') (&(name=John Doe)(|(age=37)(age=41)))
name LIKE 'John%' AND (age = '37' OR age = '41') (&(name=John*)(|(age=37)(age=41)))


Enough of the elementary search operators, there is plenty of information on that. I wanted to cover something not often seen in your run-of-the-mill LDAP search filter tutorial — how to search for LDAP entries that lack an attribute. And, for those persons that don't know LDAP from HTTP, each entry in LDAP has one or more attributes. And, can be very loosely analogized to standard RDBMS table structures... Think of each LDAP entry as a DB table: the fields for the DB table are like attributes in an LDAP entry (and this completely ignores the tree structure of the DIT and the fact that one or more of a single entry's attributes can by multi-valued). Anyways...

A tricky filter is trying to find an LDAP entry that does not have an attribute, for example, find a horse with no name. In LDAP, there is no such thing as a NULL value; rather, entries either have attributes that have values or they do not have the attribute (or, the attribute contains an empty string; but that's bad form). The first inclination is (well, my first inclination was) to use (name!=*), which does not work at all. The appropriate search filter is:

(!(name=*))

And, if you wanted to, say, grab every single entry in an LDAP server; an easy command is something like:

root@somwhere# ldapsearch -h ldap.example.org -L -x -b 'dc=org' \
        '(!(thisCantBeAnAttribute=*))'

Which assumes that there is not an attribute called thisCantBeAnAttribute anywhere in the tree, but be prepared for that query to take a while. A quicker ripping down of an LDAP's entire contents can be done if you know a little bit about the LDAP server i.e. if you know that it has the objectClass attribute indexed (indexed == faster searching). Then, you can use something like:

root@somwhere# ldapsearch -h ldap.example.org -L -x -b 'dc=org' \
        '(objectClass!=notAnObjectClassValue))'

Why would you want to rip down a Directory Server's entire contents... I don't know... Maybe you're a sicko. But, the above commands will do it for you (not accounting for ACIs that restrict information to anonymous searches).

Welcome to the wonderful world of LDAP!

When I Learned to Love Perl: Perl Sucks

2004-09-08 2:07AM

I kept meaning to write a long entry on why I hate Perl. Or, rather, why, when I was learning Perl, I really hated it. And Russell Beattie's entry Dr. Scriptlove (Or How I Learned to Stop Worrying and Love Perl) reminded me of that desire.

The first problem I had were the variable sigils: $ @ %... what the hell were those? Why do they need to jumble up my source code? They don't add to readability? Line noise... line noise! And, why the hell is it @array but its $array[1]? And... and... what the hell is:

@a=(foo,bar,baz,quux,psqs,mind);
%b=@a;
print $b{baz};    # prints "quux"
print @b{@a};     # prints "barquuxmind"

An @-thingy is constructed and then assigned to a %-thingy, and then you use a $-thingy in front of what once was a %-thingy with {baz} after it and that prints out the element in the original array that came right after baz, quux,... buuuuuut, if you use two @-thingies, one inside the curly braces and one that just happens to have been assigned into the %-thingy in the first place, i.e. @b{@a}, it prints every other element from the original @a?!?! This is maddening! Why would anyone, *anyone*, in their right mind use this slightly-less-terse-brainfuck of a language??

But, for some reason, I, like many others, kept sloshing through it. Maybe you just want to challenge yourself with this archiac language. Maybe you are forced to learn it because of work. Maybe you are an avid other-programming-language-user who is just learning Perl so that you can more aptly argue against its zealots in holy wars. Whatever the motivation(s), I kept stumbling over the sigils and figuring out what's a scalar, what's an array, what's a hash, what's context. At some point, I learned the differences between "arrays" and "list context." I learned of references and the -> operator, and no longer furrowed my brow when I come across %$a.

That's the problem with variable sigils — you have to love them to understand them, and you have to understand them to love them. (Or, I suppose, you could understand them and not love them; but then you don't like Perl; and that's.... okay.) The smallest unit of time is purportedly the Planck time constant in which, if two events occur within the same Planck time, it cannot be said which of the two events happened first. It is within a single Planck time span that a person simultaneously loves and understands Perl's variable sigils. You need one to have the other, and you need both to move forward. And, once you have that inspired moment, all of that line noise melts away into a legible... okay, wait, maybe not "legible"... melts away into a meaningful syntax and suddenly you can see The Matrix.

But, of course, getting used to variable sigils is one thing, but what about all of those Tourette's-like predefined vars? What in the world could be the purpose of those utterly unprounceable sequences of holding-down-the-shift-key-top-row-and-extreme-sides-of-the-keyboard characters? $+ $^O $&... *sigh*, the only thought one can be left with is, "why were they put there in the first place."

Of course, anytime anyone brings out their arcane and unreadable nature, 37 Perl-pimps show up to decree

use English;! You don't have to use those names! You can use nicer names like $ACCUMULATOR and $FORMAT_LINE_BREAK_CHARACTERS.
Oh, why thank you, except the problem is absolutely no perl programmer actually uses those nomenclatures, so English.pm is of little use. Plus, who can remember if its $INPUT_LINE_NUMBER or $CURRENT_LINE_NUMBER?

The good news is, no one uses these damn things. Oh sure, you're going to come across @_ and you'll definitely see $_ (or its omission) all over the place (trust me, you'll learn to love it). And, you very well may bump up across $!, $|, and even $/ or $^O. But, just think of them as slang words. They're surprisingly easy to get used to (which I can say loftily on this side of the fence after having already learned them). And, in a pinch, they are all well documented in perlvar. As an extra plus, if you ever see anyone modifying the $[ variable, it is perfectly acceptable, within the Perl culture, to put tacks on their chair when they go for a smoke break.

Of course, I saved the best for last, the ultimate in line noise generation, the pinnacle of indecipherableness, the Mt. Kilimanjaro of... okay, enough, analogies. Here's the good stuff:

$string =~ s/([a-zA-Z'\-\s]?)
             [^a-zA-Z'\-\s]
             ([a-zA-Z'\-\s]?)
            /$1$2/xg;

Ahhhh, yes, regular expressions.

The first problem I had was: a) remembering that their was a tilda in there, and b) which damn order the tilda and the equals sign went. Was it =~ or ~=? Don't know how many times, at the command prompt, I would type:

perl -e '$a~=/a/'
syntax error at -e line 1, near "$a~"
Execution of -e aborted due to compilation errors.

Other than that, regexs are line noise. There is no ifs, ands, or buts about it. The only condolences I can offer is that they are complex in all programming languages; it's not Perl that's giving you the short stick.

After finally getting used to regexs (or, at least, getting used to Perl regexs), I can promise you that you'll wonder why someone would need this:

import java.util.regex.*;

public class Splitter 
{
    public static void main(String[] args) throws Exception 
    {
        Pattern p = Pattern.compile("[,\\s]+");
        String[] result = p.split("one,two, three   four ,  five");
        for (int i=0; i<result.length; i++)
        {
            System.out.println(result[i]);
        }
    }
}
Just to do:
foreach(split /[,\s]+/, "one,two, three   four ,  five")
{
    print;
}
TIMTOWTDI:
while('one,two, three   four ,  five' =~ /(\w+)/g)
{ 
    print $1;
}

That hits the meaty spots of what I always wanted to bitch about while I was learning Perl. Now, I have different Perl eccentricities to bitch about, but I'll save those for a different post. After all, the only way to make a something better is to show your love for it by talking about how much it sucks. Or, at least, that's one way to go about it.

Apache Graceful

2004-09-01 4:29PM

Everyone knows that starting Apache involves the issuance of the command:

./apachectl start

Or, for SSL:

./apachectl startssl

To shut her down, it is:

./apachectl stop

And, if you would like to bounce the server:

./apachectl restart

But, there is another highly useful command argument for apachectl, and it is graceful.

From Apache HTTP Server Control Interface:

Gracefully restarts the Apache httpd daemon. If the daemon is not running, it is started. This differs from a normal restart in that currently open connections are not aborted. A side effect is that old log files will not be closed immediately. This means that if used in a log rotation script, a substantial delay may be necessary to ensure that the old log files are closed before processing them. This command automatically checks the configuration files as in configtest before initiating the restart to make sure Apache doesn't die. This is equivalent to apachectl -k graceful.

Basically, it lets configuration changes take effect on the fly without disrupting any of your current connections.

More on JVP

2004-08-26 12:53PM

Okay, so yeah, I adopted JVP to represent Java vs P(erl|HP|ython)... I think it's funny.

Adam Turoff weighs in on the JVP "Internet-thread" in Poisoning the Java well. Some interesting quotes:

Some programmers don't care much about coding, and just want to collect a paycheck at the end of the week. By definition, these are not great hackers. Avoiding a mainstream language (like Java) goes a long way to avoiding these people a smart company does not want to hire. Because Python is a boutique language, it's almost impossible to hire a Python hacker who is in it for an easy paycheck. Similar statements can be made for Perl, or Perl + some CPAN modules.


I once worked in a shop where we had a team of "star programmers". Our main tasks were to figure out the hard problems and do the heavy lifting so our projects could be shoved onto some entry level programmer's desk. Because it was dirt simple to hire a floor full of entry level programmers, our manager saw his job as getting his star programmers to fire on all cylinders all the time...


A smarter manager wouldn't hire by body count, and would have replaced the stable of entry level programmers with a few great hackers. Entry level programmers, when hired, would pair with their more skilled colleagues to become great hackers themselves.

Java Versus the World

2004-08-24 5:37PM

In the past month or so, the World seems to have taken Java on; and Java has responded by taking on the World. It all started with Paul Graham's Great Hackers and the quote:

The programmers you'll be able to hire to work on a Java project won't be as smart as the ones you could get to work on a project written in Python.

That rustled some feathers.

Then, Top Reasons Why People Think Java Un-Cool - Debunked stormed on to the scene riding on the coattails of Tim Bray's sudden discovery of Java's regex engine being faster than the "de facto standard". All in all, the blo(g|od) of the Internet began to boil.

Luckily, though, Mark has provided us with a way to solve this problem once and for allJava wins.

Too Much Confusion in the Federated Identity Management Space

2004-08-17 1:23PM

Making the Case For Liberty

While SAML was first to market and WS-Federation has the biggest backers, it's the Liberty Alliance that may be the best bet for identity federation.

And

In the race to enable identity federation, the Liberty group is neither as nimble as SAML nor as dominant as the WS-Federation backers

These people are mighty confused. SAML is merely an XML vocabulary and not an Identity Management solution. It is just a tool to leverage in that space. Here, you might want to read this developerWorks article Debunking SAML myths and misunderstandings. Furthermore, both Liberty and WS-Federation use SAML (as does Shibboleth); they do not, in fact, compete against it.

Federated Identity is a cool, cool thing, but few "techie journalists" seem to understand it, which is too bad. People tend to think of Federated Identity as one of those "problems looking for a solution," but it is not like that at all. But, when you have journalists saying the equivalent of "TCP was on the scene first, but HTTP and SMTP are on the verge to take it over"; it really doesn't help.

I found this mass of confusion via the blog entry Standards, vendors and end users.

I Don't Know How I Lived Without Daemontools for So Long

2004-08-06 1:47PM

You know those things that you find that, after finding them, you are confused as to how you had lived so long without them. Things like an ultra-useful software application, or a new restaurant, or a tool to use around the house, etc. Those items/places/things that you stumble upon and, suddenly, after a modicum of use, you can no longer fathom existence without such.

daemontools is exactly that. If you need to run a Unix daemon, use these.

What is Federated Identity (Part I)

2004-07-29 2:37AM

People get scared at the talk of Federated Identity. Their minds fill with privacy concerns, misuse of data, mega-corporations "owning" a person's digital self, and other Big Corporate Brother conspiracy theories. I think this might be due to the fact that the first rhudimentary implementations (as vaporous as some have been) of identity management frameworks (on the Internet scale not the inner-institutional scale) have been of the Passport variety i.e. one big master repository that seeks to contain everyone's identity data (*ahem* TypeKey).

Federated Identity is not about forcing a consolidation of account and personal data into one master service. It's opposite of that. Unfortunately, the front-runners in developing Federated Identity protocols murky the waters of this ocean with complexity. Try wading through the specifications of Liberty Alliance or WS-Trust... harrowing. The complexity has served to make Federated Identity a widely misunderstood topic.

The first and foremost purpose (in my mind) of Federated Identity is to alleviate the need for Internet denizens to register at every friggin' web site. Personally, I am sick and tired of filling out the same old forms, trying to pick a username with enough numbers after it to make it unique, and remember a password for every web site that wants to uniquely identify me. I don't think Federated Identity can get here fast enough because I don't want to register for a web site ever again.

To cut through some of the mystery and complexity of Federated Identity, a simple use case scenario best illustrates the major points.

The year is 2006, and Janie Thomas is a Senior in high school. A couple of months ago, Janie registered for an Amazon.com account; so she could buy some college guides. Recently, though, she has been overcome with a strange desire to collect merchandise that was popular in the mid-90's. To facilitate her quest, she heads on over to eBay to search for Furbies. She finds a bunch and wants to start bidding. To login, eBay offers her the option to register for an eBay account (in case she doesn't have an external account or, possibly, does not want to associate any of her other Internet accounts with this eBay account) or to use an existing set of credentials such as Amazon.com. She doesn't want to bother registering for an eBay account, so she enters in her Amazon username — hotjanie777@amazon.com — and the password associated with that account. EBay shows her a standard EULA explaining that they will never store or give out or send an email asking for her Amazon.com password, etc., etc., etc. She accepts and is logged in to eBay, and the world is good.

The next year, Janie is accepted into "Tech University" (← made-up) and is assigned the account "jthomas@tech.edu". Obviously, now that she is off to college, she needs a computer of her own. So, Janie dutifully goes to Dell.com to order a computer. The pre-orientation material Tech University emailed her directed her to log in to the Dell web site with her Tech University username and password. She does this, agrees to a simple EULA, and is given a web page tailored for Tech University and offering computers with Tech University approved configurations and their associated discounts that Dell offers Tech University students. She's happy to see that she saves $200 on her new, shiney, Tech University approved Dell computer (and, Dell is happy to compile statistics on how many computers it sells to incoming Tech University Freshman) but is saddened to remember that she has to go buy books for all of her courses.

Buying books — Janie heads back on over to amazon.com and logs on with her "hotjanie777" Amazon account. She remembers the discount Dell gave her when she logged in with her University credentials and wants to see if Amazon offers something similar for books. She heads on in to Amazon.com's "Manage Your Account" section and sees an option to associate her Amazon.com account with another account (be it a corporate work account, higher ed. account, account from another web site, etc.). She chooses to perform the association and enters in "jthomas@tech.edu" as the username of the account she wants to associate with her Amazon.com account with and enters in the password associated with her tech.edu account. She, again, agrees to a EULA and *voila!* she has federated the two accounts. Amazon tells her that, in the future, she can log in to Amazon with either set of credentials.

And, that above, that is the basic scenario of Federated Identity. There are more possiblities than what is described above, but that covers the basics. And, none of this is hard at all. But, I have a second entry queued that, at a high level, will cover how this works. (Hint: LDAP LDAP LDAP.)

How's Your Perl?

2004-07-28 10:43PM

Create a statement <x> such that the following will print "Ok."

<x>;
undef and print "Ok";

Can't figure it out? Neither could I. The answer is:

Perl/Java Programmers

2004-07-14 12:05PM

Perl programmers who know and work a lot in Java (or, should I say, Java programmers who know and work a lot in Perl) do some of the most "interesting" things. The intersection of Perl and Java people crank things out like Inline::Java, which lets a person put Java in Perl...

use Inline Java => <<JAVACODE;

    class Employee 
    {
        private String name;

        public Employee (String name)
        {
            setName(name);
        }

        public void setName(String n)
        {
            name = n;
        }

        public String getName()
        {
            return name;
        }
    }
JAVACODE

my $person = new Employee('Jeremy');
print $person->getName();
$person->setName('Susie Lou');
$person->getName();

The JavaPerl-ers, not satisfied with just being able to embed Java in Perl, decided they want to be able to go the other way, too — embed Perl in Java.

import perl5.Perl;
import perl5.SV;

public class ohTheInsantiy
{
    public static void main(String argv[])
    {
       Perl.eval("print qq`Hello World!\n` ;") ;
       
       ///////////////////
       
       SV foo = Perl.NEW("foo") ; // $foo = new foo() ;
       
       foo.call("subtest") ;  // $foo->subtest() ;
       
       ///////////////////
       
       String s = Perl.eval(" 'time: ' + time() ") ;
       
       int i = Perl.eval_int(" 2**10 ") ; // 1024

       int n = Perl.eval_int(" 10/3 ") ; // 3
       int d = Perl.eval_double(" 10/3 ") ; // 3.33333333333333
       
       ///////////////////
       
       SV array = Perl.eval_sv("  [ 'a' , 'b' , 'c' ]  ") ;
       
       String e0 = array.elem(0) ; // a
       String e1 = array.elem(1) ; // b
       String e2 = array.elem(2) ; // c
       
       ///////////////////
       
       SV hash = Perl.eval_sv("  { a => 11 , b => 22 , c => 33 }  ") ;
       
       String k_a = hash.key("a") ; // 11
       String k_b = hash.key("b") ; // 22
       String k_c = hash.key("c") ; // 33
    }
}

I am not sure if this leaves me feeling unclean, or if it is cool — "cool" in the sense of "what a great hybridization of languages." Like, in the last secret mission of StarCraft, where you learn that the Terran are creating a Zerg/Protoss hybrid. (That was an ultra-geeky analogy.)

DB Abstraction Layers Are Bad... When Used Wrong; Otherwise, They're Good

2004-07-09 8:37PM

Database Abstraction Layers Must Die!

Yea, that DBI phenomenon never really caught on. And, using stored procedures as an abstraction layer to hide database internals... yea, that's probably not worthwhile either...
</sarcasm>

An abstraction layer for a database can be improperly designed and improperly used. This should come as a shock to no one. Hell, a database can be improperly designed and improperly used. Again, this is not a sudden revelation. People take good concepts/technologies/ideas and misuse them.

But, saying that any use of a database abstraction layer impacts performance negatively, buys nothing in terms flexibility and portability, and causes developers to have to cater to the lowest common denominators across all major DB vendors... well, that's just crazy talk.

I find that DBI + native stored procedures provide a wonderous abstraction layer that does little in the way of a performance hit (and if there was a performance hit, I would refactor only after having actually known for sure it was DB call(s) that were the bottleneck). It provides flexibility and portability in regards to the underlying DB... I'm not saying porting to different DBs is a walk in the park or anything, but I shudder at the notion of having to go through all of the program files rather than just a couple plus a rewrite of the stored procedures to change database implementations.

Use a database abstraction layer if you need it, use a well designed one, and use it properly; or just listen to that other guy who has my name.

The History of my Unix Commands States the Obvious

2004-06-28 5:29PM

TheMiddle: So I 'clear' compulsively — sounds like fun.

torpor:/usr/local/apache# history | awk '{print $2}' \
 | sort | uniq -c | \
 grep -vE "df|rm|ls|cd|history" | sort -n | tail
     11 wget
     12 tar
     13 mkdir
     15 cp
     19 apt-get
     22 make
     35 cvs
     48 nedit
     52 perl
torpor:/usr/local/apache#

Other people's top shell commands.

Which Big Companies Use Perl in "Mission Critical" Ways?

2004-06-23 5:47PM

Someone asked me, "which companies use Perl?" (It was assumed he was referring to big companies... fortune 500-style companies and/or large nonprofit or governmental institutions.) I replied, "most... in some form or another." Which, was to imply that in any company's IT department, someone, somewhere, one time, ran Perl over a text file to do some rhudimentary text munging. He clarified his inquiry and reformatted it to pinpoint "which companies use Perl in 'Mission Critical' applications?"

To answer that question, a good place to start is O'Reilly.com's Perl Success Stories, which highlights:

Amazon, in addition to what was mentioned above, uses Mason. eBay used Perl in their wireless Palm i705 application. Yahoo!, apparently, uses Perl somewhere in their massive set of systems according to Jeremy Zawodny's We're Hiring a Perl Hacker announcement. And, Microsoft uses Perl to run the test harness around the C# compiler.

And, of course, Case Western Reserve University uses plenty of Perl in a variety of ways.

I'm sure there are more, but those were readily available from a quick Google search.

Tim O'Reilly's The Open Source Paradigm Shift

2004-06-22 5:53PM

This is a must read — The Open Source Paradigm Shift. The gist I took from it is that the "software" of the future will not be sold as a packaged "thing" you install. Rather, it will be a bunch of commodity subsystems glued together in interesting ways to provide a service accessible over the Internet. Customers, in one way or another, pay for the service(s) you provide; and the good services will find a way to leverage their customers to enhance the original service(s) (think "Amazon's user reviews" or "eBay's seller ratings"). (There's a lot more interesting tidbits in the article, too.)

GMail Invites

2004-06-18 9:03PM

Okay, people, apparently my (rather obvious) update at the bottom of the post is not enough to dissuade anyone from commenting or sending emails. I am very sorry. I have no invites left. None. Nada. Zero. Zilch. I am terribly sorry, but I am not the gmail invite give-away-er you are looking for.

Simon Willison is giving away gmail invites. I have 3 invites left after having doled them out to everyone I know who specifically wanted one, so if anyone else wants one, email me (jeremy.smith@case.edu) or just leave a comment.

Update: Okay, they're all gone. There was a surprising reaction to this. So, if I get anymore invites, I'll post here again.

I Want Access to Browser Right-Click Menus

2004-06-17 6:53PM

Answering the call from Joel on Software.

I want a way to access a browser's right-click menu. I am a right-click-aholic. I right-click on everything to get that little drop down context menu. Right click on this object on a webpage, get this menu; right click on this other widget, get this menu.

I would love to be able to right-click on a blog entry that gets slurped into my web-based aggregator and click "send this to Saved Items." Or, just be able to right click on an email listing in Gmail and select "Mark as Spam" or "Add label X."

To make some suggestions to some of his points:

Improved inline editing (step one: make contentEditable work in Gecko just like it does in IE 5.5+)

I think that this should do the trick — Cross-Browser Rich Text Editor.

Javascript features to do fast REST queries back to the server, so I can implement things like a lush spell checker with the dictionary on the server. It should be possible to have a 300,000 employee directory on the server and create a web app that has a list box where you can type the first few letters of an employee's name and see a filtered list as fast as you can type on the screen.

XMLHttpRequest. As a matter of fact, Gmail does this auto-completion of the address field when composing email.

A rich set of standard controls for application development that provide better ways... to drag and drop

There are two good cross-browser libraries discussed in Drag and drop with Javascript that are feature rich.

Different Results in Java Benchmark

2004-06-16 5:23PM

Yesterday, Slashdot posted an article that linked to The Java Faster than C Benchmark (done by this guy). Now, I really don't care one way or another if Java can be made to be faster than C++. But, I did want to see the difference hardware makes with Java. So, I took his source for the ackermann class:

public class ackermann {
    public static void main(String[] args) {
	int num = Integer.parseInt(args[0]);
	System.out.println("Ack(3," + num + "): " + Ack(3, num));
    }
    public static int Ack(int m, int n) {
	return (m == 0) ? (n + 1) : ((n == 0) ? Ack(m-1, 1) :
				     Ack(m-1, Ack(m, n - 1)));
    }
}

And, I ran it on a Sun Fire V880 with 4 processors and 30G worth of RAM. I wanted to see how much faster it would run when compared to his machine's specs — a P4 with 512M of RAM.

But, when I ran it; it overflowed its stack:

smith@barra:~$ java -version
java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)
smith@barra:~$ time java -server ackermann 13
Exception in thread "main" java.lang.StackOverflowError

real    0m13.416s
user    0m13.300s
sys     0m0.070s
smith@barra:~$

Did he fudge results or is his Java compiled with the --really-big-stack option and mine isn't? Chuckie, can you weigh in on this one?

Even passing in an argument of 12 caused it to throw java.lang.StackOverflowError. The largest number it would work with was 11:

smith@barra:~$ time java -server ackermann 11
Ack(3,11): 16381

real    0m9.884s
user    0m9.750s
sys     0m0.070s
smith@barra:~$

Arabica in West Cleveland (on Detroit Ave. in Lakewood) Has Free WiFi

2004-06-15 8:29PM

For the longest time, I have been bemoaning the lack of Wifi on the West Side of Cleveland. The East Side has ubiquitous wireless coverage (thanks, in the large part, to Case); however, the West Side has always been without sans the random $10/day Borders crap.

But, lo and behold, the Arabica Coffeehouse near the corner of W. 117th and Detroit Ave. has 802.11b access... that's free, which is how WiFi should be.

This is both a blessing and curse. I came in here to do some quiet reading and writing (I just happened to have my laptop with me). Then, I walk in here and see they have wireless... now I am going to spend the time I had reserved for reading and writing surfing the Internet, checking my mail, blogging about how I stumbled upon Wifi on the West Side...

Java Bashing

2004-06-15 5:53PM

Why Java Sucks For Sysadmins

That last one he mentions always gets a raised eyebrow from me when I encounter it:

yoyodyne:~$ pwd
/export/home/jdweiner
yoyodyne:~$ java HelloWorld
Hello World
yoyodyne:~$ cd ..
yoyodyne:/export/home$ java jdweiner/HelloWorld 
Exception in thread "main" java.lang.NoClassDefFoundError: jdweiner/HelloWorld (wrong name: HelloWorld)

Of course, just from a Sys. Admin's standpoint, perl can certainly bite you in the ass, too, when it claims that it cannot find a module and then shows you where it looks for a module:

somserver:~$ cat somefile.pl
#!/usr/bin/perl
use lib '/some/far/off/path';
use Not::Here;
print "Hello";

somserver:~$ perl somefile.pl
Can't locate NOT/Here.pm in @INC 
(@INC contains: /usr/local/lib/perl/5.6.1 
/usr/local/share/perl/5.6.1 /usr/lib/perl5 /usr/share/perl5 
/usr/lib/perl/5.6.1 /usr/share/perl/5.6.1 
/usr/local/lib/site_perl/i386-linux /usr/local/lib/site_perl .).
BEGIN failed--compilation aborted.

somserver:~$

Perl never mentions in the error that it was also poking around /some/far/off/path looking for library modules. Admittedly, not as bad as the weird coupling Java does with what your current pwd is, but each language has its quirks.

Linkdump: What I am Reading

2004-06-07 12:29PM

The contents of my "Saved Items" Bloglines folder.

.oO I have such a pretty navel...

Trolling the Frontpage of Slashdot with a Commercial

2004-06-02 12:37PM

I am not sure who it was that trolled Fiber To The Dorm Room onto the front page of Slashdot, but I really thought it was funny that it linked to a 5 year old ranking of most networked colleges under the pretense that that was somehow applicable.

Truth be told, we have a great network at Case, both in terms of Gigabit ethernet and ubiquitous 802.11g wireless. But, seriously, that posting was just a commercial that somehow managed to slip through.

Of course, I should mention this is not the first time Slashdot has mentioned Case's network.

I just couldn't help myself and read through the comments. Some of their conjecturing and assumptions concerning our network topology, media decisions, uplink, etc. really had me laughing.

Review of Movabletype 3.0

2004-05-29 6:03PM

A couple weekends ago, whilst visiting Chuckie, we upgraded alpha-geek.com and the sister sites (1, 2, 3, 4) to MovableType 3.0D. Initially, there was some hullabaloo over the licensing scheme; and the first versions of the licenses were restrictive to our setup (we have 5 authors with 5 weblogs). So, my initial reaction was to go get wordpress where we were safe underneath the GPL, and we could use it for as many blogs as we want, as many authors as we want, and have the freedom to modify the source code all we want and never have the fear that the codebase would be abandoned and rot. What I really wanted to do was take MT 2.661 and modify that and continue to use that. But, I quickly realized that would put me in the business of constantly upgrading my own blogging system. I don't want to have to do that. Plus, there are some licensing issues with sticking with MT 2.661 and how that license could evolve at any point in time. Nonetheless, since Jay Allen has declared that MT3 has fixed all of the comment spam problems and that mt-blacklist will cease development on his end, I would have to maintain that myself, too. [Update: Jay Allen is, indeed, continuing to develop MT-Blacklist as this post blatantly says — Your MT-Blacklist Wish List — my fault for not double-checking its status more carefully] Fuck that! We'll move it all to Wordpress and be done with it.

Unfortunately, Wordpress was woefully inadequate. Out of the box, it did not support multiple blogs with multiple authors. To shoehorn it on to alpha-geek, would mean multiple installations. Which, consequently, means multiple DB's; and during upgrades, n upgrades of the same software. I am much too lazy for that. Why would I do that when I could install n copies of MT3, be cool underneath the license, and have the same thing with the niceness of MT?

So, it was back to look at MT. They had changed the licensing structure, and we could scoot in just below the Personal Edition (5 authors, 5 weblogs). MovableType is well worth the $70, so we ponied up the money and are now completely legit.

My first reaction to MT3 was benevolent. I liked the changes they had made to the author/admin layout. It was much smoother and flowed together nicely. That about sums up the good parts. (Which is not to say their is nothing else good about MT. MovableType is a great product. It's just that no extra goodness was injected with 3.0. All of the existing goodness was "good enough" in 2.661.)

Jay Allen had said that MT3 fixed the comment spam problem, and there was to be no more development, on his end, for mt-blacklist. Well, MT3 has not fixed the comment spam problem. When a new comment is added to an MT3 blog, there is no way to go in and say:

  • never allow this IP to post comments, and
  • Never allow a comment posted from anyone that contains a link to any of the domains linked to in this comment, and
  • delete this comment, and
  • delete any other comments that match this new criteria, and
  • rebuild all of the relevant files.

The above I could do with a press of a single button with mt-blacklist. Now, with MT3, I can ban the IP; but that's it. This fixes comment spam how? MT3 replaces the functionality of mt-blacklist in what way? The fact of the matter is, it does not. MT — great piece of software — but I just shelled out $70 to reduce functionality. Great. [Update: Jay Allen is, indeed, continuing to develop MT-Blacklist as this post blatantly says — Your MT-Blacklist Wish List — my fault for not double-checking its status more carefully]

That's not the end of the comment woes.

Back when MT3 was just in beta and only super-cool, super-select people got to beta test it, there was some kneejerk reaction to the new ultra-great, ultra-spiffy, ultra-black-helicopter-possiblity of TypeKey. The way that shakes out is in my weblog config, I have the option to enable or disable "registered commenters" and/or "unregistered commenters." I like everybody being able to comment whether or not he or she is a Typekey person. So, I enabled both of them. So, anyone and everyone can comment here! (Nevermind the fact that I no longer have any effective anti-spam measures.) And, the comments can go through without approval... see the checkboxes:

But, this works in absolutely no way. When someone posts a comment, it requires approval. I can no longer enable my blogging software to allow commenters to immediately post. Let's look at that picture again.

Yep. Pretty sure I have it setup to allow immediate posting of comments. And, absolutely postive comments do not get posted (go ahead and try commenting on this post — it won't appear). So, $70 to reduce anti-spam plugin functionality and reduce overall core functionality. Great.

I'm sure MT 3.01 will fix my comment posting problem. And, MT 3.3 or 3.4 will fix my spam problem. The question is, which ones of those releases will I have to shell out more money for. The answer is, I can't modify the source code to my own blogging software to fix the problems myself. In the long run, it would have been easier to have grabbed Wordpress, put on my PHP hat, and modifed that to be able to do multiple blog/authors. But, I didn't. And, I have already spent too much of my time enhancing and tweaking my current navel-gazing tools to want to go and hack on another. So, here's to MT3. And here's to Wordpress, I might see you soon.

Does the Order of Elements Matter in XML?

2004-05-21 2:37PM

Does the ordering of elements matter in XML? I have scanned the Extensible Markup Language (XML) 1.1 specification, but nothing jumped out at me. For example, are:

<parameters>
    <field>foo</field>
    <field>bar</field>
</parameters>

and

<parameters>
    <field>bar</field>
    <field>foo</field>
</parameters>

Equivalent?

Does the specification weigh on that one way or another?

Is it up to the producer of the XML and the consumer of it to agree to preserve order? If that is the case, it seems to remove some eXtensibility of XML because then you are requiring anyone parsing/writing to the hypothetical document to make sure he or she is using a library that preserves ordering of elements.

Context.pm Change Saving for Posterity

2004-05-16 5:37PM
Custom MT hack used here. Saving it here for posterity:
--- Context.pm.orig     Sun May 16 17:23:00 2004
+++ Context.pm  Sun May 16 18:05:38 2004
@@ -948,8 +948,10 @@
     require MT::Trackback;
     my $tb = MT::Trackback->load({ entry_id => $e->id })
         or return '';
+    my $blog = MT::Blog->load($e->blog_id);
     my $cfg = MT::ConfigMgr->instance;
-    my $path = $cfg->CGIPath;
+   # my $path = $cfg->CGIPath;
+    my $path = $blog->site_url;
     $path .= '/' unless $path =~ m!/$!;
     $path . $cfg->TrackbackScript . '/' . $tb->id;
 }
@@ -962,7 +964,9 @@
         or return '';
     return '' if $tb->is_disabled;
     my $cfg = MT::ConfigMgr->instance;
-    my $path = $cfg->CGIPath;
+    # my $path = $cfg->CGIPath;
+    my $blog = MT::Blog->load($e->blog_id);
+    my $path = $blog->site_url;
     $path .= '/' unless $path =~ m!/$!;
     $path .= $cfg->TrackbackScript . '/' . $tb->id;
     my $url;

File Sharing Between WinXP Pro and Win98

2004-05-08 3:07PM

For some reason, I have been asked to transfer some files from a very old Windows 98 box to a Windows XP Professional box (don't ask; it's a favor for a friend). I figured this would be an easy task. Create a share on the WinXP box, give write access to the everyone group, navigate to that share from the Win98 box, and dump the files. Right? Wrong.

I did not have the ambigious "Microsoft Network" password for the Win98 machine, but that is no bother. You hit "cancel" at the login screen, and it just lets you in. (I had always assumed that those credentials were merely a placebo for Win98 users and had no effective use.) So, I hit "cancel" and was dumped into the desktop. I had already created the wide-open share on the XP box and both computers were connected to the LAN. I ran \\computername and was given a password prompt to access the XP machine &mdash "you need a password to access \\computername\ipc$". No, not a username and password prompt; rather, just a password prompt with no discernable username associated with it. I left it blank and hit "okay" (fully expecting that to work). It did not work.

I hopped back over to the WinXP machine and enabled the Guest account. "Maybe that's the default username Win98 uses to access shares," I thought to myself. I attempted again and failed.

It was asking me for a password associated with \\computernam\ipc$, so my thought was that if I tried directly accessing the share via \\computername\sharename maybe I could bypass this Windows InterProcess Communication$ credential challenge oddity. (Isn't Windows supposed to be easier than this?)

Typing in \\computername\sharename was a no-go. Still challenging me for some mysterious username-less password.

I tried some more various combinations of trickery trying to make it just-work before finally stumbling upon the answer. First, on the Win98 box, create a new "Microsoft Network" account JRandom. It will whirl and copy and transfer settings for a while desperately attempting some unnecessary DWIMmery. Reboot the 98 box and actually log in with the newly created account. Now, go back to the XP box, and create a local account to that computer called JRandom with the same password you gave the 98 account. Make sure XP's JRandom has rw access to the share. Finally, from the 98 box, you can enter \\computername\sharename and have it just work (even though the two accounts are completely separate, have nothing intrinsically in common except they are the same name and password).

*shrug*

It took me a while to figure this out, and Google was surprisingly not as helpful as I expected, so I thought this is a good nomination for a blog entry.

Disable Browser Window Resizing

2004-05-06 12:19PM

From Critical Section

I just want to say - there should be a special punishment for developers of software which automatically resizes your browser windows.

I concur. If you use a nice browser, you can go to Tools → Options → Web Features → Advanced and un-check the box next to "Allow scripts to move or resize existing windows."

Setting Up New Alpha-Geek Server

2004-01-30 3:07PM

Chuckie (← pointer to his forlorn blog) and I have acquired a dedicated server from ValueWeb. They set it up with Red Hat, and Chuckie spent last night performing various voodoo trickery to hot-install Debian on the running RH distro. (Good job, Chuck-man!)

Now, I am going to spend the afternoon getting my hands dirty with Apache Virtual Hosts and various IP listenin' magic to whip it into shape to handle alpha-geek.com, andywismar.com, and the people along for the ride.

Should be fun.

Idiomatic Perl: Finding the Location of an Included Module

2004-01-29 6:59PM

It's been a while since I have posted any idiomatic Perl, so here is an extremely useful idiom to those that do not know it already. Say, you are using the module Net::SSLeay, and for some reason, you need to peer into its innards. Sure, sure, you could run a find / -name SSLeay.pm -print; but there is an easier way. You could, also, execute perl -e 'print join "\n", @INC' and go hunting through all of those directories; but there is an easier way:

user@server:~# perl -MNet::SSLeay -e 'print $INC{"Net/SSLeay.pm"}'
/apps/pkg/production/perl/lib/site_perl/5.8.0/sun4-solaris/Net/SSLeay.pm

Should I Buy Beer or Source Control?

2004-01-29 6:01PM

The only reason I am linking to this — Getting Started with Your Own Software Company — article, that has already been featured on Slashdot in Eric Sink on Starting Your Own Software Company, is the following two quotes:

The world spends more on beer every day than it spends on version control tools in a year.


how much time did you assume it would take for you to build your 1.0 release? Whatever it was, double it... Building that first release will take you a lot longer than you think.

MyDoom Virus Report from the Case Email Servers

2004-01-28 12:41PM

In the past 24 hours, 713,594 email messages have gone through our new AV email filter servers (a lower number than normal because many SMTP servers out there in the cloud of the Internet are still using the old MX records that point to the old SMTP servers). 232,065 have been the W32/MyDoom-A virus. That's nearly a third of the email! They have all been caught and deleted.

In a half hour or so, the TTL's for the old servers will have completely run out; and most of the Internet will be concentrating solely on the new AV email filter SMTP servers. I'll run the numbers again, then.

So far, though, this has not been as bad as SoBig.

I Like "LinkBlogs," But I Like Some More than Others

2004-01-27 4:53PM

Skimming through so-called "linkblogs," "blogmarks," "one-liners," "quickies," whatever is nice. I like reading through them. I subscribe to several of them, but I like the format of some over others.

How I use my aggregator is as follows: I read through the accumulated posts, basically, skimming them for worth; if one is "worthy," I store it in my Saved Items area to get back to; repeat ad nauseum until I get caught up with all of the new items. Then, I go back and begin intently reading the items I saved.

This works fairly well for me. And, for linkblogs like Simon Willison's Blogmarks, Jeremy Zawodny's linkblog, LaughingMeme's MLP, etc. it works great. Each link is a separate entry. I can save each individual link that they post. I see an entry that I believe I will be interested in or is worth reading later, I save it; and I pass up the one's that point to cat pictures and such (I don't much care for cats — not even kittens).

But, then there's the other style of linkblogs such as Erik Thauvin, Keith Devens, and random($foo). This doesn't work for my aggregator reading heuristic. All of their links are dumped into one post, and if I see two or three of them I would like to read (out of 47 or so), I need to retain the whole post. When I finally get back to the saved "linkdump," I have usually forgotten why I had saved it in the first place and have to go through rereading through all of the links rediscovering why I saved it in the first place.

Then, there's the whole thing with subscribing to their "linkblogs" separately from their main blog (which I like), but that is neither here nor there.

Not that any of this will end up causing me to unsubscribe from anything.

Recommendations for PubSub Subscriptions

2004-01-25 2:19PM

I have a PubSub subscription. Any time anyone that is monitored by their service says anything about Perl, it gets added to an RSS feed that I subscribe to via BlogLines. Needless to say, this generates a lot of items; and there is a relatively low signal to noise ratio in there. What I would like to do is go in there and edit my search negating out items that match "freshports", "freshmeat", "comp.lang.php", etc.

So, I clicked on over to PubSub.com and clicked on the My Subscriptions link. It took me to a page that asked me for my email address.

"Ah, good," I thought to myself. "It's having me log in so I can edit my subscription parameters."

I enter in my email address. The next page informs me that an email has been sent to my account with a list of my subscriptions.

"Ah, good," I think to myself. "In the email, it will give me links to visit to edit my subscriptions."

No such luck. All I get is a link to the URL where the RSS feed is generated and a link to cancel the feed. No link to edit the parameters.

So, in response to the blog entry How PubSub.com is different from *, where Bob Wyman asks:

At present, we're just trying to get some folk to come by and test the site. We hope they will let us know what they think about the results of our matching and that they'll give us ideas on how to improve the subscription interface.

My idea for an improvement on your subscription service, allow me to edit the parameters that generate my feed. Right now, I can cancel a feed and generate an entirely new one; but I will probably be "editing" this a lot to try and balance the signal/noise ratio and would prefer a more streamlined and efficient way to accomplish this.

Sooo, How Is This Orkut Thing Going to Work?

2004-01-24 2:29PM

Through some sick twist of curiosity, I went to see what orkut (in affiliation with Google) was all about. "What the Hell..." I thought. "One more account on one more web page that I will forget before too long. At least it might entertain me for an hour or so; give me something to play around with..." On the frontpage, there's a login form plus a link to "join orkut."

Simple enough. I clicked on the link to join but, alas!, was defeated.

So... uh... ummm... did they just bootstrap their "friends" network with one dude and tell him "start inviting people?" Who was this first member who all other members will descend? In other words, what kind of elitist bullshit is this?

My life just won't be complete until I get an invitation to join orkut.

Update: According to Orkut Circuit, the starting person was Orkut Buyukkokten, himself; and the rest is an experiment in 6° of separation.

C#'s Test Harness

2004-01-23 4:05PM

Via More Perl at Microsoft, I stumbled upon Gus Perez's blog entry Testing the C# compiler, which has the statement:

Our test harness (tool we use to execute and validate results of each test) is a Perl script

While I do not consider it that big of a deal; it is not as if Perl has suddenly conquered the world because someone installed ActiveState on one of the Redmond Giant's computers. It's just that I wonder about people who work at Microsoft, "do they use the right tool for the job or has functional fixedness set in and they use VB everywhere?" I wonder the same thing about Big Blue. Do they use Java everywhere? Even where it is not the right tool for the job?

So, I am just glad to see MS thinks a little outside MS.

Update: Scoble saw it, too.

Damned Cool Subscription Service

2004-01-21 3:31PM

Damned cool — Syndication Subscription Service. It's a service where you enter in what aggregator you use. It remembers that. Then, if a blog/syndicated-website links appropriately to their service, you can do one-click subscribing no matter the aggregator you use. Well, not "no matter" the aggregator you use; you have to use one on their list; but it supports a lot of them:

Can't Get Enough CSS

2004-01-19 10:01PM

My period of CSS knowledge consumption is coming to fruition — playing around with the layout of alpha-geek. If you use a nice browser, you can start switching through stylesheets (it's that little icon on the lower left corner of your browser window). Many more stylesheets to come and a way to save your preferred stylesheet in a cookie.

Note: The "Old Style" stylesheet — the one that mimics the previous design for this site — is still pretty rough. I'm working on it, but honestly, I don't much care for that site design anymore, so I may just abandon it.

How to Load External CSS Stylesheets

2004-01-18 11:43PM

I can't figure something out — what are the qualitative differences between the different ways to load external CSS stylesheets? The two most popular ways are:

<link rel="stylesheet" href="/styles.css" type="text/css" />

And:

<style type="text/css">
@import "/styles.css";
</style>

What is the difference between the two? More generally, what are the overall best pratices with the loading of stylesheets (I am not talking about accessibility issues and non-CSS browsers; rather, getting stylesheets to CSS-aware browsers)?

Picking some examples:

People / Sites using @import
Simon Willison
<style type="text/css">
@import "/green.css";
</style>
Mark Pilgrim
<style type="text/css" media="screen">
@import "/css/squares-final.css";
</style>
CSS Zen Garden
<style type="text/css" title="currentStyle">
@import "/001/001.css";
</style>
People / Sites using <link rel="stylesheet" type="text/css" href="..." ... />
mezzoblue
<link rel="stylesheet" type="text/css" 
href="/css/v33.css" media="screen" />
<link rel="stylesheet" type="text/css" 
href="/css/v33print.css" media="print" />
<link rel="alternate stylesheet" type="text/css" 
href="/css/radar-lg.css" title="radarlarge" media="screen" />
Andy Budd
<link rel="stylesheet" 
href="http://www.andybudd.com/blog/styles-site.css" type="text/css" />
People / Sites using both
A List Apart
<style type="text/css" media="screen">@import "/c/ala.css";</style>
<link rel="stylesheet" type="text/css" 
media="print" href="/c/print.css" />

Bring Me Your Regexs! I Will Create HTML To Break Them!

2004-01-12 11:01PM

In the comments of Do Not... DO NOT! Parse HTML with Regex's and Example of Hard to Parse HTML, a couple of people piped up about how there are legitimate reasons to use regex's when your input is HTML.

Let me reiterate, if all you can say (in the biz we call this "specification") about the input to your program is that "it will be HTML"; there is no reason on God's green Earth that you should be using regular expressions to parse it. I can't think of a way to make that any more clearer.

Patrick Walton was first up and offered these two regex's:

s/<\s*script.*?>//gis;
s/on[a-zA-Z]+\s*=//gis;

This will, of course, mutilate the contents of a page like:

<html>
<body>
onMyBirthday=FUN!!
onHolidays=FUN!!
ontology=FUN!!
batons=FUN!!
</body>
</html>

Also, there are additional places other than just <script> tags and on* attributes where one can hide JavaScript code (via Integrating JavaScript into Stylesheets):

<html>
<body>
<style>
background: url("
    javascript:
      document.body.onload = function(){
        ...custom js here...
      }
  ");
</style>
...
...
</body>
</html>

There are more ways to break Patrick's regular expressions, but I think that is enough for now.

The next guy to chime in was one d.furuta, who says:

Assuming you know what you're doing, it's fine to use regexes if appropriate. The problem is not experienced programmers using regexes; it's inexperienced programmers not knowing when regexes are acceptable and when a parser is needed.

I have heard this argument before. Usually, I hear it as justification for seeing something like the following code:

($table_data) = $html =~ /<td>(.*?)<\/td>/gis; # pull out data between <td> tags

"But, it works!" they say.
"It's easy!"
"It's quick!"
"It will do the job just fine!"

I berate them for not being lazy. (I, also, berate them for using .* in a regex — see Death to Dot Star! — but that's the subject of a different post.) You need to be lazy as a programmer. Parsing HTML is a solved problem. You do not need to solve it. You just need to be lazy. You have CPAN. You will never reach Perl-Guru until you have mastered CPAN. Be lazy, use CPAN and use HTML::Sanitizer. It will make your coding easier. It will leave your code more maintainable. You won't have to sit there hand-coding regular expressions. Your code will be more robust. You won't have to bug fix every time the HTML breaks your crappy regex. This is true laziness:

#!/usr/bin/perl
use warnings;
use strict;

use HTML::Sanitizer;
use LWP::Simple;

my $html = get('http://alpha-geek.com/example/crazy_html.html');

my $sanity = new HTML::Sanitizer;

# pick your poisons
# in the documentation, learn how to specify permissible attributes, also
$sanity->permit_only(qw/ html head title body a p h1 div strong em /);

print $sanity->filter_html($html);

__END__
# the above code outputs
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Crazy HTML -- Can Your R
egex Parse This?</title></head><body><h1>Did The Javascript Execute?</h1><div> I
 will execute here, too, if you mouse over me </div></body></html>

There now, doesn't that code seem so much nicer than 97 regex's and various special case post-regex and pre-regex string manipulations? Isn't that nice, clean, clear, and concise? Aren't robust libraries wonderful?

One last time:

Parsing HTML is a solved problem. Use a library.

If you still need convincing I can go on and on and on about this topic. Just let me know. And, the best way to let me know is to continue posting regex's in the comments. You set'em up. I'll knock'em down.

Obtaining System Privileges to a Local Windows XP Box

2004-01-12 5:31PM

I would have just opened the case, yanked the hard drive, and read it from another computer; but this is much more elegant — Dana Epp's ramblings at the Sanctuary : Defeating the BOFH: Compromising A Windows System (via Scoble in Dana gets into a locked machine).

His methodology was to boot from a Knoppix CD and write over logon.scr with cmd.exe. Rebooting, Windows XP came to the login prompt; he waited; the login screensaver executed after about 15 minutes; this resulted in a command shell executing in the login screensaver's stead. Voila!

Much more elegant than yanking the hard drive.

Atom, Do Not Forget the Unix Philosophy

2004-01-10 4:59PM

I subscribed to the Atom mailing list about a month ago mostly to hear what the murmuring was about including category-like elements. Well, I have yet to see that discussed. However, they have discussed how to represent the kitchen sink in an atom feed.

The list is extremely high volume. Paul Hoffman noted in a message on January 9th:

I just saw that you folks have sent more than 2000 messages in under 6 months, with only 170 subscribers. And I thought IETF discussions were talkative!

These people know how to talk!

A lot of it is good discussion. A lot of it is, also, absolute craziness. There are people that seem to want atom to solve every problem they have with website communication. People bring up representing BlogRolls in atom, recursive atom feed of atom feeds, synthesizing feeds, and even a brief mention of representing FOAF data in atom.

I think it just has to stop. I think people need to remember the Unix Philosophy:

Do one thing and do it well.

Atom does not need to solve every problem you can think of, or that you can fantasize about, or can hypothesize that at some point in some dreamland the problem may crop up, or that you can show off your intellectual prowess by masterfully thinking up some esoteric edge case that will occur once as use cases approach infinity.

I think the development cycle for atom needs a benevolent leader, a philosopher king, a Larry Wall / Linus Torvalds / Guido van Rossum / Yukihiro Matsumoto. Someone to say, "this is wheat; that is chaff; and this is where we are going." This is easier to said than done.

Quotable Tim Bray

2004-01-06 12:23PM

Via Tim Bray in Technology Losers:

4GL Spelled out in full, that would be Fourth-Generation Language. This was super hot stuff back when I was getting into the business in the Eighties. The notion was that instead of writing detailed procedural programs full of messy and easy-to-get-wrong if statements and loops, you'd write declarative programs that just generated the output from the input. This went over big-time with the management community, which was (and remains) sick of paying high-priced temperamental programmers to write code that's full of nasty little detail-level bugs.

Unfortunately, it turned out that with a 4GL, you could write 90% of your application in no time at all (making managers wonder why these things normally take so long) but you couldn't get the last 10% done at all. The fact is, life has if statements and loops and so on, and programming systems that pretend these things don't exist are at best crippled.

There were dozens of these things (my personal demon was DATATRIEVE), now mostly relegated to the technology graveyard or at least to niche roles. The two mainstream technologies today that retain some flavor of 4GL are Visual Basic and XSLT.

I Would Like Platform Independant (Straight-Forward) RPC's

2004-01-05 3:53PM

Web Services? What has the industry been smoking?

If the industry really needs some kind of platform independent remote method invocation (something that I seriously doubt) I think we could do better than to hijack HTTP and XML.

I, for one, would certainly like some platform independant remote procedure calls. Calls to Oracle. Calls to LDAP. Calls to proprietary anti-spam devices. Calls into hand-rolled legacy systems built around a Berkely DB. Calls to a Kerberos authnetication server. Calls to Active Directory. I program this stuff everyday. If I can wrap the entire ball of duct tape up into a single XML-RPC/SOAP/REST/pick-your-poison call, that would be great.

What is this guy smoking that he finds folly in the issue?

If I can make a call like the following:

Bloglines Killer Feature

2004-01-04 1:37PM

For me, Bloglines' "killer feature" is that it is server-side. It's like IMAP but for news aggregators. I go to work. I do some reading at work. I go to some other place and do some reading there. When I get back to my place, I don't have to go through and redeclare items "read" that I had already read. All of that stateful information is held on the Bloglines' server and follows me around wherever I go. Like I said, it's like IMAP but for news aggregators.

Sure, sure, it's interface is a bit lackluster; but it has to work in the confines of a browser. I'll give up UI-niceties to have my software application maintain its state between various desktop computers.

What would be really cool is if Bloglines had an externally facing API. That way, real desktop clients could be written to include nice UI's but maintain state on the Bloglines' server. What I am talking about is a well-defined news aggregator API (probably using a combination of OPML and Atom and various hooking mechanisms to mark something as read, move it into a different folder, subscribe to new feeds, rename feeds, edit feeds' URI's, etc., etc., etc.). That would be good stuff.

In a nutshell, I want a non-browser based news aggregator that operates on open standards and maintain its state via a centralized server. I want IMAP for news aggregators.

At Work Saturday Morning == Increased Blogging

2004-01-03 9:23AM

At work on a Saturday morning, again, watching the metadirectory run a full load on the LDAP server re-populating existing and new attributes. The best case scenario is that I end up doing a lot of sitting (and, consequently, posting a lot of one-liner's as I catch up with my news aggregator) whilst watching the metadir run correctly. The worst case scenario involves a lot of running around, cursing, and crazy, quickly-written perl -MFix::Everything -e 'please'.

Hopefully, you will see a lot of one-liner's appearing as I remain bored. Bored is better than busy for this morning/afternoon.

Example of Hard to Parse HTML

2004-01-02 8:11PM

In the comments of Do Not... DO NOT! Parse HTML with Regex's, Mark Pilgrim asked for a test page illustrating some hard-to-parse HTML that had an innocuous JavaScript payload.

Here it is — Can Your Regex Parse This?. (If you saw an alert JavaScript box, the JavaScript executed.) You can view source on that page, or I put up a text of the source here.

The programming trick would be to write a regex that effectively stripped the javascript. Of course, in this specific example, that could be done with relative ease. But, the general problem is much harder. You should just use a library to parse HTML.

Do Not... DO NOT! Parse HTML with Regex's

2003-12-31 12:59PM

Via Sam Ruby in Syndication and CSS, I discovered that Joi Ito was putting CSS in his RSS feeds. The much-linked-to howto is located here, which points out an old post from Mark Pilgrim entitled How to consume RSS safely.

The gist of Mark's article is that you should strip certain tags (or, only allow certain tags) when parsing and displaying RSS feeds. This is kind of obvious. The old software adage "be liberal in what you accept" does not apply here.

The scary part is in the comments where a bunch of RSS Aggregator writers were alluding to the fact that they were going to use regular expressions to strip out the unwanted tags and unwanted tag attributes. My God, it's like a whole new crop of regex newbies suddenly encountering the age-old problem and applying the age-old faulty solution. (Don't these people read PerlMonks?)

Regular expressions (in any language) are not the right tool for the job when parsing HTML. Use a robust library offered in your programming language. (I bestow upon you HTML::Parser or a host of other HTML parsing libraries for Perl.)

The following is HTML that most browsers will display. These examples illustrate some of the most common problem cases with parsing HTML.

What Context Would You Like Your Patch?

2003-12-29 12:19PM

It's weird, but I have never seen any documentation on what "industry standard" is for sending in patches to Open Source projects. I am no patch-King, myself. Over the years, I can count the number of patches I have ever sent in to Open Source projects on one hand (on 3 fingers, to be precise). But, when I was doing it, I had always wondered, and googled, and perplexed over how to generate the patch. More specifically, how much context to include with the diff. I think, each time, I came to very similiar conclusions as this guy:

diff -C 4 from-file to-file

Four lines of context seems to be just right.

Voracious Knowledge Consumption

2003-12-24 2:23AM

It happens to me about once every 2-3 months. Maybe more. Maybe less. And, each time it occurs, the degree at which it occurs varies (ever so slightly, really, but it varies nonetheless). What I am talking about here is the sudden desire to learn absolutely everything there is to know about something. I am talking about an unquenchable craving that keeps you up past 2am night after night, plagues your mind while you are at work, and constantly haunts you while you try to perform your day-in / day-out activities. You just have to know everything there is to know about this "thing." The more you try to ignore it, the more prominent the fixation becomes. You just need to feed the information beast until it's gorged with data and rendered impotent; thus allowing you to sleep at night, once again.

My current knowledge passion is CSS. I can't get enough. I read about it. I hack away experimenting with it. (Yes, sitting on my desktop right now are about a half-dozen different pure-CSS designs for Dichotomy's Purgatory.) I just can't get enough. It's really quite powerful.

But, enough of this bloggin' stuff. I need to get back to CSS readin' and playtime.

Benchmarking Some Regular Expressions

2003-12-22 2:37PM

Over on 10 Goto 10, there was a post, Java regex, which linked to (oooh the winding web of blogger links) some regular expression benchmarks of different Java Regex engines. Someone in the comments asked about benchmarking this against Perl. So....

What I Need from a Server Side Anti-Spam Device

2003-12-21 6:09PM

I originally posted this on the cwru.net.general newsgroup in an attempt to explain the intriquicies and complexitiies of server side anti-spam devices. But, I thought it was a good list; so I am posting it here. Who knows -- maybe somebody has a system like this...

Here's The Problem I Need Solved by an Operating System

2003-12-20 2:07PM

I have two primary desktop computers (both do run Windows); a work computer and a home computer. I have an exceedingly similar suite of software installed on both -- Mozilla Firebird, Mozilla Thunderbird, WinAMP, EditPlus, etc., etc. Additionally, I have a bunch of settings defined -- file associations, desktop layout, command shell options, etc. I want to be able to share this securely between the two.

I want my Thunderbird Bayesian spam filtering learning algorithm information store to be shared between the desktops. I want my Firebird's bookmarks to be the same. I want to setup tab completion for the DOS shell on my work computer and have it setup on my home computer. I want to set the command prompt's shell to a blue font color, too. I want to change my file association for .mp3's on my home computer and have the same thing take effect on my work computer.

And, it does not stop there, I want this configurable. I want to be able to specify whether or not these changes that I make to one desktop machine gets replicated out to the others (and, I want a configurable default setting that this choice is non-obtrusive most of the time).

I realize how difficult this would be. Differences in hardware. Differences in libraries. Differences in installed software. But, this is what I want. And, something like this should be handled at the OS level. And, it should be provide a well documented, open, clear, and consistent framework for ISV's products to hook into.

Are you listenin', Scoble? That's how I would make Windows better (well, one of the ways, at any rate -- I would also like ActiveState Perl installed by default, too; but we won't get into that).

I Gave Perl a Present

2003-12-19 12:53PM

You probably have heard, Perl is 16. Happy Birthday, Perl!

And, you know what you can do to celebrate this merry occassion? Go donate money to the Perl foundation. No, seriously, go do it. I just did. I donated a measly $20, but that's all it takes. Go. Donate. It's $20. You can spare it. All you do is type in your information (name/address/cc number/amount to donate) and hit submit. It's easy. Donate $20. Don't be a prick. For God's sake, it's h(is|er) birthday.

A Blog Queue That Never Ends

2003-12-18 12:43PM

I am glad I am not the only one whose queue of "stuff-I-will-blog-soon" keeps growing -- My ~/blog directory is starting to feel more like a mail queue and On not finishing things.

I have 13 draft entries in my blog queue that exist in some form of incompletion including:

  • Movable Type HowTo: Create RSS feeds for categories.
  • Explanatory "What Exactly is NP-Complete" including some good ol' down home deterministic and non-deterministic state machines.
  • OOP limitation spouting about how to model an Object X that has a relationship has-a with an Object Y, which in turn, has a relationship has-a back with Object X.
  • More Perl idioms because one can never get enough.

Maybe providing insight into my to-blog queue will jumpstart me into flushing it?

The Web is for Machines

2003-12-17 11:13AM

A little over a month ago, there was some ruckus over the semantic web, meta-data, etc. You know what? I am starting to believe the web is for the machines. Yep. Not for us. Is for machines. We should embrace it.

Right now, there are metric tonnages of meta-data being produced; a lot of it being displayed to humans that just don't care. But, all this meta-data continually gets produced completely contrary to the notion that meta-data is expensive. Don't believe it -- Metadazzle overfizzle (read that for nothing else than the picture of using Excel to write a love letter).

I'm okay with all of this, though. Let the web be for the machines. Occassionally, I human can walk up to one of these machines, ask it for information; it will whir and buzz and beep and spin through heaps of meta-data, and it will hand us the information we want. That is, until the machines enslave us, which happens, I believe, directly after the meta-data heat death.

A Little Conundrum With Inter-Blog Communication

2003-12-16 1:37AM

Let's say "hypothetically" you were the project lead on a team that is going to roll out a blogging system to a medium sized user base in the next 2-3 months. (Approximate user base size... I don't know... we'll say, about the size of a University's constituents... ≈30,000 at maximum saturation). Obviously, you will want to include the ability for the users, when they set up their blogs, to syndicate them. And, obviously, you will want a default to cater to the users that want to start their blog by clicking next through a couple of windows and have it "just work." I see three scenarios.

RSS and Atom, Together, Holding Hands, Smooching

2003-12-15 5:47PM

Now that the syndication business has forked why won't it fork again and again and again?

I do not think that RSS and Atom are the same thing. Atom is specific to blogs. Atom defines a way for blogs to blog, to communicate inter-blogg-ing-ly, and to unify an API so cross-platform blogging clients can be built i.e. use any blog client on your Google blog or your Typepad blog or your LiveJournal blog... etc.

RSS will be used for what RSS is for -- syndicating web sites. I have no plans to stop using RSS. And, now, I do have plans to start using Atom.

Right tool for the right job. This applies to RSS and to Atom. They have different jobs. But, there is some small modicum of intersection between their problem/solution domain and everyone is having a hissy-fit over it.

Scoble keeps asking, "what should Microsoft do?" "What format should Microsoft support?" Well, that's easy, for syndication, use RSS. For a blogging client or server, use Atom. And, if you build a web server, make sure to use HTTP instead of FTP. Right tool for the right job... everybody got that? Good.

Now, can we all move along? RSS will be supported in a lot of capacities. Atom will be supported in a lot of capacities. The world will not end. Armageddon is not upon us. You will still be able to buy cold beer at a reasonable price. You will still be smarter than all of your coworkers. The best era of cars will still be the one's that came out when you were 16. Kids will still have it easier than your generation had it. And, RSS and Atom will take sunset strolls down sandy beaches in direct opposition to the baying and naying from the quibbling peanut gallery (myself included).

However, Atom is Missing Something

2003-12-15 10:23AM

The Atom 0.3 Spec is out (via dive into mark: Atom 0.3 snapshot). It seems to be missing a critical element, though -- a <category> element. As a matter of fact, in Mark's Movable Type template for generating an Atom feed, he overcame this deficiency by using the <dc:subject> extended element from the Dublin Core. That makes little sense to me. Why are they already using extended elements?

So, I went to the Atom Wiki to discover what the justification was for specifically discluding a category designation for posts. And, this is what I hate about Wiki's; when you are looking for something exact, it is hard to find in the hyperly-overlinked dystopian cornucopia of information. Searching for nodes that contain the term "Category" in the title, I had 21 hits; the most promising being CategoryElementSpec. Unfortunately, that was just a page with 7 links elsewhere.

After about 45 minutes of stumbling through the Wiki (which, is the only way to desribe navigating a Wiki -- stumbling), I finally encountered the node Categorization, which included the discussion on categories.

Basically, everyone thinks there should be an element. Everyone, also, realizes categories are a hairy problem. As a matter of fact, the more generalized problem is "groupings," which is one of those problems that is easy in concept and incredibly difficult when you start thinking about it. Can a group have other groups as members? What do you group on? Etc.

I just hope that they stick with KISS on this one. Don't try to represent hierarchal categorization in the feed; keep this lightweight. A syndication feed is no place to start reinventing a relational database; just flatten out the information. If I were to propose something, it would look exactly like the category tag for the RSS 2.0 Specification.

Disable Search Box in the Navigation Toolbar in Mozilla Firebird

2003-12-13 2:11PM

In the newer nightlies of Mozilla Firebird, the default builds have a search text box crammed into the navigational bar. And, there's no way to disable it via the standard "customize toolbar," preferences, or advanced preferences menus. I couldn't even find out how to disable it in the Firebird Tips & Tricks. After some googlin' and surfin', I did discover how.

Open up your userChrome.css file (these configuration files are in your profile which can be located via these instructions -- Editing Configuration Files). Add the following line:

/* Eliminate the Search box */ 
#search-container { 
   display: none !important; 
}

All Right, You Sold Me On Atom

2003-12-12 5:13PM

I was very skeptical about this Atom business. I thought they were reinventing for reinvention's sake. At the very core, I could see them wanting to come up with a unified blogging API; but I could not understand why they would not want to use RSS 2.0 as their syndication format (Don Park's similar notion where he proposes that Atom hijack RSS 2.0 and use it).

Well, now I understand. The whole Atom "thing" is explained very well and succinctly at Atom Slideshow, XML Conference 2003 (via Sam Ruby: Atom in Depth).

Running down a couple interesting items. The syndication format and API are tied together. To create a weblog entry, one executes an HTTP POST of the data in the Atom syndication format. Similarly, to retrieve an entry, execute a GET. (The HTTP PUT and DELETE verbs are used in their self-describing manner as well -- "API".) To me, that seems appropriately symetrical.

The slideshow also dealt with some of the shortcomings of the RSS 2.0 Specification. For example, can the <title> element have markup in it? How do you designate whether it does or does not (good example in the slideshow of title elements with different levels of markup)? The simple solution to that is, obviously, give the title an optional attribute that designates markup, which is what they did. It's refreshing to note that KISS is prevalent in the design.

They, also, tackled an issue I ran into when trying to create Movable Type templates that produce a non-funky RSS 2.0 feed; that is, where to put an entry's full text and how to designate it's encoding. The <description> element just didn't fit with that (as they describe in the slide "other problems"). They solved it by splitting <description> into two elements, <summary> and <content>, and use the same attribute designation to declare how the element's content is encoded.

Overall, I found the slideshow to be very revealing and well prepared; plus, it lays out a good case for what they are doing. (See, and who says I am not open minded? I can do an about-turn on an issue when one side of the argument is well justified and aptly communicated.)

It's too bad a presentation like this wasn't already prepared when Scoble asked for someone to "explain to me in layman's terms the difference between Atom and RSS 2.0".

Making It Easier to Subscribe to RSS Feeds

2003-12-10 1:23AM

Dave Winer talks about making it easier to subscribe to weblogs' RSS feeds. He suggests having a service running on desktops on a non-standard port listening for request (he uses port 5350 as an example). Basically, weblogs would put a link like "subscribe to me!!!!!!!!!", which in HTML, looked like <a href="http://127.0.0.1:5350/subscribe?url=http://www.scripting.com/rss.xml">

I see several problems with this. What about authentication and authorization? Can I just go around subscribing random people to random blogs by shooting requests at their desktop's port 5350? What about firewalls? What about the added security issues brought about by running a server-type application on a desktop machine?

I prefer to have the service running somewhere else like Bloglines. And, then, have the links look something like <a href="http://bloglines.com:5350/subscribe?url=http://www.scripting.com/rss.xml">.

Yep, you guessed it. Bloglines already has that. A link for my site would look like <a href="http://www.bloglines.com/sub/http://alpha-geek.com/rss20.xml"> and would be placed on my blog a la:


Subscribe with Bloglines

That is just something they came up with. What is needed is a standard way to do it. Someone needs to grab the ball, run with this, and pioneer a standard. There are some other issues to deal with. How would a weblog that I want to subscribe to know what my RSS aggregator is -- a desktop one or a server-centric one? If server-centric, which server?

Over-Engineered Software Design

2003-12-06 4:05PM

Okay, let me be the first to admit that I over-engineer the hell out of most anything I program. And, I would say, 83% of the time, it has provided me with no benefits. That is, the time I spent designing and implementing pluggable-framework-that, polymorphic-this, and heavy pouring of extensible-fu-out-da-wazoo all to solve a specific problem; I don't think that in the long run, I ended up saving time or work. Basically, the problem that was solved never needed to be generalized/extended in other ways; and so the over-engineered code just sat there humming along performing its relatively simple task (simple in comparison to its design). And, whose to say whether the overly-OOP-ified code is more maintainable than a procedurally written application. I would say it is. But, a functional programmer might find it to be ugly (pointer to tilly's excellent article Why I like functional programming).

But, in the remaining 17% of the cases, the net gain has been huge!

This is all getting at the article Understanding Object Oriented Programming, which Simon Willison and Hans Nowak criticize in How not to use OOP and De kritiek van Hans, respectively.

I have to admit, I would be the crazy OOP guy.

Math Bloggin'

2003-12-05 12:47AM

Ooh... we're bloggin' 'bout Math -- The infinite hotel. That's a level of blog-geekdom I haven't done. So (not meaning to allude that I will do it again), here's a quick blog-quip somewhat directly related to the referenced entry:

Does the Set of all sets contain itself?

Helloooooo, Russell.

Encoding in the Description Item Element in RSS 2.0

2003-12-04 6:53PM

I've been redesigning my blog feeds (Movable Type Template For RSS 2.0 Using Core Elements) to use the core RSS 2.0 elements in the appropriate manner. The only functionality I could not represent (is "represent functionality" the phrase I want to use there?... maybe I should reword that)... the only thing I could not do was include the full text of the post. So, I relented and used the extended <content:encoded> element.

But, according to Dave Winer, the full text should go in the <description> element. So, I put it there. Quickly, all of the aggregators began to display my feed with the HTML as:

<p>I went ahead and waded through the murky waters of what constitutes "Site Syndication" with RSS v2.0. I cast aside my previously used <a href="http://feedvalidator.org/docs/howto/mt-rss20.tmpl">deprecated Movable Type RSS 2.0 template</a>. I threw off the oddities of the "extended" elements defined in <a href="http://dublincore.org/2003/03/24/dces#">Dublin Core</a>, <a title="RDF Site Summary 1.0 Modules: Syndication" href="http://web.resource.org/rss/1.0/modules/syndication/">RDF Syndication</a>...

I could find no way to specify that the encoding was done in HTML. Hmmm... so I ran a Google Search for RSS 2.0 description encoding, and I found the article RSS 2.0 Best Practice Tip via Lockergnome's RSS Resource. Unfortunately, the article told me nothing of value. Basically, it's up to the aggregators to try and detect if the content of an <item>'s <description> element has HTML in it.

Hmmm... I'll try and wrap the <description> element's content up in <![CDATA[]]> and see if that works... Otherwise, I guess I'll be sticking with <content:encoded>.

MS Spam Blocking Idea

2003-12-04 1:13AM

MIT's Seven Hottest Project Picks

The interesting one mentioned, "spam blocking by Microsoft where each email sent requires a math problem to be solved. The idea is that mass spammers' equipment cost would increase to the point of no returns." Seems like a good idea, but you would need to reach a certain level of saturation of SMTP servers requiring this before it would work; not to mention that it breaks backwards compability with traditional SMTP.

Movable Type Template For RSS 2.0 Using Core Elements

2003-12-02 5:37PM

I went ahead and waded through the murky waters of what constitutes "Site Syndication" with RSS v2.0. I cast aside my previously used deprecated Movable Type RSS 2.0 template. I threw off the oddities of the "extended" elements defined in Dublin Core, RDF Syndication, MetaVocab, etc. (This all sounds oh-so-valiant when it all amounted to was me reading a bunch of specifications interlaced between name calling and screaming.) In the end, I went right to the source -- RSS 2.0 Specification; and I ended up finding some nifty things. The only extended element I kept was the <content:encoded> from RDF Site Summary 1.0 Modules: Content because I could not find an appropriate core element to use for an entire post's content.

If you are like me, a categorization freak, I included, in the template, how to list each entries' possibly multiple categories in the feed (most of my entries are categorized in more than one).

Without further wordy meandering, here's the feed -- Movable Type RSS 2.0 Template. In a soon-blog-entry, I'll document how I setup Movable Type to create RSS 2.0 feeds for each category individually (and, I'll make a couple smarmy comments about people setting up entirely new instances of a blogging platform to do "link blogs" when all they needed was a category). That way, someone can just subscribe to my Perl category RSS 2.0 feed if they find the rest of my non-technical type entries mostly annoying.

Stuff I Just Broke

2003-11-29 4:11PM

Doing some internal redesigning of Dichotomy's Purgatory. Broke some stuff while I was at it.

  • One-liner's are broken on the category (example: cars and driving) and full category pages (example: cars and driving, full listing) ) in that they just don't show up (except for, of course, the actual One-liner category). The Movable Type tags are applying their "context".
  • On the monthly archive pages (example: April 2003), the One-liner's that are showing up are the one's posted in that date frame (again, MT context-fu). This could be the desired functionality on those pages, but I tend not to think so.
  • The "Most Recent Comments" are getting MT-contextually-bastardized on the "Single Entry" pages (this entry being an example).

That's all I have found thus far. There very well maybe more broken stuff.

Movable Type really needs an attribute applied globally to all of their internal tags called apply_outside_of_context="0|1".

Ah well, the stuff is going to have to sit broken for now. I've had enough blog-playtime and am going to get something to eat.

Definitions Through Independent Rulesets

2003-11-26 12:23AM

Code Rage -- Do All Developers Believe They Are Better Than the Average Developer?

Yes, we all do. It's called hubris. It's an important aspect of being a programmer. In this case, however, It is a misapplication of hubris.

I believe I am a better developer than average. I, also, believe I am a better driver than average. But, how does one know if one's belief is correct?

This touches (well, not touches, "pinpoints at its core" is more like it) a much more philosophical notion of "definitions" and "criterion" and how people tend to judge others by a different set of rules than they tend to judge themselves.

All These MS Geeks

2003-11-25 10:29PM

When I first heard about .Net, I thought, "Wow!" "This is going to be crazy!" A common run-time environment that's pluggable and open!" Geeks love pluggable (and by pluggable, I mean, a clear and simple API with just enough optional complexity to satisfy everyone). I thought it was going to be great.

Then, it faded into murky waters as the Java people pointed and said, "we have that!" or "our that is better than your that"; DotGNU started and fell; Mono started, sputtered, crawled, stumbled, etc.; and everyone else kept about their business.

But, just as soon as you figured .Net went away, this whole Longhorn/PDC brouhaha started. It was a bit scary at first. I am used to seeing Linux geeks, and Perl geeks, and Python, and MacOS, and Java geeks all being zealous and excited and over-hyped about whatever "cool" thing is supposedly going on in their peninsula of the technology landscape. But, this is the first time I had seen so many MS geeks come crawling out of nowhere. And, they weren't even psuedo-geeks, these were full-fledged smart folk getting all hyped up and excited over something MS was doing. It was spooky at first watching them do interesting stuff (stuff in the most technical sense, mind you) with their platforms and muscling in on a spot reserved for us "others" -- this area of programming where we like to use our tools; where we play with our tools just for fun -- and, all of a sudden, there's all these MS-touters doing the same thing with their stuff.

I was a bit tentative at first, but I was, also, very very curious. It looked interesting. It sounded cool. It had enough buzz words associated with it to get a Starbucks lounge of MIDS students into a frothing frenzy. But, what I was looking for was whether or not it would help me work. Platforms, programming languages, IDE's, API's -- these are all tools I use to get my job done. Did .Net offer me something above and beyond?

You Know The Routine

2003-11-25 9:47PM

You know the routine... haven't had time to write... blah blah blah... been busy at work... blah blah blah... my free time has been sucked up by my all-encompassing OCD as I busily try to manipulate a candle into a form that has perfectly uniform melting characteristics... blah blah blah... ya know, normal people stuff.

My "to-blog" queue is filled up, though, and I plan on trying to get most of it out in one big defecatory1 push.



1Some words just lend themselves into being adverbisized2.
2And, others lend themselves into becoming verbisized.

New Alpha-Geek Comment Policy

2003-11-17 2:37PM

Anonymous comments (one's that have no defined name, url, or email) are still allowed; however, a default value will be used as a placeholder for the person's information once the comment is submitted.

Clairvoyance into a Future Patent

2003-11-17 1:47PM

Gates Unveils Spam Software

Quote:

A Microsoft representative said the technology will use algorithms to judge whether incoming e-mail messages qualify as junk and filter them out

I've got $500... nay... $700 that says they will be granted a patent on this. Any takers?

And The Award For "Stupidest Programming Technology Ever" Goes To...

2003-11-13 1:37PM

You. Have. Got. To be. Kidding. Me.

Hello, World in XAML (for real) (via Ole Eichorn)

World's most complicated "Hello, World" program ever. And, yes, I do think it is more complicated than "Hello, World" in Brainfuck. I guess it only makes sense, though, in the grand scheme of things.

Frontpage is to HTML as XAML is to programming

Or, something like that... close enough -- verbosity and all.

#!perl
print "Hello, World"

When Perl Executes BEGIN, CHECK, INIT, and END blocks

2003-11-11 11:47PM

It's amazing how much you can know about something and not know that you know it,... , ... in a sense... I suppose...

At any rate, here's some interesting Perl info Today's lesson is: END blocks are LIFO. There's a famous obfuscation out there based around the order of execution of multiple BEGIN and END blocks, but I can't seem to find it right now. It's somewhere over on PerlMonks' Obfuscated code section. The order of execution of the CHECK and INIT blocks was new to me, though.

Here's two more (simple yet interesting, nonetheless) for your perl enjoyment.

Take the following code, save it to a file, and execute it.

die unless -e $0;
print stat _;

What's that doing? (Hint -- perldoc: file test operators.)

And another:

user@server# perl -e 'print join "\n", values %main::'

Do you know what you are looking at?

Meta-Data is the Heat Death of Information

2003-11-10 5:41PM

So, there's been much hubbub and ballyhoo over Clay Shirky's daft criticism of the W3C's holy grail, The Semantic Web™, in The Semantic Web, Syllogism, and Worldview.

In my mind, I had formed this eloquent remark concerning data, data about data, data about data that is about data, documentation on data about data that is about data, helpful pointers to documentation on data about data that is about data, and the recursive besetting therein. But, enough meta-people have meta-chimed in at this meta-point, and I don't want to add meta-noise to their meta-signal. So, I'll just simply state it with no supporting argument:

Meta-data is the heat death of information


What Microsoft Thinks of Perl

2003-11-06 3:37PM

What Microsoft thinks of Perl

Okay, the article is circa January 1999; but at least it reveals how Perl was on the software giant's radar screen back then. It's not a bad article. To quote something:

Should you consider moving away from VBScriptsince Microsoft approves of Perl, and you can use it in nearly all their products? If you're starting out as a script developer then I think that VBScript will be much easier for you to begin with... VBScript 5.0 has classes and regular expressions that provide the two main features that might lead you to Perl. The regular expression engine in VBScript uses the Perl syntax for its regular expressions, so you should be able to use the regular expression books out there to help you get going on the wonders of regular expressions.

It just so happens that I have done some VBScript 5.0 development (way back when -- Chuckie, remember the "Big Red Button?"). What they called regex's back than have so very, very little to do with Perl regex's, it's funny that the author of the article draws a comparison.

This is why I tend to discredit Microsoft. They point at something and say, "oh yes, we have that." "Our implementation is compatible with that." In reality, it is not. They say that now, in 2003, 4 years later, about various other pieces of their technology -- "oh yes, we have that!" I afford them more skepticism than I do most others.

Utility of Pushing Programming Language Envelopes

2003-11-05 10:47PM

Couldn't agree more -- Having fun is sometimes pushing the envelope.

Playing with the nooks and crannies of a programming language is fun and useful -- exploring the edge cases, stretching the limitations of its syntax, deconstructing the Schwartzian Transform, learning and understanding perl idioms, etc.

So, go ahead and do some evil with your programming language... just for kicks.

Why VB Programmers Scare Me

2003-11-04 11:53AM

So, Don Box likes VB. That's fine. VB scares me, but he likes it.

The reason VB scares me the most is not the whitespace or the newline delimited statements. It's not the verbosity or the dim keyword. It's not Visual Studio or the splatterings of _'s.

The reason VB scares me is the developers who use VB. 99% of the time, the developer who prefers to use VB is not passionate about programming. They don't care about extending their abilities or the nuances of the art and science of programming. They are, and this may be harsh, dim-witted mechanics. They work harder and not smarter because it does not occur to them that there may be a smarter way to work. You just never meet a passionate VB programmer. You meet ho-hum, besotted people who care little for programming beyond that it is classified as their job, and their boss gives them a paycheck for sitting behind Intellincense and clacking away at the keyboard.

That's why I hate VB. Sure, I could enumerate for hours why the syntax of the language sucks. But, the real reason is that the people who are inclined to use it, settle with it. VB inspires programmer rut. Or, taken a little differently, VB attracts programmers who seek to be rutted. How many times have you ever meet a *Wow!* programmer who prefers VB?

MS Fixing Their CLI

2003-10-31 5:37PM

Could it be? Could it be?? Microsoft is fixing their shell??? Codename "MONAD".

This is one of my biggest complaints about MS (Can Microsoft Be Accurately Introspective?, Just Some MS Bashing). That would be great!

Scoble references the Slashdot article, Microsoft's new CLI, here.

The jury is still out, though. I need more technical details. (And, no one mentions what separator they are using '/' or '\'.)

Riding Around on a Segway

2003-10-30 5:17PM

I just tried out a Segway (lots of info on Amazon.com's Segway site, too).

It's a cool device (albeit, not $5000 cool, but certainly cool enough to deeply desire trying one when one is in close proximity... but, really, what isn't?). When I first hopped on, it was slightly wobbly. My natural reaction to the slight wobble was to try and compensate. This resulted in increased wobble as I shifted my weight trying to offset the natural wobble. I became a wobble amplifier and ended up looking as if I was doing a little gyrating raver dance -- all I needed was a fast tempo *oonsk* *oonsk* *oonsk* in the background. After mentally forcing myself to stop trying to offset the wobble and hump the control shaft, I began trying to move. My first inclination (as most of the other males' inclination) was to use my arms and push the steering grips away from me. Contrast this to the females' instinctive motion to shift their hips forward or backward to try and persuade the device to move. Both methodologies resulted in choppy movement. However, it took all of 60 seconds to get the hang of just naturally shifting your weight.

What Is This "Expose?"

2003-10-29 10:29AM

I keep hearing people talk about OSX, and every time they mention it, they talk about some thing called "Expose" (Panther - first impressions, The first big Panther Gotcha, etc.). I don't have a Mac! I don't have OSX! (I know, I know, weep for me...) I don't know what it is. What is it???

Sure, sure, I could google it and get 9700 articles describing it in detail complete with screenshots and feature lists and ways to customize and extend it. But, I am damned lazy.

I just hate hearing, "this is soooo cool!" but no one saying why. People just say, "Expose is cool." And, they leave it an exercise for the reader to understand why. Or, they just assume the reader is in the know, and their statement is understood as fact.

I hate being outside the "know."

Hacking At Kwiki -- Table Formatting

2003-10-28 7:11PM

I have installed and have been hackin' away at Kwiki as an experiment in documentation of the legacy systems and the inter-dependencies between them. So far, so good.

The first thing I stumbled upon was Kwiki tables. In tables, the rest of the text formations were not applied. So, if you wanted to have a table whose text was bolded or italicized or a link to another Wiki entry, you would attempt to enter something like:

Good JAPH

2003-10-26 12:23PM

This is a good JAPH from sauoq.

perl -e 's();echo Just another Perl hacker,|;;open _;print<_>'

Simple yet appropriately complex and interesting.

But, I Don't Want 1.2G of Oracle Server Stuff, I Just Want the Linux Client Libs!

2003-10-22 7:07PM

I really, really loathe the fact that one must download over a gigabyte of Oracle crap just to install client libraries. All I want to do is connect from PHP/Perl/Whatever to a remote database. And, to do that, I first need to agree that:

I will not use the Programs for, and will not allow the Programs to be used for, any purposes prohibited by United States law, including, without limitation, for the development, design, manufacture or production of nuclear, chemical or biological weapons of mass destruction.

Then, I need to download 3 CD's worth of software (in cpio format). Then, I need to execute a Java GUI installer and explicitly tell it that 95% of what I downloaded, I don't fsckin' want.

Oracle really needs to offer a "client download only" that can be installed from the command line.

Oracle's really lucky they make a great product, or we would take our license and our money elsewhere. *Hah!* Take that software giant! The minute your software slips up, and there is a better product out there, you are definitely losing 0.000000000001% of your revenue. No doubt about it.

Becoming Amazed at the UI's Being Developed within the Constraints of Browsers

2003-10-20 1:13PM

I really am becoming amazed at what UI's are being developed within browsers (I mentioned XUL earlier in XUL -- I Never Knew). Here's a screenshot of Oddpost (readingMail.gif); which is a browser based email application with an integrated news aggregator (via evilmonkey: Outlook web client which came via Scoble). Looks pretty nice.

The one big thing that needs to happen (and I know this may sound odd), but they need to develop some kind of standard API hook-in to the right mouse button for browser applications. I am a right mouse button junkie. I want the browser-based web applications I use (such as Bloglines) to be able to access the right-button menu of my mouse. Something akin to:

<A ONRIGHTMOUSECLICK="mouse.rightButtonMenu.add('menuItem');
mouse.rightButtonMenu.menuItem.name = 'Do This Thingy';
mouse.rightButtonMenu.menuItem.onClickAction = callThisFunction();
mouse.rightButtonMeny.add('menuItem2');
mouse.rightButtonMenu.menuItem2.name = 'Do This Other Thingy';
.
.
.
mouse.rightButtonMenu.menuItemN.onClickAction = foo();">Some Text</A>

Not that I am acting as a proponent for somebody out there to "extend" the ECMAScript standard; rather, I would like to see it included in the standard and subsequently implemented in the browsers. Of course, while I am scribing a wishlist, I would also like them to redo DOM. ...and I want a pony...

WhichWiki?

2003-10-17 5:53PM

Kwiki or TWiki... Kwiki or TWiki...

Both are written in Perl. Both have a "pluggable" architecture in that you can write a plugin in Perl and add/customize functionality. Both perform standard Wiki-fu and Wiki-voodoo. Which to choose? Which to choose?

XUL -- I Never Knew

2003-10-13 11:53PM

If you use Mozilla or another Mozilla-based browser, check out this XUL based interface for Amazon.com. I had heard about all this XUL stuff (XBL, XRE, etc.) back when Netscape 6 was rearing its bloated head but never read much about it, and it seemed to disappear. Or, at least, building "web frameworks" with it never prospered.

Then, I saw that. Then, I did a "View Source" on the page. It looks pretty interesting. Does anyone else know of any cool XUL based applications?

How to Validate SSN's In Perl

2003-10-13 5:31PM

At "Structure of Social Security Numbers," they detail how to check for a valid Social Security Number. What it boils down to is:

Any SSN conforming to one of the following criteria is an invalid number:
  1. Does not consist of 9 digits
  2. Any field all zeroes (no field of zeroes is ever assigned).
  3. First three digits above 770

A beginner Perl programmer's code might resemble something of the following:

Can Microsoft Be Accurately Introspective?

2003-10-10 12:31PM

Yep, yep, I emailed Scoble. I really wanted to know. Do Microsoft people know which products of theirs "suck." I remember when IE was awful. I wondered if the IE team sat around saying:

"Man, our browser sucks!" "Yea, it does. I don't even use it. I use Netscape." "We should make it better."

And, then, all of a sudden, it became the best browser. Now, it sucks again. I wonder if the IE team is back to sipping beers and talking about how to make it better?

I am assuming there has to be some *nix people (or old *nix people) who work at MS. I can't help but think that they sit around and berate the people who developed the DOS shell.

What in the fsck where they thinking when they used the back slash (\) as their directory separator!? Everyone knows the back slash is the escape char. Furthermore, it's hard to get at -- it's way over there in the upper right spot of the keyboard that you have to strain your right pinky to get to. Did they do it just to be different?

Thankfully, it seems you can use the forward slash in the DOS shell nowadays.

I wonder about the Frontpage team and the IIS team... I wonder if the AD team doesn't sit around and ask themselves why they didn't use the standard LDAP attribute names...

And, I, also, asked him if there were any closet Perl programmers at Microsoft. I suspect there are...

Ah well, I was hoping for a more thorough response, but it seems he had his time tied up conjecturing about Why Bloggers prefer Macs?.

Lock in Mortgage Rates, Become Debt Free, Your Opinions Are Worth Money, Find That Perfect Someone, Drugs, Vibrators, Xanax, and 5-6 Inches of Growth

2003-10-09 12:29PM

Jeremy Zawodny's blog: Cheap Viagra, Vicodin, Xanax, Prescription Drugs, and Penis Enlargement Pills!!!

Sounded like fun to me...


This message had to be perfect.... I just hope I got it right! Why? Because with all the offers that you get in your inbox, it's difficult for someone to get a real message through to anyone these days.

1. I will tell you everything I do right now that makes me huge profits
every week... and I'll give you that information at no cost, risk..
anything... I'll just give it to you.


The Amazing Jack Rabbit Vibrator - The Best Orgasms Ever! Find out why Charlotte of Sex and the City became obsessed and find out why it's the world's most famous, unique, and amazing sex toy. The shaft and head of the jackrabbit is made of a bright pink, pliant jelly that is inserted into the vagina. The tip is realistically sculpted to mimic the head of the male penis. The shaft and head rotate either to the right or left. The distinguishing feature of the jackrabbit is the rotating chamber of beads, or "pearls," in the base of the shaft. These beads rotate and tumble against each other, creating extra movement and wonderful pleasurable sensations at the sensitive base of the vagina.


Check out our unbeatable prices...

30 d Phente rmine (Yellow) 30mg Capsules -- $59.00
5 Via gra 100mg -- $88.00
30 Tra madol 50mg -- $76.00
30 Phe ntermine (Blue & Clear) 30mg Capsules -- $67.00
30 Didr ex 50mg Tablets -- $76.00
30 Bo ntril-SR 105mg -- $76.00

We have the lowest prices and largest selection online! Click here to order now!




Computer Go *BEEP!*

2003-10-09 12:31AM

Is there a way, from a standard *nix command, to make a computer emanate a beep from its little-internal-speaker? And, yes, I just tried a:

 % find /usr/ports -name beep
It came up with nothing.

Brief, Completely Off the Cusp OS Review

2003-10-08 11:13PM

At work, I develop a lot on Solaris boxes. Solaris sucks. I hate hate haaaaaaate Solaris. It can't get its libraries straight. It can't decide betweem gcc, cc, gcc-solaris, or whatever else. It's an internally confused OS.

The other OS I develop on at work is Debian. Debian's nice.
% apt-get install this
% apt-get install that
% apt-get update
% apt-get upgrade
% apt-get dist-upgrade

All good stuff. Debian, though, can get a little confused when it comes to what version of which library where. This is compounded by the fact that Debian is a little slow on the adoption of newer versions of software.

At home, I have a FreeBSD box. FreeBSD is nice, too. Very consistent directory layout. The ports tree is functionally equivilent to apt-get a la:

% cd /usr/ports/whatever_you_want
% make && make install && make clean

Having the ports tree installed in the file sytem is nice. It makes it easier to find what you are looking for. If it came down to a shootin' match between apt-get and the ports tree, I don't know which one would win. But, I do know one thing -- Solaris sucks.

The Easy Way, The Quick Way, and The Right Way

2003-10-08 8:07PM

There's a good way to do things, and there is an easy way of doing things. Most of the time, the two do not coincide. Additionally, there is a quick way of doing things ("quick" in the immediate sense); and too often are the quick and easy ways the same. When they are the same, it becomes difficult to convince people to do things the right way. What some fail to understand is the net effect, over a long enough period of time, the "right" way (assuming it is sufficiently "right") will cut down on work.

The in-and-out of the specifics of what I am dealing with doesn't really matter. And, telling you them would, most likely, bore you. What matters is that I spent the better part of a two hour meeting convincing them that there is a "right way" to solve a certain problem. After having them agree, they still dissented and insisted on doing it the easy, fast way. I tried to convince them that, in the long run, it would cause more work. They agreed, but the deadline was unwaivering.

So, in a bit of a huff, I told them (this is not my project, by the way, I was just present in a consulting capacity) that I could do it the right way, fulfilling 70% of their requirements... in one night... drunk... That would leave them one month and 29 days to fill in the rest.

Sometimes my ego just gets the better of me in certain situations. I've a good night of coding ahead of me...

Okay, so maybe not drunk; but if I had to, I could...

YAPI: How goto Operates with a Subroutine

2003-10-07 5:47PM

Yet Another Perl Idiom.

Crazy little Perl "thingy" over at Stray Toaster Thinking: And this was my first work thing this morning, a code review with this in it...

It won't make any sense whatsoever until you go read how goto acts in "subroutine" context (if one can even lexically "say" and "mean" subroutine context -- rephrased, when the first argument of goto is a reference to a subroutine). Well, I am not expecting you to click on the link, so I'll point out the relevant material:

Perl Idiom: Strict and $a

2003-10-04 4:03PM

Every good Perl programmer (except Lincoln Stein, but that's okay, he's allowed) knows that the first three lines of any Perl program go:

#!/usr/bin/perl
use warnings;
use strict;

The strict pragma prevents Perl from allowing unsafe constructs such as un-scoped/un-lexicalized variables, dereferencing non-references, and calling subroutines that do not necessarily exist. Really, most of the time one sees strict complaining is when you mispell a variable:

#!/usr/bin/perl use warnings; use strict; my $necessarily = 1; # correct spelling if($neccesarily) # oops! generates runtime error { `rm -rf /`; }

Pretty useful. Pretty simple. But, try this:

#!/usr/bin/perl
use warnings;
use strict;

$a = "Hello, World!";    # notice no "my" declaration

GO META-DIR!!!

2003-09-26 8:07PM

Stay on target.... Stay on target...

Almost there.... Almost there...

RMI Sucks

2003-09-26 7:47PM

I have had the displeasure of using RMI before. It sucks. It sucks because it is too damned complicated. I should have done what Llucifer did (no, not that Lucifer -- this one has two L's) in RMI sucked for me, so I wrote my own RMI.

Converging Deadlines

2003-09-26 5:29PM

There's a spot in the road where three project deadlines converge. Today (and tomorrow) would be that spot. Case's all-new hand-rolled-because-we-like-it-that-way meta-directory is performing its first in-production-pass over the 70,000 user records.

Hopefully, the email server will not catch on fire...

/me monitors the progress anxiously...

Maybe I Am Just Horribly Mistaken

2003-09-25 11:11AM

Has anyone else noticed that Dave Winder's Scripting News: a weblog about scripting and stuff like that isn't much about "scripting?"

The definition of scripting

Wiki Replaces Word

2003-09-24 6:47PM

If you are reading this, chances are, you already know MS Word is bad; and you know why it is bad -- binary format, interoperability, bloated, icky, icky, icky, etc. Eric Burke elucidated several of those points in Word Considered Harmful and, also, offered a replacement for team project documentation, TWiki.

The reason I link to the article is because I was considering doing this exact same thing. Where I work, we are rolling in an ERP system to handle financials and human resources. On the other side of the "people scope" we have students and a variety of University affiliates (Alumni, temp employees, University Hospitals, CIM, CIA, lots of random "special" people, etc.). These disparate groups (some from ERP and some from a multitude of legacy systems) need to be converged (and reconciled for people with multiple associations with the University) into University-wide systems such as LDAP, the meta-directory, email, calendaring, etc., etc., etc. The scope of this is huge, and I keep running in to documentation problems -- people not being able to find my "superb" documentation and, myself, not being able to find others. I was thinking a Wiki of some sort might just do the trick...

Java == SUV, Part Deux

2003-09-23 4:23PM

Philip Greenspun's Weblog: Fallout from the Java = SUV posting

Just picking some quotes out.

it is not obvious how one is supposed to choose among the 100 different ways to get something done in the world of Java tools

Ah, TIMTOWTDI for Java. Pssst... I'll give you the secret on how to decide between the 100. Get a PerlMonks. And, yes, there is one; it's called JavaJunkies. Alas, I just don't think Java the language is conducive to fostering a good community.

whether it is good to have SQL queries prominently featured in source code or better to make everything into Java objects and magically generate SQL behind the programmers' backs

All SQL should be sectioned away either in well-designed, concise classes that automagically generate it or, preferrably, all on the DB in stored procedures such that the table architecture is wrapped in an API. You should be able to throw out your Oracle server and replace it with a file based data storage architecture and only have to change one of your classes. This is good design.

My problem with Java is that it makes hard things hard, and easy things hard.

Agreed, but some of those hard things are, also, hard in any other language (Perl, PHP, whatever); and Java makes it the least hard. Right tool for the job. Work smarter not harder. Insert another stupid cliche here.

In the end, all of these (If you really want a mini to haul a trailer..) "Programming language X is to Vehicle Y as Programming language Z is to Vehicle..." ... *doh!* I ran out of letters, but you get the idea. They are becoming ludicrously inaccurate.

Just say "no!" to the downward spiral of increasingly inaccurate analogies!


The Proliferation of Attacks on Common Programming Paradigms

2003-09-17 11:15AM

Maybe it's just me, but there seems to be a lot of people claiming that there is a lot wrong with current common programming practices. I don't mind this. Hell, I do my fair share of criticizing. But, if people could offer a little more substance in what they are proposing in the alternative, that could be construed as a good thing.

Is It High Time To Get Rid Of Classes?

A Couple Oldies-but-Goodies Programming Posts

2003-09-12 5:01PM

Maybe you're bored. It's Friday; maybe you're gearing up for the weekend and would not mind doing a little reading on programming practices. I don't know, but I haven't posted these before, and I somehow ran across them, again, today. So, here you go, a couple oldie's-but-goodies:

Perl AI?

2003-09-11 1:13PM

The, I believe to be new, weblog Perl AI Blog - Artificial intelligence has been solved invites:

all Perl programmers to implement the main Alife Mind loop of the simplest artificial intelligence.

Okay... well... so... uhhh... I might have a question... okay, what should I do wi...

There is no need to standardize or homogenize the evolution of the server-side AI Minds in Perl. Let there be a wide diversity and diaspora of the evolving Minds in a classic scenario of the survival of the fittest.

Oh! That makes it clear. Do you have some example code? That could give me a better idea, I think...

AWK??? A "Real" Programming Language??

2003-09-10 5:59PM

Isn't AWK deprecated yet? Real Programming with AWK. Mmmm... Perl... so much nicer.

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.

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.

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.

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.

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:

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:

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.

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.

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

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

  • 90+ percent of all software desperately wants to be installed in a path that has a space in its name, Program Files.
  • It uses the backslash character (\) to separate directories. Backslashes are for escaping characters! I can't tell you how many times I have sat at a windows box and typed
    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/someSubDir
    Which thankfully, works.
  • You need to enclose perl CLI one-liner's in double quotes:
    C:\>perl -e "print \"hello\n\""
    versus
    user@host% perl -e 'print "hello\n"'

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.

When Good Programmers Code Bad Perl

2003-07-31 5:37PM

I am pretty adept at Perl, and I had trouble deciphering this one -- Perl Angst. The first line (@fields = (0, @fields); threw me for a loop as in "why the... what the... well, that's weird." But, I read on assuming it would make more sense once I got to the applicable part.

while ($r = $q->fetchrow_arrayref) { Well, that's a common idiom. That made sense, $q is obviously a DBI statement handle, and he is fetching array references from it into $r and looping over the set. Any Perl coder has seen that more than once. And, the next line (my $topic = $r->[0];)) makes perfect sense, too. But, then there's the next line...

while ($topic != -1) {
That could really use a comment. Why negative one? Why is it in a while loop? It becomes apparent, later, that $topic gets reassigned and -1 is a sentinal value in the result set from the DB, but a quick comment would help put it in context.

The next bit is just some Perl-fu:

foreach $i (1 .. $#{$r})
{
$totals{$fields[$i]}->[$topic] += $r->[$i];
}
$topic = $parents[$topic];

So, $i is spanning over the length of @$r, but it is being used to index both @$r and @fields. That seems a little awry, but we can assume that @fields was populated with a call to $q->{NAME}->() or such. But, still, it's a terse line. And, where did @parents come from, anyways?

IE6 Still Growing?

2003-07-29 6:03PM

That's weird -- Microsoft's IE 6 global usage share continues to rise. Mozilla has, actually, taken over IE in my logs. But, of course, it helps that Scott and I (and I believe, gnubbs) use Mozilla. So, that's not saying much...

Actually, don't even know why I am putting this in as an entry...

The Ultimate Source Code

2003-07-28 5:23PM
use PSI::ESP;

my $clairvoyantDWIMmery = PSI::ESP->new();
my $arrayOfObjects;

for(1..$clairvoyantDWIMmery->getAppropriateNumber())
{
    push $arrayOfObjects, $clairvoyantDWIMmery->createAppropriateObject();
}

$clairvoyantDWIMmery->doTheRightThing($arrayOfObjects);

I believe that non-technical managers think this is what all source code looks like.

Coming to Terms with Java Versus "Scripting" Languages

2003-07-25 11:37AM
if you enjoy severe lack of type safety and more dynamic binding that you can shake a stick at, don't use Java. If you want to allow your users to inject random bits of code that do not adhere to any sort of contract in ways that man and God did not intend...

I liked the rant (via The BileBlog in Those Dreaded Words... 'Beanshell Integration').

Blog Utilities Should Have Feed Aggregators Built-In

2003-07-22 5:41PM

There's been some talk around the blog-o-sphere about response codes to blog entry requests (the context of this is usually brought up in terms of Pie/(n?)Echo/Atom stuff). Some of the comments raised the issue of bandwidth, which all goes back to a post Dan Sugalski made in Blog propagation and death to polling. Why do we have to poll for the feeds? We have "pinging"; why not link that up to aggregators?

What I am thinking about is building in a web-interfaced "Feed" aggregator into Movable Type (or, whatever blogging tool). Put something in there akin to Bloglines or NewsApp. Now, with your own web-based aggregator (if your blog is http://example.com/blog, your aggregator would be at http://example.com/aggregator, or whatever), you can begin to subscribe to other blogs' feeds from your own server. When you go through the subscription process, the site you are subscribing to automatically knows to "ping" your aggregator when new content is posted. So, we have yet another feature to add to a blogging tool, a method for people to subscribe to your blog and have your blog know to ping them during updates.

Stupid Bearings

2003-07-21 10:41PM

Bearings are one of the most ubiquitous devices on mechanical systems. So, this would lead one to believe they might be relatively inexpensive. Right? Right? They are everywhere. I probably have several dozen different bearings in my car.

I called the dealer today to get pricings on my front wheel bearings. $218 a piece. Shell-shocked... absolutely shell-shocked. I had them check again. $218. That was just blow #1, though.

First Computer Experience

2003-07-18 12:07PM

My first experience with a computer was very similar to Kasia's first experience with a computer. I can't remember the make or model of it, but it was Scott's (do you remember what it was?). In a similar fashion to her's, you loaded cassette tapes into it to run programs; and it was an all-encompassing unit i.e. the monitor, keyboard, tape drive, motherboard, etc. were all in one big device. We used to play this horse-betting game on it constantly (I was 12 or so).

I guess this could be considered the beginnings of both my love of computers and my love of gambling.

Bloglines (Again) -- Now That's What I Am Talking About

2003-07-17 6:37PM

So, I made a couple criticisms of Bloglines in the last entry Found A Web Base RSS Aggregator -- Bloglines. Well, check out Bloglines News:

July 17, 2003

We have made some changes to the subscription process to make it easier to subscribe to feeds with just one click. Unless it isn't clear which feed you wish to subscribe to, the confirmation page will no longer appear. We have also added subscription check boxes to the Top Feeds and New Feeds pages, so that it's easier to subscribe to multiple feeds at once.

July 15, 2003

When clicking on a folder name, all unread items within that folder are now displayed on one page in the right pane, for easy viewing. We also continue to tweak the colors and fonts to make the display easier to read. And we smashed a couple of bugs for good measure.

That's what I am talkin' 'bout.

Found A Web Base RSS Aggregator -- Bloglines

2003-07-16 12:47AM

I was in the hunt for a completely web based (RE: no need to download and install additional client software) RSS aggregator (Web Front-End RSS Aggregator). Well, I finally stumbled upon one --Bloglines.

My preliminary findings are favorable. It's fairly easy and does what it claims. I still have a lot of playing left to do, but here are some initial nitpicks (hey, I am a user, being "nit-picky" is my duty; I did this with Mozilla Firebird, too, even though I love it -- First Day with Mozilla Firebird).

  • It takes 4 clicks to subscribe to feed and get back to blog listing. That's 3 too many for me. I want to put the URL to the RSS feed into a text box and hit submit. No more clicking should be necessary.
  • I would like to be able to view all unread items on one page rather than blog-by-blog. Actually, I want both.

Yep, that's it. Just two gripes thus far. That's a pretty good score. I'll be sure to blog again about it.

Web Front-End RSS Aggregator

2003-07-14 5:53PM

There's all these RSS aggregators out there like Feedreader and SharpReader and such. But, what I would like to know is if there is a completely web-based one?

How I would want it to work is something like I hop on over to http://example.com/yourRSSAggregator/setup.php, sign up for an account, and begin placing URL's to RSS feeds on the page. Then, I could go to something like http://example.com/yourRSSAggregator/index.php, and see some kind of UI with what feeds I had subscribed to all laid out.

Does that exist? I guess I could google and stumble amidst the blogosphere trying to find something like this, but I am lazy.

i 0wnZ j00!!!

2003-07-10 6:51PM

I administrate two boxes. However, I am not a System Administrator; I would never want to be. Unfortunately, these two boxes have a sufficiently complex Apache install (the subject of one of my first blog entries in Install Apache 2.0 w/ FreeTDS (SQL Server), PDC Authentication, etc.). So, because of this complexity and the fact that it is slightly non-trivial shoehorning Debian onto a Dell Poweredge 2550), the task of system administration of these boxes falls upon me.

But, I take great pride in keeping them secure; always making sure OpenSSL, Apache, PHP, etc. are up to date; only allowing ports 22, 80, and 443 open; keeping a watchful eye on 'who -a'; etc. But, we have a developer who wants to access his home directory over Samba. So, Samba was setup and remained running. And, it fell behind a few patch-levels.

XML::Smart... Not So Much

2003-07-09 2:29AM

(Or, how I am using it completely incorrectly; but we'll see)

So, earlier, I mocked up a Perl script demonstrating how to publish using straight XML a la Mark Pilgrim's Python example.

I had never used XML::Smart before, but I figured it could not be that hard. The XML that needed to be produced was simple, and the Python code on Mark's site looked simple enough. Of course, this was all before I encountered the befuddlement of XML::Smart.

Did Echo Fork Already?

2003-07-08 7:53PM

Okay, here is diveintomark's echo feed and here is joelonsoftware's echo feed; and they don't look very similar at all. That is, if I was going to write some code to parse it, I would write it for one and not the other. (My MT echo template is based on diveintomark's MT template.)

Where Mark has <subtitle>, Joel has <title rel="subtitle">. Where Mark has <modified>, Joel has <date rel="modified">; etc., etc., etc., so on and so forth, repeat ad nauseam.

I suppose I could go read up on the Echo Wiki Frontpage which one is more accurate (or more desired if they are both equally valid), but I find Wiki's too difficult to navigate. Other's love them; I just find them jumbled.

J$


$a="A"and$'_="J";map{$a++}(66..ord
);$$_='$';print$'a,$$a

I Am Regex Spoiled

2003-07-08 6:37PM

Maybe I am just too used to one way to do regular expressions. Admittedly, even doing them in PHP with ereg() and ereg_replace() (or, even, pereg() and pereg_replace()) feel clunky and clumsy. But, in Getting Started with Regular Expressions in .Net, this is their version of a regex:

Dim SearchString As String = _
   "A cobra is a very, very venomous snake!"
Dim Pattern As String = "\bve\w*"
Dim oMatch As Match
Dim MatchHits As Integer = 0
oMatch = Regex.Match(SearchString, _
   Pattern, RegexOptions.IgnoreCase)
 Do While oMatch.Success
    MatchHits = MatchHits + 1
    oMatch = oMatch.NextMatch()
      If oMatch.Success Then
         MessageBox.Show(oMatch.Value)
         MessageBox.Show(oMatch.Index)
         MessageBox.Show(oMatch.Length)
      End If
Loop

It seems so much more natural in Perl (here is an overly terse implementation of the VB.Net code above translated):

$_ = "A cobra is a very, very venomous snake!";
print join "\n", $&, $+[0] - length($&), length($&), "\n" while(/\bve\w*/g);

Even at maximum verbosity, the Perl "feels" cleaner:

my $string = "A cobra is a very, very venomous snake!";
while($string =~ m/(\bve\w*)/g)
{
    print $1, "\n";
    print pos($string)-length($1), "\n"; 
    print length($1), "\n";
}

J$


$a="A"and$'_="J";map{$a++}(66..ord
);$$_='$';print$'a,$$a

Perl Script Demonstrating How to Publish Using Straight XML

2003-07-08 5:53PM

Mark asks for a Perl hacker [who] could mock up a similar prototype to his Python implementation of publishing via straight XML. So, what's 20 minutes of Perl hacking...

HowTo Create Feeds for Categories in MovableType

2003-07-07 5:47PM

I had done a bunch of Googling to discover the "right way" to do this, and I came across many different methods for constructing feeds for creating category-based syndicate feeds. So, after messing around with the different methods, I settled upon doing it this way.

  1. Go to the MovableType menu for your blog.
  2. On the left, click on the "TEMPLATES" button.
  3. On the listing of templates directly underneath where it says "Archive-Related Templates," you'll see a hyperlink for "Create new archive template." Click on that one.
  4. Give your template a name such as "Category RDF" or "Category RSS 2.0."
  5. For the body of the template, I used the following respectively, but Internet searchs provide a bounty of them:
  6. Hit "Save" to create the template.
  7. Now, back on over to the menu buttons on the left, click on "WEBLOG CONFIG."
  8. Up at the top of that page, you'll see a navigational menu looking like " Core Setup | Preferences | Archiving | IP Banning." Click on "Archiving."
  9. Click on the "Add New" button and up pops a window asking you to select an archive type and a template. For archive type, choose "Category"; and for the template, choose the name of the template you just created ("Category RDF" of whatever) and hit "add."
  10. Now, that should do it. But, in terms of placement of the files, I have an "index.xml", "index.rdf", "rss20.xml", and "feed.xml" under each category's subdirectory. So, that is, there's an http://www.alpha-geek.com/perl/index.xml, http://www.alpha-geek.com/perl/index.rdf... and http://www.alpha-geek.com/ocd/index.xml... so on and so forth -- one for each category. To accomplish this, use some of the MT tag-fu.
  11. In the same window under your archiving preferences, you can specify an "Archive File Template." If you leave it blank, MT uses its defaults. You can, also, specify "just_put_it_here.html". Or, using MT tags, you can say "<MTArchiveCategory dirify="1">/index.xml" (You can actually go crazy with that and do a lot of directory-fu.)

This MT stuff is pretty nifty.

J$


$a="A"and$'_="J";map{$a++}(66..ord
);$$_='$';print$'a,$$a

The Foos Has Gone to All New Levels

2003-07-07 3:19AM

Just when you thought the game could become no more exciting.

So, I am a pretty avid foosball (table soccer) player. It's a great bar game. It's such a great bar game, I went out and got myself a foosball table (from that exact store I linked to, as a matter of fact). Over the course of playing foos, it was often bantered about that we should be keeping statistics. For a while, some of us kept track of our respective records against one another, but nothing formal came of it. But, now, it has been standardized and finalized -- here is the official "J$" nomenclature for tracking foosball scoring.

So... Things Have Changed

2003-07-06 11:41PM

Yep, I finally got around to consolidating the blogs. I tried to maintain as much backwards compatability as feasible, though. alpha-geek.com/left and alpha-geek.com/right are still there, and the different RSS/RDF feeds are in place for those sites (as they were). As a matter of fact, there is many different feeds for each category (RSS .91and 2.0, RDF, and Echo 0.1). So, if all you want to read is my Perl postings, just suscribe to that feed.

When Google's Down, The Internet Goes Down Too

2003-07-02 11:03AM

I ran into this problem when Google went down and so did Zawodny (Google API Offline Aagain, MT pissed. Once Google is down (if you have used the MTGoogleSearch tags), MT cannot rebuild pages.

Here's the fix.

Echo Is Not /R(SS|DF) [0-2]\.[0-9]{1,2}/

2003-07-01 2:37PM

It all starts here -- Scripting News. Actually, no, it all starts here (Netscape), and where I first ran into it -- the little configurable slashboxes on /. And, if you have paid no attention to all of this "content syndication" brouhaha and you cannot decipher the "line noise" at the title of this entry and you have not noticed that I have made several other posts referencing this agglomeration of "design by blogging" a.k.a. "engineering principles applied via yelling the loudest (even though everyone is still just using a keyboard no matter what your BlogShares worth is)", you have no idea what I am talking about. Consider yourself better off. What I am talking about is RDF which begat RSS 0.9x which begat RSS version... version... uhh... well... it would take a numerological researcher to figure out the family tree from there.

Originally, RDF and RSS were ways to notify other places of content. Just look at the slashboxes. They are simple. You use a structured file format in a publicized location that contained a couple of key items -- the title of an article and a URL to access the article. After that, throw in some more simple items like maybe an author and/or a brief description; then, wrap the whole thing up in some meta-data that refers to the original site. Voila! Any barnyard animal with an install of Perl and LWP can "syndicate" any other sites content.

But, there's a difference between barnyard animals and the Internet horde. Cows and pigs and sheep are content with the grain they receive. The denizens of the "blogosphere" want meta-data with their breakfast. Enter in a new conceptual model of a (for lack of a better generalization) standard, self-contained, published Internet object (be that what it may). Let's call that Echo (or Pie or whatever... anything but R[A-Z]{2}), and let's have someone explain why we need it for content syndication What is Echo?. Take that, grab a pair of scissors, and run with it; and what do you get -- a set of uniform "services"; the mother of all API's that will define how to interact with blogging; an effort to not only deprecate the common methods of syndication, but to also replace any common methods of interacting with blogging and blog-like software (and an obligatory link to a kuro5hin entry describing how and why that is going in What's Wrong with the MetaWeblog API?).

So, now what has happened? We have lost the Unix philosophy. The underpinning principle or set of principle(s) that govern the Internet.

Do one thing and do it well.

Why would I use Echo for syndication?

Parrot Could Revolutionize CPAN

2003-06-26 6:23PM

Other than (or, in addition to) the community, Perl's biggest killer "app" is certainly CPAN. There have been and still are efforts to create "CPAN's" for other languages like Python's Python Packages Index, PHP's PEAR, Java's CJAN (I think... this Java stuff always seems to appear and disappear), etc.

But, CPAN still remains un-paralleled. However, that could all change with Parrot.

BlogRolling.com Web Services

2003-06-26 6:07PM

BlogRolling.com should have a web service. I am thinking something like getWhoHasBlogRolled( URL ) and getBlogRollOf( URL ). It would be simple to write something that would slowly do getWhoHasBlogRolled( URL ) by parsing the HTML from the BlogRolling search page. And, doing getBlogRollOf( URL ) could almost be "emulated" by going to the URL specified and trying to parse out the BlogRoll (assuming the person has it posted in some form on the page the URL points to).

The End Is Nigh

2003-06-25 1:31PM

First time I have ever seen this.

Never has this been truer.

RSS By Committee

2003-06-24 7:29PM

FrontPage - Sam Ruby's Wiki and A fresh start? [dive into mark].

Person 1: I think the horse should have on-board water storage!

Person 2: That's retarded Person 1. That would be too much weight. And, how would we store the water in such a container to be structurally sound?

Person 3 [largely ignoring Person 2's comments]: We should store the water in humps on the horse's back!

Person 2 [getting irate]: No no no! We should drop this internal water storage, and talk about increasing the overall size of the animal!

Person 1: To make the water storage compartments more structurally rigid, we could place them on the back and embed the water in fatty deposits.

Person 4 [sounding somewhat reasonable]: If we make the animal too tall, it will be difficult to mount.

Person 5: HA HA PERSON 4 WANTS TO MOUNT THE ANIMAL!!! LOL!!!

Person 6: Let's make the neck really long, so it gains the advantages of height but is still easy to mount.

Person 2: How are we ever going to pump blood up a long neck. Plus, I think we should change the name from Horse v2.0 to something else because the original creator of the horse keeps threatening patents on it. I say we call it Hugglesnatcher!

Person 4: Tell me, why again, we need an animal with a long neck when its intended purpose is to be used in the desert?

Person 3: I think knobby knees are cute! Are we going to have to be expert riders to use this new horse?

Person 5: I THINK THE HORSE SHOULD TRY TO SPIT ON PERSON 4!!!!! I THINK IT SHOULD ALWAYS TRY TO SPIT!!!

Person 4: Oh dear, I don't think this redesign of a horse for the desert is going well...

Target Equals "_new" and "_blank": Deprecated

2003-06-24 5:37PM

I have always disliked these "A" tag attributes, but now I can officially declare them deprecated. Since everyone should be using a browser that has tabbed browsing, these attributes are useless. If I want to open a page in a new window, I wheel-click (or "middle-click") the link, and it opens up in a new tab. Viola! And, if I do not want it open in a new tab because I am through browsing that page and want to move on to greener pastures, I give a single left click.

But, there are people out there that litter their pages with TARGET="_blank" and TARGET="_new"; thus forcing a new window open. Thank God for Mozilla Firebird Extensions! With the extension This Window! (whose home page is at churchillrm :: Phoenix Extensions), I can just right-click on links and force them to open in the same window bypassing those unscrupulous web developers who try to dictate to their users which window should open where.

PHP Gem Not Often Used

2003-06-23 10:31PM

In PHP, the standard equality comparison operator is '=='. This is used for both strings and numbers (compare this to Perl's '==' and 'eq'). However, there is another equality operator in PHP, '===' (that's right, three equal signs) that will enforce type checking i.e.

97 == "97" // returns true
97 === "97" // returns false as you are comparing an integer to a string

In a similar fashion, there is a '!==' that enforces type checking.

There are times (more often than you would think) that these operators should be used when compared to there un-strict equivilents.

Just your friendly, neighborhood Spiderma...errr... PHP tip-dropper.

J$
#!/usr/bin/perl
J=>money
;$_=ord$"<<s>>$J>,s-.-
$&*$'+$&-e&&y[%_(8)]]J]
&&print chop;print chr

BlogRoll Addition With Explanation

2003-06-20 6:01PM

All right, I just added steveo to my BlogRoll just because he had a ManOWar posting (Ouch!) That's just for you, gnubbs.

The Attack of the MS Network Web Crawler

2003-06-19 7:19PM

I received my first taste of the (now infamous) MSNBOT today. It moved fairly slowly. Around 4:55am, it hit the root site http://alpha-geek.com/. After probing for a '/robots.txt' (and finding none), it moved on from there page-by-page at the rate of 1 page every 3-5 minutes. It did not finish crawling until 10am, about 5 hours later. At least they are not as bad as fastsearch.net. That little bugger goes to town.

J$
#!/usr/bin/perl
J=>money
;$_=ord$"<<s>>$J>,s-.-
$&*$'+$&-e&&y[%_(8)]]J]
&&print chop;print chr

What I Wish I Would Have Said About DOM

2003-06-17 4:53PM

So, in my little rant about hating ECMAScript because of the DOM (which I blogged in Nice to Have Native XML Support, Now Fix the Language Itself), I stated "[DOM is] the kind of bad that has warped my mind so far that I cannot think of an alternative to it." Well, Elliotte Rusty Harold states the items I wish I would have discussed in The Good, the Bad, and the DOM.

Post-Modernism And Perl

2003-06-17 4:47PM

If you have never read this, I recommend it -- Perl, the first postmodern computer language. I wish all computer languages had charismatic, well-spoken creators who enjoyed discussing meta-philisophical meanings/consequences of their language. I would love to read articles like this for PHP, Python, Ruby, etc.

J$
#!/usr/bin/perl
J=>money
;$_=ord$"<<s>>$J>,s-.-
$&*$'+$&-e&&y[%_(8)]]J]
&&print chop;print chr

Defining A Sports Car

2003-06-13 6:07PM

I have already gone through my definition of what classifies an SUV (versus so-called "hybrids") at Defining SUV's So I Know What to Hate. So, taking the cue from Scott where he posts the British Sports Car Definition; it is my turn to define what constitutes a sports car. First off, the British definition is far too lenient. By that definition, you can slap another seat on a John Deere and call it a sports car.

Like I stated in the SUV article, cars' characteristics must be judged amongst its contemporaries. But, what attributes does one measure when trying to decide on a sports car?

First Day with Mozilla Firebird

2003-06-12 4:37PM

I have been using Firebird all day today (as I stated I would here -- Switching Browsers), and I love it. It's fast. It renders page nicely. Tabbed browsing rocks! Blocking pop-up windows is a God-send for someone who has been using IE for so long. I have three nit-picks, though.

It's Always the Simple Bugs

2003-06-12 4:03PM

Just got bit by this one. It's a simple one, and I have reduced it down to some generic offending code. The applicable line is

foo() or (printError("foo had an error") and die);
print "\nwhy did I not die?";
It would not die. It would always print out
foo had an error
why did I not die?
It was really bothering me. Here's a full example of the code.

Switching Browsers

2003-06-12 1:11AM

All right, that does it. I am switching to Firebird. I stuck with Netscape for a long, long time. I resisted the urge to go to IE. It was a long hard battle. I held onto Netscape even as it faultered and failed. Finally, I gave in and started using IE. I have been using IE ever since (sometime in late '99-2000). Now, however, I make the move. How much more evidence do I need? (1 2 3 4 5 . . . .)

Smart People Use Different Programming Languages Than Dumb People...

2003-06-11 3:52PM

... At least, according to Lisp advocate extrordinaire, Paul Graham in LFM and LFSP, which is actually an email sent by Cal Tech's Mike Vanier. The article basically boils down to LFSP's (Languages For Smart People) being languages like OCaml, Lisp, and other languages that let programmers define their own abstractions (such as macros) and LFM's (Languages For the Masses) that are languages like Java which:

deliberately restrict the abstractive power of the language, because of the feeling that users "can't handle" that much power.

I wonder what Perl falls under. What about PHP?

It's amazing the stuff you come across when you are waiting for your Meta-Directory to process 67,000+ records...

J$
#!/usr/bin/perl
J=>money
;$_=ord$"<<s>>$J>,s-.-
$&*$'+$&-e&&y[%_(8)]]J]
&&print chop;print chr

Leaky Abstractions Strike Everywhere Including Development Environments

2003-06-11 3:47PM

Do IDE's spoil beginners?

Amen! This goes back to The Law of Leaky Abstractions (a lot of the time, I disagree with Joel; but in this case, I agree wholeheartedly). Knowing what goes on behind the scenes makes you a better programmer. For example, not knowing specifics on how Sun's JVM works does not necessarily make you a bad programmer; however, knowing it will make you a better one. In the same respect, you should know what your development environment does for you (and know how to do it yourself) before using it.

DBI Post Brewing

2003-06-11 12:17AM

I have a post brewing. I was just about to write it, now, but my mental manna has been expended for the day. The subject -- "Why DBI Is Awful!" It truly, truly is. I do plan on having some justification for this. After all, you don't step on Tim Bunce's toes for no reason.

AppleScript: How Do People Use Languages Like This?

2003-06-10 11:41PM

Courtesy of Sterling Hughes in his entry Shucks, he points to a nondescript web page with some nondescript code to perform a nondescript action i.e. Upload Web Pages Automatically with AppleScript (scroll down to the bottom to see the code). Did anyone else *shudder* and think of Visual Basic?

Binding "Out" Parameters to Table Types for Oracle PL/SQL Stored Procedures

2003-06-05 4:41PM

I am having a problem getting Perl to bind OUT parameters correctly to Oracle stored procedures using DBD::Oracle. Everything works fine when I am binding them to normal PL/SQL variable types such as NUMBER, VARCHAR2, etc. The real gotcha comes when I try to bind parameters to data types defined in the Oracle package as:

TYPE myTable IS TABLE OF DeptTable%rowtype INDEX BY BINARY_INTEGER;

Perl 6 Binding Clarification

2003-06-04 1:26PM

Ahhh... fresh from This week on Perl 6, a clarification between "run-time" binding and "compile-time binding" (for Perl 6).

Run time binding looks like

$foo := expression

Compile time binding looks like

$foo ::= expression

The difference between the two (if you are not already intimately familiar with the two) comes straight from the source (Damian Conway) in this Google-cached thread -- Google Groups: View Thread "Compile-time binding".

::= is to := as a macro call is to a subroutine call




J$
#!/usr/bin/perl
J=>money
;$_=ord$"<<s>>$J>,s-.-
$&*$'+$&-e&&y[%_(8)]]J]
&&print chop;print chr

When to Decide on OO

2003-06-02 5:47PM

Starting a new project? Going to use Perl (or any other scripting lanuage that optionally supports OO constructs)? Want to decide whether or not to use OO?

Perl Monks is good.

J$
#!/usr/bin/perl
J=>money
;$_=ord$"<<s>>$J>,s-.-
$&*$'+$&-e&&y[%_(8)]]J]
&&print chop;print chr

Automatic Generation of Form Validation Javascript

2003-06-02 5:41PM

I ran across The Anti-Javascript FAQ written by a very "passionate" Aahz Maruch (who has a blog on the The Artima Developer Community ). This led me to the aforementioned ((J(ava)?)|ECMA)Script hating page. There, he mentioned that "JavaScript form-validation duplicates coding effort." This is true. This is very true. All data validation submitted via a form should be handled on the server side -- validating it client-side is just to provide some user-ease. But, user's like easy things.

Photog: P3

2003-05-28 10:31PM

Has my interest waned so much so quickly that my last posting on this was almost two weeks ago?

Basically, though, work has been busy and moving from house-to-house has kept my occupied (and, then, you know, all the drinking that happens in between). At any rate, this is going to be short.

I just so happened to be hopping around the ol' Internet and ran into a couple of on-line photo albums. Almost all of them, had the concept of "albums" to use for their categorization.

Wow! 99 Bottles of Beer in Perl

2003-05-23 4:31PM

$b=sub{(99_-@_-$_||No)." bottles of beer on the wall\n"};
warn map{&$b.substr(&$b,0,18)."\nTake one down, pass it around\n".&$b(0).$/}0..98

Impressive. Most impressive. It was Dave Rolsky who threw that one together.

On-line Photo Album: p2

2003-05-15 6:43PM

Now that we have a rough sketch of some requirements for the on-line photo album, we can begin answering some of the questions that were poised. It's easy to see that one of the more complex issues will be organization/categorization/presentation of the pictures, and that the choices made concerning how the pictures are stored/organized will directly affect (and limit) how they can be presented. For example, if we do not associate pictures with specific categories such as "Summer Vacation Pics"; we cannot present them to a viewing user as that group. That is, a user cannot choose to view all of the "Summer Vacation Pics."

But, this can be easily simplified with a couple of general assumptions. The first is that we can assume (for the first iteration of the web app, at least) that categorical pictures usually fall within a similar time frame. That is, a category such as "Summer Vacation Pics" will most likely all occur within a one month time frame. Reworded another way, pictures happen in timeframe groupings. Thus, pictures will be organized according to date. Now, we need to choose what time frame for the date -- store pictures according to the day they were uploaded, the week, the month, the year? I believe month will be more than adequate.

Furthermore, we can continue to reduce complexity by saying a thumbnail is a thumbnail is a thumbnail. There is no reason to have differently sized thumbnails. All pictures get compressed to a thumbnail resolution all the same even though the pictures themselves may be different. I think 160x120 is a good size for thumbnails. (View what that size looks like at http://www.pbase.com/gallery/ddyer/yellowstone.) It's not too small that one cannot make out the picture, but not too big that you cannot easily fit many photos on a screen. But, how many can you put on a screen leaving page size still reasonable?

Over-Engineering Small On-line Photo Album

2003-05-13 6:57PM

I had planned on writing an exhaustive review of good web application design/architecture/engineering, but that never came to pass. So, I am going a different route.

A (longer) while ago, I had planned on writing a small web app that would serve the basic functionality of putting up a web photo album. To combine these two tasks, I am going to go ahead and write the web app and over-engineer/over-design the snot out of it; all the while, blogging away with justifications and reasoning for my design decisions. We will see how long this holds my attention span...

chromatic Waxes Subjectively on Programming Languages

2003-05-13 6:39PM

An article such as chromatic's What I Hate About Your Programming Language is difficult to write. It's like answering why you like your favorite pizza topping or why you prefer dark green shirts to brown.

He breaks it down to the fundamentals:

There are many syntactic and otherwise superficial differences [in different programming languages]. At one level, all languages have a philosophical axe to grind. They exist for a reason. At another level, they're all just flipping bits and jumping around in a long chain of ones and zeroes. Everything in between is a matter of taste...

Melding Brain Halves Via Painting Code

2003-05-07 6:43PM

In Hackers and Painters, Paul Graham lambastes one categorization and metaphor for computer programmers and attempts to set out a new one that falls equally short. Not that I am blaming him for aligning himself with a faulty analogy, it's just that anytime you attempt to make a correspondance between one occupation or activity with another, there is going to be holes; but it will provide interesting insight assuming it was written sufficiently well (which this one is).

His whole gist is that programmers (he refers to them as "hackers," which I am not doing so to avoid the connotations of that word) are more like painters and writers than they are like mathematicians or engineers. I would agree there is a huge component of creative thinking that occurs during implementation. But, I would also agree that a lot of analysis, design, and modeling occurs, also, in other phases that are equally as important and relevant as the actual "coding."

TDD Applied

2003-05-06 6:11PM

For my next TDD blog entry, I am going to describe the process of TDD as it applies to writing a function that performs factorials (in Perl).

We start with a quick subroutine for an assert statement (for this little blog entry, we are going to use something simple):

sub assertEqual {
    return shift eq shift;
}

Pretty simple. Now, we can move on to the TDD. Our first test of the factorial method is to guarantee that f(0) returns 1. So, let's write the test.

assertEqual( f(0), 1);

Now that we have a test, let's go and code. What would a subroutine look like that passes that test. (Don't think too ahead of yourself, now.)

Singing More Praise for Test Driven Development

2003-05-06 5:31PM

It's hard to be terse when one is trying to describe programming techniques and the benefits/drawbacks thereof. This is especially true when you are deriving the examples from real world occurrences. Stuff in the real world is always messy. But, I will try to be as straight forward as possible.

When you come to Case, you receive two email addresses. You get a primary email address that is your initials followed by a number to make it unique as in 'abc12@cwru.edu' (if a portion of the name is missing like if a person did not have a middle name, an 'x' is substituted in like 'axb12'). The second email address you get is your alternate email address, and it is of the form 'first_name.last_name@cwru.edu' something like 'Jon.Smith@cwru.edu'. If 'Jon.Smith' is not unique i.e. more than one person has that name (quite possible), we stick in the person's middle initial -- 'Jon.A.Smith'. If even that is not unique, we start tagging numbers on the end until it is -- 'Jon.A.Smith1', 'Jon.A.Smith2', 'Jon.A.Smith3',...

The code that handles this is in dire need of refactoring and has fallen under my umbrella as I redesign our meta-directory / account system.

Business Logic Over Here, HTML Over Here, but Where to Put Presentation Logic?

2003-05-02 6:07PM

I just stumbled upon this article, Template Engines, from the guy who wrote the bTemplate PHP library. It's an interesting article in that it is almost completely contrary to how I think it should be done. I have always been a big fan of the ultra-simple template models like Text::Template, which come with no mini-programming language in them. But, I did always feel as if that was the wrong way, too. Why should the presentation logic be in with the "business logic" (by the way, I am going to call it code logic instead of business logic from here on out).

Test Driven Development

2003-05-01 5:55PM

Okay, so I finally had to make the leap to test driven development (it's hard to try and improve your own programming skills when you no longer have another alpha-geek to bench yourself against). Many respected individuals espouse the wonderous virtues of it. I knew it was a more correct way to do things, but I did not know if it would, necessarily, help me be more productive.

Is the Future Dynamic or Static?

2003-04-29 5:13PM

Are Dynamic Languages Going to Replace Static Languages?

My $.02. Languages will allow both. Dynamic typing will be the default, but more and more languages will allow you to specify hints (or just switch into a static mode):

.Sig Explained

2003-04-24 6:47PM

Figured I would go ahead and de-obfuscate my blog.sig.

Making HTML Links More Descriptive

2003-04-24 5:51PM

Link typing: Who cares?

I had actually been thinking about this a lot. When I blog, a lot of my entries look like this one, where most of the link "text" is this this this and not anything descriptive.

When You Have A Hammer, Everything Looks Like A Nail

2003-04-23 7:13PM

Sometimes I just over-design things. I like design. Design is creative. I like implementation, too. But, design is where the fun is.

So, I am building a meta-directory from scratch. During design, I encountered some problems with the common implementations. They were not terrible problems and could easily be worked around with some code on top of code on top of DB triggers, but I just had to think that there must be a better way.

Limitations of Hand Rolled Meta-Directory

2003-04-16 6:37PM

The current project I am leading at work is to overhaul the travelling of our data. In addition to gathering, munging, formatting, and normalizing the data; I need to hand roll a Meta-Directory. I have read up on how other Universities have done it (University of Maryland, University of Alabama, and Boston College), but I am not convinced they did it correctly. And, if you are going to reinvent a wheel, the damn thing better be just as round as an Enterprise level software round thing-a-majig. So, I got to thinking...

Cruft and Complexity: Bad or Good for Programming Languages?

2003-04-15 7:31PM

Over on the O'Reilly weblogs, Schuyler Erle talks about the, now much-blogged, Hundred-Year Language article in his The Other Side of the Hundred-Year Language. He points out that, in 100 years, programming languages will have had to strike some compromise between clarity and expressiveness versus complexity. This is contrary to Paul's notion that languages should remain simple. To quote, "cruft breeds cruft" and "axioms-- the fewer, the better."

I think that we can have our cake and eat it, too.

The Primordial Beginnings of PHP5 -> Parrot

2003-04-15 6:34PM

Sterling Hughes: Mapping Parrot to PHP

I did not actually expect the PHP developers to directly consider having PHP5 run on Parrot. I had always assumed that the PHP developers would come out with PHP5; and Zend would, subsequently, release PHP5 versions of Optimizer®, Accelerator®, Go Even Faster®, Super Duper Faster®, etc. Following that, a separate bunch of clever people would write up a PHP->Parrot byte-code compiler; thus, creating PHP that runs on Parrot.

That is not to say that it is absolutely certain the PHP5 developers are going to have it running on Parrot, but this marks the first nuances of that possibility. I would have to say that it is a good idea; however, I don't know what Zend will do after that. I have a suspicion that it will be difficult to optimize Parrot more than it already will be optimized. (After all, I think Dan is putting plenty of weight on having Parrot run rather quickly; no one likes to get a pie in the face.) I am not sure what product Zend would begin to hawk other than their IDE. Though, I am not even sure what direct correlation there exists between the PHP-dev group and Zend. Maybe the developers act completely independently. I guess I had just always assumed Zend provided some financial backing for PHP's development, and I don't know what sway that affords them.

Just speculating a little...

J$
#!/usr/bin/perl
J=>money
;$_=ord$"<<s>>$J>,s-.-
$&*$'+$&-e&&y[%_(8)]]J]
&&print chop;print chr

Pieces Are In Place For "Write Once, Be Any Language"

2003-04-11 5:13PM

Speculation about Microsoft's mysterious X#

In the article, they speculate that X# is going to be a full-fledged programming language (like C#) rather than an XSLT replacement. The difference between C# and X# will be that X# uses an XML-compliant syntax a.k.a. you will write programs in XML (or something that can be easily converted to XML) that can be compiled to .Net byte-code.

That's what the article speculates. I think I know what X# is. It is going to allow you to write a C# program (or a program in any other .Net language), compile it into byte-code and X#, and then de-compile it into any other .Net language.

Automatic Bias Shift

2003-04-07 7:10PM

So, here, I made mention of communities being a "killer feature" of a programming language. Now, it night be that because I was thinking about it, I kept subconsciouly finding myself at sites discussing it. Or, maybe, a bunch of others simultaneously noticed it at the same time I did. But whatever it was, it sprung from everywhere. And, since the other bases have been covered in the other blog entries, I asked myself "what brings about this community?" More specifically to programming languages, what aspects do programming languages have that fascilitate the gathering of a community?

Oft Overlooked Killer Feature of Programming Language -- Community

2003-04-04 5:23PM

Surfing through the O'Reilly weblogs, I came across William Grosso's blog entry "Why Java is Better than You Think". I am not going to comment on why he likes Java so much. He has valid and well-defined points, and all of them are good (and all of them can be applied to any modern programming language *oops* I said I was not going to comment). But, the one statement that really stood out in his talk was something I never considered fully even though I've been prompted to do so before.

New programmers must be able to get up to speed in the language.

Nice to Have Native XML Support, Now Fix the Language Itself

2003-04-02 9:59PM

The EMCA announced that their will be native XML in ECMAScript. How it is being implemented is better explained by John Schneider in this article. That's nice and all (probably will not spell the end to XSLT). But, what I really want is for them to fix ECMAScript.

Just Sprinkle It on Your Servers...

2003-04-02 8:29PM

Everyone has seen Big Blue's commercials that tout servers that can heal themselves. Marketing-speak is a funny thing.

I had been wondering what this was all about, and while the article is not technical, it does touch on a couple of points.

New .sig

2003-03-28 4:57PM

So, not "feeling the muse" enough to embark on writing the Vegas summary, I decided that I needed a good geeky sig. Ever since I commented over here giving an implementation of reversing a string in C++ and, consequently, signing off with the Perl way to reverse strings, I have been signing most of my posts a la:

print scalar reverse '$J';
J$

But, that is no JAPH (well, it is not really a JAPH at all -- it's the PerlMonks modified version that is supposed to print out your name -- another good JAPH link w/ explanations here). A JAPH (or name-JAPH, as the case may be) is supposed to be completely non-inituitive and usually exploit an interesting "feature" of Perl. Off to find a better JAPH, we go.

Does the Program A Language Make?

2003-03-27 6:01PM

The Sapir-Whorf Hypothesis basically states that human thought is limited by our language. (Actually, it states that it is "affected by"; "limited by" is my touch to it -- the J$ corollary.) Does this apply to programming languages, also? Given a programmer with an overall programming ability recorded in the numeric metric 'x', does he or she program at a level 'y' that is less than x if he or she is in a different language?

In 2005, All Programming Languages Will Be OO Skewed and Run on a VM

2003-03-25 6:33PM

(Except for C/C++.)

In this presentation from a NY PHP convention which I found linked off of this blog here, glimmers of PHP5 emerged.

I predict that in 2005, there will be 3 VM's -- JVM, parrot, and .Net -- and they will all battle it out (Mono and dotGNU will sink into obscurity). You heard the prophesy here, first.

print scalar reverse '$J';
J$

Creator of XML Denounces XML

2003-03-17 5:37PM

Tim Bray, one of the initial designers of XML, has posted a blog entry entitled Why XML Is Too Hard For Programmers.

He doesn't provide any alternatives to XML, really. He just says things like:

can point to a handful of different popular XML-in-Java APIs each of which has its own data model and each of which works. So why would you think that there's a data model there to build a language around?

I think the key first step is to make XML stream processing idiomatic in as many programming languages as possible.

It's an interesting read at the very least. I like it when people say their own stuff sucks. I, also, find it funny when one of the creators of XML is parsing XML in Perl with regex's. Craziness. I suppose just because you helped design XML, that does not necessarily mean you follow code programming methodologies (or, you just simplified the code for your blog entry).

print scalar reverse '$J';
J$

What's A Web Service?

2003-03-17 5:08PM

So, you have probably heard of web services. You might even wonder what a web service is. Well, after I thought about it for a bit, I started to realize what a web service was and how these services, in a "buzzword" sense, differentiate from using your standard browser to query information from another server and render some HTML.

Distributed Blogging With Centralized Content Discovery

2003-03-15 3:58PM

This blog entry about this other blog entry is interesting. The first blogger, Seb, discusses a design system to make blogging more structured. That is, to more tightly integrate blog topics with one another. The second guy, myelin, talks about his pet project The Internet Topic Exchange. A site that collects topics/channels, and when you blog on a certain topic, you ping that category's URL so it gets updated. Others can, then, have an RSS channel feed from the channels/topics and know when others blog on it. So, if I want to read blogs on Perl, I collect this RSS feed, and I know when others blog on Perl. Seems like a good system, but I see one shortcoming...

Have Several Hours to Kill Reading Programming Methodologies?

2003-03-14 5:49PM

Here are a bunch of links that float around my bookmarks. I figured I would post them in case anyone ever missed them when they first appeared on the standard fare of geek sites. They are in no particular order. If you know of other good ones that I may have missed, post them for my consumption.

Why Do I Have Two Blogs

2003-03-13 7:13PM

So, I have two blogs -- this one and the Left Half. The main purpose for constructing two blogs was another layer of categorization. I wanted entries in the Left Half to be primarily technical -- programming, car specs and analysis, engineering, etc. This half, the Right Half, was to absorb the more subjective natured subjects such as my thoughts on the automotive industry in general, diatribes about books and movies, dissertations on why such n' such is good or bad. Of course, it is hard at times to maintain a strict delineation between the two. In those cases, I do an eeni-meeni-minee-moe type of algorithm. Whose to say which half this entry belongs? And, there is some weirdness. The Left Half has One-liner's which seem to lend themselves more to the Right Half, but the Right Half has the quotes section. I thought of reducing myself to one blog but decided against it. This seems to be working out so far.

So, there you have it. My two blogs.

Apocalypse 6 Concentrate

2003-03-13 6:54PM

For those of you who are living under rocks, Apocalypse 6 was recently released. I finally made it through all of the pages, and here are the glimmers of hope and moments of agony I found therein.

(*Note*: These are just my interpretations of the heavy-handed specifications. They may be completely wrong. Wait for Damian's Exegesis to obtain a more official interpretation.)

Why Do People Believe Email is Secure?

2003-03-10 6:29PM

Wired News: E-Mail Stink Proves Web's Power

That is just one example. There are plenty of others where people live under the mistaken construct that email is, somehow, a secure protocol (even barring social engineering insecurities). Here is another example. I know... I know... People are dumb. I am reminded of this daily. I suppose when I am finally apathetic towards it, my life will go on for the better.

What I Want from an Email Client

2003-03-09 8:31PM

Excluding browser based email clients such as Hotmail and Yahoo! Email, I have probably used 5 or so different email clients including Microsoft Outlook and Outlook Express, Netscape Messenger, (most recently new) Bloomba, and the one I currently use daily, Qualcomm's Eudora. But, none of them possess the entirety of features I want out of an email client. "What are these?" you might ask. Well, here is a list of them that I can come up with. I will update this list as I think of them:

The Google Dance Is Your Chance...

2003-03-09 5:03PM

It seems Google is dancing. And, seems to be coming up with some "interesting" related sites for my two blogs. Though, I checked with the Google-dance tool but came up with nothing interesting. Not sure what is going on but it does seem funny...

Installing Lycoris

2003-03-07 6:26PM

So, I have this really old laptop, a Dell Latitude CPi D266XT. Inside, it houses a beefy PII 266 with 64M RAM and an 8G hard drive. Not a very powerful box, but one that is sufficiently acceptable to be used as a small Linux box for blogging (here and here), word processing, and the occassional web site surfing. Of course, wrestling Linux onto old laptop hardware can be an experience unto itself. Especially when you decide to deviate from your standard distro and try a new one.

Software / Systems Development Occurs in Pulses

2003-03-05 2:05PM

As I sit here, at work, writing a blog entry, I cannot help but notice that the development of version 1.0 of our email/directory services/calendar/groupware/etc. system occurred in spurts of rapid activity separated by periods of relative inactivity. Now, as development of version 2.0 of the system is underway (which is entirely necessary as we were all under the gun and rushing to "flip the switch" as we slipped further and further away from our initial rollout date, which was handed to us in the first place; but I digress), I am noticing the exact same trend.

Defining SUV's So I Know What to Hate

2003-03-02 9:30PM

SUV's, technically, began in the 1940's with Willy's Jeep Wagon that was advertised as a "utility vehicle" for the family. But, it was not until the 50's that the Chevrolet "Suburban Carryall" defined what SUV's were. They started as a pick-up truck's chassis, layout, and engine with a compartment stuck over the bed that was filled with interior and covered trunk space. But, as soccer moms and yuppies discovered they were "cooler" than station wagons and minivans to haul their children and make-up around, the SUV had to evolve.

Install Apache 2.0 w/ FreeTDS (SQL Server), PDC Authentication, etc.

2003-02-28 2:16PM

This document will server as a guide to getting a highly specialized Apache install on a linux box. The demands are many: php-support, mod_perl support compatibility with MS SQL and MySQL, GD support including standard graphics libraries (jpeg, freetyp, png), NT authentication via pam, and many more. This will hopefully set you in the right direction. This was originally written by myself and Chuckie for the Apache 1.3.x series. It was a compilation of many different sources of information and a lot of trial and error. This, at least, centralizes all that we learned and is heavily altered to comform to the Apache 2.x series.