I've written essentially the same application several times in different languages, for different frameworks, or for substantially different platforms.
I'd also count a serious refactoring or structural improvement as having programmed something again.
I think this could be a really interesting discussion. My first reaction to georgieporgie's comment was the same as omaranto's. But in practice, like you say, we do end up doing a lot of code re-writing.
Suppose we are to explain omaranto's statement to someone who is not a programmer. My try is: given that (i) programs, whether in source or binary format, can be indefinitely replicated with virtually zero cost and (ii) we know how to write modular programs and (iii) there are plenty of useful modules available for re-use, we never have to substantially re-write anything from scratch.
But (iii) is arguably false due to a variety of reasons: intellectual property issues, incompatible platforms, "incompatible" programming languages, etc.
I'd also count a serious refactoring or structural improvement as having programmed something again.