9
\$\begingroup\$

I often notice posts which contain strike-through versions of previous character counts, like this:

Perl (123 111 chars)

I don't see this practice mentioned anywhere in the FAQs, nor here on meta. Might be I was using the wrong terms for my search. In any case I'd like to know what's the rationale behind these numbers, when to use them and when not to.

I guess when finding a shorter version, I should leave the longer striked out. But what about when I find a bug, and fixing it will make my code longer? What about when I do ten size improvements, do I keep them all? And what about if I don't like to include them, is there some danger of not including old counts being perceived in a bad way somehow?

\$\endgroup\$
4
  • 1
    \$\begingroup\$ I just like to do so, in order to mention how much my entry has improved. It's not required, or anything, some members just like to. I don't think header is standardized (all it has to mention is a language). \$\endgroup\$
    – 0..
    Jan 16, 2014 at 17:00
  • 1
    \$\begingroup\$ Since answers sometimes receive improvements from other users, but the points go to the first poster, I believe the strikethrough is a form of etiquette and show of honesty. It says "I initially did it in this many characters, and then the community helped to pare it down..." \$\endgroup\$ Jan 22, 2014 at 9:28
  • 1
    \$\begingroup\$ @joeytwiddle: that's an interesting view. It would mean that if I improve my answer on my own, I should not leave previous counts. I wonder whether others read the numbers that way as well. Would you post that as an answer so that others can express whether or no they agree? Iirc downvotes on meta don't cost reputation, so even if you are all alone, there should be no hurt in it. \$\endgroup\$
    – MvG
    Jan 22, 2014 at 9:32
  • 1
    \$\begingroup\$ @MvG: It might still be appropriate to keep the original count. Since there is something of a race to post the first solution in each language, it seems more honest to retain the initial offering. But I can't speak for the community... Good tip about rep. \$\endgroup\$ Jan 22, 2014 at 9:45

1 Answer 1

14
\$\begingroup\$

There isn't a policy around this, and I don't think that there needs to be one.

I starting using struck-out numbers for old versions in imitation of other golfers on this site, so I can't tell you the original rationale. However, I can offer my thoughts as to its utility.

The site stores a history of each post; if a post has been edited then it tells you when it was last edited and provides a link to the full history. However, there's no way of telling how much it has changed without following that link. The struck-out numbers provide a hint about how much history there is, and whether it relates to improvements in the code or in the documentation / discussion. They can also give a hint as to how much optimisation room is likely to be left: if you see 400 300 280 277 then it's probably going to take a lot of effort (or a completely different approach) to improve that answer.

To your specific questions:

But what about when I find a bug, and fixing it will make my code longer?

Why would you want to highlight evidence of your mistake? ;) In this case I would replace the previous count; I think I may on one or two occasions where it affected several previous versions and where the same fix worked for all of them have bumped up the struck-out numbers by the same amount, preserving the history of how much it improved. In those cases I would also have left a note in the body of the answer explaining how to correct the previous versions.

What about when I do ten size improvements, do I keep them all?

Up to you. I think that some people do, but if you want to abbreviate to 400 300 ... 265 264 then I doubt anyone would complain.

And what about if I don't like to include them, is there some danger of not including old counts being perceived in a bad way somehow?

I don't think so.

\$\endgroup\$
2
  • \$\begingroup\$ "In this case I would replace the previous count" - I just strike out the old count and leave it there. Is there a reason to not do that? \$\endgroup\$ Jan 14, 2014 at 6:23
  • 4
    \$\begingroup\$ @JanDvorak, the counts are about saying "I can do it in this many chars". If it turns out that the program was buggy, I couldn't do it in that many chars. See also the sentence before the one you quote. \$\endgroup\$ Jan 14, 2014 at 11:17

You must log in to answer this question.

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