At such dismal times when projectiles are whizzing overhead and hearts are palpitating from the siren call of rockets, with Iron Dome batteries lighting up the sky and the hideous sight of dead Palestinian children paraded in front of TV cameras, let’s engage in a moment of wishful, magical thinking, the alternative universe of what Gaza might have become after Israel had ended its occupation in 2005.

Let’s call it: “It’s a Wonderful Life” for Palestinians, a counter-narrative where warfare and bloodshed never happened because the Gazans were too busy preparing for a new nation. Today, instead of missiles raining down from all directions, Gazans might have been eyeing a bid to host the next World Cup.

It’s really not that farfetched, but given the cards that Hamas was holding and the endgame they were playing, it was unlikely to have turned out any other way.

Nothing was inevitable. With Israel’s withdrawal there was a blank slate of possibilities. Today people speak of Israel’s naval blockade and restrictive border crossings (now imposed by Egypt, too) as reasons for why Gaza did not have a free hand in charting its future. But such restrictions on the flow of people and raw materials took place only once it became clear that for Hamas borders and ports are arteries for rockets, artillery, and the kidnapping of soldiers. If the Gazans had spent the last ten years importing equipment with which to build a new nation, there never would have been an Israeli blockade.

While we’re dreaming, it’s important to remember that Gaza is a beachside enclave right on the Mediterranean. For decades it has been an armpit of rubble and dust, but it had the potential to be the harbinger of a Palestinian paradise. If Hamas, fresh from its electoral victory over Fatah, had called up casino magnate Sheldon Adelson, as right-wing a supporter of Israel as there is, and suggested a partnership in casinos all along the strip, rather than firing rockets at civilians and martyring their own, Hamas would have been busy booking Tony Bennett and Britney Spears to headline its hotels for Christmas.

Instead of resorting to terror they could have just hosted resorts. Imagine, no sounds of bombs bursting, just whirring slot machines; craps tables instead of a wasteland that looks like crap. (The Native Indian-Americans extracted similar concessions from the United States, without launching rockets. And they never had beachfront property!)

Gaza could have been a Monaco or a Macao; instead it has all the magnetism and charm of Mars.

Yes, I know that those who elected Hamas are among the Islamic faithful and bikinis and baccarat is not exactly their thing. But universities, medical centers, and commercial enterprise were theirs for the asking. Gaza didn’t have to become a breeding ground of terrorists; it could have cultivated nation-building entrepreneurs instead.

Filled with implacable hatred and an obsession with conquering all of Israel, these Palestinians managed to learn nothing from the “start-up nation” to their north. Try getting Google to open up offices and employ local techies in Gaza. The people know little else aside from explosives and martyrdom.

There was a choice: Nation building or rocket launchings. We know what Gazans chose, a decision that was made permanent when they exercised their electoral franchise and Hamas came to power without city planners, architects, or finance wizards with MBA’s. The message sent to the world was: We’re not ready for statehood. Our diplomacy will focus on blowing things up rather than Palestine rising from the ground. Our tunnels will transport terrorists. All we desire is to obliterate the Zionist enemy with whatever means possible.

Sure, Israel has made its share of mistakes, particularly in the West Bank. But Gaza is a different story and it could have had a better ending. After all, had there been no missiles, Israel’s security concerns would have been allayed; its most persuasive argument against Palestinian autonomy wholly disarmed. Given the relative success that PA President Abbas has had in policing terrorism in the West Bank, the settlements and the right of return would have remained the primary impediments to a two-state solution.

Yet, Hamas keeps invoking the word occupation even though no Israelis or Jews live in Gaza, and haven’t for some time. Beginning in 2005 there was an open frontier of possibilities, but it went completely squandered, no progress made, no sustainable plan for a future was even commenced. And all that foreign aid misdirected in the service of destruction. What if Hamas had taken its cue not from the Muslim Brotherhood but rather the Kurds of Kurdistan or African-Americans, who certainly didn't win their civil rights by becoming domestic terrorists?

The pioneering Israelis almost instantly became known around the world as a people who made the deserts bloom. The Palestinians of Gaza, however, now unoccupied for nearly a decade, are only known for things that go boom.

Thane Rosenbaum, a novelist, essayist and professor at NYU School of Law, is the director of the Forum on Law, Culture & Society and the author, most recently, of “Payback: The Case for Revenge.”