On Tuesday, millions of Americans will gather around their TV screens and participate in an American ritual: watching election returns.

While President Trump has been insisting that “it would be very, very proper and very nice if a winner was declared on Nov. 3” and categorizing delays in counting as “totally inappropriate,” he is wrong. At times, it has taken weeks, even months, to find out who won the presidency. While election night itself has long been about political entertainment, advancements in media, technology and statistical analysis have dramatically heightened expectations for instant results. This transformation of election night into a show that culminates with a clear winner has not always been good for democracy, and such entertainment demands create problems for 2020, when counting every vote is essential.

During the 19th century, political parties controlled almost all aspects of the Election Day experience. Newspapers were partisan outlets, and even printed the ballots that citizens would cast. Citizens proudly marched in torch-lit parades to cast their ballot, voted under the watchful eye of partisan leaders, and then looked for “election night rockets” that might communicate to voters the local tally.

This changed at the turn of the 20th century, as political reforms — notably the rise of more standardized voting procedures and the secret ballot — began to limit the power of political parties to manipulate the voting process. Newspapers also underwent a dramatic change as they moved away from partisan coffers for support and toward an advertiser-based model dependent on circulation — which demanded cultivating public trust. Election reporting became a way to celebrate new professional ideals of objectivity, and newspapers began to emphasize the “science” of election returns. They hired mathematical experts to help with calculations and cultivated public fascination with the process of reporting results.

In 1952, the connection between journalism, technological innovation and data processing was vividly on display when the CBS Election Evening television show featured a huge computer, UNIVAC, which engaged in a “battle of the brains” with NBC’s computer Monrobot. The technological bells and whistles didn’t just entertain audiences. They also boosted the prestige and political importance of corporate broadcasting companies and the highly profitable national network affiliation system on which they depended.

By 1976, with electoral reforms having firmly ended the era of backroom party politics, the networks worked with newspapers to develop polling operations that controversially allowed them to predict, not just report, ballot box returns.

And yet, frustrations arose with the horse race coverage that focused overwhelmingly on presidential politics. During the 1970s, cable television operators argued that a different approach to the medium could encourage civic engagement at the local level, and help advance the interests of an industry looking to change regulatory policies to better compete with the broadcasting industry.

And so in 1972, the National Cable Television Association (NCTA) began promoting cablecasting programs, which offered live, in-depth interviews with local, state and national candidates. The NCTA also celebrated the election night achievements of the industry. Cable operators featured “blackboard scoreboards” and “computerized tote machines” to tally the local, state and national votes. In New York City, TelePrompTer Manhattan cable television featured interviews with “roving reporters” covering local races using computers to “help analyze voting patterns” and recording interviews with ordinary citizens. They weren’t alone; 258 cable systems featured some type of election evening coverage that year.

The lesson: Cable’s flexibility and affordability encouraged creativity and the inclusion of new perspectives to better understand the political process as it played out on the ground. These types of cablecasting programs also promoted an alternative way of thinking about television and civic engagement, paving the way for new national cable networks that would transform the political and media environments, including C-SPAN, which launched in 1979, and CNN, which hit cable systems in 1980. Both cable networks promised to deliver on what broadcasting network news could not or would not: bring more diversity, transparency and local engagement to the political process.

In fact, a credibility crisis that arose from election night coverage in 1980 created an opening for cable television advocates to reiterate this point. That year, NBC News first projected a win for Ronald Reagan shortly after 8 p.m. Eastern time. President Jimmy Carter then delivered a concession speech before the polls closed on the West Coast, prompting howls from Democrats who believed that they lost congressional seats as a result.

Rep. Timothy Wirth (D-Colo.) led a congressional investigation into these early predictions, questioning their timing. By reporting a presidential victory for Reagan before the polls closed, “early projections result in voters feeling like their vote, the linchpin of this democracy, is worthless,” Wirth argued. The drive for ratings and the rush to be first “may be ruining the good news judgment while alienating voters by telling them what they have done before they have done it.”

Ted Turner, the cable programming entrepreneur, used the controversy to criticize the “network arrogance” and their “uncontrollable desire for ratings and revenues.” Polls are not facts, Turner contended. Instead of reporting events as they unfolded, exit polling manufactured the news, projecting the future. Turner saw market competition, provided by cable networks like his own CNN, as the solution.

The subsequent expansion of cable — including the launch of two new 24/7 cable news networks, MSNBC and Fox News, in 1996 — did provide competition in newsrooms, but it certainly didn’t resolve the tensions over election evening coverage.

This competition backfired on election night 2000, ultimately sowing tremendous confusion and distrust. Between 7:50 and 8:02 p.m., ABC, CBS, NBC, CNN, MSNBC and Fox News all projected Al Gore to win the critical state of Florida — before all of the polling places in the state closed. Two hours later, the call was retracted. Between 2:16 and 2:20 a.m., the networks reversed course, declaring Bush the winner of Florida. Yet less than two hours later, that call too was retracted.

Voters woke up confused. Conspiracy theories started to circulate — conservatives believed that the “liberal media” tried to sway the election for Gore with the initial projection, while liberals saw the management of the Fox News election desk — which first called Florida for Bush — by the Texas governor’s cousin John Ellis as a clear violation of journalistic integrity by the right-leaning cable network.

Television news — both network and cable — failed the American people that evening. During the ensuing congressional investigation into the debacle, Rep Eliot L. Engel (D-N.Y.) lamented: “Al Gore was not the only one who lost that night. The American people lost that night, and the news media also lost that night. For many years, public confidence in the news media has been on the decline. I suspect that it took a nose dive on election night.”

Scholars have noted that a central problem in the 2000 coverage was a lack of clarity about how election desks and exit polling worked, where networks actually received their information — notably that all the major TV newsrooms that year used the same data from the Voter News Service to make their projections — and the “limitations of predictive models in a close election.”

Election night 2020 promises to test whether the media has learned from failures of the past. Due to the introduction of massive numbers of mail ballots in states unused to dealing with them and laws in some states that mandate that election officials wait until Tuesday to process them, it will take time to know who won.

Transparency about the process is essential to avoid either candidate declaring an early victory without an accurate count, something Trump’s campaign has reportedly considered doing. If viewers understand on election night that a huge portion of the results remain outstanding, they may be more patient about a slow count and less likely to assume something untoward happened.

Projecting a winner on election night may make for good TV, but it’s essential to remember that entertainment isn’t the purpose of Election Day, democracy is. And that means we need to embrace the process of vote counting, even if it is slow, tedious and boring.