domenica 26 giugno 2011

Quantities, Units and Values an Object Oriented Implementation


Software for simulation or real time software typically manipulate physical quantities and a solid foundation of quantities, units and dimensions is a key issue. Common software languages not provide a native support to express units and quantities in order to avoid wrong assignment and comparisons or to do an automatic dimensional analysis. This is the cause of loss of time and trouble and in the worst case as the famous Mart Climate Orbiter the failure of the mission for a conversion error between system of units.

Model Library for Quantities, Units, Dimensions and Values (QUDV) of sysML provides a solid model to express system physical properties. It provides an abstract syntax of the library expressed by a sequence of block diagrams.
 
We present a concrete implementation of the QUDV abstract model through an object oriented implementation following the class diagram in the figure below. Our formulation is concentrate to provides the basis for defining basic units and others units via conversion or derivation.

Figure 1 Class Diagram

Also it to provides the definition of a system of units where is possible to specify coherent derived units as a product of base unit. In this version of the library we miss the part for defining a declarative specification of dimensional analysis assigning an expression and its dependencies to each quantity kind. (It is an open issue to do)

For the complete article follows the link http://www.codeproject.com/KB/vb/quantity.aspx

References

Quantities, Units, Dimensions, Values (QUDV)

Eric Allen, David Chase, Victor Luchangco, Jan-Willem Maessen, and Guy L. Steele, Jr.. 2004. 
Object-oriented units of measurement. In Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications (OOPSLA '04). ACM, New York, NY, USA, 384-403. DOI=10.1145/1028976.1029008 http://doi.acm.org/10.1145/1028976.1029008

venerdì 24 dicembre 2010

Googling bug's life cycle

I found here some examples of bug's life cycle in term of status and resolution http://trac.edgewall.org/wiki/WorkFlow/Examples with incremental complexity.

and here some real cases of bug'a life cycle 

https://defect.opensolaris.org/bz/page.cgi?id=fields.html
https://bugzilla.gnome.org/page.cgi?id=fields.html  
http://neowiki.neooffice.org/index.php/Bugzilla_Guide#Life-cycle_of_a_Bug

The examples are similar but not equal, seems to me that exists a particular life cycle for each software project. In the previous post I describe the configuration of Trac environment to support "my bug's cycle". 

giovedì 23 dicembre 2010

Bug's life cycle, tickets workflow

I used Trac to describe our bug's cycle exploiting the Trac ticket workflow.
The ticket workflow is configured defined tickets status, tickets resolution and tickets transition.

Status

The keys tickets/bug status are new, assigned, closed, reopened, infoneeded, couldnotreproduced, testrequested.

1) New: When QA files new bug.

2) Assigned: ‘Assigned to’ field is set by project lead or manager and assigns bug to developer.

3) Could not reproduce: If developer is not able to reproduce the bug by the steps given in bug report by QA then developer can mark the bug as ‘CNR’. QA needs action to check if bug is reproduced and can assign to developer with detailed reproducing steps.

4) Need more information: If developer is not clear about the bug reproduce steps provided by QA to reproduce the bug, then he/she can mark it as “Need more information’. In this case QA needs to add detailed reproducing steps and assign bug back to dev for fix.

5) Test Request: The bug should be resolved, but the QA should test and confirm.

6) Reopen: If QA is not satisfy with the fix and if bug is still reproducible even after fix then QA can mark it as ‘Reopen’ so that developer can take appropriate action.

7) Closed: If bug is verified by the QA team and if the fix is ok and problem is solved then QA can mark bug as ‘Closed’.

Resolutions

The resolutions are the reason for why a ticket was closed. The keys bug/ticket resolutions are: fixed, invalid, wontfix, duplicate, worksforme, could not reproduce, deferred.

1) Deferred: If the bug is not related to current build or can not be fixed in this release or bug is not important to fix immediately then the project manager can set the bug status as deferred.

2) Fixed: When developer makes necessary code changes and verifies the changes then he/she can make bug status as ‘Fixed’ and the bug is passed to testing team.

3) Invalid: Some times developer or team lead can mark the bug as Rejected or invalid if the system is working according to specifications and bug is just due to some misinterpretation.

The bug's life cycle and transitions are showed in the follow figure:



The workflow is configured in the trac.ini file
[ticket-workflow]
; opensource-workflow.ini
; accept action
; When you accept a ticket, you get ownership of it. (You can't accept a
; ticket on someone else's behalf.)

accept = new,assigned,accepted -> accepted
accept.operations = set_owner_to_self
accept.permissions = TICKET_MODIFY

; assign, reassign, unassign actions
assign = new -> assigned
assign.operations = set_owner
assign.permissions = TICKET_MODIFY

reassign = assigned,accepted -> assigned
reassign.operations = set_owner
reassign.permissions = TICKET_MODIFY

; Allow correcting the ownership of a closed ticket.
change_owner = closed -> closed
change_owner.name = change ownership
change_owner.operations = set_owner
change_owner.permissions = TICKET_MODIFY

unassign = assigned,accepted -> new
unassign.operations = del_owner
unassign.permissions = TICKET_MODIFY

; leave actions
leave = * -> *
leave.operations = leave_status
leave.default = 1

; resolve actions
resolve = new,assigned,accepted,couldnotreproduced,testrequested -> closed
resolve.operations = set_resolution
resolve.permissions = TICKET_MODIFY

; reopen actions
reopen = closed -> new
reopen.operations = del_resolution
reopen.permissions = TICKET_CREATE

; request info actions
requestinfo = assigned,accepted,new -> infoneeded
requestinfo.name = need more information
requestinfo.permissions = TICKET_MODIFY

provideinfo = infoneeded,testrequested -> new
provideinfo.name = provide info
provideinfo.permissions = TICKET_MODIFY
provideinfo.default = 2

;could not reproduce
couldnotreproduce = assigned,accepted,new -> couldnotreproduced
couldnotreproduce.name = could not reproduce
couldnotreproduce.permissions = TICKET_MODIFY

detailedsteps= couldnotreproduced -> new
detailedsteps.name = detailed reproducing steps
detailedsteps.permissions = TICKET_MODIFY
detailedsteps.default = 2

;test request
testrequest = assigned,accepted,new -> testrequested
testrequest.name = test request
testrequest.permissions = TICKET_MODIFY

giovedì 7 ottobre 2010

Esempio di file di configurazione personalizzata .NET

L'articolo Nested Element in Application Config File presenta un semplice esempio di lettura di un file di configurazione personalizzato con una gerarchia di elementi.

martedì 28 settembre 2010

Come configurare le applicazioni in .NET

Utile riferimento per affrontare la confingurazione delle applicazioni .NET è .NET Application Settings.

E' tutto molto bello fino a quando si configurano le singole proprietà non strutturalmente correlate, poi per configurare l'applicazione intesa come "business logic" - l'amore finisce - e occorre lavorare un pò di più...

mercoledì 22 settembre 2010

Oggi ho comprato un libro: "You are not a gadget" ha i capelli rasta?!?!

Che bello, oggi ho comprato un libro,
   anzi il nuovo libro di Jaron Lanier "You ar not a gadget" ... WOW

Il libro del guro dell'informatica è fra le mie mani, ed ecco che le domande mi assillano e l'inesorabile confronto con le mie miserie arriva impietoso. Come avrà fatto ad arrivare fino a li? Come avrà fatto ad avere quelle intuizioni? Ma avrà sviluppato codice? 

Mi appresto ad aprire il libro sempre più restio e timoroso, ed ecco una sorpesa, mi compare la foto di Jaron,
ha i capelli rasta?!? capperrò sara quello il segreto del suo successo? a me non mi è mai venuto in mente di farmi i capelli rasta, poi a quella età, proprio fuori luogo. E lui li porta tranquillamente gironzolando tra Berkley e la Sillicon Valley. (non ho proprio capito niente)

Ancora più restio e deluso apro la prima pagina del primo capitolo che inizia cosi
      "Software expresses ideas about everything from the nature of a musical not to the nature of personhood"
Il software esprime delle idee su qualsiasi cosa, su tutto, ed è proprio cosi! ed è proprio questa indeterminatezza la bellezza del software, che cattura e affascina e lo fa spaziare su tutti i campi della scienza.

Bellissimo! Mi sono rinfrancato, vedi che ne valeva la pena comprarlo, ed ho chiuso il libro prima che mi passase quella sensazione di soddisfazione e chiarezza e sono andato a dormire.

martedì 14 settembre 2010

Facebook e l'illusione della libertà  (UPDATE)

Cosa ci dobbiamo chiedere di fronte a questi fatti?
Repressione e oscurantismo, sono scenari che si stanno affaciando concretamente nella rete.

Si siamo liberi, ma liberi di parlare di "nulla" proprio una bella libertà! :)

Facebook e l’illusione della liberta (UPDATE)