I used to ski in a one to two week block every year, for about 20 years (i.e. 2 weeks on then 50 weeks off). Once I reached a certain level (being able to do parallel turns) I never really forgot how to do them, although the first few runs of a new season would be a bit tentative. Something that continued to improve year on year was my ability to turn at speed on steep slopes. I think this was due to learned (and remembered) confidence as well as muscle memory, in particular knowing that because a turn would work, a sudden increase in speed didn't mean automatic disaster. I also learned to lean out of a turn (i.e. down the mountain, the opposite of a turn on a bike) and this was also a confidence thing that I didn't forget, and which turns safer still. Unfortunately, my increasing confidence was offset by decreasing fitness so I reached a plateau. That said, on my last couple of trips, I didn't fall once. I never took a multi-year break to test the concept properly.
Very similar to my experience with cycling with long breaks.
I’ve also forgotten most of how to speak Spanish, which I learned as a child. It does come back quicker than the first time with a lot of practice, but I can’t speak it on demand without a lot of re-learning.
I also ride mountain bikes and find that if I take extended breaks of months or longer, I forget how to do the more difficult riding, and I have to re-learn/practice until I’m comfortable again.
Same goes for programming. Take a year or two off and see what your remember about algorithms and protocols.
Riding technical trails on a MTB. Without regular practice you lose a lot of pace.
Street or park BMX tricks (tail whips, flairs, flips, grinds etc). These require skill plus confidence. Without regular practice the confidence won't be there to attempt them.
And this is the main problem with algorithmic interviews. This type of programming has little to do with the stuff most of us do on a daily basis. So we forget much of it a year or two after our last interview, and have to go back and spend weeks or months reviewing when preparing to interview again. Seems like a waste of time.
I’ve never taken long breaks from my main instruments, but it sounds like you forgot both aspects of playing. I did play trombone for a few years starting in middle school, but haven’t played in over a decade. I definitely remember the basic slide positions for notes and a few of the common scales, but I wonder how well I would be able to play the trombone now.
1: At least some of this is mouth muscles just being too weak (in another thread an ex rock climber talks about climbing a tree and that's a similar effect), some of it is that when I quit, I was still learning to make it sound good, so I never had unconscious control for a lot of the subtle changes I had to make. The rest is probably just things I forgot.
I'm not sure whether or not this belongs in the same category as riding a bicycle.