SilverWook said:
It's a reference to the TAS episode, The Practical Joker.
Not the first "computer goes crazy" story, but notable for the first appearance of a holodeck in Trek, and of course, the first malfunction. ;)
Personally, what I love most about the episode is how petty the pranks start off, and then it moves on to homicide! Not much of a middle ground.