I’m half a world from home, in Shanghai, a city I’ve never explored, with fresh sights and sounds around every corner. And what am I doing?

I’m watching exactly the kind of television program I might watch in my Manhattan apartment.

Before I left New York, I downloaded a season of “The Wire,” in case I wanted to binge, in case I needed the comfort. It’s on my iPad with a slew of books I’m sure to find gripping, a bunch of the music I like best, issues of favorite magazines: a portable trove of the tried and true, guaranteed to insulate me from the strange and new.

I force myself to quit “The Wire” after about 20 minutes and I venture into the streets, because Baltimore’s drug dealers will wait and Shanghai’s soup dumplings won’t. But I’m haunted by how tempting it was to stay put, by how easily a person these days can travel the globe, and travel through life, in a thoroughly customized cocoon.

I’m not talking about the chain hotels or chain restaurants that we’ve long had and that somehow manage to be identical from time zone to time zone, language to language: carbon-copy refuges for unadventurous souls and stomachs.

I’m talking about our hard drives, our wired ways, “the cloud” and all of that. I’m talking about our unprecedented ability to tote around and dwell in a snugly tailored reality of our own creation, a monochromatic gallery of our own curation.

This coddling involves more than earphones, touch pads, palm-sized screens and gigabytes of memory. It’s a function of how so many of us use this technology and how we let it use us. We tune out by tucking ourselves into virtual enclaves in which our ingrained tastes are mirrored and our established opinions reflected back at us.

In theory the Internet, along with its kindred advances, should expand our horizons, speeding us to aesthetic and intellectual territories we haven’t charted before. Often it does.

But at our instigation and with our assent, it also herds us into tribes of common thought and shared temperament, amplifying the timeless human tropism toward cliques. Cyberspace, like suburbia, has gated communities.

Our Web bookmarks and our chosen social-media feeds help us retreat deeper into our partisan camps. (Cable television news lends its own mighty hand.) “It’s the great irony of the Internet era: People have more access than ever to an array of viewpoints, but also the technological ability to screen out anything that doesn’t reinforce their views,” Jonathan Martin wrote in Politico last year, explaining how so many strategists and analysts on the right convinced themselves, in defiance of polls, that Mitt Romney was about to win the presidency.

But this sort of echo chamber also exists on cultural fronts, where we’re exhorted toward sameness and sorted into categories. The helpful video-store clerk or bookstore owner has been replaced, refined, automated: We now have Netflix suggestions for what we should watch next, based on what we’ve watched before, and we’re given Amazon prods for purchasing novels that have been shown to please readers just like us. We’re profiled, then clustered accordingly.

By joining particular threads on Facebook and Twitter, we can linger interminably on the one or two television shows that obsess us. Through music-streaming services and their formulas for our sweet spots, we meet new bands that might as well be reconfigurations of the old ones. Algorithms lead us to anagrams.

I keep thinking about a widely circulated speech that the movie director Steven Soderbergh gave this year. He recounted a flight he’d taken from New York to California and the way a nearby passenger had been using an iPad. “I begin to realize that what he’s done is he’s loaded in half a dozen sort of action extravaganzas and he’s watching each of the action sequences,” Soderbergh said. “This guy’s flight is going to be five and a half hours of just mayhem porn.”

Soderbergh was mainly lamenting the endangered appreciation of real storytelling and character development. But there’s an additional moral to his story. As his fellow flier traversed an entire continent, he used a device capable of putting a galaxy of information within reach to collapse the universe into one redundant experience, one sustained note, a well-worn groove also known as a rut. There he happily spun his wheels.

I say that as someone who has too frequently spun my own, clutching my smartphone, looking down instead of up, tap-tap-tapping, maintaining unbroken contact with the usual suspects and entertainment and ideas. But I try to resist, because trading serendipity for safety is a raw deal in the end. There’s a skyline in Shanghai unlike any I’ve seen. Who knows what other discoveries are in store?