From: Peter Olcott on
On 5/28/2010 11:22 AM, Liviu wrote:
> "Peter Olcott"<NoSpam(a)OCR4Screen.com> wrote...
>>
>> I have found that maximum readability also directly leads to maximum
>> reliability and minimum debugging. In the case where a function can be
>> easily exhaustively tested, is reasonably easy to read, and probably
>> won't need to be modified the increase of readability over speed is
>> not as important. In this case speed may outweigh readability.
>>
>> http://www.ocr4screen.com/UTF8.cpp
>
> Compared to the first revision you posted yesterday, this one at least
> fixes the infinite loops. That alone is a major speedup, indeed ;-)
>
> Now maybe if you tried to actually test it, you'd find the next obvious
> error, painfully obvious to anyone even remotely fluent in C/C++.
> Which is even more odd since I thought you were writing code so
> perfectly designed that it needed virtually no debugging.
>
> Liviu
>
>

You are referring to the fact that I don't bother to invoke it in
main()? That was not an error. The only reason that included main() was
so that the compiler would not complain. It is intended to be used as a
header file.
From: Liviu on
"Peter Olcott" <NoSpam(a)OCR4Screen.com> wrote...
> On 5/28/2010 11:22 AM, Liviu wrote:
>> "Peter Olcott"<NoSpam(a)OCR4Screen.com> wrote...
>>>
>>> http://www.ocr4screen.com/UTF8.cpp
>>
>> Now maybe if you tried to actually test it, you'd find the next
>> obvious error, painfully obvious to anyone even remotely fluent in
>> C/C++. Which is even more odd since I thought you were writing
>> code so perfectly designed that it needed virtually no debugging.
>
> You are referring to the fact that I don't bother to invoke it in
> main()? That was not an error. The only reason that included main()
> was so that the compiler would not complain. It is intended to be
> used as a header file.

No, not that. Why do you have to _guess_ anyway? Just lower yourself
to actually try and test it with any non-ASCII input.

Liviu


From: Pete Delgado on

"Liviu" <lab2k1(a)gmail.c0m> wrote in message
news:u9EpJIo$KHA.4316(a)TK2MSFTNGP04.phx.gbl...
> "Peter Olcott" <NoSpam(a)OCR4Screen.com> wrote...
>>
>> I have found that maximum readability also directly leads to maximum
>> reliability and minimum debugging. In the case where a function can be
>> easily exhaustively tested, is reasonably easy to read, and probably
>> won't need to be modified the increase of readability over speed is
>> not as important. In this case speed may outweigh readability.
>>
>> http://www.ocr4screen.com/UTF8.cpp
>
> Compared to the first revision you posted yesterday, this one at least
> fixes the infinite loops. That alone is a major speedup, indeed ;-)
>
> Now maybe if you tried to actually test it, you'd find the next obvious
> error, painfully obvious to anyone even remotely fluent in C/C++.
> Which is even more odd since I thought you were writing code so
> perfectly designed that it needed virtually no debugging.

Let's also not forget his other code metrics none of which are met by the
posted code... After all the hot air, after all the agonizing over design
and the discussions and arguments over performance and efficiency, this is
what we get! ROTFL!

The truly funny part is that the portions of his code that even have a
chance to work appear to have been contributed by others. *This* is the code
that Peter claims would be so easy to write that it would take him about 20
minutes a day for 7 days to create. Well, days after Peter's self-imposed
deadline, he apparently still doesn't have a working program to show for it!

So Peter Olcott, now do you understand why I doubted your claim that you
were 75% done? I wasn't being facetious, just realistic given the knowledge
you have shown of design/evelopment and project management/estimation.

Thanks for the laughs! :-)

-Pete


From: Peter Olcott on
On 5/28/2010 11:52 AM, Liviu wrote:
> "Peter Olcott"<NoSpam(a)OCR4Screen.com> wrote...
>> On 5/28/2010 11:22 AM, Liviu wrote:
>>> "Peter Olcott"<NoSpam(a)OCR4Screen.com> wrote...
>>>>
>>>> http://www.ocr4screen.com/UTF8.cpp
>>>
>>> Now maybe if you tried to actually test it, you'd find the next
>>> obvious error, painfully obvious to anyone even remotely fluent in
>>> C/C++. Which is even more odd since I thought you were writing
>>> code so perfectly designed that it needed virtually no debugging.
>>
>> You are referring to the fact that I don't bother to invoke it in
>> main()? That was not an error. The only reason that included main()
>> was so that the compiler would not complain. It is intended to be
>> used as a header file.
>
> No, not that. Why do you have to _guess_ anyway? Just lower yourself
> to actually try and test it with any non-ASCII input.
>
> Liviu
>
>

I have other priorities right now. I will exhaustively test it once I
derive the UTF32toUTF8 function. I need this function to generate my
test data.
From: Liviu on
"Peter Olcott" <NoSpam(a)OCR4Screen.com> wrote...
> On 5/28/2010 11:52 AM, Liviu wrote:
>> "Peter Olcott"<NoSpam(a)OCR4Screen.com> wrote...
>>> On 5/28/2010 11:22 AM, Liviu wrote:
>>>> "Peter Olcott"<NoSpam(a)OCR4Screen.com> wrote...
>>>>>
>>>>> http://www.ocr4screen.com/UTF8.cpp
>>>>
>>>> Now maybe if you tried to actually test it, you'd find the next
>>>> obvious error, painfully obvious to anyone even remotely fluent in
>>>> C/C++. Which is even more odd since I thought you were writing
>>>> code so perfectly designed that it needed virtually no debugging.
>>>
>>> You are referring to the fact that I don't bother to invoke it in
>>> main()? That was not an error. The only reason that included main()
>>> was so that the compiler would not complain. It is intended to be
>>> used as a header file.
>>
>> No, not that. Why do you have to _guess_ anyway? Just lower yourself
>> to actually try and test it with any non-ASCII input.
>
> I have other priorities right now. I will exhaustively test it once I
> derive the UTF32toUTF8 function. I need this function to generate
> my test data.

You really mean to generate test data using another (untested) function
of yours? Brilliant.

Liviu