Re: algorithm - how to estimate time to complete
From: Tony Dahlman (adahlman_at_jps.net)
Date: 02/28/05
- Next message: Steve R. Burrus: "Help--Null Pointer Exception"
- Previous message: Rhino: "Re: TRUE PROVEN METHOD OF HIGHER INTELLGENCE"
- In reply to: worzel: "algorithm - how to estimate time to complete"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 28 Feb 2005 03:03:51 GMT
worzel wrote:
> Not a problem as such, just a question about estimating time for producing
> algorithms.
>
> I recently had to write a class with a method that was to convert digits
> (int) into their 'word' representation.
> To begin with, converting say, 234, into "two three four", was easy enough.
> But the method was also to 'sound english'
>
> So, 234 now had to be converted to:
>
> "two hundred and thirty four"
>
> Some other examples:
>
> "six million, three thousand and fifty six"
> "six billion and one"
> "eight billion,six million, three thousand, fourhundred and fifty six"
>
> (like the way a person may write on a cheque underneath the digit amount.)
>
> I wrote such a method. (which was actually a little more invoved than this
> as it supports currencies, floating point number etc;) But, only after badly
> underestimating the time involved for me to do so. There were were a few
> elemenst about it that were not so obvious until I sat down to write it. I
> ended up scratching a lot of stuff down on paper, and wrote it 3 times till
> I was happy with it.
>
>
> I have two questions here:
>
> What is the best way to estimate time for rather small tasks like this? How
> to you determine if a job will take an hour, a day, or a week? I know it
> seems like a silly question - but I am just keen to see what sort of
> responses come back from it.
>
> Secondly, how long do you think it would take you to write a method such as
> this? Personally, I allowed an hour and a half, and, like I said, was badly
> mistaken. I know I took longer because I trivialised the problems till I ran
> into them in live code, but still, it took way longer than I expected. (It
> took me a whole day and a bit of the next day)
>
>
> TIA
>
Whoa! I think you made three or four mistakes, here....
First, it took me ten minutes to find out that this code has previously been written,
far more completely and scalably than you even imagined. (See link below.) And it
is free under a GPL-like license.
Second, if you think that the correct text to put on your checks for $234 is
"two hundred and thirty-four," then you missed something in your sixth- or
seventh-grade grammar book. (I know that many Americans talk that way, but
that is colloquial and therefore, arguably, acceptable.) Is it standard in
Australia, or should $234.39 be written:
Two hundred thirty-four and thirty-nine / 100 ______dollars ?
At least, other English-speaking countries will be using this, not your,
convention for writing numbers as text.
Third, you apparently did not even think about internationalizing these strings.
Fourth and perhaps most important, your boss's question about how long it would
take you to do this may have been intended to get you to think about the problem
rather than just doing calculations. Not speaking for the boss, of course, and
he/she may know nothing about software development and programming, in which case
the above doesn't apply.
It pains me (I'm a shareholder but never an employee) to think that IBM puts
this code out there, yet people don't notice. WORA means "run anywhere", so why
don't more people learn how to do that? (Not flaming you personally with that. :))
http://icu.sourceforge.net/apiref/icu4j/com/ibm/icu/text/RuleBasedNumberFormat.html
Regards,
Tony Dahlman
----------------------------------------
Please do not send follow-ups to my posted email address. I will never see them,
thanks to spammers who will surely send lots of crap there.
- Next message: Steve R. Burrus: "Help--Null Pointer Exception"
- Previous message: Rhino: "Re: TRUE PROVEN METHOD OF HIGHER INTELLGENCE"
- In reply to: worzel: "algorithm - how to estimate time to complete"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|