Maybe. I also think that the implications of code can be harder to decipher on first pass than writing text which leads me to believe that maybe that mental model (Red Team, Blue Team) might not fit here.
Perhaps the analogy is better for "Writing code" versus "Writing Test Cases"?