If you write code you're a programmer. End of story.
The 'no true Scotsman' fallacy does not apply when you are actually debating whether someone living in a border region with mixed parents can be considered 'a true Scotsman'.
We don't call everyone that uses Excel a programmer, even though the simplest expression of the form sum(A11:A22) is, for every reasonable definition, 'code'. That would dilute the term far beyond what people generally mean when they talk about 'programmers'.
You cannot call yourself a writer, just because you passed English with a C for your essays and now write blog posts for a limited audience. You are not a programmer just because you can whip out webapps that strictly do the limited things you require of them.
Your analogy doesn't work because "mathematician" is a research position. You should compare mathematicians to computer scientists, not programmers.
You could make the same analogy and prove any side of the debate depending on the job you choose:
If you do plumbing, does that make you a plumber?
If you do painting, does that make you a painter?
If you do physics, does that make you a physicist?
If you drive vehicles, does that make you a driver?
Really, the debate here is that some people consider the word programmer to mean "computer scientist" or "computer expert", while others consider it to mean "person who programs". It's a debate on the meaning of a word and this kind of debate cannot be settled, because the word has multiple meanings. Everyone's right in their own way.
If you write code you're a programmer. End of story.
"Programming, and then there's programming" and "code plumbing" are, in fact, semantics.