A couple of days ago I got a tip that I was very close to being the first CPAN author to upload 1000 releases in a year (989). Today I topped it off:
Thus ends my CPAN numbers ambitions. From now on I will concentrate on -Oquality -Ofun and -Oacmeism. Actually the numbers stuff ended in early September.
The -Oquantity and -Ofrequency flags were fun for a while, and it resulted in my getting a large portion of my modules into an up to date state; but numbers for numbers sake has a limited appeal.
Note: It was ironic that one of my final releases was from a pull request by SHARYANTO++ who leads almost all the CPAN statistics. :-)
Elasticsearch has a builtin scoring algorithm which works quite well in practice, but sometimes you want to roll your own scoring algorithm. Let's examine how to create a custom scoring algorithm using the function score query.
Let's assume we want to search and score Perl job offers based on a set of weighted keywords. To get the score of each offer, we'll multiply the weights of matching keywords where positive keywords have weights greater than one, and negative keywords are weighted less than one. Thus, the positive and negative keyword matches add and take away from the final product (score) respectively.
Define the Qualitative Importance and Their Weights
Instead of assigning weights directly to keywords, let's use qualitative tags of desirability (importance) for each keyword (trait). Borrowing from okcupid's five degree scale of importance:
This takes care of the non-negative traits, now let's add qualifiers for negative traits using a similar pattern:
Article in Russian about Test::Spec benefits and gotchas/internals
I deal with a lot of modules that promise backwards compatibility with older
versions of perl, usually back to perl 5.8.1. Since I don't regularly use perl
versions that old when developing, accidentally introducing incompatibilities is
always a risk. Having a continuous integration system check this for me makes
it much easier to catch mistakes like this before they get released into the
Travis CI is a very useful continuous integration
service that is free for any public repositories on
GitHub. There are issues with using Travis CI for the
kind of testing I need though. First, it only provides the last revision of
each perl series. Especially in the perl 5.8 and 5.10 series, there are
substantial enough differences between them that testing only the latest isn't
adequate. Additionally, some of the testing needs to be done on perls built
with threading, which isn't included on most of the versions available on
Travis. It also is sometimes useful to test without any additional modules
pre-installed like Travis does.
Some idiot has just uploaded a purely spam distribution: THEMA-MEDIA. He clearly knows it's idiotic, because his README.md begins with "CPAN-foolishness".