[Kde-finance-apps] First appearance of Alkimia in the KDE SVN repository

Klaas Freitag freitag at kde.org
Tue May 25 16:50:58 CEST 2010


Am Sonntag 23 Mai 2010 15:11:33 schrieb Thomas Baumgart:

Hey,

Thomas, one of the first real sunny sundays of 2010 and you sit in front
of the computer and do finance math - great :-)

Thanks, I am really happy about seeing something moving forward. Seems like 
even kraft can become a solid app math wise with your help :o)

> I just added some initial code to the Alkimia directory  
> http://websvn.kde.org/trunk/playground/office/alkimia/ of the KDE SVN 
> repository.
> 
> It's not much, but I promised to work on the general object to represent 
> values.
Which is cool, but also quite some complicated code, I hope I may say that.

Its not that I can not understand it but I wonder if why we need that much
functionality in a base class. I am sure you have thought about that, but
let me ask some questions:
- The AlkValue constructor handles the '5 8/16' format. Where is that used
in practise?
- Later on we remove invalid chars from the string, isn't that too risky?
For example, what would the input "0x1F" result after all non digital 
chars have been removed? 
- the negative sign is searched within the entire string, is that correct?
What if one comes with something like "5-3" in hope that AlkValue calculates
to 2?

Wouldn't it make sense to have a flag that indicates if "dangerous" 
operations such as the ones described above have taken place or not?
And what about passing a KLocale to the constructor instead of just
the decimal sign? It could default to the default locale and other
information than just the decimal sign could be taken from it, for
example the toString method.

Please, this is of course not meant offensive, I think we should be
open in discussing on a code base to achieve the best for our project.
Of course it is great to see this code coming in and making up the 
prject. Thanks again, Thomas.

regards,

Klaas



More information about the Kde-finance-apps mailing list