Author Melinda M. Snodgrass originally intended Data to swim in the opening scene, to illustrate that theory and practice are quite different and that Data has difficulty processing this. The producers found it difficult to find a public swimming pool that they could use on their budget and also had no time in their shooting schedule to find a way to maintain Data's make-up when swimming. Snodgrass was then asked to find a different activity for the opening, coming up with the iconic poker games among the Enterprise crew.
Picard's scene with Guinan was not in the original script. Melinda M. Snodgrass was told that they needed a "Ten-Forward" scene to accommodate Whoopi Goldberg coming in that week.
Gene Roddenberry disliked the premise of this episode, arguing that there would be no lawyers in the 24th century. Writer Melinda M. Snodgrass convinced him that even if there were no crime, people would still have to settle civil disputes, negotiate contracts, etc. Roddenberry relented, and production of the episode went forward.
This is the first episode to feature a poker game in Commander Riker's quarters. This would become a common feature of the show for its duration with various officers and crew participating.
The first cut of this episode ran 13 minutes longer. Author Melinda M. Snodgrass had a videocassette of that version which was used as reference to reconstruct the episode with new special effects and a new transfer of the additional footage. This new HD reconstruction is included on the 2012 Blu-ray of Season 2.