Re: RE: [PEAR] [ANNOUNCEMENT] Numbers_Words-0.7.1 (beta) Released.
| From: | David Costa | Date: | Tue, 25 May 2004 14:34:26 +0000 |
| Subject: | Re: RE: [PEAR] [ANNOUNCEMENT] Numbers_Words-0.7.1 (beta) Released. | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-29637@lists.php.net to get a copy of this message | ||
On May 25, 2004, at 4:27 PM, Antonio Carlos Venancio Junior wrote:
You think, well first and foremost this is a BETA package. So I can change the API if needed and if I deem it appropriate. Second YOU need to understand that if you pass an invalid numeral you will get an odd/inaccurate result. Nobody can forecast all the possible numerals passed from 1 to 5999999 so if the use doesn't bother to learn how to use a package don't blame the author.Yeah, i think it _is_ a problem. You have to parse the number and raise an error when the conversion could not be made, i.e. because the user passed a "bad" roman number. Try to remember when you have learned semanthics (and roman numbers too). You need to understand that 'VIIII' _is not_ the representation of the number nine (9). The correct representation is 'IX'. You will never find a book with page 'VIIII', gotcha?!This is not a problem, if you convert VX that is not a valid numeral so it's your fault I assume. Same for VIIII. It will return you a rough guess, which cannot be accurate if you pass an invalid numeral. toNumber expects a valid Numeral as input.That are only two examples of _wrong_ roman numbers, because 'VX' doesn't exists and its computed as a 5 (five). And the correct form of a nine (9) is 'IX' and not 'VIIII'.
I would strongly vote against you on the QA team because, in lieu of kindly and politely suggest a change, you came in and said "I ask permission to change the code" claiming something about speed (non existing issue in a static method). QA should act in extreme situations not when/if someone like you doesn't like the API. So your approach was wrong. Just because you might have karma (I don't know as have never seen something substantial committed by you) this doesn't mean you can change a code if you don't like it. Not even if you are on QA. David Costa, http://dotgeek.org http://pear.php.net/user/gurugeekOf course if this is bad for your personal use, feel free to fork your own version and do it your way, by all means this is something you can do.That's why we need a QA team. This package certainly whould not be aproved that way. I just made an "expect to fail" test to the class that not failed. That's the basics. --