Just-picked beans are truly best munched straight off the bush, but if you absolutely must cook them, do it just barely. If you aren't growing them yourself, just take care to use the most fresh beans you can find because it really makes a difference in both taste and texture.
Be sure the beans are as fresh as possible and err on the side of under-cooking rather than over-cooking. You want a fresh snap on the tooth, not that soggy blah feeling we're all too familiar with.
Barely Cooked String Beans
1 1/2 lbs string beans (preferably young and slender), trimmed
1 tablespoon olive oil
1/4 teaspoon flaky salt such as Maldon or kosher salt
3 small cloves garlic, chopped
1/4 cup sliced almonds
Prepare an ice bath in a large bowl. Drop the beans into a pot of boiling salted water and cook for 30 seconds. Quickly drain then plunge into the ice bath. Drain and pat dry.
In a skillet large enough to hold the beans, heat the olive oil over medium heat. Cook the garlic until just beginning to show color, less than 30 seconds. Add the almonds, salt and beans and sauté for another 30 seconds.
Remove from pan and serve.