Archive for March, 2007

cocoon-rcl – my precious

March 24, 2007

I finally made cocoon-rcl to work, few days ago. Cocoon-rcl is Maven plug-in that makes life of every Cocoon developer much easier and pleasant. It enables you to develop Cocoon applications/blocks rapidly. You may wonder what that means exactly. In a fact, it takes care of resource and classreloading so you can develop without any restarts of your application.

Essentialy, all you have to do is to start your block this way:
mvn cocoon-rcl:webapp jetty:run
And start hacking sources of your block in any IDE you like. All changes will be instantly visible in a browser. You can change sitemaps, flowscript files and even ordinary Java classes.

I would like to thank Reinhard Pötz who has done this handy plug-in. Developers willing to migrate from 2.1.x should consider it as one of killer-features along with servlet services and Spring integration.


Is list singly-circularly-linked list problem

March 19, 2007

Hi, it’s my first post on the blog ever! 🙂

To not bore you telling how excited I am having my own blog I would like to give you some food for thought. You should be also warned: on this blog it’s going to be much more this kind of stuff as I’m math student of MIMUW. Yes, that famous and unbeatable university 😉

Ok, let’s move to the problem that my colleague (Paweł) told me about today. There is an singly-linked list and we are given one of the nodes it consists of.
The problem: how to determine in O(n) time and O(1) memory if this list is singly-circularly-linked list or not. In other words: does the list have a cycle? O(n) means that your algorithm must be linear when it comes to the number of elementary operations and can modify only constant amount of memory. That means you cannot mark particular node if it was visited or not.

In order to avoid confusion I’ve created drawing illustrating valid list:list.png

Ok, I promise to not use Draw and produce nicer image next time.