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
- cd webservice/java
- cvs import -m "adding java implementation" webservice/java vendorname tag
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
There, that's a lot easier than individually adding directories and files.
( Nov 23 2004, 11:09:35 AM PST )
Permalink
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?
Dollar costs
zilch
Support for refactoring
renaming and changing method signatures, moving them around... all with dependent references kept in tact
Extracting interfaces
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 )
Permalink
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 )
Permalink
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" %>
<%@page pageEncoding="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 )
Permalink
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.
In the meantime, the Big Lie that waging war on Iraq has some relationship to 9/11 and terrorism apparently has been successfully Jedi mind-tricked into the American psyche and we're destined to have four more years of high crimes and misdemeanors. It just makes me wonder what is up with the rest of the country. Plenty of folks abroad are, evidently, equally perplexed by this election, as we see in a recent Daily Mail cover.
If you're single, there are some Canadians offering asylum. I'm thinking of packing up the family and moving to New Zealand or something.
Just to keep track of where I don't want to be, I'm reckoning with the map:
| Strong Kerry (146) |
| Weak Kerry (37) |
| Barely Kerry (69) |
| Exactly tied (0) |
| Barely Bush (30) |
| Weak Bush (66) |
| Strong Bush (183) |
| Needed to win: 270 |
|
|
|
Do you live in a state of stupity?
Apparently 59,054,087 of you do.
|
State |
Avg. IQ |
2004 |
1 |
Connecticut |
113 |
Kerry |
2 |
Massachusetts |
111 |
Kerry |
3 |
New Jersey |
111 |
Kerry |
4 |
New York |
109 |
Kerry |
5 |
Rhode Island |
107 |
Kerry |
6 |
Hawaii |
106 |
Kerry |
7 |
Maryland |
105 |
Kerry |
8 |
New Hampshire |
105 |
Kerry |
9 |
Illinois |
104 |
Kerry |
10 |
Delaware |
103 |
Kerry |
11 |
Minnesota |
102 |
Kerry |
12 |
Vermont |
102 |
Kerry |
13 |
Washington |
102 |
Kerry |
14 |
California |
101 |
Kerry |
15 |
Pennsylvania |
101 |
Kerry |
16 |
Maine |
100 |
Kerry |
17 |
Virginia |
100 |
Bush |
18 |
Wisconsin |
100 |
Kerry |
19 |
Colorado |
99 |
Bush |
20 |
Iowa |
99 |
Bush |
21 |
Michigan |
99 |
Kerry |
22 |
Nevada |
99 |
Bush |
23 |
Ohio |
99 |
Bush |
24 |
Oregon |
99 |
Kerry |
25 |
Alaska |
98 |
Bush |
26 |
Florida |
98 |
Bush |
27 |
Missouri |
98 |
Bush |
28 |
Kansas |
96 |
Bush |
29 |
Nebraska |
95 |
Bush |
30 |
Arizona |
94 |
Bush |
30 |
Arizona |
94 |
Bush |
31 |
Indiana |
94 |
Bush |
32 |
Tennessee |
94 |
Bush |
33 |
North Carolina |
93 |
Bush |
34 |
West Virginia |
93 |
Bush |
35 |
Arkansas |
92 |
Bush |
36 |
Georgia |
92 |
Bush |
37 |
Kentucky |
92 |
Bush |
38 |
New Mexico |
92 |
Bush |
39 |
North Dakota |
92 |
Bush |
40 |
Texas |
92 |
Bush |
41 |
Alabama |
90 |
Bush |
42 |
Louisiana |
90 |
Bush |
43 |
Montana |
90 |
Bush |
44 |
Oklahoma |
90 |
Bush |
45 |
South Dakota |
90 |
Bush |
46 |
South Carolina |
89 |
Bush |
47 |
Wyoming |
89 |
Bush |
48 |
Idaho |
87 |
Bush |
49 |
Utah |
87 |
Bush |
50 |
Mississippi |
85 |
Bush |
|
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 )
Permalink