Archive for the ‘Commons’ Category

SVN filter script

Wednesday, September 16th, 2009

There’s probably a better way, but thought I’d share a quick hacked up script I created to take an SVN changelog and filter out revisions that I didn’t want there. I used it while merging Commons Collections generics branch into trunk to create specific submit messages showing the bugs fixed on each file in its commit message. I filtered out the common and not interesting revisions for fixing tabs, or my shifting of the license header so the merging went easier.

# ARGV contains a list of filters to ignore
# stdin contains a file

svn_separator = "------------------------------------------------------------------------n";

entries = $stdin.read.split(svn_separator);

ARGV.each do |revision|
  match = "^r#{revision}"
  entries = entries.select do |entry|
    entry !~ /#{revision}/
  end
end

if(entries.length > 1) then
  puts entries.join(svn_separator);
  puts svn_separator
end

Commons Lang 3.0 status

Sunday, September 6th, 2009

(From mailing list email)

Thought I’d share the status of Lang 3.0.

  • 65 resolved issues out of 131. Basically around 50% of the way there.
  • 65 contributors involved, with 55 patches and 340 comments. Thanks to everyone out there for the work so far.
  • First commit on 25 Mar 2008, so about 18 months along now. That was one week after the last release (2.4).

Ideally… March 2010 would be a great time to see 3.0 come out. :)

I’ve started moving some issues to 3.x that don’t have anything actionable. Things like “Maybe add a RegexUtils?” etc. Basically ideas.

There’s one JDK 1.6 dependent issue in there. WIth a circa March 2010 release, I think that’s a fine dependency given that 1.5 goes end of life in Nov 2008.

There are a good range of simple and complex issues in there to work on.

Authors of Lang

Saturday, August 8th, 2009

Via my contribution report plugin for JIRA, I see that Apache Commons Lang has been the work of 337 JIRA users, working on 519 issues, with 445 patches and 2,307 comments.

JIRA Outlet Search 1.0.2 plugin released

Sunday, April 5th, 2009

I’m playing at setting up a Commons dashboard within the Apache JIRA. This means needing some improvements to my plugins so that they can pretend the site is Commons specific. It’ll be nice to get custom l&fs for JIRA dashboards one day too.

The first released change is the ability to make the Search restrict itself to a set number of projects (and lets you say “Search Commons” next to it rather than “Search JIRA”):

JIRA Outlet Search Plugin

The open and federated Commons

Saturday, November 8th, 2008

Thinking out loud on a new vision for Commons…. (aka.. this is the lightning talk I should have given if I’d have thought the thoughts more clearly 48 hours earlier).

Originally Commons was a place for Jakarta projects to come together. It worked somewhat, but then built its own commit base rather than being a place for people to come together. The use cases that drove the code was more often outside of the AS, in day jobs, than at the ASF. At least for the enhancements and bugfixes to a library. This is a good thing, but the first aim is not being met.

Somewhere in the conversations between Commons people that we’ve had at ApacheCon (just mumblings and grumblings oh people who were not here) there is an underlying ‘truth’ - which is more than just an open source project that has been surprisingly successful in its own quiet way. It’s something to do with the bazaar atmosphere, with the high level of equality (everyone’s a benevolent dictator of some component or other), with the notion of delimited and overlapping community that allows for high amounts of individuality without a high bus count, and, yes, with the pain that a strong focus of stability has given us all in the general lack of aggressive JDK 1.5+ libraries. There’s something different about the project which is an idea worth taking further. I don’t pretend to understand it completely.

The failure of the initial aim to bring projects to share is, I believe, strongly in the notion that people are committers of a project. Or two. Each new project you commit to is a context switch and a responsibility load to add. You can’t keep up. Many who join Commons end up focusing on Commons more than their original project, while others pass through doing good and then going back home for good. There’s not a feeling that you can join in every now and then. It’s a new entity - not a  true commons.

It always was in some way… when you left the house in the village to head out to the common, you were on different behaviour, playing a different role. The difference was that it was well understood that you were going back home again, and you’d be back out again tomorrow, or the day after, or some time soon.

One thing we’ve had over the years are projects and people who took their toys away again and went to sit in their house where the code worked happily inside their project and was no longer easy to find. My assumption here is that this is because when you’re on the common there are standard rules to adhere to - don’t let your dog crap on the grass, don’t play golf, don’t drive your car. Some don’t like this. In Commons’ case it’s a standard release process, and parent pom which leads to the same build/website approach. It becomes a case of fully committing to the tribe, or staying home.

Thus we get to the title of this ramble. There needs to be a middle ground and I have two snippets of thought to propose as a starter for that new land.

Firstly… the open Commons. While the Apache structure means it can’t be open for anyone off the street (and I spend enough time with lawyers to know I want that) - I think we need to reach a point where Apache committers feel no obligation to take on Commons as a new home. Show up - work on your piece - go home. We need to find a technical solution here -giving everyone commit access will likely be chaotic, despite my desire to try such a thing. Maybe the solution is to provide a branch space for any committer to work on something and integration comes via the regular maintainers. Anyway - problem 1 to solve - let people know it’s easy to walk in, help out, and head home again.

Secondly - there needs to be a solution to taking toys home and having them be hidden. I call it ‘taking the toy home and putting it in the window’. Or more positively - ‘putting the toy in the window to see if anyone wants you to come play’. Let’s use a concrete example. The Droids Incubator project has a component called NoRobots. It’s a simple robots.txt parser that has had a migratory life (from my osjava to Commons suggestion to HttpComponents to Droids). The Droids project should flag it as beloning to the federated Commons, Commons themselves will link over to it and life can continue. It’s a a Commons-like component, just not actually developed in Commons.

What would being a part of the federated Commons mean? Here’s some thoughts:

* Website stays in the window. It puts on a federated-Commons logo (”Part of the Greater Commons”?).

* Name becomes Commons Xxx (I’m 50/50 on this one… it’s bold yet potentially confusing).

* The Commons website links to the window. It is also the obvious location for more discovery mechanisms such as a page that explains the types of components available etc. Tempted to write a focused bit of tech that reuses the existing DOAP xmls.

* Uses a Commons (Java)-namespace/maven ids (again a 50/50).

* Upholds a lightweight set of release quality goals that probably match 100% to ASF goals.

If development activity starts to spread to other projects - then it can move more squarely into the Commons as a middle ground.

There’s a third item I want to mumble about. The stagnation of stability. Focus on not screwing users leads to stagnation. Axis made a healthy choice (for themselves) to screw their users and move to Axis2. They’re in a better place now. Log4j made a healthy choice (for their users) and focused on stability. They’re in a worse place now but offered better value to the users. Both are a sign of choosing a polar extreme. Much of Commons suffers from the Log4j path… except for CLI which has the Axis approach (but worse in that the new development lost direction but robbed the old development of life).

What am I rambling about now eh? I’m going to call it the unhealthy competition between maintainer and creator. The battle between the goal creator and the water carrier (c’est vrai mon petite sardines?). The failed balance between the draining of 1.x, and the rejuvenation of 2.0. We need to be more concious of the creation process. Here’s my versioning manifesto of bleeding obvious statements:

* New versions are always done in a branch, with a sandbox mentality. The website and the public material remains 1.x focused until 2.0 is ready; not to say that it can’t link to the ‘coming soon’, but it should uphold 1.x until the time is right. No more CLI screwups.

* New major revisions can do whatever they bleeding well want to with backwards compatibility. If that means changing package names to avoid the problem of transitive dependencies or runtime stupidity, then so be it. Change away. Even change product name, there is no reason why BeanUtils couldn’t be replaced by ‘Reflector’ - it’s only a brand and it means the approach can be wholly new.

That’s all I have. I’m pretty sure I used up my 5 minutes. Go home - put something in the window. Maybe the federated Commons will even stretch to the next town (JODA Time anyone?).

The odd commit?

Tuesday, March 25th, 2008

Got to wonder if anyone else at OSBC is committing tonight :)

r640727

Commons Lang 2.4 released

Sunday, March 23rd, 2008

Just sent out the announcement of the Commons Lang 2.4 release, which eagle-eyed viewers might have noticed sneaking out in the middle of the week.

It’s the first of three releases that I got to work on a lot in the dayjob, last summer at SourceLabs. Someday hopefully I can help get Taglibs Standard 1.1.3 and Quartz 1.6.1 out.

Commons coding habits

Friday, March 21st, 2008

Minor note on how I do my Commons coding now. When time allows, I head over to igoogle.com and look at the front page. I have this configured to show my Google Reader latest on the front page, in which I have JIRA feeds connected [I use Bloglines for reading blogs].

I find this to be the best way to keep up to date with development. Much nicer than watching the emails fly by. A JIRA pain seems to be that new issues and update issues (which means comments usually) appear on different RSS streams. Here, in case it’s of use, are the urls I use:

New issues

Comments

I also monitor Quartz, ASF Infrastructure, osjava.org and sourcelabs.org in the same way. I’ve recently started starring the interesting ones so I can go back to my ‘watch list’.

At long last, byebye StringW

Monday, March 3rd, 2008

Long before I started dumping code on Commons, I had my GenJava libraries. Originally these lived at www.generationjava.com, then they moved to osjava.org. I signified a util class with a W [it was before we had XxxUtils as such a common pattern, and yes it seems silly now]. It stood for Wrapper. Which meant something like Helper, but originally actually wrapped the underlying Java class. Its first few methods were probably written in early 2000, so 8 years of life.

Over the last couple of nights, I’ve been deprecating and removing code that has moved or parallel evolved at Commons. Tonight the StringW class, which originally made up a large amount of Commons Lang’s StringUtils reached the point where there was nothing of value left in it:

r2639

The aim is to deprecate gj-core as either being found elsewhere or not being worth the effort of maintaining.

Lang tip: ToStringBuilder - Quick trace statements

Friday, December 14th, 2007

Resurrecting this from the data for the Commons blog.

It’s always a pain to be putting in tracing statements (aka System.out.println) and find that the object’s data is hidden away in private attributes. One option is to break out the debugger, another (security manager willing) is to use the org.apache.commons.lang.builder.ToStringBuilder to output the Object in full. Here’s the very, very simple line of code to get this done:

System.out.println("TASK: " + ToStringBuilder.reflectionToString(task));