A new blog commenting on East

Gregor Gramlich presents his view on East here.

3 Responses to “A new blog commenting on East”

  1. dkallen Says:

    So, I took your challenge. I tried writing this Eastwards and Westwards.
    The eastward version was slightly more lines of code. I found it harder to read. And I noticed no difference when I changed the representation of the gender. I sense that I missed something. Can you upload the full code you used for this? I did it in Visual Studio 2008 in C# and my project code is located at http://cid-1694a89505687617.skydrive.live.com/self.aspx/Public/EastwardTest.zip

    Perhaps my “westward code” is already too eastward to provide any contrast.

    Oh, and I find nested parens to be harder to read than intermediate variables. But I can easily extract variables from them, so I don’t get hung up on that.

  2. james Says:

    dkallen,

    Thank you for taking the time to write the code and post it.

    I noticed in the Westward code that you are already Eastward, in that you don’t return a date of birth nor the gender. This is great. The benefit of the Eastward approach would already be known to you. However, if you want to see more contrast, then expose the date and gender and see the resulting code.

    I also noticed the the GiftSender was also East, a nice touch.

  3. james Says:

    I should have also mentioned that you could have mocked the GiftSender rather than making a proper class for it, then testing the interaction only, which depending on mocking framework would be less code.

Leave a Reply

You must be logged in to post a comment.