Isn't this a bit backwards? The royalty system for writing and music evolved in a different age, an age where a physical artifact carried the writing/music and thus it was relatively easy to charge for it, count the reproductions, and distribute any income. You also have to include the huge special interests that have... motivated... the current royalty system. Google for the story of "Mitch Glazier" and "work for hire" to see what shenanigans have been discovered.
Programmers and the job of programming evolved when a physical artifact wasn't necessary, and has become impossible to attach to a work. It's more or less impossible to count reproductions or uses. Any income collected would be less than the number of reproductions or uses, but by how much is utterly impossible to determine. Distribution of the income would be similarly arbitrary.
The screenwriters, songwriters and authors should be paid like programmers, not programmers paid like screenwriters, songwriters and authors.