Showing posts with label core. Show all posts
Showing posts with label core. Show all posts

Monday, August 9, 2010

Redesign of CIlib core for 0.8 release

The release of CIlib 0.7.5 will be out soon. We anticipate that this will be the last release of the 0.7.x series of CIlib and work will begin on the new 0.8.x series soon.

With 0.8, a few (large) changes will happen to the core CIlib library. Firstly, we are decoupling the simulator from the library completely. This means that the core library will be exactly that, a core library. Some design desicions made in the past are coming back to haunt us, so we'd rather just fix the problem instead of making it a known issue and living with it.

Additionally, the objects in CIlib currently know far too much about the objects they use etc. The core will migrate to use dependency injection (the hollywood principle) so that:
  1. Testability will be a primary concern.
  2. Lots of redundant code will disappear.
  3. The cleanup will mean better code for the users of the library.
I encourage you to chat to us on the mailing list about these changes, they are long overdue and I'm looking forward to making the changes which will mean a better library.

Saturday, September 26, 2009

Bootstrapping, the new frontier

Bootstrapping CIlib is providing some interesting challenges.

We need to have a selection of predefined bindings and then have them dynamically overridden when needed. This is only on the specification usage of CIlib, so the API usage will remain relatively unchanged (for the moment - some setters might be removed in future versions)

To address these issues, we have written some interesting code to get the overrides working correctly. This is still very much a work in progress, but I feel we are on the right track at least.

Nothing is set in stone at the moment, but the Bootstrapping API is changing a lot. It's exciting to get the new framework up and running :D

Tuesday, August 25, 2009

Core issues and Dependency Injection

It's something that has been a long time coming, but CIlib is in need of a little core refactoring to ensure that the code is maintainable and most importantly, testable.

I've spent a long time examining the various Dependency Injection (DI) frameworks that are available and I've finally decided on using Guice.

The core of CIlib will rely completely on injection to get the required instances in the required places. This does, however, mean that some serious changes will be needed on the inside, but they will be changes that users will not even notice.

CIlib has some static code (in the form of singleton instances and static accessors - Algorithm.get()) and this will be removed to ensure that the library is what it is supposed to be.

More to come on this refactoring as I get into it.

Also, it's almost time to commit the missing code / algorithms :) Keep an eye out for the new Evolutionary Programming and Evolutionary Strategies algorithms that will make their way into the master branch soon.