On Thu, May 2, 2013 at 7:25 AM, Sasha Pachev <[email protected]> wrote:
> it must work correctly on any file that
> has lines shorter than 512 bytes. If the line is longer than that it
> can truncate the string, but must not crash.
I missed this little gem the first time. Only a programmer who has
got their brain firmly stuck in the world of C bondage would even
think to write something like that. Not only did you introduce an
arbitrary 512 byte line length with no basis in the original
description of the problem purely to make implementation faster and
less painful for you, but you had to specify that it wouldn't crash.
Reasonable languages don't screw with your head to the extent that
you'd actually think that cutting lines off at an arbitrary point was
acceptable or that anyone might think crashing was an option.
Yes, friends, this is a textbook example of a programmer manually
optimizing a program by specifying the low-level details. Precisely
the conditions under which I said C would outperform higher-level
languages. Is anyone surprised?
--Levi
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/