RE: Re: Refactoring wishlist

"Mark Miller" <[email protected]> Fri, 30 Sep 2011 17:07:11 -0700
Newsgroups gmane.comp.programming.refactoring
Message-ID <[email protected]>
OK, just added Reverse Boolean (thanks George, for encouraging this). Here’s
your screenshot of the refactoring’s preview hinting:

 

http://a.yfrog.com/img859/5843/r5a.png

 

CodeRush customers: I’ll get the source to this plug-in up on the community
plug-in site in 24 hours.

 

- Mark Miller

  DevExpress

  C# MVP

  @MillerMark

 

From: [email protected] [mailto:[email protected]] On
Behalf Of Mark Miller
Sent: Thursday, September 29, 2011 2:33 PM
To: [email protected]
Subject: RE: [refactoring] Re: Refactoring wishlist

 

  

Hi George,

I was just re-reading through your list, and somehow I missed #7 on the
first read - reverse the sense of a Boolean variable. CodeRush does NOT have
this yet, although it's something we've been talking about implementing for
a while. It's a great suggestion. 

- Mark Miller
DevExpress
C# MVP
@MillerMark

From: [email protected] <mailto:refactoring%40yahoogroups.com>
[mailto:[email protected] <mailto:refactoring%40yahoogroups.com> ]
On
Behalf Of Mark Miller
Sent: Thursday, September 29, 2011 1:11 PM
To: [email protected] <mailto:refactoring%40yahoogroups.com> 
Subject: RE: [refactoring] Re: Refactoring wishlist

  
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)

{

// …

}

It’s a simple example, but CodeRush can simplify any level of complexity in
an expression.

CodeRush is still the only refactoring tool I’m aware of with this
refactoring. Simplify Expression has been in the product for five years.

Here’s the link to the documentation:

http://documentation.devexpress.com/#CodeRushXpress/CustomDocument5851

Here’s a link to a screenshot I just took with your example code and
CodeRush’s simplification. CodeRush’s 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. 

We’re ready to impress you. J

- Mark Miller

DevExpress

C# MVP

@MillerMark

From: [email protected] <mailto:refactoring%40yahoogroups.com>
[mailto:[email protected] <mailto:refactoring%40yahoogroups.com> ]
On
Behalf Of George
Sent: Wednesday, September 28, 2011 7:39 PM
To: [email protected] <mailto:refactoring%40yahoogroups.com> 
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]





[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/