0 of 0

Here's the thing about gingerbread houses. You labor over them for hours. You painstakingly decorate them with gumdrops and candy canes.

And then, someone shakes the table it's sitting on, and boom! It all comes crumbling down, leaving a huge, house-shaped hole in your heart.

Never again, we said.

This year, we were determined to build a stronger gingerbread house. One that wouldn't crumble, no matter what. One that could withstand an earthquake.

So we consulted Ben Schafer, chair of the department of civil engineering at Johns Hopkins. He recommended keeping the corners square, and making sure the roof is centered and evenly balanced.

"If you keep everything nice and straight, then the structure doesn't run away from you," he tells The Salt. If the peak of your roof is off by even a little, the whole thing could come crumbling down.

But the key to any great gingerbread house, Schafer says, is the icing that holds it all together: "Assuming that you don't eat the gingerbread — which can be a problem for some people — I've always seen the damage at the connections."

Icing can easily get too runny or too stiff. And even after it dries, it often isn't strong enough to hold the structure together. On the other hand, Schafer says, a strong glue can sometimes compensate for a faulty, unbalanced structure.

That's why Erica Kahn, an undergraduate at the Brown University School of Engineering who helps put on the school's yearly Extreme Gingerbread Competition, said she steers clear of icing altogether.

Instead, Kahn recommends melting down caramel, gummy candies and marshmallow. Once they're melted, the marshmallows become tacky and gluelike, Kahn tells The Salt. "They become this really strong, cementlike substance."

With these tips in mind, we proceeded to construct.

We did face one huge setback: Every grocery store in D.C. we hit for this little experiment had run out of gingerbread, so we had to settle for graham crackers.

Of course, graham crackers are weaker and more brittle than gingerbread. So to make sure our walls could stand strong, we sandwiched melted marshmallow cement between two graham crackers. The marshmallow adds weight, which helps stabilize the structure. It also acts as a sealant, ensuring that the cracker won't crumble.

We didn't use this technique on the roof because we were afraid it would become too heavy. Instead, we braced the roof with a couple of smaller pieces of graham cracker, glued horizontally along the center.

And to further reinforce the crackers, we sealed any weak spots with melted gummy bears.

Warm, gelatinous gummy bear goop is not unlike epoxy. You should be careful when you're working with this stuff. Cover your work surface with paper, and maybe wear some gloves.

We used the goo to hold the walls together ...

... and to secure the roof.

Schafer, the civil engineer, had warned us against using too many decorations. During earthquakes, it's often the nonstructural elements on houses, like heavy gargoyles, that can fall and hurt someone.

So we limited ourselves to a few gumdrops on the roof, secured with gummy bear epoxy.

To test the structure, we simulated an earthquake by shaking a table around. (If you want to be more scientific about it, you could use a shake table).

Nothing budged.

We then tried dropping our house from bigger and bigger heights.

Still nothing.

Even after we chucked it from a few feet up, we found only slight damage — at the eaves of the roof.

Sure, it's not the prettiest house. And while it's technically edible, you'd likely chip a tooth if you took a bite.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.