What's That Noise?! [Ian Kallen's Weblog]
Tuesday November 23, 2004
Adding a file system hierarchy into a CVS module
I had a whole bunch of code that needed to added to a CVS repository. Normally with just a new directory or two and a few files, doing "cvs add" for each one is no big deal. But when there's a whole file system hierarchy that can be a real PITA. This is where "cvs import" comes in handy.
I usually only use "cvs import" to create a new CVS module but it can also be used to do a "bulk add." Maybe it's common knowledge for CVS jockies but it's easy to forget about unless oft-used. Here's the scenario:
- module webservice already exists with subdirectories perl, python and php
- a new subdirectory java is in your sandbox and needs to be added and it has a complex hierarchy of source packages, jar files and test data
- to add webservice/java do this
vendorname and tag aren't really consequentially, if doing for your company, that sounds like a good choice for the vendorname... the tag should be indicative of the CVS module change i.e. java_implementation_start
- cd webservice/java
- cvs import -m "adding java implementation" webservice/java vendorname tag
There, that's a lot easier than individually adding directories and files.
( Nov 23 2004, 11:09:35 AM PST )
Friday November 19, 2004
Editing Perl with Eclipse and EPIC
I've been bouncing between development in Perl and Java a lot this, two languages that I both love and loath at various times. One of the things that I love about developing in Java is using Eclipse. This week I decided to give the Eclipse support for Perl a spin. Well, I'll be saving my love for the Java support.
The only gripe I've heard about Eclipse that I haven't had a good answer for is the absense of Emacs key bindings. Otherwise, what's there not to dig about Eclipse?
Support for refactoring
renaming and changing method signatures, moving them around... all with dependent references kept in tact
OK, that falls under refactoring but worthy of its own mention
Source and javadoc stub automation
Spontaneous method stub creation, constructor and accessor creation, javadoc stubs
Test case generation and running
JUnit and ant awareness, yum
Syntactical and semantic error highlighting
Fixing errors early and often is easy cause they're usually obvious
I was hopefull that the EPIC plugin would provide at least some of those things for Perl development. This is what I found:
- Syntax highlighting
- Module outlining
- Dependency checking (i.e. "use" statements validated)
OK, that's a pretty good start. But some things I wanted like syntax completion (i.e. when editing Java, you can type "for", hit shift-space to pull up options to loop over an array or a Collection and voila: a for loop is materialized.
- The semantic checking hangs sometimes (a popup with "Building Workspace (Blocks User Operation) [thermometer bar] Invoking Perl Auto Builder" will just put it under spell for a brief period)
- Sometimes the dependency checking makes mistakes... it'll falsely indicate a problem with a an import (a "use" statement)
- No refactoring, build system, testing or perldoc support
...so basically all of the goodness you get for Java development is lacking for Perl. Nonetheless, I think it's a promising start. I'll be trying the EPIC updates from time to time as new occasions to develop in Perl present themselves.
In the meantime, you can enjoy the fruits of this week's labor by pulling it off of CPAN; that's where you can get
WebService::Technorati. It's also part of the latest release of the Technorati web services SDK. Thanks to David Wheeler for turning me on to Pod::Simple::HTML ...I'm still trying to figure how he gets it to output nice docs from pod, mine didn't come out nearly that purty. Ah well, I guess that'll be part of next week's Perl fun.
( Nov 19 2004, 10:59:25 PM PST )
Wednesday November 17, 2004
XML::Parser on Mac OS X
I needed to fiddle with XML::XPath on my powerbook today, it depends on XML::Parser. Complacent with how most unixy things I want to do JFW on Mac OS X, I dropped down to my CPAN shell and typed "install XML::Parser" -- bzzzt!
It turns out that expat is not installed, grrr. So I fired up Fink Commander and had it gimme some expat lovin'. Tried it again -- bzzzt! This is what I did in the CPAN shell
cpan> o conf makepl_arg "EXPATLIBPATH=/sw/lib EXPATINCPATH=/sw/include"
cpan> install XML::Parser
-- ding-ding-ding! We have a winner! XML::Parser
installed! Thereafter, XML::XPath
JFW'd and I'm on my way.
( Nov 17 2004, 04:53:44 PM PST )
Sunday November 07, 2004
Tomcat's "Content-type" header parsing busted?
One bit fun this week was trying to figure out why some XML output I was working was mangling characters. I thought I was doing all of the right things as far as handling the data goes. Well, I think I was but Tomcat 5.0.28 wasn't.
I poked around the Jakarta bug database and the only mention I could find that close was PR 31442, which described having this
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
and saying that the text was coming back ISO8859-1 when the page is requested as a GET but not as a POST. Well, someone from the Jakarta project marked the bug INVALID glibly saying to ask on the user's mailing list and look at the Connector configuration because it's not a bug. WTF? Are you kidding?
Now I looked around in the Connector stanza's that come in the server.xml and see no mention of encoding configuration attributes. I've got a real simple test case.
<% response.setContentType("text/xml"); %>
triggers no funny encoding behavior, I get the data out as good old utf8 just as I wanted but if I did this
<% response.setContentType("text/xml; charset=UTF-8"); %>
....kablooey! Mangled encoding! That's just wrong. And if it's not wrong, I think it warrants a better answer than RTFM on the Connectors.
And the problem may not just be isolated to JSP handling. Judging from other reports that are turning up in Google's index pertaining to SetCharacterEncodingFilter, it's affecting the filter implemetation as well.
( Nov 07 2004, 02:46:58 AM PST )
Saturday November 06, 2004
What are all of these stupid people doing in my country?
There were some severe system problems last week that pretty much knocked this site out of commission, I'm hoping it's all in the past now.
There you have it: the closer you are to the coasts or Lake Michigan, the more likely you're not a dumbass.
I was never particularly enamored with John Kerry, in fact I would've been happy with a Wesley Clark-Howard Dean ticket. Nonetheless, I don't think Kerry would have been so driven to a war that he would have disregarded counter-indicative intelligence and the advice of allies to wage one.
Another idea that no longer seems entirely ridiculous is to secede from union. Seriously, who wants to be part of this country when California's vote is under represented in the electoral college and yet our youth are being sent to Fallujah to wage war against a culture and people most people here know little of. We're the country's vegetable stand and
it's cannon fodder. I don't think so. Suddenly, Ecotopia
sounds like a reasonable proposition.
Independence for California!
( Nov 06 2004, 01:12:57 PM PST )