A few weeks ago, I finally replaced the ceiling light fixture in my walk-in closet. It had been working badly for a few years. About 10 or 15 years ago, the pull-chain wore out, but I was able to safely disconnect the whole fixture, remove the pull-chain, cut off the last few links which were inside the fixture and reconnect the pull-chain and reinstall the fixture (that last part was the toughest).
Then, about 2 years ago, the pull-chain wasn't working well. Sometimes, it worked fine, other times, it didn't. But strangely, after a few hours or a few days, the pull chain somehow reset itself and began working normally. I disconnected the fixture and examined it closely. It was working fine, but reinstalling it was a PITA because I was doing it without much light and the ceiling attachment area was getting worse. After that, I went out and bought a whole new fixture and kept it nearby.
But a few weeks ago, it stopped working again and never returned to life. This time, with my ladyfriend's help (she shone a light at the darkened area from a lamp I plugged in to an outlet on a different circuit breaker), after disconnecting the fixture again, undoing the needed wires, and reconnecting it to the next fixture, I was able to reconnect everything without it being a big PITA. Now I have a predictably working ceiling light! And I didn't fry myself.
It's not the first time I fixed something electrical in my co-op apartment. About 25 years ago, I was able to change two light switches which had worn out. That's when I had mapped out all the circuit breakers (previous owner never did that).