lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

review process not working


From: David Kastrup
Subject: review process not working
Date: Tue, 26 Jul 2011 10:50:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

For whatever reason, the review processes are not working.  The code in
commit 104f80daf1dab11ef5b598006e3d4be8dfbe1926
repeatedly uses floating point arithmetic like int(pow(2.0,...)) where
the outcome is not guaranteed to be correct, it does its calculations
based on non-existing glyphs ("rests.-1" instead of "rests.M1"), it
loops through lists with an O(n^2) algorithm (first calculating list
length, then iterating an integer index for accessing it), it has bad
loop conditions.

The overall code makes obvious that this has been created by a
comparative novice to the programming languages and data structures of
Lilypond.  He has been doing his best.

The patch lists Graham as the committer.  Mike later contributed a
trivial one-line "fix" (exchanging pow(2, ...) with pow(2.0, ...)).

What can we do to avoid things like that happening in future?  I
stumbled upon this because after an unrelated "make check" where I did
not bother to adjust the test-baseline, the warnings for the bad glyph
names got into my diff.

So I discovered one problem by pure accident and sloppiness, and then
looked at the code.

And frankly, rests.M1 is an accident waiting to happen.  It looks to me
as if this particular problem is also in Rest::glyph_name (which frankly
is the function that should have been called in the first place).

-- 
David Kastrup




reply via email to

[Prev in Thread] Current Thread [Next in Thread]