Friday, 8 October 2010

Project mgmt on google code?

Q: Project mgmt on google code?
A: Not likely!

Actually, I examined the facilities on google code a while ago, added a few issues and deleted them again as experimental evaluations. My immediate reaction was that I could find no life cycle stages of a certain module – a module could attain any of the following intellectual stages:
  • vapor: imagined, probably needed or possibly not, no implementation nor any evaluation supporting nor opposing the creation of the module,
  • rejected: the module development is stopped at any of the pre-gamma stages, and stowed away for trackability and a possible future reevaluation, 1)
  • evaluated vapor: text, design and evaluations describing and underbuilding the creation of a module
  • experimental: a code that implements some important aspect of a module, used for demonstration for further evaluation and a code base for the future module
  • alpha: the module is implemented but unstable,
  • beta: the module is pretty stable, but not systematically bug-tested
  • gamma: stable and systematically bug-tested
  • gamma-old: gamma but considered for replacement: replacement documentation exists
  • delta: actively being replaced
These life cycle states are 'home hack' adapted, a test-based development enviroment should have a different set of stages: fulfilling this or that many test cases.

Whether google code usage can be adapted to an arbitrary life cycle management of individual modules is as yet undecided, but it is an infinitely important question for any opensource project.

1) Extreme programmers and other modern project management use to dislike stowing away things for later reevaluation, but this is just an oversensitivity and disability to evaluate and correct oneself from own thought errors. The key points that makes stowing away problematic is keeping a database and any system of competition-by-blame.

Tuesday, 5 October 2010

R91 (R92, R93): one huge jump

Pretty abstinential from the last weeks administrative low effective time consuming tasks of mine (current Swedish ineffective unemployment system), followed by quite logical and notable failures, my programming/construction deficit resulted in me boldly splitting off all scanning/parsing functions to the separate modules parse.[ch], in order to experiment freely with the parsing. Intending to program as intensely as possible to make a programming system for map generation (see prev post), the revision R91 differs very much from R90. Foremost two files that were embarassingly missing, token.[ch] were finally added. Checking out the source without those two files wouldn't have worked! :-( Stupid and sloppy of me. Also the reworked syntax is in maps/ori-mon.mkm, which was however forgotten in R91 but came in R92 (also see prev post). The test program parse_program.c was created for testing the new parsing language. When mature it shall also generate and test-print a data structure constituting the map language program loaded.

Some history examination of the repository revealed that I renamed scan.[ch] in the code while not doing it properly in svn. So while a smart programmer might have been able to deal with the missing code by reading and analyzing, some intermediate versions of scan/token.[ch] are missing. Fixed now – I think.

A sample program

The following code is very preliminary, but exhibits the principle of map creation, that I've chosen. The stream system that I spoke of previously is not the primary way to organize the drawing of images. Instead a human map drawer reasons with various layers and objects to draw in those layers. The layers have an order: the first drawn first, then next one – possibly overwriting features in the previous layers – and so on till all layers are drawn. In map making most objects are coordinate transformed zero times or more, and finally the object is projected onto a flat surface, i.e. "the paper". When a label is attached to an object, (f.ex. the string "Sirius" to the star Sirius) it is not transformed/projected quite the same way: a label should be placed near the object that it labels, but "upright" from the perspective of the image spectator, so that the spectator needn't put the head on one side: the label has to take the paper position of the object and add a little offset so as to be written near but not on the object it refers to.

The programming system, and the code below, is not finally defined: it needs some fixes to become logical, and to reflect the stream system that I've speculated about earlier, but at last I got an idea of how to code maps in a generic way. The long term intention is of course not just star maps, but any map. The details of how to store databases in files and how they're loaded and processed is of course a remaining topic: I'm inclined towards relation algebras rather than the clumsy SQL thinking, but this is a matter of syntax, not semantics, since a well designed relation algebra should be mapable to SQL statements.
orion() {
    ## procedure for the heavenly hunter 
    border    += load “ori_b.db”;
    labels    += [pos: [x: middle, y: bottom], 
                  string: "Orion",
                  justify: middle];
    projection [type: Lambert_conic, α: 5ʰ20ᵐ, δ: 10°, Δδ: 10°];
    frame [height: 500px, width: 500px];
}
monoceros() {
    ## procedure for the heavenly unicorn
    border    += load "mon_b.db";
    labels    += [pos: [x: middle, y: bottom], 
                  string: "Monoceros",
                  justify: middle];
    projection [type: Lambert_conic, α: 7ʰ10ᵐ, δ: 10°, Δδ: 10°];
    frame [height: 500px, width: 600px];
}
main() {
    
    ## ‘layer’ declares the layers wherein the program puts
    ## objects, when executing an ‘out’ all layers are drawn
    ## with stored objects one by one, background first, then
    ## border, aso. to at last map_labels. What layers that
    ## are to be used, is up to the programmer and the naming 
    ## is free by programmer choice:

    layer background(noproj); # background: no projections, 
                              #             just one frame
    layer border;             # border:     given in αδ* as
                              #             a loop → coorsys
                              #             change, projection,
                              #             frame
    layer grid;               # grid:       given in αδ* as
                              #             lines → coorsys 
                              #             change, projection, 
                              #             frame
    layer nebulae;            # nebulae:    given in αδ → 
                              #             coorsys change, 
                              #             projection, frame
    layer stars;              # stars:      given in αδ →
                              #             coorsys change, 
                              #             projection, frame
    layer labels(noproj);     # labels:     given in αδ →
                              #             x₀y₀ + xy offset ???
                              #             (MANUALLY!)


    background += infinite [color: [r: x00, g: x00, b: x40]];
    grid       += grid [α: 1ʰ, δ: 10°];
    stars      += load "stars.db";
    labels     += align stars "stardesg.db";
    nebulae    += load "nebulae.db";
    labels     += align nebulae "nebdesg.db";
    { # a stacklike block for loading local data
        orion; # run procedure ‘orion’
        out "orion.svg";
    }
    {
        monoceros; # run procedure ‘monoceros’
        out "monoceros.svg";
    }
}
Further notes on the layers: layer border is for constellation borders, layer labels is for star and galaxy labels, and are intended for manually copying positions from the star and galaxy layers, then adding an offset to place the star and galaxy labels at proper positions: not colliding with each other, not overlapping the labelled object.