W
worzel
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
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