Re: Literate style with a nod to Hamcrest matchers - good or bad?

Ron Jeffries <[email protected]> Sat, 13 Feb 2010 14:21:56 -0500
Newsgroups gmane.comp.programming.refactoring
Message-ID <[email protected]>
Hello, simonvarley99.  On Friday, February 12, 2010, at 11:17:11
PM, you wrote:

> I was looking for a more literate way to reflect that the code
> was trying to figure out if one number is divisible by another
> number. So a few beers later and ... well, I ended up down this
> strange Hamcrest matcher path and went from one line:

> public MyClass() {
>         ...
>         if ((number % divisor) == 0) {
>             ...
>         }

I'm pretty old-fashioned but I think that if a programmer doesn't
know exactly and clearly what number%divisor == 0 means, it's time
to look for a career in something easier.

Ron Jeffries
www.XProgramming.com
www.xprogramming.com/blog
To tolerate a problem is to insist on it. -- Software for Your Head



------------------------------------

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/