Skip to content

Intermediate functions: To test or not to test? #41

Closed
@Cohen-Carlisle

Description

@Cohen-Carlisle

My two cents:

I just finished Ruby's crypto-square and I let the tests drive the implementation without much thought at all as to what I was actually doing. I think this was mostly because I was unclear on some portions of the readme. Then at the end I had a pretty big jump to make to get the ciphertext working and I hacked it together in an ugly fashion.

I definitely think the tests were driving the implementation too much on that particular exercise. I didn't really have to think until near the end, and by then I had implemented things on autopilot in way I didn't actually like much.

So from that experience, I say "NAY" to testing intermediate functions.

Devil's Advocate:

Testing intermediate methods allows beginners to get a start where they might otherwise hit a wall. I should be practicing red-green-refactor instead of letting the tests of intermediate functions drive the implementation in a way I didn't like.

Counter Devil's Advocate:

I concede I should have practiced red-green-refactor. However, the fact remains that testing intermediate functions forces me to take certain approaches I might not otherwise have taken.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions