Posts tagged with ‘apache software foundation’

Apache Commons Text

kinow @ Jan 07, 2017 20:39:03

There is a new component in Apache Commons: Apache Commons Text. The 1.0 release might be announced in the next weeks. The current site is still in the Commons Sandbox, but it will change with the 1.0 release. The promotion from the sandbox happened a few days ago in the project mailing list.

Here’s the project description: Apache Commons Text is a library focused on algorithms working on strings.

There was a thread on the mailing list some time ago (Oct/2014) when we first discussed the component idea. Since then many people contributed porting code from Apache Commons Lang, Apache Lucene, donating code from existing projects, and with new ideas.

It is important to be aware that certain parts of Apache Commons Lang are being marked as deprecated, and will be removed in the future, after Apache Commons Text 1.0 is out. For example: StringUtils, and RandomStringUtils.

That will happen probably in a 4.x release of Apache Commons Lang, if everything goes well with Apache Commons Text :-)

And there are already future features in branches too. It was decided that these features needed further work, so they will probably be included in next releases.

So that’s a little bit of background on the new component that will be released soon. If you have code using Apache Commons Lang, you might be interested in staying tuned to release announcements in the mailing list!

And should you have suggestions and would like to contribute, feel free to join and start a thread in the mailing list, open a JIRA issue, or submit a pull request.

Happy hacking!

Contributing to Apache Jena

kinow @ Jan 01, 2015 18:49:03

As I mentioned in my previous post, I am using Apache Jena for a project of a customer. I had never used any triple store, nor a SPARQL Endpoint server before. But for being involved with the Apache Software Foundation, and since the company itself is using several Apache components, it was only natural Jena to be our first choice.

It has served us very well so far. At the moment we have less than 100 queries per day, but the project is still under development and we expect 1000 queries per day by the first quarter of 2015 and 1000000 near the end of 2015. We also have few entries in TDB, but expect to grow this number to a few million before 2016.

When I work for companies and we use Open Source Software (OSS) in a project, I always prepare assessment reports to include in the deliveries. In this report I justify the choice of Open Source Software (as well as commercial software). Sometimes I am lucky to work for a company that asks me to include hours to work on OSS :-)

I use Trello to triage issues in OSS projects (and for several other things). I have a board with several cards for Open Source. About a month ago I set up one for Jena and listed the issues that I thought I could contribute to.

Jena Trello card
Jena Trello card

I annotate easy issues with a “lhf” suffix for Low Hanging Fruit issues, and delete issues from the card once I submit a patch or update it (and include it in another card for the TupiLabs reports).

Most of the issues I included in the card for Jena had been created over two years ago, and hadn’t been updated in a while. When you test these issues against the current code, usually you find that some of them have already been fixed. Other issues included documentation problems, and minor features. I didn’t find any blocker issue that would impede us to use Jena in production.

Jena JIRA activity summary
Jena JIRA activity summary

The picture above shows the past 30 days activity summary in JIRA for Jena. The red line shows issues created, and the green line issues resolved. Andy Seaborne was very active in the past days and fixed several issues that were too old and had already been fixed in the trunk, and kindly merged patches and pull requests.

Some issues like JENA-632 will take a longer time to fix, but I’m getting used to Jena’s source code, and at the same getting more confident to use it in production - especially with a supportive OSS community. We are using Jena for RDF with Hadoop, and I learned that I can replace some custom Writables by others in the Jena Hadoop submodule.

By the way, even though this project ends in April, I intend to continue contributing to Jena. There is a lot of parts of the code that I would love to be able to understand and contribute, in special the Graph database, optimization techniques for SPARQL queries, the grammars used in the project, Fuseki v2 and enhance its testing harness (as well as the test coverage).

If you are looking for a interesting project to get you started with semantics, linked data, RDF, and even graphs and database querying, try contributing to Jena. I bet you’ll have a lot of fun!

Happy hacking and happy 2015!

Strings transliteration in Java with Apache Commons Lang

kinow @ Aug 09, 2014 12:49:33

Rosalind is a website with a curated set of exercices for bioinformatics, organized hierarchily. In some of these examples you are required to replace characters (nucleotides) by other characters. It is a rather common task for developers, like when you need to replace special characters in user’s names.

There are different ways of describing it, such as translate, replace, or transliterate. The latter being my favorite definition.

In Python I know that there are several different ways of transliterating strings [1][2]. But in Java I always ended up using a Map or a Enum and writing my own method in some Util class for that.

Turns out that Apache Commons Lang, which I use in most of my projects, provided this feature. What means that I will be able to reduce the length of my code, what also means less code to be tested (and one less place to look for bugs).

String s = StringUtils.replaceChars("ATGCATGC", "GTCA", "CAGT"); // "TACGTACG"

What the code above does, is replace G by C, T by A, C by G and A by T. This process is part of finding the DNA reverse complement. But you can also use this for replacing special characters, spaces by _, and so it goes.

Happy hacking!

The Apache Way and on writing software reviews

kinow @ Sep 29, 2013 14:53:53

The Apache Way is the philosophy behind Apache Software Foundation and is shared by all of its projects. It is composed by a set of principles:

  • Collaborative software development
  • Commercial-friendly standard license
  • Consistently high quality software
  • Respectful, honest, technical-based interaction
  • Faithful implementation of standards
  • Security as a mandatory feature

I have been part of Apache Commons for a while, and haven’t really contributed much yet. Maybe because I had lots of projects related to TupiLabs as well as my own wedding this year. But I can assure that respectful, honest, technical-based interaction is quite right (not to discredit the other items, of course).

Even though there are critics of the Apache Way (1, 2, 3), it still stands as an important pillar for the Apache Software Foundation, and its principles help to create stable and production ready software, such as Apache Hadoop, Apache Httpd, Apache Commons Lang, among others.

There are many reviews and comparisons on Apache software (as well as on other software, like JavaScript libraries, Java Web Frameworks, Ruby Web servers and so on). Sometimes, though, these reviews or comparisons can be biased or not well founded. In cases like this, the developers of the tools may be frustrated, or users can be misled and choose the software based on wrong assertions.

I have just returned from honey moon, ready to start writing code again, but first I had to read all the unread messages in my inbox. Some were e-mails from Apache mailing lists. One of these e-mails had Phil Steitz comments on a post by Daniel Wu.

Instead of publishing his performance benchmark results of Apache Commons Pool, Daniel posted his code to the commons-dev mailing list. Phil Steitz, one of Apache Commons Pool committers replied with questions and a few points that Daniel could use to enrich his benchmark tests.

This kind of behavior happens a lot within Apache (at least in the mailing lists that I follow), and it produces a lot of benefits for different parts.

  • The person writing a review or comparison can get the programmer opinion before actually publishing anything.
  • The programmer can see how other people were testing his/her code.
  • All other commons-pool committers and maintainers, the mailing list readers, and people that found the mailing list archives will be able to read the conversation history.
  • No misguided benchmark results were published (and lots of wrong decisions were avoided).

I keep loving the Apache Way and the resulting community and code around it. There are always lots of things to learn, the Open Source projects communities are healthy and you will always find people willing to share their experience and time teaching you.

♥ Open Source




Learning with Open Source: Reviewing SVN commits log

kinow @ Feb 10, 2013 13:02:45

Last year I became an Apache committer, and dedicated most of my time learning the Apache way, reading different mailing lists and getting used to the things a committer is supposed to know (voting process, keeping everything in the mailing list, and so it goes) and getting used to [functor] API.

In 2013 I hope I can help in the release of [functor], since Java and functional programming are getting a lot more of attention recently, probably due to the project lambda. But I also want to start contributing with the other components from commons (like math, io, jcs) and other top level projects (hadoop, nutch, lucene).

Reviewing SVN commits log

FUNCTOR-14 was created to enhance the generators API in [functor]. I’d worked on a branch for this issue, but needed some review in order to be able to merge it with the trunk. That’s where you can see why Open Source is so awesome. Another Apache member, Matt Benson, created another branch to work on the project structure, but also to review the generator API.

Apache Software Foundation

( Read more … )