On 7/31/09 3:49 PM, Monty Taylor wrote:
Davi Arnaut wrote:
On 7/31/09 3:16 PM, Jay Pipes wrote:
Lest I be accused of merely bashing MySQL engineering, let me explain
why I was less-than-slightly amused at the below email thread and
forwarded it to this list...
Early on in the development of Drizzle, Brian, Monty T, Stewart and I
spent hundreds of hours fixing nasty, hard-to-diagnose bugs just like
these. Seeing this email brought back some not-so-happy memories of that
refactoring work.
Why does Drizzle not suffer from these kind of bugs (or at least very
few of them) compared to MySQL? Very simple: our build/compile process.
Compilers emit warnings for a reason. When you ignore those warnings
(such as a variable's data could be truncated via a cast), you let your
code get exposed to these kind of bugs. By enabling -Werror and
compiling with VERY strict warnings, these kinds of bugs are caught
EARLY by the compiler, which complains that you are trying to do
something that may not be a good idea!
Anyway, I apologize for including private email addresses in the
forward, but the lessons of strict compilation's benefits should not be
forgotten.
Frankly, writing crap code has nothing to do with warnings and such.
It's like blaming the pen a author used to write a crappy book. No
amount of warning can make a someone learn good development practices or
know the language.
This is true - but a stricter compilation environment will prevent some
classes of errors which stem from people thinking they _really_ know
what's going on, or that they can outsmart the system when they really
can't. Some people can, but they are few and far between.
If you're going to write crap code, we should make it as hard for you to
do so as we can. Of course, crap can always happen.
Right, but back to the original message, the lesson taught by this
function is not about warnings, but about designing interfaces that make
sense. The code there is just a consequence of such twisted logic for a
read function. This was the context of the first message in the thread,
hinting at the problem of instrumenting the said function.
Regards,
-- Davi Arnaut
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp