Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

The following will be soon possible to do in Delta Shell:

!DeltaShellScripting1.pngImage Added

After running the script, a new time series is created and then added to the project. Then it is opened in the view.

Image Added

Maybe this is the way we should write our integration tests in the future (smile). It stimulates to have a well designed API. For example I immediately think that adding items to the project and opening them in the gui can be simplified (KISS principle), e.g.:

Code Block
# create water depth time series, add it to the project and open it in the gui

waterDepth = TimeSeries.Create[float](Name = "water depth") # maybe we don't need a TimeSeries as a type?

waterDepth[DateTime(2009, 1, 1)] = 0.1
waterDepth[DateTime(2009, 1, 2)] = 0.2
waterDepth[DateTime(2009, 1, 3)] = 0.5
waterDepth[DateTime(2009, 1, 4)] = 0.3
waterDepth[DateTime(2009, 1, 5)] = 0.4
waterDepth[DateTime(2009, 1, 6)] = 0.1

CurrentProject.Add(waterDepth)

Gui.OpenView(waterDepth)

What is important is to be consistent in the API and to know that it must be stabilized asap, if people start using it - it will be hard to change it. Here are a good tips about it:

How to Design a Good API and Why it Matters by Joshua Bloch

See original including video presentation here: http://www.infoq.com/articles/API-Design-Joshua-Bloch

All programmers are API designers. Good programs are modular, and intermodular boundaries define APIs. Good modules get reused.

...