The argument that the definition of "non commercial" is debatable has nothing to do with the CC license in particular and would equally apply to any other license in the world that has such a clause, so this is no argument against using a CC license for software.
The real reason why CC is not recommended for software is that there are typically different distribution forms for software: Source code, compiled code, transpiled code, etc. and CC does not address that at all, as for other media no such distinction exists. The result is that in some cases it isn't clear if a CC requirement only applies to the source code itself, to either the source code or a compiled/transpiled representation of it, or even to both equally.
Software licenses typically define that compiled/transpiled versions of source codes are not derived works but are in fact the same work in a different distribution form and that for the license it plays no role in what form a work is distributed, the same license conditions apply. Also in case of Copyleft licenses, they also define that whoever distributes a compiled/transpiled form, must also distribute the original source code; again, CC has no such requirement.
If using the CC "SA" attribute, it is guaranteed that derived works has equal protection and BY-SA 4.0 is even one-way compatible with GPLv3 (you can release CC BY-SA 4.0 code under GPLv3 if you like, as GPLv3 enforces all requirements of CC BY-SA 4.0 and even beyond it). So with "SA" attribute, compiled code shares the same license as source code for sure but also forces any work based upon your work to also use that license. That is a problem, if other parts of that derived work use a different license and conditions of that different license make it impossible to release the derived work as a whole under the CC license.
E.g. let's assume I write an app that uses your CC SA code. Because of "SA" my entire app (a derived work) must be released as CC SA. However, my app also uses code under a license that requires that I grant patent rights to users. If I release that app under CC SA, I would not grant those patent rights and thus violate the other license. But if I release it under a license that grants those patent rights, that would not be CC anymore and thus I had violated the SA constraint. So I can mix the source codes in a source repo (unless any source code has a license that also forbids that) and also distribute that source code but there is no license I could use to release a binary built from that source code that would not violate either one of these two licenses.
If using the "NC" attribute, it is not compatible with other software licenses anymore, as other licenses do typically allow any form of commercial usage. You can mix CC NC code with other licenses but only if the CC code stays under CC license on every redistribution.
And the NC attribute is sticky, meaning it will inherit to derived works. Derived works must be released also under a CC NC license or under a custom license with such a restriction and the later one is not recommend as writing licenses is a task for lawyers, not for software developers. If you write a custom license and mess up, your license may have loopholes and not provide the desired or required protection level and in that case the owner of the original work could sue you, as you would then be violating the CC license requirements. So to be safe, you will have release derived works also under any CC NC license, which makes "NC" as sticky as "SA" in practice.
So if you use CC SA or CC NC code for a project, you can mix in code under BSD or MIT or Apache license but the resulting product basically has to be CC SA or CC NC again, which is okay to permissive licenses as BSD/MIT/Apache; they allow the resulting product to have a different license than the the source code, also a more restrictive one and don't require any license requirements to carry over to the final product.