BabyIDE implementation of Dijkstra algorithm.

11 views
Skip to first unread message

Trygve Reenskaug

unread,
Oct 22, 2011, 8:45:27 AM10/22/11
to DCI-object-evolution
Hi all evolution members
,
I have extended BabyIDE with a facility for exporting the source code for a DCI application in HTML. The source code is in a ZIP file with an HTML and a GIF file.Unzip both to the same directory from:
    http://fulloo.info/t-files/Listing-BB7Dijkstra.zip

I'll be very grateful for feedback.
  1. Do you have any problem with the file? There should be a picture near the top of the document.
  2. Do you have any comments on the layout of the document?
  3. I will be particularly grateful for comments and suggestions on the program design and the code as such.
  4. I plan to publish this on the composition list. Any comments?
Enjoy
--Trygve

--

Trygve Reenskaug       mailto: try...@ifi.uio.no

Morgedalsvn. 5A         http://folk.uio.no/trygver/

N-0378 Oslo               Tel: (+47) 22 49 57 27

Norway

Marc Grue

unread,
Oct 22, 2011, 7:06:52 PM10/22/11
to dci-ev...@googlegroups.com
On 2011-10-22, at 14.45, Trygve Reenskaug wrote:
  1. Do you have any problem with the file? There should be a picture near the top of the document.
Works fine

  1. Do you have any comments on the layout of the document?
Clear

  1. I will be particularly grateful for comments and suggestions on the program design and the code as such.
Can you describe roughly what the differences are between the Dijkstra and Frontloading examples?

  1. I plan to publish this on the composition list. Any comments?
Is it already one of our "canonical examples"? I can create a space for it at https://github.com/DCI/dci-examples and we could collect further implementations there for comparisons if you like...

Cheers,
Marc

Trygve Reenskaug

unread,
Oct 23, 2011, 6:44:23 AM10/23/11
to dci-ev...@googlegroups.com
I've found a command for converting .HTML to.PDF. Three files are now available:
    http://fulloo.info/t-files/BB7Dijkstra.pdf   An approximation to Jim's Ruby code. (The same as the posted .ZIP/HTML-file)
    http://fulloo.info/t-files/BB4bPlan.pdf   Planning program with DCI
    http://fulloo.info/t-files/BB4aPlan.pdf   Planning program without DCI for comparison

(I know of one error in a comment. I leave it in as a challenge. There are likely to be many blunders and also examples of clumsy code. Enjoy!)

(I prefer to be honest here, and call it 'blunder' rather than its euphemism, 'bug'.)

More inline below.



On 2011.10.23 01:06, Marc Grue wrote:
On 2011-10-22, at 14.45, Trygve Reenskaug wrote:
  1. Do you have any problem with the file? There should be a picture near the top of the document.
Works fine
Good

  1. Do you have any comments on the layout of the document?
Clear
Good. The listing is created programmatically, so changes are possible. One change I am considering is from this structure
    (all Interactions), (all Contexts), (all Data).
to
    (for each context: (its Interaction(s), its slass(es)) (all data)

  1. I will be particularly grateful for comments and suggestions on the program design and the code as such.
Can you describe roughly what the differences are between the Dijkstra and Frontloading examples?
The Dijkstra example illustrates Context recursion. Among other things, this leads to many simultaneous occurrences of the same role where the role is bound to the same or different objects at the same time through the recursion.

The Frontloading example illustrates a merger between MVC and DCI where the updates of the Views are done with DCI Contexts. It is not particularly elegant and I am sure it can be improved. It can possibly be seen as an example where there is quite some distance between the use case and the Context operations?


  1. I plan to publish this on the composition list. Any comments?
Is it already one of our "canonical examples"? I can create a space for it at https://github.com/DCI/dci-examples and we could collect further implementations there for comparisons if you like...
IMO, a canonical example should have been carefully reviewed by at least two independent readers. My examples have been written, but never read. It would be nice with one or more canonical examples, but that requires community effort since the writer should not be reader of the same program.
BTW, I think a culture of careful, detailed, and honest code review would be a boon to our community. It should be simple, since our code is supposed to be readable.

Cheers,
Marc
Cheers
--Trygve

Reply all
Reply to author
Forward
0 new messages