8
\$\begingroup\$

I came across this recent question, originally only tagged with .

OP is particularly interested in how unit-test -friendly his code is, and what could be done to improve on that aspect.

The tag doesn't seem appropriate in this case, since my understanding of that tag's applicability implies that the post contains unit tests.

Would a tag be useful?

\$\endgroup\$

5 Answers 5

4
\$\begingroup\$

I'm giving this since it is a meta-tag, and we're already in the process of burninating a number of them. Even if it were already around, it would've still been one of the tags to go.

\$\endgroup\$
7
\$\begingroup\$

No!

While may be a valid concern in a peer review, it adds about no value to the question itself, it's a meta-tagging. In fact any question that will ever be tagged should just explicitly state in the question body that a - or the main - concern is the testability of the code.

Some of you will say, that this also applies to and I will say: Yes, this applies to all meta-tags, but why make the same mistake as before?

The initial goal for tags was searchability (another of those *ability words). And all these meta-tags provide no value for that :(

\$\endgroup\$
1
  • 2
    \$\begingroup\$ I would replace "could" with "should". Adding the information in the question body is more important than the tags, IMO. \$\endgroup\$ Jun 26, 2014 at 19:56
3
\$\begingroup\$

Yes!

Testability is a valid concern in a peer review, having a tag would guide reviewers into writing their answers from a testability standpoint, just like the popular tag guides reviewers into addressing readability issues.

is more than just , and is too vague.

\$\endgroup\$
3
  • \$\begingroup\$ So what's the difference between unit-testing and testability? You're right. Unit testing is too vague, but I think it's a failure of it's wiki to define how it's to be used. I see nothing in the wiki that makes me think it shouldn't be used for that question. \$\endgroup\$
    – RubberDuck
    Jun 26, 2014 at 17:10
  • \$\begingroup\$ @ckuhn203 My understanding of the unit-testing tag's applicability implies that the post contains unit tests. Maybe the tag's wiki could simply be improved instead. Care to propose that as a "No" answer? \$\endgroup\$ Jun 26, 2014 at 17:12
  • \$\begingroup\$ So much yes, writing testable code is hard, having this tag will make CR a better research tool, it is one thing to make people happy with us reviewing their code. But would it not be awesome to also allow people to find high scoring answers on questions that are tagged testability.. ( Yes, that would be awesome ) \$\endgroup\$
    – konijn
    Jul 9, 2014 at 16:36
3
\$\begingroup\$

Maybe, but probably not.

There is nothing in the unit-testing wiki that makes me feel like it doesn't apply to the referenced question. What's the difference between and ? The wikis could be cleaned up to specify that applies specifically to reviews of unit testing code and that applies to how testable code is, but I'm afraid that these two similar names (yet very different ideas) would be confused. It seems that having these two tags would just set us up for an eventual synonym made out of the despair of being unable to maintain them separately.

\$\endgroup\$
2
\$\begingroup\$

Yes!!

From https://stackoverflow.com/help/tagging

Tags are a means of connecting experts with questions they will be able to answer by sorting questions into specific, well-defined categories.

Tags can also be used to help you identify questions that are interesting or relevant to you.

Testability is very interesting/relevant to me, it seems the worst code by smart people I see so far is testable code. I want to track what CR comes up with as a community to address the inherent difficulties in writing good testable code.

\$\endgroup\$
2
  • \$\begingroup\$ "it seems the worst code by smart people I see so far is testable code"? Please elaborate. Do you mean testable code or test code (i.e. code written in tests)? \$\endgroup\$ Jul 10, 2014 at 14:01
  • \$\begingroup\$ testable code \$\endgroup\$
    – konijn
    Jul 10, 2014 at 14:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .