Monday, December 31, 2012

Steady progress developing Umple

I would like to end 2012 by highlighting how the Umple model-oriented programming technology is progressing.

Numerous people have worked on Umple during 2012 including my graduate students Hamoud Aljamaan, Sultan Eid and Miguel Garzon as well as several former graduate students. Twelve UCOSP students fixed bugs and added many small features. UCOSP arranges for fourth-year students at many Canadian universities to work on open-source projects as their capstone course project. They have all been logging their progress.

Over 68 issues were closed in 2012, and many more have been moved into the 'Mostly done' status. Some of the key changes include:

  • Many more error and warning messages (such as this) to help users create correct Umple code (e.g. detecting duplicate attribute names).
  • Greater stability and functionality for UmpleOnline: It works better between browsers and looks much nicer, with syntax highlighting.
  • Arguments to transition events on state machines, and various other state machine improvements, such as automatic transitions upon completion of a do activity.
  • Immutable attributes and associations.
  • Automatically sorted associations.
  • Generated code that indicates the line number in the original Umple files where it came from, allowing editing and compiling of Umple, with error messages in Java pointing back to Umple line numbers.
  • Improved documentation, including an API reference, and a generated grammar document that is nicely coloured.
  • Passing through comments from the Umple source to the generated Java.
  • Command line arguments, such as controlling the language generated, and ordering Umple to compile the generated code.
  • Ability to embed an UmpleOnline diagram, or textual Umple, in a web page.
  • Numerous bug fixes.

Work well underway includes:

  • Adding constraints to Umple. Simple constraints where you specify and attribute, a comparator and a value are working, e.g. [age > 18]. These will prevent setters from violating the constraint.
  • Adding C++ code generation. Most of the pieces are in place, although it is not compete yet.
  • Adding a comprehensive tracing capability (Model-Oriented Tracing Language) to allow injection of trace directives at an abstract level.
  • Adding basic SQL generation.
  • Adding a capability to reverse engineer code into umple (umplification).
  • Generation of state machine diagrams using the -g GvStateDiagram option.
  • The UIGU tool for generating user interfaces from models (this is essentially complete, but has been found to be too inefficient for widespread use, so it needs refactoring or rewriting).

In addition to making progress on the above, work planned for the near future includes:

  • Adding Autosar, multi-threading and real-time concepts to Umple.
  • Adding generation of formal specifications, as well as formal specification of umple semantics.
  • Research into comparing umple to regular code using metrics.
  • Further research into usability of Umple
  • Ability to debug code in Umple without relying on looking at generated code
  • Many more example systems
  • Automatic layout in UmpleOnline, using GraphViz.

Ongoing news about Umple can be found on Facebook and Google Plus. An up to date analysis of Umple can be found on Ohloh.


Tuesday, December 18, 2012

Evidence of climate change: Snow depth and chance of white Christmas decreasing

When a major storm hits, some people say 'climate change'. But should avoid doing so, since individual events by themselves, no matter how record-breaking, cannot be used to determine a long-term trend.

Telling evidence of climate change can only come from looking at long term changes, i.e. comparing certain averages from lengthy periods many years ago to the same data for more recent periods.

Environment Canada has a very interesting page documenting the likelihood of a white Christmas. In it they compare data from the period 1992-2011, to the period 1963-1982 (my childhood to my adulthood). The results are startling.

Snow depth: Out of 39 cities, 33 have seen a decrease in snow depth, and only four (Vancouver, Victoria, Hamilton and Brandon) have seen an increase. 12 cities now see less than half the snow they used to on Christmas day: The following are the percent changes in depth:

Fredericton -72.7%
Halifax -70.0%
Kamloops -63.6%
Saint John -63.6%
Moncton -60.9%
Penticton -60.0%
Charlottetown -58.8%
Sarnia -55.6%
Stephenville -52.2%
Quebec -51.2%
Kelowna -50.0%
Montreal -50.0%

Chance of a white Christmas: 31 of the 49 cities have seen chances of a white Christmas drop. Only three (St. John's, Victoria and Vancouver) have seen an increase. Sarnia holds the record, having a 56% lower chance of a white Christmas; Toronto Airport is not far behind at 46% lower.

This is clear evidence of climate change right across Canada. The regional differences are particularly interesting. Decreases in depth can be noted from Whitehorse to most of the Prairies, throughout Ontario, Quebec, and the Atlantic provinces.