Tuesday, April 22, 2008

GSOC 2008 - Eclipse

With the start of my adventure in Frankfurt GSOC adventure has started. This year I apply for the project in Eclipse PDE and I've got it (as announced yesterday). I'm very pleased with the fact that this is a way to add the biggest piece of software to Eclipse in one chunk since I've started.
Kim has been sentenced to work with me ;)

If you want to follow the project in the bugzilla here is the way.
If you have any suggestion please leave a comment.

Monday, April 14, 2008

Spring goodies

It is not gona be about spring behind window. It's a word about springframework.
Spring is huge but very flexible. One has two options use all it gives or modules one needs.
Nevertheless it can be quite annoying. Whenever you decide to use subset of its modules DAO support is provided in spring-tx.jar. This package is also needed when you decide to use Spring JDBC support classes.
This way my simple surveys app is getting bigger and bigger :)

Thursday, April 10, 2008

Google's hegemony

Yesterday I had a talk with Piotrek about Google extensive and aggressive politic. In Poland there are several companies which monopolize some segments of the marked. Sentenced to Google doesn't sound very realistic neither optimistic :). The big difference between Google monopoly and eg. Polish telecom company is that it is not to the fact that there is no other choice. In case of Google it is simple the best.
There is also a threat that we confide to much of our private information to Google. They are about to start global health service support tooling, they keeping our mails, photos, documents feeling (Blogger), day schedules. So they know about us a lot. Some people claim that Google can use this information to suggest us what should we buy, eat, wear or even think.
I've just had example of that. As I didn't wanted miss my football hours yesterday I've put event to the google calendar with e-mail remainder. Today I found my remainder in gmail spam folder :)
What is terrifying, weather was bad (and I mean baddddd). Cold wind and rain. So maybe Google has started health care program and combined it with Google suggestions service? :D

Wednesday, April 9, 2008

Sometimes

How many times you needed to back away from assumptions you have made ?
This is not really time I want to go with the story further. But as I've browsed the bash I've found something that made me laugh:


<Khassaki> HI EVERYBODY!!!!!!!!!!
<Judge-Mental> try pressing the the Caps Lock key
<Khassaki> O THANKS!!! ITS SO MUCH EASIER TO WRITE NOW!!!!!!!
<Judge-Mental> fuck me

Wednesday, April 2, 2008

Tracing the BEAST


I have spent some time on analyzing BEAST code. I have started with the describing packages with UML. Then I've moved to the business logic analysis.
Let me introduce you BEAST's configurator. It can be found in dr.xml.
Configuration of BEAST simulation is given by xml file. Each xml node has its realization in java code.
BEAST is using builder pattern (or maybe it's better to say builder's builder) for the software initial setup. However this is some data driven, distributed variation on this pattern ;).
As you can see at the picture there are two classes marked yellow.

XMLParser is responsible for parsing XML file with the configuration. It uses DOM model of that file as an input. The traversing through the code is done in post-order manner. To parse each node from the description BEAST uses multiple AbstractXMLObjectParser's specialization instances (this builders can setup instance of the classes with the business logic).
And at this point I can explain what I mean saying distributed. Most of the specializations of the AbstractXMLObjectParser are anonymous classes which can be found in model's classes.
To see whole set of object parser you can always look into BeastParser.setup() method.

Reference class is realization of idref's concept from setup file.
Each parsed node is stored (as a new node realization instance) in some object's registry or/and added to it's parent node. When such a object is referred in other parts of configuration it is wrapped in Reference and returned to caller node. That means we can refer to the classes which was built before.
E.g. When parsing proces reach the mcmc node it look for the builder which is responsible for building class which implements MCMC process (I am skipping building of the mcmc's child nodes). At this point every referred object (is already consturcted) is taken from the registry and used for correct in construction of MCMC implementation.

So the formula for extending BEAST is simple.

  1. define xml for your contribution

  2. provide builder for your implementation

  3. implement your contribution



I don't want to go into much details about this engine (as for example how the simplation is started, after construction or how the xml description is validated) so if you can any questions and suggestions (as I only interpret the code I could misunderstand some concepts) leave a comment.
Next time I will show you simple recipe for adding new tree mutator to the BEAST.

cheers,