I am a biologist. I wrote and am about to submit a manuscript that describes a statistical analysis of computer model; it is a statistical methods and modeling paper.
After my manuscript was written, a collaborator with a background in CS started to develop the code for their own project. In the process, they substantially improved the code, making it more logical, more readable, more adaptable. However, it still reproduces my original analysis unchanged and the manuscript itself has not changed.
The collaborator has not asked for, and I have not offered, authorship, but another co-author asked me to consider it.
I am uncertain about whether his contributions merit authorship, and my primary concern is that authorship reflects intellectual contribution. On the one hand, the manuscript itself has not changed. On the other, the software that was described by and will be released with the paper has changed.
I would like to collaborate with this and other computer scientists more in the future, but I would like to better appreciate what constitutes an intellectual contribution.
Both with respect to this case, and more generally, how can I determine when a collaborator's contribution meet both of the two following criteria of authorship (from the Committee on publication ethics):
substantial contribution to conception and design, or acquisition of data, or analysis and interpretation of data;
drafting the article or revising it critically for important intellectual content;
update: it is clear from further consideration and the answers in below that the contribution justifies authorship, so I will offer it.