Little White Redundancy

As heard on programming projects everywhere:

"Ohhh, wassa harm in a little redundancy? It's not so baaad!"

See: RedundancyIsInertia (even a little white bit of it)


In RefactoringWithComPlusTechnologies, the book's example contains a simple loop in each collection class that drops members from the collection when deletes have been confirmed. "Why go to all the bother, expense and risk of refactoring it into a common subroutine?" I heard, "It's so simple, only a handful lines, what could possibly go wrong?"

Well... The indexing of member numbers to delete is independent of the "for each" looping that checks their status flags... And it's WRONG! Yes, it deletes the wrong objects in some cases. And this bug exists in every business collection class in the entire system. It can hit every object where you might fetch more than one and delete some of them.

Ick!!! -- JeffGrigg

Reminds me of AlarmBellPhrase.


EditText of this page (last edited February 18, 2006) or FindPage with title or text search