Contact potential co-authors at the beginning of the project
Firstly, it is great that you are thinking about this --- too many people start projects like this without thinking about the credit they ought to give to other contributors.
To avoid getting into a mess, or an authorship dispute, I recommend you take the time to contact relevant contributors and agree on authorship terms before you start writing this paper. If you are the one writing the paper then it is certainly reasonable for you to be an author, even if you had little input into the code. Similarly, if there are other programmers who contributed to the code, it is reasonable for them to be co-authors even if they don't add much to the paper. (I'm assuming that your paper is about the code, such that contribution to the code constitutes a significant contribution to the paper.) If their contribution falls below a level that warrants co-authorship, you might still want to add them to an acknowledgement in the paper. As the other answer here points out, there are all sorts of contributions to a paper that can warrant authorship --- it is not always just about who wrote the actual paper. So you will need to make a judgment about what contributions warrant authorship.
The best thing to do here is to make a list of all the people who you think have made a sufficient contribution to the code to warrant co-authorship, and then contact them to see if they would like to be co-authors on the paper. If in doubt, contact them anyway and see if they think they've contributed enough to warrant co-authorship or acknowledgement. (You might ask them to have a hand in writing/reviewing the paper, or you might decide that they warrant co-authorship credit even without this.) Have a meeting with all of them and make sure you all agree on the authorship of the paper --- i.e., you all agree on whose names will be on the paper and the order in which they will appear. Also make sure that everyone knows and is comfortable with their role on the paper going forward.
If you are unable to contact one of the contributors, or if they are non-responsive, then you probably cannot add them as a co-author (journals generally require all co-authors to consent to publication, except possibly in the case when a co-author is deceased or incapacitated). In this case you could add the person to the acknowledgements instead of as a co-author, and note their contribution to the code.