You could see it in any barrier island town as residents dealt with the damage from Sandy.

In older structures, with first floors just a few feet off the ground, some homeowners returned to find inches of sand in their living rooms and water damage everywhere. In many newer homes, built on piles, more-fortunate property owners may have lost the contents of garages and mud rooms, but their living space was unscathed.

In the most extreme cases, concrete pads and foundations were all that was left in some yards, mute testament to bygone homes from a bygone era.

Major storms teach tough lessons. And, just as previous storms taught coastal communities that they needed stricter building codes, Sandy is offering lessons about how, and where, we should rebuild, if we're willing to listen.

And rebuild we will. There's no doubt that New Jersey's Long Beach Island shore communities - and the amusements that are an economic engine for the entire state - will be rebuilt. Last week, speaking of the washed-out sections of Boardwalk and amusement pier in Seaside Heights, Gov. Chris Christie said, "We will rebuild it. There's not a question in my mind we will rebuild it."

He could have been talking about the entire Jersey Shore.

But how we rebuild it is an important question. It is clear that sea levels are rising. People can argue about the cause. Man-made global warming? A naturally occurring climate cycle? But there is no sense ignoring reality. Our streets may be full of sand, but there's no reason to put our heads in it.

We can expect stronger, more frequent storms. And they will be barreling into shore areas that have never been more developed.

Some scientists think the whole idea of living on barrier islands is a little crazy. They point out that these relatively thin strips of sand are constantly changing their shapes. Storms accelerate the process, and that's a big problem when there are roads and houses on top of these shifting islands.

But it would be foolish to think New Jersey would abandon its barrier island communities. Instead, we have spent millions of dollars on seawalls, groins, dredging and beach-replenishment projects to try to protect these communities.

Surely, part of that effort needs to be establishing new building standards in coastal areas so that future storms will not be as devastating. Indeed, Department of Environmental Protection spokesman Larry Hajna told The Associated Press last week that he thinks building codes will be updated following Sandy.

And part of our effort must be to take a harder look at where we allow people to build. New Jersey's program to buy flood-prone properties has mostly been used on inland flood plains. It's time to use some of that money to prevent rebuilding in the most dangerous areas of the shore.

The rest of the country won't continue forever to subsidize shore living through the National Flood Insurance Program if we don't take common-sense steps to make sure the money spent rebuilding after storms isn't wasted.