Serving the Quantitative Finance Community

 
User avatar
rmax
Posts: 374
Joined: December 8th, 2005, 9:31 am

Architecture and Design

October 28th, 2011, 1:40 pm

QuoteOriginally posted by: outrun..also.. just like a good user experience, we should focus on a good developer experience.Give them empty project (language specific) with things to fill in, todo?Agree with the concept of a developer is a user of the framework like anyone else. Hence it is key that they have support in terms of good documentation. It works (or at least if it doesn't they understand why not). And it is not onerous to implement.This comes back to NFR00 Useability!
 
User avatar
rmax
Posts: 374
Joined: December 8th, 2005, 9:31 am

Architecture and Design

October 28th, 2011, 1:51 pm

QuoteOriginally posted by: outrunindeed usability from the contributing community point of view!I just realized that that also would need to include all the internal tools we build. E.g. if we have tools that automatically generate Matlab interfacing code, that that would need to adhere the same standards.These little tools are great opportunities to use a test cases for building templates by putting then under the same rigorous quality control. These tools might indeed also have value in their own, like any other module (except that they are not QF specific)Agreed. I can see building a whole host of tools that will make development (and testing) easier. It is almost a sub-system in its own right! And I hate using developer tools that are rubbish just because a developer should be using them!
 
User avatar
rmax
Posts: 374
Joined: December 8th, 2005, 9:31 am

Architecture and Design

October 30th, 2011, 6:18 pm

We seem to be having some design decisions around the error handling be owned by the caller, and not the recipient. Is this a decision?
 
User avatar
Cuchulainn
Topic Author
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Architecture and Design

October 30th, 2011, 6:34 pm

QuoteOriginally posted by: rmaxWe seem to be having some design decisions around the error handling be owned by the caller, and not the recipient. Is this a decision?I think there are thousands of viewpoints on this subject; the following are strategies:QuoteThere are several levels of exception safety:1. Failure transparency, also known as the no throw guarantee: Operations are guaranteed to succeed and satisfy all requirements even in presence of exceptional situations. If an exception occurs, it will not throw the exception further up. (Best level of exception safety.) 2. Commit or rollback semantics, also known as strong exception safety or no-change guarantee: Operations can fail, but failed operations are guaranteed to have no side effects so all data retain original values.[2] 3. Basic exception safety: Partial execution of failed operations can cause side effects, but invariants on the state are preserved. Any stored data will contain valid values even, if data has different values now from before the exception. 4. Minimal exception safety also known as no-leak guarantee: Partial execution of failed operations may store invalid data, but will not cause a crash, and no resources get leaked. 5. No exception safety: No guarantees are made (Worst level of exception safety). And do we use try-catch blocks or ERRNO stuff? And exceptions are not the same as failures, according to Bertrand Meyer.
Last edited by Cuchulainn on October 29th, 2011, 10:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Topic Author
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Architecture and Design

October 30th, 2011, 6:42 pm

QuoteOriginally posted by: outrunQuoteOriginally posted by: rmaxWe seem to be having some design decisions around the error handling be owned by the caller, and not the recipient. Is this a decision?I would prefer a mechanism that does error handling by default, but that can be completely eliminated by the caller compile time.E.g. we can use something like this?// default, checkdouble my_sqrt(double x){paramchecker::check(x);return sqrt(x);}// alternative user definable checkertemplate <class T>double my_sqrt(double x, T paramchecker){paramchecker::check(x);return sqrt(x);}What happens if I call my_sqrt() in a loop with data I know is correct? It will be inefficient. BTW my_sqrt() does 2 things. We can check constraints at a higher level once.
Last edited by Cuchulainn on October 29th, 2011, 10:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Topic Author
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Architecture and Design

October 30th, 2011, 6:46 pm

Boost Math Toolkit might be a good place to see how they have done it. Maybe standardise in STL exception in the beginning.
Last edited by Cuchulainn on October 29th, 2011, 10:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Topic Author
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Architecture and Design

October 30th, 2011, 7:17 pm

BTW exception handling is concerned wiith IS09126::Reliability::Recoverability. This sub-characteristic needs to detemined if it is on the critical path in early releases.
Last edited by Cuchulainn on October 29th, 2011, 10:00 pm, edited 1 time in total.