Writing before discussing usually raises the quality of the discussion, so consider having students write first.
Try not to plan major conceptual discussions for the very end of class because students will often want to continue working on their own writing and will be more distracted than usual from the discussion. Brief wrap-up discussions do work at the end of class.
If you notice that students are paying more attention to computers than to their peers during the discussion, ask students to move away from the computers. If your classroom is arranged so that students cannot move away from the computers (say, in rows), the teacher should move to a focal point at least to turn students away from the screens.
For extended discussions, consider turning off the computers, but be sure to start booting the machines again before you leave (a courtesy for the next teacher coming into the computer classroom).