Should I write a comma between "freelancer" and "writing"?
***** NOT A TEACHER *****
I would NOT use a comma.
1. "I worked as a freelance
writing simple programs."
2. "I worked as a freelance
debugging their programs." [Thanks to post 12 for this example.]
As you know, if you used a comma, that would mean that the words following the comma could be deleted without seriously affecting the meaning of the main clause "I worked as a freelance."
In your sentence, however, I feel that "writing simple programs"
defines what kind of freelance work you did. Thus it is, in my opinion,
essential information. Furthermore, in speech there would be no pause when you said it.
Mona: I hear that you worked as a freelance.
Raul: That's right.
Mona: Were you debugging their programs?
Raul: Oh, no. I worked as a freelance [no pause]
ONLY WRITING SIMPLE PROGRAMS.