When I was diagnosed with breast cancer at age 41, I was working as a "junior baker" in a hip, new Brooklyn bakery called Baked. I had pivoted professionally by about 1000 degrees a few years prior, transitioning from (unhappily) litigating in a fancy boutique entertainment law firm in New York City, to joyfully baking up every treat you could imagine — jumbo chewy chocolate-chunk cookies; malted blondies; moist zucchini bread, studded with toasted pecans; and flaky, mile-high, cream biscuits.

I knew nothing about the world of pastry prior to starting at Baked, but I'd always had a sweet tooth that just wouldn't quit, and was eager to learn how to satiate it without heading to the grocery store. Luckily, my 20-something co-workers there — equal parts hilarious and cynical, warm and bitingly harsh — were patient, (relatively) supportive teachers, despite the fact that they'd been students themselves only a year or so before.

They taught me everything about baking: how to properly use measuring spoons and operate the industrial-sized Hobart stand mixer; how to gently fold the dry ingredients into wet when making tea loaves; how to melt chocolate in a makeshift double-boiler; that I needed to scrape out the unmixed monster cookie dough stuck at the bottom of the stand-mixer bowl.

At first, being their student was somewhat humiliating, as I was so much older yet had so few skills. But, as luck would have it, my millennial co-workers were not only excellent teachers, they were also interested in learning themselves: bonding me to them during what would soon become a tough time in ways I could not have imagined.

From the moment I was diagnosed with cancer, and through my treatment, my co-workers at Baked were naturally empathetic and inquisitive — even straight up curious — about what I was going through. This was, in part, I'm sure, because of their youth; they couldn't even comprehend the notion that what had befallen me (the old-lady mom, who worked part-time and said the f-word a lot) could someday happen to (youthful, cool) them. But they didn't exude fear, or feel ashamed for not being sick themselves. And they never felt sorry for me in that slightly patronizing way that made me so uncomfortable.

After my double mastectomy and first two chemo treatments, I shaved my head prophylactically in order to avoid watching my hair fall out, and bought two wigs: one for work and one for life. My "work wig" was a cheap one from Ricky's — the iconic New York costume and beauty chain store — that came with its own light-blue wool beret. And I had another, pricier one, made of natural hair by a celebrity wigmaker, that I wore the rest of the time. I'd be in front of the Hobart — work wig and all — mixing up the chocolate cloud cookie dough while chatting all things cancer with the bakery's head decorator, like everything was completely normal.

She wanted to hear about the hospital's chemo suite, where I received my treatments; about what it was like to wear a wig (it sucked); about my radiation therapy; about the tiny little tattooed dots that I had been given so the hospital technicians could accurately position the radiation machine over my body each day.

I told her about the long waits pre-treatment, and how I would look around the room at all the other women with breast cancer — feeling both pleased that I looked healthier, and depressed that cancer-ridden me felt good about looking better than cancer-ridden them. I told her about how much I hated the needles, but how kind the nurses who wielded them were. I told her how I refused to take my wig off in front of anyone but my husband and children, as I couldn't bear to have people see me when I looked so vulnerable and unattractive.

We talked about it all in this chatty, slightly clinical, matter-of-fact way that I found refreshing, distracting, and just plain comforting. In fact, I credit my co-workers at Baked with injecting much-needed levity into a pretty dark period in my life.

For better or worse, after being diagnosed and treated, I struggled the most not with despair about my future well-being, but with navigating people's reactions when I told them the news — or when my blonde bob-of-a-wig gave it away. The fear I saw in the eyes of my fellow preschool moms made drop-offs and pick-ups annoying at the best of times, and profoundly upsetting at the worst. I could tell that they felt sorry for me, and who could blame them? I felt sorry for me, too. But I could also tell how relieved they were that this wig-requiring misfortune had struck me, and not them.

Intellectually, I understood exactly how they felt, though I like to think I would have behaved differently. But their reaction was just plain human: that very real combination of heartfelt compassion for the unwell, coupled with off-the-charts relief that it's not actually happening to you. Human or not, however, it made me feel terrible — a weak and helpless version of me.

But then I would go to work a shift at the bakery, and I'd feel like myself again, and would find everything physically surrounding me so incredibly comforting: the plush, sweet-smelling yeasted cinnamon rolls I'd encounter in the morning, the rows and rows of brightly colored sprinkles lined up in the cake-decorating section, and, most especially, the trays of generously filled whoopie pies in the bakery case. All of it brought me solace.

The whoopies, in particular, were practically life-saving. First, I adored making them in part because of their simplicity; a single large bowl, a whisk, and a rubber spatula were the only necessary tools. Second, I loved the speed with which they came together; after completing the mise en place and mixing the batter, a quick rest on the workbench was all that stood between me and a whoopie pie. Last, I was thrilled that they baked in less than 10 minutes — instant gratification.

I rarely filled the pies, as that was mostly a job for the cake decorators. But when I did, there was little else more satisfying than portioning out generous dollops of cream on the upturned cookies and lightly sandwiching them with the tops, just until the filling began to poke out at the sides.

Over time, because I loved them so, I developed almost a sixth sense about how to make the perfect whoopie pie. I instinctively knew when the batter was properly mixed, properly rested, and ready to be pulled from the oven. I was whoopie pie-obsessed — so in love with the treats — and I'm not ashamed to say it.

And, of course, I relished eating them. They reminded me of the Drake's Devil Dogs of my youth (two chocolate cake "cookies" shaped like dog bones, sandwiching a thick layer of cream) a box of which was always in my family's kitchen cabinet. The cookie part of the Baked whoopie pie was much moister and more flavorful than a Devil Dog, and the Swiss meringue buttercream that filled the chocolate pies was light, fluffy, and scarily addictive.

At first, the bakery only sold chocolate whoopie pies, but eventually we were making gingerbread and pumpkin ones for fall, red velvet and peppermint ones for the holidays, and strawberry ones in the spring — and I truly loved them all. I had a nostalgic connection to the treat, no doubt, but it was also one of the first baked goods that I perfected, and that made me feel like an expert, filling me with confidence and pride. The assembly process felt peaceful and unhurried.

In short, when assembling whoopies, I felt like me, a new and different me — one who now knew her way around an industrial stand mixer and a piping bag — but me, nonetheless. And it was the beginning of a professional love affair with old-school sweets that are simple to make and over-the-top delicious.

It's a cliché, I know, to equate baking and treat-making with all that is soothing, relaxing, and good. And honestly, I am much more of a snarky realist when I bake, working as quickly as possible, and forgetting to savor many aspects of the process. I'm no smiling dreamer, lazily going about my prep work, then stopping to enjoy the way the pie dough feels between my fingers and how the mid-morning light bounces off my countertop. Despite this, I unquestionably experienced baking's restorative powers at Baked.

Now I am in no way advocating that those undergoing cancer treatment try manual labor, with people 20 years their junior, in an effort to lift their spirits. There were many days where I just didn't feel well enough to complete my shift — or even go into the bakery at all. Moreover, sometimes being there just bummed me out: all my fellow-bakers without a care in the world, save for where they were going drinking that night, versus chemo-drained me, struggling each day with a four-year-old on a sleep strike.

But in the end, my time in that warm, bustling, professional kitchen, filled with trash-talking millennials and delicious smells, was exactly what the doctor ordered, as it were. After all, I was surrounded by the things I liked best, and folks who judged me not at all for the wig I wore, nor the crap with which I was at present forced to deal. And it still makes me smile when I think of it.

The treat in particular that still always brings me back to those Baked days is the whoopie pie. While at the bakery, I celebrated every birthday with at least one; I also ate a whoopie pie on my last day of chemo, and I had one when I stopped radiation, and then, finally, I ate a whoopie pie the day I stopped wearing my wig. The whoopie pie is still the sweet I turn to for every bake sale, potluck, in-school birthday celebration, and the occasional dinner party — when I just want to shake things up. And even though the straight up chocolate–vanilla one is still my favorite, I now make all different kinds, including gingerbread, grasshopper, peppermint, and pumpkin.

The pumpkin flavor, in fact, has a permanent spot on my Thanksgiving dessert table; it's my most favorite way to get in the holiday spirit, and pay homage to my healing time at Baked. Recently, I developed the most perfect of pumpkin whoopies, filled with a rich dark chocolate–cream cheese filling. And while they are delicious, and gorgeous to look at, for me they are full of nostalgia. They remind me not just of my childhood, or of the darkest time in my adult-life to date, but of the power of that which is sweet — even when sour is seemingly all that surrounds you.

Pumpkin whoopie pies with chocolate cream cheese filling recipe

(Bobbi Lin/Courtesy Food52)

This story was originally published on Food52.com: When I got cancer, baking made me feel powerful