Feature Envy and Duplication

20 views
Skip to first unread message

Kevin Rutherford

unread,
Oct 20, 2009, 4:36:57 PM10/20/09
to ruby...@googlegroups.com
You may be interested to know that I have just found, within Reek's
source code, a case where I had earlier "fixed" FeatureEnvy and by so
doing introduced new Duplication. I've just reverted the FeatureEnvy
in order to have no duplication, and the code seems much happier.
The experiment continues...
Kevin
--
http://www.kevinrutherford.co.uk -- agile, TDD, XP, lean, TOC

Ashley Moran

unread,
Oct 20, 2009, 5:17:58 PM10/20/09
to ruby...@googlegroups.com

On 20 Oct 2009, at 21:36, Kevin Rutherford wrote:

> You may be interested to know that I have just found, within Reek's
> source code, a case where I had earlier "fixed" FeatureEnvy and by so
> doing introduced new Duplication. I've just reverted the FeatureEnvy
> in order to have no duplication, and the code seems much happier.
> The experiment continues...

That's surprising (to me...) - can you give a distilled example of how
fixing feature envy caused that? (Or just the source if that's easier?)

Cheers
Ashley

--
http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashleymoran
http://aviewfromafar.net/

Kevin Rutherford

unread,
Oct 21, 2009, 4:17:32 AM10/21/09
to ruby...@googlegroups.com
Hmmm. I've just re-run Reek on the offending code and found it no
longer reports Feature Envy!
So I moved that code in response to an earlier, buggy version of the detector.
Ho hum.

Ashley Moran

unread,
Oct 21, 2009, 5:55:10 AM10/21/09
to ruby...@googlegroups.com

On Oct 21, 2009, at 9:17 am, Kevin Rutherford wrote:

> Hmmm. I've just re-run Reek on the offending code and found it no
> longer reports Feature Envy!
> So I moved that code in response to an earlier, buggy version of the
> detector.
> Ho hum.

Oh well :( I've done similar things in the past, it's annoying.

Still interested to see how the rest of your experiment plays out!

Reply all
Reply to author
Forward
0 new messages