On the occasion of my sixtieth birthday, my friend Lenny visited me from Toronto. He is seven years older than me, and he gave me some sound advice: respect the limitations of your body. Lenny said that he no longer climbs ladders, even though he is a yoga instructor and his balance is good—climbing ladders just seems like a risky thing for a sixtysomething to do.

The advice came just after I had binge-watched the first season of “Westworld,” a TV series about machines gaining human consciousness (something that I, like many cognitive neuroscience professors, have been teaching for over ten years). In the world of the show, the bodies of the robots, unlike your body and mine, are easily repaired. A vast robot-repair shop remanufactures and reattaches severed limbs, and efficiently closes gaping wounds.

For the past few years, I’ve been on a kick that I call the “pre-mortem”: thinking ahead to what could go wrong and putting systems in place to minimize the damage if they do go wrong. For instance, I got a landline, in case the cell networks go down in a natural disaster such as an earthquake. I’ve taken cell-phone photos of my passport and credit cards, in case they get lost. I taped an emergency-phone-number list to the inside of the kitchen cabinet that is nearest the phone, and I put a combination-lock box in the back of my house to hold a front-door key, in case I lock myself out. I must have struck a chord with this idea, because my TED talk about it went viral.

My wife, Heather, and I have our bedroom upstairs, and there is only one way out in case of a fire—down the stairs and out the front door. If a fire broke out downstairs while we were upstairs, we might be trapped. We’d lived this way for six years, but it seemed risky not to have a backup escape route. I solved this problem as so many Americans do, by going to Amazon for ideas. There, I found an emergency-escape ladder, the foldable, expanding kind. It looked perfect. It could be stuffed into a tidy little bag, and we could keep it in the bedroom closet and pull it out when we needed it. The instructions that came with it suggested—no, insisted—that we try it out first, so that we’d be familiar with its operation before those panic-filled moments of an actual fire. It doesn’t take a brain scientist to figure out that this is sensible advice. So on a clear, warm Friday afternoon, at around quarter to five, I unzipped the storage pouch and got ready to sling the ladder out the bedroom window. I recalled Lenny’s advice about not climbing ladders, but this seemed like a special case. My wife stood by, watching with interest.

Memo to self: Do not attempt things that might end badly late in the day on a Friday. Traffic is heavy. Doctors may no longer be in their offices.

I’ve never had trouble with fixed, stationary ladders. I replace light bulbs, fix lighting fixtures, and clean rain gutters. I clip the high branches of trees. I know ladders. But this ladder was an entirely different beast. Although the rungs were aluminum, they were attached to flat nylon webbing, not to anything solid. This was what allowed it to fold up so compactly. It had two large hooks at the top, for placing over a windowsill or a deck railing. We have a deck, and there was one obvious place for the hooks to go: the wood railing. I anchored the hooks over the railing, and then went downstairs, three stories, to test whether the railing would hold by standing on the second-from-the-bottom rung, just a foot above the ground.

I came back upstairs. I climbed over the railing to put one foot on the ladder, and then the other, while steadying myself with my hands on the railing. I brought my left hand down from the wood railing and onto the ladder’s webbing, and then shifted my right hand from the railing to a small wooden crosspiece attached to the deck. I took another step, lowering my feet, with my right hand still on the deck’s crosspiece. I’d never been on such a rickety contraption. (It was less stable than the rope bridge I built as a cub scout.) Having no rigid frame, it swung wildly left and right, forward and back. I was glad I was practicing now, rather than during an actual fire, and in the daylight, rather than at night.

As I lowered one foot to the next step, the wooden crosspiece broke, sending my body swinging wildly to the left.

“Well, that’s good to know,” I said to my wife.

“Yes,” she said. “We won’t grab onto that next time.” Although severely tilted, I was nonetheless pleased. We were accomplishing the kind of tryout recommended to perfect our emergency-escape plan, during the calm moments of a non-emergency. I dropped the piece of wood and it fell twenty-five feet to the ground. As I held on to the webbing with my left hand, the ladder started swinging.

Every year, thirty-two thousand Americans die from accidental falls. I was not going to be one of them; letting go was not an option. My upper body was now leaning to the right, my right hand flailing, and I could no longer reach the comforting stability of the deck. Even with the sincere intentionality I give to planning ahead, this was not something I had foreseen. I glanced at the frameless aluminum ladder rungs and managed to grab one with my right hand.

Now, unbeknownst to me, the edges of each aluminum rung on the ladder were thin, unfinished, and razor sharp. And, sticking out from the back side of each rung, inexplicably, were two equally sharp aluminum tabs. On the way down such a ladder, one might miss the swinging webbing that holds the rungs and grab onto the sharp edge of a rung itself.

Memo to self: Always inspect a product carefully before using.

With my hands grasping the webbing above my head, I continued to make my way down the rungs, foot after foot, hand after hand. On the fourth rung, I felt a splash of something hot and wet on my face, and as I looked up to see what it was I noticed blood—lots of it—spurting out of a gash on the top of my hand and streaming down the ladder. I realized I must have cut myself on a rung above me, looked, and saw blood along its edge. I studied the wound—it was about the width of an iPhone across the back of my right hand and, gaping open, about a quarter of an inch deep. I was having my own private anatomy lesson, three stories up: I could see muscle, tendons, frayed nerve bundles, veins. This was not a minor cut that would heal itself with time.

“I think you’re going to have to take me to the E.R.,” I called up to Heather.

Memo to self: You should listen to Lenny more often.

At this point, climbing down the ladder seemed easier than hoisting myself back up. “Meet me downstairs, I said. When I got to the bottom, the blood was still spurting out. I put my free hand over the wound and applied gentle pressure. Oddly, it didn’t hurt at all. Yet.

Heather grabbed a packet of frozen fruit from the freezer and a clean washcloth, and we got in the car. I kept applying steady pressure. We did not know where the nearest emergency room was. It was five o’clock on a Friday night. Traffic was heavy with commuters. The nearest E.R. might have taken longer to reach than one farther away.

Memo to self: Figure out ahead of time where the nearest hospital E.R. is to the house, and have a backup choice in the event of traffic.

Every year, there are a hundred and twenty-five million accidental injuries in America that require a visit to a doctor. Just more than forty-two million of those are bad enough to require a visit to an emergency room. I’ve only been to an E.R. once before, in 1987, when I gave myself an asthma attack from laughing so hard at the “Fawlty Towers” episode “The Germans.” (I required epinephrine and oxygen, and the doctor warned me to stay away from anything “Cleese-related” for thirty days.)

As we drove, I remembered that there was an urgent-care clinic just a mile from our house, and we headed there. The adrenaline in my system must have decided to ratchet up a notch, because I was suddenly overcome by a wave of nausea. At one point, I almost asked Heather to pull the car over. At the same time, I felt like I could run a three-minute mile or fight a gorilla. Heather was now in shock, too. One of the nice things about our marriage is that our emotions are usually synchronized. The adrenaline had turned her pale, her hands trembling on the steering wheel. “My God,” she said in a shaky voice. “Oh. My. God.”

We arrived at the John Muir Health Urgent Care Center, in Orinda, and hurried in. With blood all over my face and clothes, and holding the icy fruit pack against my still bleeding hand, I approached the intake counter.

“I’ve got a bad laceration on my hand.”

“That’s trauma,” the intake nurse said. “This is illness. You need to go to the counter next to this one.”

I stepped two feet sideways.

“I lacerated my hand,” I told the nurse at this counter.

“I need to see it,” she said, “Put it here on the counter, please, and show it to me.”

I removed the frozen-fruit pack, and blood starting spurting out onto her countertop.

The nurse shrieked. “We can’t have that here! You can’t put blood on the intake counter!”

I felt like reminding her that she was the one who asked to see the wound, and “on the counter” no less, but I’ve learned the hard way that people who are freaking out do not like to be criticized.

I covered the wound back up. The nurse then led me into the examination room to see the doctor.

“What seems to be the trouble?” he asked.

I uncovered the hand. I have never before met a doctor who was afraid of blood, let alone one in an urgent-care clinic. But, despite all the blood that covered my face, arms, and clothing, he seemed somewhat unprepared for what he saw.

Jerking back, he said, “We can’t help you here. You’ll have to go to an emergency room.”

By now the washcloth I was using as gauze was soaked through. The doctor grabbed a padded two-foot-square exam cloth from the chair next to me that looked like the previous patient had sat on it, and he said, “Let me wrap it with this.”

“That doesn’t look like it’s sterile,” I said.

“Oh. You want something sterile?”

“Yes,” I said. “I would prefer that.”

He took a gauze bandage from the shelf and unwrapped it.

“Where is the nearest E.R.?” I asked.

“Where do you live?” he asked.

“It doesn’t matter where I live,” I said. “Where is the nearest E.R. to here?”

“Probably Walnut Creek,” he said.

As soon as he said it, Heather brought it up on Google Maps. “Thirty-five minutes,” she declared. “Heavy commute traffic and an accident on Highway 24.”

“Can you recommend another?” I asked.

“Maybe Highland, in Oakland,” he said. Heather GoogleMapped it. Twelve minutes. But Highland is a large, urban hospital, and was likely to be crowded on a Friday evening.

For the first time, a frightening thought occurred to me—I am a musician, and the damage to my hand might mean that I would never play the guitar or piano again. I needed to think carefully about who was going to do the work to repair my injury, to insure that I would recover the full use of my thumb and fingers. I’m fortunate to live in an area with many fine hospitals; I just wanted to be sure I got to one in time.

“I’m going to phone my doctor and ask him for advice,” I said to Heather.

My doctor answered right away. He and I have a good relationship, built up over years and based on mutual trust and respect. I have his cell number because he knows I won’t abuse it by calling him every time I stub my toe or get a sore throat. He knows how much I like my hands.

I described my injury to him and explained, “I’m at an urgent-care clinic in Orinda, but they’re not equipped to repair it.”

“Are you feeling numbness in your fingers or thumb?”

I checked. “No, but the back of my hand at the base of the thumb is numb. And oddly it doesn’t hurt.”

“You’re probably in shock. Can you move your fingers and thumb in their full range?” my doctor asked.

I told him that I could curl my thumb toward my palm but couldn’t straighten it out again, and that I could move it away from my fingers but not toward them.

“I think you’re going to need a hand surgeon or plastic surgeon,” my doctor told me. He said that we could track down a good one first thing on Monday morning. “For now, go to Alta Bates, in Berkeley, and just get them to sew it up.”

We got to Alta Bates in twelve minutes, and even though there were already about ten people sitting in the E.R. I was seen very quickly.

Memo to self: If you want to be seen right away in an emergency room, it helps to be actively bleeding.

The E.R. doctor gave me eight separate shots of lidocaine. A technician cleansed the wound thoroughly with a liter of saline solution. The doctor ordered a suture kit. “How did this happen?” he asked.

“I didn’t listen to my friend Lenny. I climbed a ladder with dangerously sharp edges.”

We talked about the loss of movement that I’d noticed, and he observed it, too. I told him I planned to see a hand surgeon on Monday. He sewed me up with thirteen stitches while I averted my eyes. Then he carefully fitted a cast, to immobilize my thumb. The trick was to keep my thumb extended at a right angle from the hand, so that the tendons wouldn’t retract before the surgery. Just as I was leaving, he added, “The hand surgeon is probably going to want to open that up again to have a look at it.”

I spent Saturday and Sunday berating myself and trying to imagine a life without playing the guitar, bass, piano, or drums. I hated the thought of losing that. I hated even more that it was the result of my own stupidity for trusting the product without inspecting it. At least I can still sing, I thought. I was comforted by the words of my friend Victor Wooten, who says, “I don’t play the bass, I play music.”

I sat down at my desk to work, figuring I could still type—the four fingers of my right hand were perfectly fine, and peeked out from the top of the cast. I moved the mouse over to the left-hand side of the keyboard. But my heavily bandaged thumb kept hitting the space bar unintentionally, forcing me to type one-handed. That slowed me down substantially. I was used to typing as fast as I could think. Now I worried that my thoughts might disappear before I committed them to the page.

As I was telling myself, my wife, and my dog how stupid I was, and that I wouldn’t blame either of them for leaving me, my doctor called me on my cell. I told him flat out—I’m not in any physical pain, but I’m feeling depressed. He told me about a study of the aftermath of gunshot wounds, which compared the experiences of 7-Eleven clerks injured during robberies to those of soldiers injured in the Iraq War. The way people were injured influenced their neuropsychological state, my doctor explained, which in turn affected the way they recovered. Soldiers who were shot saw their injuries as heroic. Store clerks who were shot had no such positive framing—they saw themselves as victims. They suffered from depression and were far more likely to become addicted to opioids. My doctor advised me to frame my own injury carefully, to avoid the temptation to steep in regret, self-loathing, and concerns about loss of function. “Stay in a positive mood,” he said. “It will make all the difference in your recovery.”

He gave me the name of a highly regarded hand surgeon in San Francisco. I e-mailed the surgeon on Saturday afternoon and heard back within an hour; he would see me on Monday. When we met, I told him about the injury. “I make my living typing and playing guitar,” I began. “The most important thing to me is to restore the full function of my hand.” He examined my hand, putting my fingers and thumb through a range of movements, pressing against them to assess strength, tapping on them. He explained that the ladder had cut through the two extensor tendons controlling the thumb, the radialis longus and the radialis brevis, running along the back side of the hand. The movement I retained in my thumb was from the flexor tendons on the palm side. He also noted the patch of numbness near the base of the thumb, about the size of a silver dollar—that indicated severed nerves. “This will be very straightforward,” he said. “I’ll go in and repair the tendons and the nerves. If the nerves are too short, we can put in nerve grafts.”

I had read about nerve grafts. It was cutting-edge medical science, requiring very delicate and precise microsurgery, but this doctor had been doing the procedure for years. I was delighted to discover that he, too, was a musician, and so understood how important my hand was to me. We scheduled my surgery for the next day. It would be done on an outpatient basis, which meant that I could take public transportation there and my wife could drive me home.

The anesthesiologist met with me before the procedure and gave me a choice. He said that he could give me a nerve blocker in the tissue surrounding the nerve feeding my right arm, so that I would feel nothing but would stay awake during the surgery, or he could knock me out with the general-anesthetic propofol.

I asked if there was some reason to prefer one to the other. He explained that many people don’t like coming out of the surgery with no feeling in their arm—it disturbs them—and that administering the nerve blocker usually leaves a bruise at the injection site. The problem with propofol is that the dose that would be required to knock me out completely would raise the risk of systemic harm, as with any general anesthetic. (Propofol is the drug that killed Michael Jackson.) The doctor’s preference was to use the nerve blocker with a light dusting of propofol, what they call conscious sedation—not enough to lose consciousness, but enough to spare me any pain. I agreed to this approach—I’d had the same sedation during a recent colonoscopy.

My surgeon came in, and we talked about what he was going to do. It’s always a good idea to review with the surgical team what the plan is right before the operation. Occasionally, with busy schedules and lots of patients, the procedure intended for one patient gets performed on another. Jean-Philippe Gouin and Janice Kiecolt-Glaser, two researchers at Ohio State, published a study showing that greater fear or distress prior to surgery has been associated with poorer outcomes, including longer hospital stays, more postoperative complications, and higher rates of rehospitalization. The pre-op conversations are meant to provide some much needed calm. The anesthesiologist started the propofol drip, and the next thing I knew the surgery was over and I was in the recovery room.

One side effect of propofol is that patients often experience a state of euphoria for twelve to twenty-four hours after going under. The day after my surgery, I woke up feeling terrific. I didn’t feel crazy or manic or like I could rule the world, I just felt really good in my life and like everything was the way it was supposed to be. That lasted all day. There is an emerging body of evidence showing how mood can affect recovery time from soft-tissue injury. What we call “being in a good mood” has a neurochemical underpinning: increased serotonin production, decreased cortisol production, and a host of other hormonal changes that increase the production of critical T-cells and other cellular-repair mechanisms. Both oxytocin and vasopressin, two hypothalamic peptides, attenuate the stress response, and they have also been associated with faster and better-quality wound healing. How can you increase oxytocin and vasopressin? The surefire way is through positive social interactions, such as the gurney-side chat I had with my doctors, and the support and loving care from my wife.

As I write this, it’s been six days since the surgery. The surgeon texted me and said he thinks I’ll make a full recovery. My thumb will be immobilized for six weeks, and after that I will have ten weeks or so of physical therapy. I have no pain at all and have more or less gotten back to my regular routine, albeit one-handed. I’ve begun to appreciate that we live in a two-handed world. On the sartorial side, buttoning the top button of my pants is almost impossible, and I’ve given up trying to button those tiny little collar buttons on my professorial shirts—I walk around now with my shirt collars flapping in the wind. Even the relatively warm Northern California winters require a good jacket, but doing the zipper with one hand has defeated me. And then there is the kitchen door, which I had weather-stripped just six months ago, to keep out the cold, and which now requires two hands to close and latch. To the list of things I cannot do for a while I add opening bottles, squeezing toothpaste onto the brush, and using my injured hand to wash the opposite armpit. Canned goods are useless to me. (There goes my earthquake-preparedness food supply, at least for the next twelve weeks.) I’ve discovered pre-loaded dental floss, mounted on a plastic holder. I have figured out how to open jars by holding them between my knees and loosening the lid with my uninjured hand. And I discovered Macintosh dictation software, which is not all that bad.

The age that we are, chronologically, is rarely the age that we feel. My sixteen-year-old self felt like an adult and resented not having all the privileges of one. (In retrospect, he was delusional.) My sixty-year-old self doesn’t feel all that different from my forty-year old self. As my mother has passed through certain age milestones—sixty-five, seventy, seventy-five, eighty—she’s described the experience as surreal; the numbers don’t at all reflect how she feels inside.

Yet sixty is not thirty. Your body and mind are not as resilient or sharp. The quickness with which things can go awry is shocking. A half second of lowering your vigilance can have dramatic negative consequences. It’s prudent to take that into account, to modify your activities. I make it a point to wear a hat and scarf in the cold. I walk more deliberately on ice. I don’t rely on the side mirrors in my car but turn around to look over my shoulder before changing lanes.

The problem with going up and down ladders—and, for that matter, stairs—is that we’ve done it so many times in our lives by the time we are sixty that we take for granted that we know what we are doing. Part of aging is fighting the complacency that comes with routine. And that’s a more global concept than just monitoring physical movements that might potentially be hazardous—like cutting through a bagel with a knife or reaching into a garbage can that has a broken bottle in it. The walk light might be green, but that doesn’t mean you should cross the street without looking. This applies across our entire lives—to our interpersonal relationships, our relationship with ourselves, and our ability to remain open to new ideas. Complacency is not just something that numbs us to quotidian dangers. Complacency, especially as we age, too easily becomes the enemy of growth, of intimacy, of creativity, of a happy life.

I learned the hard way that you can’t control what happens to you, but you can control your reactions to it. It’s hard to be happy and to enjoy what life has to offer if you are constantly angry about people and things that have wronged you. It’s hard to be open to new, positive experiences when you are fixated on the negative ones. The neurologist Viktor Frankl wrote that everything can be taken from a person but one thing, the last of the human freedoms: to choose one’s attitude in any given set of circumstances.

My guitars, strewn around the house, look lonely. My favorite guitar is on the sofa, where I left it before the accident. Another is on a stand in my writing room, and one sits propped up against the wall in my home studio. I have gathered them near the stereo speakers and begun playing music to them to keep their beautiful wood open and vibrating with musical sound, so that in sixteen weeks they will be ready for my wiser self. As Evan Rachel Wood’s character said in “Westworld,” I choose to see the beauty in the world.