In the decades since director Roland Emmerich. The highest-grossing movie of the year has since held on to its popularity based on annual viewing to coincide with the July Fourth holiday, which allows the glaring computer virus plot hole to reemerge.
At the start of Independence Day, David managed to decode a signal within satellite transmissions, which he realized was a countdown to the alien's global invasion. After reaching the president with this intel, David became a direct figure on the frontlines in battling the invaders. With his immense knowledge, David teamed up with Captain Steven Hiller (Will Smith) to pilot the previously crash-landed alien spacecraft into the mothership in order to a virus to the enemies' mainframe. The pair were successful, thwarting the invasion and, most importantly, saving humanity. David's move in reversing alien technology to use against the enemy then served as the basis for the 2016 sequel, Independence Day: Resurgence.
In the decades after Earth's first war against alien invaders, the United Nations set up the Earth Space Defense, which was meant to serve as a global defense system and research program that reverse-engineers the technology used by aliens. Ironically, this stemmed from David's actions in Emmerich's 1996 film, even though the movie failed to explain how the character effectively used a Mac computer to the virus into alien technology. The Independence Day plot hole was even addressed by writer/producer Dean Devlin (via Yahoo!), who explained, "Okay: what Jeff Goldblum’s character discovered was that the programming structure of the alien ship was a binary code." He then went on to state break down how David reversed the code to wreak havoc on the aliens' communication system. Thankfully, a deleted scene added a more plausible explanation to David's effective virus.
In the Independence Day 20th Anniversary DVD release, there was a deleted scene (which can be found via YouTube) that shed light on how David used his computer to the virus. The scene featured David working on the crash-landed ship in Area 51 when he realized the aliens' programming "language" resembled that of the signal he deciphered at the beginning of the invasion. With that knowledge, David presumably created the virus and was able to without being directly connected to the mothership. The spacecrafts were linked, considering how David and Hiller's ship was docked without their control. Therefore, that wireless link allowed David to infect the systems, giving the president's defense team time to lead an assault.
How David's Mac operating system was able to handle the program capacity needed to decode, reverse, and initiate a virus remains a mystery. That said, there was at least a better explanation for the Independence Day storyline. Considering it became such a widely talked about plot hole, it seems like the deleted scene would have benefited the final cut of the film. Though questions would have lingered, the short sequence would have added more plausibility to David's hacking of the aliens' communication system. It took two decades, but Independence Day fans now have some answers.