Every New York City resident used to have a few things within a couple of blocks of his or her apartment.

They were the essentials: a post office, a gym, a bodega, and a good, inexpensive diner. Most of us still have no problem with the first three, but the New York-style diner has gone the way of the dodo in recent years. The question we need to ask is why is this happening to restaurants we cherished.

Sure, some great old standbys still thrive, like the Hudson Diner in the West Village, the Square Diner in TriBeCa and the Neptune Diner in Astoria.

But the last decade has seen a steady decline in these institutions, places we rely on in order to get a quick, inexpensive stack of pancakes or gyro platter.

And the last two years have seen an acceleration in such shutterings. The old-fashioned Empire Diner in Chelsea closed its chrome-clad doors last May, the Manhattan Diner on the Upper West Side closed earlier this year, and the Palace Diner, a Flushing stalwart since 1976, will be converted into a Chinese joint after it opens for the last time Friday. This list is just a few picks from the menu of the at least 10 diners that have shut down over the last two years.

So what's driving them all out of business? One key reason is shifting demographics. As different populations move into these neighborhoods, and others move out to Long Island or die off, the tastes change. The Lower East Side only has one good bialy left, but clubs abound. Same with diners: Flushing is now an Asian-American enclave, and Chelsea's residents represent an increasingly-affluent, young slice of the pie.

But demographic changes alone can't explain the diners' unwelcome exodus. New York's Neighborhoods are constantly in flux, so a couple years of the same shouldn't be driving the diner away.

Another contributor is the cumulative effects of the punitive violations and fines foisted upon the city's eateries by the city Health Department.

Don Capalbi just sold the College Green Pub, a bar he owned for years in Flushing, after years of wrestling with the city over minor infractions and supposed violations.

Capalbi said he once received a fine for not having a visible No Choking poster in his bar (I've seen it with my own eyes both before and after the fine - it's prominently displayed near the cash register). When he tried to contest it, the judge gave him no rope; he had no recourse to overturn the violation.

And Capalbi says that the new letter grade system is even worse, doing little to inform potential customers.

They close these places down and there go the jobs, Capalbi said. These health grade violations are a clear reflection of not only how clean a restaurant or bar is, but apparently also the last time the inspector was admonished for not bringing in enough revenue, and whether or not the inspector had a fight with their spouse that morning, and luck.

A typical story is that of Millard Fillmore's, whose owners apparently got hit with a health violation for having uncovered potato chips on the bar, according to a bar owner familiar with the situation.

A Manhattan bar owner was docked mega points on his inspection for being a few minutes late to work, leaving no one authorized to deal with food. A number of bars have stopped offering free hors d'oeuvres and even cheese and crackers after being slapped with fines for having uncovered food items.

So there goes the neighborhood. We used to be able to stop in at our local and grab a cheap beer and a few peanuts or pretzels, or to drop in at the diner and willingly order a questionable cup of soup for just a couple bucks. Now, thanks to the Health Department, our choices are limited to high-dollar places that can afford to eat periodic fines. Thanks, but I'd rather take the chance.