Production
First-time screenwriter Lou Holtz Jr. conceived The Cable Guy while working as a prosecutor in Los Angeles, declaring that he once saw a cable company employee in the hallway of his mother's apartment building and started thinking, "What's he doing here so late?" The screenplay became the subject of a bidding war, won by Columbia Pictures at a price of $750,000, plus a $250,000 additional bonus if the movie got made. The role of the Cable Guy was originally sold with Chris Farley attached to star, but he later dropped out due to scheduling difficulties. Adam Sandler was also considered.
Jim Carrey received $20 million, then a record amount, to star. Following Carrey's signing, Columbia Pictures hired Judd Apatow to produce. Columbia rebuffed Apatow's interest in directing, but accepted his suggestion to invite Ben Stiller on whose Ben Stiller Show Apatow had worked. Stiller was considered to play the Steven Kovacs character before it was offered to Matthew Broderick.
The original screenplay by Lou Holtz Jr. was a lighter comedy, described by Apatow as "a What About Bob? annoying friend movie" where the Cable Guy was a likeable loser who intrudes upon the cable subscriber's life, but never in a physically threatening way. Carrey, Apatow and Stiller liked the setup of "somebody who is really smart with technology invading somebody's life", and opted to add slapstick and darker tones, changing into a satire of thrillers such as Cape Fear, Unlawful Entry and The Hand That Rocks the Cradle. The dialogue would also fit Carrey's style of comedy.
Holtz wrote four additional drafts, each one darker than the previous, before leaving the project and giving Apatow the opportunity to take over the writing. Apatow and Stiller visited Carrey as he was filming Ace Ventura: When Nature Calls in South Carolina, and over a few days, riffed a lot of the set pieces that were added to the script, and further explored how Carrey wanted to perform the character. Apatow took the film to the Writers Guild for arbitration to get a writing credit but ultimately Holtz retained sole credit for the script. Apatow expressed frustration at not getting credit but acknowledged that as he was also a producer on the film, the Writers Guild requirements are set very high to protect writers.
The final script had elements so disturbing that Columbia heard many complaints regarding certain scenes. In turn, Apatow declared that the studio did not specifically order removals, "but we took [the scenes] out as part of the natural evolution of our creative process". Stiller stated that he shot every scene with "a dark version and a light version", and that he was surprised that the studio did not object to the violent ending.
The fight sequence at Medieval Times between Chip (Jim Carrey) and Steven (Matthew Broderick) is an homage to the Star Trek episode "Amok Time"—including the use of Vulcan weapons (lirpa), the dialogue, and the background music. Director Ben Stiller is an admitted Trekkie. Actor Charles Napier guest-starred in the Star Trek: The Original Series episode "The Way to Eden".