RE: Re: Refactoring wishlist
"Mark Miller" <[email protected]> Thu, 29 Sep 2011 13:11:28 -0700
| Newsgroups | gmane.comp.programming.refactoring |
|---|---|
| Message-ID | <[email protected]> |
Hi George,
Ø So here's your challenge: give me the link or admit that you were giving
an overzealous sales pitch.
We wrapped up Apply DeMorgan's Law inside a refactoring called Simplify
Expression. We did this to make it more accessible to users who had never
heard of DeMorgan.
We also added logic to find redundancy and simplify math operations that
went beyond considerations of DeMorgan, Quine, and McCluskey. For example,
we can simplify this:
if (!(a < 5 || a == 5))
{
//
}
Into this:
if (a > 5)
{
//
}
Its a simple example, but CodeRush can simplify any level of complexity in
an expression.
CodeRush is still the only refactoring tool Im aware of with this
refactoring. Simplify Expression has been in the product for five years.
Heres the link to the documentation:
http://documentation.devexpress.com/#CodeRushXpress/CustomDocument5851
Heres a link to a screenshot I just took with your example code and
CodeRushs simplification. CodeRushs preview hinting shows the change that
will take place to the code before you apply the refactoring.
http://a.yfrog.com/img739/2884/gvlf.png
Also, George, I would challenge you to come up with more challenges for
CodeRush.
Were ready to impress you. J
- Mark Miller
DevExpress
C# MVP
@MillerMark
From: [email protected] [mailto:[email protected]] On
Behalf Of George
Sent: Wednesday, September 28, 2011 7:39 PM
To: [email protected]
Subject: [refactoring] Re: Refactoring wishlist
Mark,
Look for my challenge to you in the paragraph above my signature.
CodeRush looks good.
But I wonder if we are communicating, here. I didn't find the logic
manipulations anywhere in a quick scan of the CodeRush documentation
(http://documentation.devexpress.com/#RefactorPro/CustomDocument1480). For
instance, where is "apply DeMorgan's Law"? E.g., change something like
if ( !(a || !b) ) ...
into
if ( !a && b ) ...
assuming it would also remove double negatives and extra parentheses.
A search for "DeMorgan" in your online documentation came up empty. So
here's your challenge: give me the link or admit that you were giving an
overzealous sales pitch. I'd like nothing better than for you to lay me out
on this one and have your product win the day, but I don't think you can.
George
[Non-text portions of this message have been removed]
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/refactoring/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/refactoring/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/