Matt's Coding Logbook

May 8

Vaadin/GWT and Maven annoyances

I love Vaadin but it is a bit broken in regards to how it deals with maven.

Maven is a beast, but if one is doing any form of serious java development it is really the only game in town. There is really no excuse if your doing any serious Java development for not using maven.

Vaadin actually has good support for maven except for one major annoyance: by default the Vaadin archetype places the gwt generated javascript inside of src/main/webapp/VAADIN by default.

There is a convention for where to place generated sources for maven projects: target/generated-sources

Unfortunately generating this javascript takes a long time and only needs to be done when a gwt widget is added/modified. Thus the hack of depositing the generated javascript inside of src/main instead of target.

Maybe having the archetype behave this way is OK because it gets the project up and running quickly, but it is definitely a bad practice IMHO.

Personally I’m looking at just creating a separate maven module to deal with the generated javascript. It will probably be a bit of a pain to get maven happy with including javascript outside of the module for the war file, but there really doesn’t appear to be a cleaner solution.

For the moment I’ve simply created a new ‘generated’ directory at the top of my maven root directory and am dumping the javascript there. It is still a hack, but I feel it is a significantly cleaner hack.

May 6

Starting my new venture. Plan on keeping this blog updated as I make progress.  Stay tuned for more…

Maven All-in-one (single jarfile) application archetype

I’ve created a maven archetype that creates an all-in-one (single jarfile) application complete with application-runtime access to build-number and maven artifact version.

I’m jumping through the hoops now to get this published to the maven central repo (which is an interesting process all on its own).  Looks like the only way to get it done is to use Sonatype OSS repository which is acting as a sort of gatekeeper.  Why on earth isn’t github an "Approved Hosting Location"?

Helpful resources for creating an maven archetype and publishing to maven central repository:

Dependency Explorer Update #1

One of my friends discovered a set of maven repository mirrors.

Ibiblio FTW!

rsync -a -v —include “*/” —include “*.pom” —include “*.xml” —exclude “*” —bwlimit=1000 maven2

The above gets the complete set of pom files and xml metatdata files for the entire maven central repository.

Plan on getting the rest of the artifacts via a ‘slow slurp’ to not put too much pressure on ibiblio’s servers.  It will probably be weeks before I’m ready for the full dataset anyway so no rush.

Apr 9

Dependency Explorer

From everyone I’ve talked with most developers would be interested in a way of exploring the full global ‘open source software dependency web’.

It seems like an idea whose time has come, but I can’t seem to find a site that has that kind of info.  I’d like to do this for all all languages but I think java with maven would be the easiest to tackle first.

The hard part oddly enough is getting access to the data.

Not an insurmountable problem but one that might take a bit of consistent pushing to overcome.

Apr 8

Github repo setup for stockoptionlab

Apr 8

Stock Option Lab Bench

I’d like to start investing more in stock options, but I want to play with a great deal of what-if scenarios before I commit any of my hard-earned cash.  I want to learn and get a feel for how stock options work ‘in the real world’, not idealized mathematical models.

So I’m going to create a database (MongoDB most likely), load it with tons of historical stock option data (and maybe other interesting time-series data), and create some software that allows me to efficiently test strategies in an automated fashion.

I’ve played with genetic algorithms and neural networks in the past, however the downside to using those is that one is unable to understand what makes the final strategy tick.  The upside of course is that one can use the power of the computer to adaptively explore the data for good strategies, so I definitely want to use them, but need to tame them.  So I’m thinking this time I’ll concentrate on extremely simple GEs/NNs (Learners), and preprogram a small collection of strategies that the Learner can combine to use.  This limits the possible strategies severely, but really I want this system to teach ME what strategies work, and I being a mere human, I can only comprehend relatively simple stories.

Lots of data, and lots of calculations.  I need to write the software/dataset such that it can scale, and I can take advantage of things like Amazon’s EC2.  To my mind this means heavy reliance on functional programming.  Ideally it would probably be best to use a language like Erlang, or Scala.  I’m going to start in Java though, simply because that is the language I already know, and I know I can get results quickly.  I’ll attempt to use a functional style wherever possible, and may switch to another language if I have difficulties making Java perform.

Apr 7

First Post!

Decided to start a little blog to note my progress on various software projects, experiments, ideas, etc…

I don’t intend for this to be a ‘literate blog’ where one spends time crafting sentences carefully to help the reader digest the authors thoughts. Expect typos, bad spelling, and general lack of care and attention.  

Hopefully the result will be interesting.