Archive for June, 2006

mission accomplished…

Why, lookit that:
XML::Parser::Lite::Tree::XPath
It works!
So I let the author know about the mods, if he wants them. But in looking at the code to do this, I think I’d be happier with a “Lite” version. Don’t get me wrong, this is a lovely plugin if you want all of its features. I simply don’t: not the MSN smilies, and not the java stuff. I had to disable it to keep it from slowing my system down. Plus, in the course of modifying the code, I discovered it makes three passes over the content of the entry. Why? I think again cos of the javascripts, but now I want to look at this and see if I can make it a bit leaner and meaner…

del.icio.us:mission accomplished...  digg:mission accomplished...

Comments

plugin mashup

And, no, I don’t mean the trendy kind of mashup that’s all the rage in 2.0. I’m talking about when plugins collide. Particularly plugins that run through the_content of a WP blog entry. I have two such at the moment: one that inserts smilies into the text such as this :-) and I have another that renders code within <code> elements as completely unprocessed elements. The two together give rather unfortunate results for:

<code>XML:: Parser::Lite::Tree:: XPath</code>

(notice the strategically placed spaces before Parser and XPath…) as something like:

XML:<img src=’http://www.digitalramble.com/wordpress/smilies/yahoo_tongue.gif’ alt=’&#58;&#80;’ class=’wp-smiley’ width=’18′ height=’18′ title=’&#58;&#80;’ />arser::Lite::Tree:<img src=’http://www.digitalramble.com/wordpress/smilies/yahoo_love.gif’ alt=’&#58;&#88;’ class=’wp-smiley’ width=’18′ height=’18′ title=’&#58;&#88;’ />Path

Ahem.

Now clearly, it isn’t always possible to avoid plugin collisions. Some are just inherently incompatible with one another. But I have to wonder about the notion of indiscriminately putting smilies in where one might not want them to appear, such as in code elements.

There are probably some alternatives. For example, I could use Simple Code to generate unrendered code samples that view properly. But the same reason that this plugin would not collide with the Smilies one is the reason I don’t care to use it: it provides an option under the Write admin panel to cut and paste the code in, and the protected result out. This means that when I’m writing up a post, I have to save it, go to the SimpleCode option, paste the code i want, copy the results, then go back to editing. If I navigate away and neglect to save, I’ll lose what I was writing. Given that I tend to go back and forth with snippets of code, and given that this is a technical blog with lots of code, that’s not convenient (although, I must say it came in handy for massaging the above example, which will go away otherwise when I fix this collision). However if the output from SimpleCode contains anything the Smilies might match, I’m still stuck with potential Smilies appearing even in this.

I could drop the Smilies plugin but just as I’m geeky enough to want the code feature, I’m geeky enough to want the Smilies in the right place.

Hmmm…I foresee some modifications to this plugin.

del.icio.us:plugin mashup  digg:plugin mashup

Comments (3)

forays into local cpan installation

I really dislike having to install perl modules locally. But sometimes that’s the set of cards I get dealt. And in all honesty, once it’s properly set up in an account, it’s easy to add on any others at a later date. So. I generally start with a local perl directory, in $HOME/perl, to keep things tidy. Otherwise I wind up with a more generic bin and lib sitting out there, and there’s lots that use bin & lib that have nothing to do with perl.

I add env variables:

if [ -d $HOME/perl/lib/perl5 ]; then
        PERL5LIB=${PERL5LIB:+$PERL5LIB:}$HOME/perl/lib/perl5
fi
MANPATH=${MANPATH:+$MANPATH:}$HOME/perl/share/man
export MANPATH PERL5LIB

(or if you prefer csh style — which I do, but I haven’t bothered to switch these bash shells around yet — I may, if I get irritated enough)

setenv PERL5LIB      $PERL5LIB:$HOME/perl/lib/perl5
setenv MANPATH     $MANPATH:$HOME/perl/share    

You can use printenv in most shells to double check the settings and make sure they “stuck”.

There really doesn’t seem to be any one place that combines all the info I use for a local install. I usually start out with this one which is almost complete but it leaves out salient details such as exactly how to start up cpan (which I always forget, it has such forgettable syntax) and doesn’t really contain tips for troubleshooting (there’s always troubleshooting).

However, it provides a perfect MyConfig.pm file to get started with, so I copy that into the ~/.cpan/CPAN/MyConfig.pm and follow the instructions it has in the comment section at the top. After the localizing alterations, I can run perl -c MyConfig.pm in order to make sure I haven’t done something boneheaded.

Now I’m ready to rock and roll. Get into cpan via perl -MCPAN -e 'shell' and now I can start installing. The help file I listed before suggests checking the changes I make to MyConfig.pm via a make on Text::Autoformat. I don’t really bother anymore but it’s a handy way to check that the variables are all correct.

Let’s say I want to install Flickr’s API. So I go with install Flickr::API. It will ask me some questions. What I have found out about CPAN is that most of the time (as in 99% of the time), the default is a perfectly good way to go when it asks questions. Quite often when I install something, it will suggest other things that should be installed or updated, etc. I just go with the flow on all that.

When I nibble around this article you’ll see more tips and such on unprivileged perl installs. Obviously installing your entire local copy of perl isn’t the way to go for the most part (and neither am I actually trying to install Bugzilla, at least not in this little essay), and they discuss a slightly different way of setting up the MyConfig.pm file, but there’s other goodies such as force install which I can try if I get nasty messages after attempting a plain install. Also what frequently helps me is to try installing the noted dependency packages on their own. Take the Flickr::API — it also wants XML:: Parser::Lite::Tree:: XPath and will inform me of that while installing the Flickr stuff. And sometimes it will take care of it, and sometimes it won’t; doing a separate install on that often works.

The last bugaboo I generally wind up dealing with, especially since I mostly write perl for cgi scripts is the transition from running on the command line to calling it from a web page. All the previously mentioned steps get the perl working on the command line, but then it can still turn into a big ol’ Internal Server Error mess when I try to go online.

The problem is, of course, that the http client isn’t accessing my pretty MANPATH and PERL5LIB paths for the extra info. This is where tweaking the @INC array helps: I can be all perl hacky and do something like BEGIN{unshift @INC, "$HOME/perl/lib/perl5"} (note that $HOME itself won’t actually work here, I use it for shorthand notation — replace this with the full value of $HOME in this case). But I just discovered this tidbit when googling and trying the use "$HOME/perl/lib/perl5"; worked like a charm! I’ve posted this previously only at another location: the flickr slideshow. Because www.sclrr.org is on a different server than is www.io.com/~sclrr, I had to re-install the perl libraries, and find a different solution to the path problem.

del.icio.us:forays into local cpan installation  digg:forays into local cpan installation

Comments (1)

into the thickets of free software, open source, and personal privacy

Came across this article the other day and I’ve been thinking about it. Setting aside his somewhat confusing terminology (”Free Software” really should be called open source, because the very program he is railing against, Picasa, is free software. The source code is proprietary, but the software is still free…), he nevertheless touches on a number of issues I’ve been fascinated by for the last several years or so.

In any case, like any good geek, I’ve used freeware for years. Who wouldn’t? And of course I’ve always been generally aware of open source software, as anyone on Unix would be, through the efforts of gnu, linux and the like. However, since I was using Windows increasingly in my current job and lazily on my home computer, it wasn’t until about two years ago when I decided I was going to migrate to Linux and then last year when I completely removed the Windows installation that I was looking much more closely at Open Source.

We already know that the Open Source model is sound. There’s more than two decades worth of solid work, starting with the early GNU projects to today’s Linux distros and more to show that. What’s more, especially for the more popular and widely used programs, the churn rate on bug fixes and feature additions is much higher. You only have to look at Firefox’s quick turn around on bug fixes, and the number of releases its made as compared to Microsoft’s completely anemic Internet Explorer 6 which gets only a minor facelift some seven years later with the release of IE7.

But if you’re not compiling things, if you’re not poking through the code, if you’re happy using just executables, then the philosophical differences between freeware and open source aren’t going to be obvious. And certainly there’s quite a bit of other freeware that enjoy the same pace of responsiveness and bugfix/feature adding. Linux users, even while preaching the open source mantra, tend to rave as much about google software as anyone else, and last I checked, googleware, while free, is most certainly not open source.

There’s a slew of other considerations as well. Open source software is more likely than most to be present on multiple platforms. A good piece of software whose code is accessible can be ported by someone interested in it elsewhere. This simply doesn’t happen with proprietary code; only the owner of the code will make any necessary investment to do so, and many don’t. And the beauty of using the same program whether you’re on Windows, Mac, or Unix is that you don’t have to memorize new interfaces. You’re more likely to be able to interact without issues with someone on another computer. Send them a file and it will be correctly interpreted and opened. The frustration factor goes down and the usability factor goes up.

However, I think Picasa is a slightly different issue. The only reason Picasa is available on Linux is because it’s bundled with Wine, an open source program that allows Linux users to run Windows applications. Google made extensive fixes and extensions to Wine so that it would be able to run Picasa in Linux. We therefore have a piece of open source software which has been extensively upgraded in order for Picasa to make its Linux debut.

This actually takes the entire Picasa debate out of the usual free vs open domain, and indirectly brings me to another issue especially relevant with today’s issues on domestic surveillance by the governments: the final reason that pushed me over the edge into getting out of Windows was the whole DRM and privacy concerns. This involves not just the DVD protection stuff but also the trusted chip technology (blog of helios has a pretty good run down on this whole issue worth reading — check also for which hardware is involved). You’ll notice that now these trusted chip sets are going to be on Macintosh computers as well, with their well publicized move to Intel chips.

Linux is literally the only way out of this for the foreseable future, and it’s Open Source that will guarantee that. Even if DRM were somehow put into it, anyone could recompile without it. Folks outside the country could keep versions available.

And how did I come to this digression with Picasa? Back to Wine: it could well be a way for die-hard Windows users to get away from the DRM technology while still running the programs that they know and love. I just love the multiple levels of irony here.

del.icio.us:into the thickets of free software, open source, and personal privacy  digg:into the thickets of free software, open source, and personal privacy

Comments

cross platform and cross computer utilities…

In general, the programs and tools I use revolve around a couple of considerations:

  1. I need to use them at home/at work (or more precisely, from different computers)
  2. I want to use the same tool regardless of the operating system I’m using (I have linux at home, but must use Windows elsewhere)

Ideally I’d like my data accessible from anywhere, and I don’t want to have to learn new applications just because I’m on a different operating system. Obviously there are no hard and fast rules because some programs are just too useful not to have around even though they only run on Linux. (Don’t let the mentions of Linux scare anyone off here. Everything I discuss is either a web application or works on Windows as well as it does on Linux.)

In practice, this means I gravitate toward browser based utilities and open source cross platform utilities. In the former category are many of the Google tools: Gmail, Calendar, Notebook, plus others such as Bloglines, Meebo. In the latter category are Firefox, Thunderbird, Open Office, Gimp. Sometimes there are programs near and dear to my heart that I take the trouble to locate off platform versions of them, such as vi (yes I know I’m depraved) but this last category I’m not addressing here.

I’ve actually known about Meebo for some time, but I’ve started experimenting with it only in the last few days. I have no complaints whatsoever with Gaim which is what I normally use. However, when I was travelling for a few weeks last year, it was very cumbersome to download it, unpack it, use it, and then delete it. I should have made use of Meebo then although I’m not sure how usable it was at this point. Right now, it’s pretty sleek, works very well. Could use some more bells and whistles (I do not mean this literally in the sounds sections) — I have a hard time telling when I’ve got a new message in, for example. But it’s got a good interface, looks very smooth, and is worth checking out. It also offers a one stop place to log all your conversations, which could be a good thing or a scary thing, depending (completely configurable, never fear).

Feed aggregators have been interesting. There’s plenty of computerside clients, of course, but for this one I definitely want a web based one! Google Reader and Bloglines seem to be the main contenders out there. I tried Reader first, but it has an inherent disorganization that makes me want to scream. You get fed a steady stream of all the new articles that have come out. And if non has, no problem, it will show them to you over again. You wind up completely uncertain of what you’ve seen, where you’ve seen it or even when you’ve seen it. You lose all context since a post from that political blog might be followed by a post from that comics blog and then your little sister’s journal entry. No thanks. Yes, there’s kind of an edit subscription mode at the top you can turn on that helps organize the information, but there’s no settings to turn that on or anything. Bloglines is much better organized, although their frames setup makes me want to scream. They could set the sidebar up without frames, I’m sure, and make a much nicer interface. Still, the organization of the subscriptions into orderly files is wonderful, and they have several API’s for accessing the feed list which you can turn to nefarious purposes on your own website and so on. My particular favorite has been to assemble a comics folder, in which I placed all my comics subscriptions — rigorously selected to actually display the comic (some will just give you links to go to your comics — no thanks!) — and in the morning i just flip that folder on, go to wide view and jump down each one almost like a regular newspaper. I love it! And of course all I need is a browser and I can go thru my feeds.

Different web utilities can be combined in sometimes unexpected ways. Here’s one that’s proved very useful (via LifeHacker) if you use Google Calendar and you want to track the daily weather: Go to Weather Underground and find your zipcode or area of interest. When you get to the page in question, you’ll find a green ICAL link in the upper right hand area of the screen. Copy the link location for this ical file (in FF, right click and choose copy link location) and then go over to your Calendar, click on Settings, then Import Calendar and paste the ical address in there. What’s cool is that the next seven days or so have weather information in them, which gets updated. It cleans up after itself: the weather information is always eight days including yesterday. Plus, as the weather info updates during the day, the info box also updates in the calendar.

I’ve been using Delicious for several months now to collect my bookmarks in a completely accessible fashion, although I use DR’s delicious account more for “reporting back” here, so with that account I take the trouble to copy or type up some notes with each link. Either way, Delicious offers a way to access your bookmarks from anywhere, and through the different utilities and API’s that it has, you can do all kinds of stuff with the bookmarks you make, besides go searching or browsing through them at Delicious itself. They finally took the smart step of adding private entries to this utility, which is good for people who want to keep certain work links or personal links private and yet keep everything together. I experimented with Magnolia as well, which could be another alternative, but I have enough links on Delicious that exporting/importing isn’t an attractive proposition. Oh, and you can save an xml export of the Delicious bookmarks, although at present I don’t know of any utilities that work off of it (even Delicious itself!). Still, you can download that to your personal computer for backup.

The final sort of online utility I’ve been considering but have not actually used yet, is an online password saver. I’ve looked at this one, but I have serious reservations about saving passwords online. At the same time, if they are saved on my personal computer, I’m really screwed if I can’t remember something while away from my computer. (As an aside, I should note that I’m very strict about setting FF and other browsers and utilities to never remember passwords. Even if someone should get on the computers I actually use, they will find that nothing has my passwords: not my ftp or ssh utilities, not my browsers, nor my mail clients. Nothing logs in automatically and so on. Perhaps the constant need to remember my passwords will keep Alzheimers at bay, who knows…)

I don’t think I need to extoll the virtues of Firefox here, but it sure does have good extensions, which would make a post in of themselves. I’ll confine myself to the latest one I’ve nabbed: the copy as html link firefox extension which is a boon to bloggers everywhere (along with Google Notebook) in cutting and pasting links (how often have you copied the address, come back here, pasted it, gone back, copied the title, back here, paste, and so on ad infinitum?). With this, you highlight the text you want, right click, choose the copy as html that is now present, and go back to paste in one step. This is one of those tiny little utilities that fix something which was truly headdesking and yet never addressed till now and you wonder why it wasn’t done this way to begin with. This is functionality that should be built into browsers.

Thunderbird is a very well thought out program, and I do like how it’s set up. However, while it meets my criteria for operating across different platforms it still renders my mail inaccessible if I download mail with it onto a particular computer. So although I prefer its interface to Gmail’s, I primarily use it to retrieve and archive my email, from Gmail and IMAP clients (had to leave the pop ones alone). Still, if you use something like Outlook (shudder), you should definitely be looking at something like this. Plus, Thunderbird also has cool extensions like Firefox does, to help you customize it exactly the way you want.

I was initially somewhat dubious of Open Office’s Write as I’d tried converting a few files a couple years back and had too much trouble with tables, but the OOo team seems to have been hard at work and I’ve been very pleased with the results this time around. No trouble with any of my files so far. Ditto Gimp — I coudln’t figure out how to do anything the first go around, and this time I transitioned right off Photoshop with nary a hiccup. I’m particularly pleased that the interfaces on the Windows version are the same as in Linux. Saves me a lot of bother. Plus which the applications are smaller, faster, and somewhat cheaper than the Windows counterparts ;-) Even if you’re not a Linux user, you’d probably be pleasantly surprised at the speed and ease of use of these programs. They keep getting cast in terms of substitutes for Windows programs, but in reality they’re full fledged programs with a good deal more functionality plus interoperability.

If you’re not off internet cafe hopping, Gaim’s a great application. It combines all the major IM interfaces into a single program. Yahoo IM, AIM, Jabber (which hooks up to Gtalk), and others are all represented here. You don’t have to have multiple programs running if you’re talking with people on different IM’s. It’s got a slick interface, tabbed conversations, and it can do group chats as well.

There. That should be plenty of toys to look over…

del.icio.us:cross platform and cross computer utilities...  digg:cross platform and cross computer utilities...

Comments (2)

« Previous entries · Next entries »

Bad Behavior has blocked 751 access attempts in the last 7 days.