An electrician ripped my bathroom exhaust wiring, I owe him a six pack
Had a buddy who does residential wiring come by to look at a flickering light in the bathroom. He saw how I had the exhaust fan wired to the same switch as the light. He just shook his head and said "you're not doing that, are you?" Turns out I had it sharing the neutral with the light circuit. He spent 20 minutes explaining how that can backfeed and leave power on the fan even when the switch is off. I fixed it the next weekend, separated the neutrals, put the fan on its own timer switch. Cost me about $18 in parts and an afternoon. Anyone else get corrected on basic code stuff they thought they had right?
Did your buddy happen to mention if you had the neutrals tied together upstream too? I made that same mistake on a hallway light and fan setup, and it took me way too long to figure out why the fan would hum even after I flipped the switch. What finally helped me was drawing out the whole circuit on paper before I touched anything, just to see where every wire was actually going. After that I bought a cheap voltage tester and checked everything twice before I even opened the junction box.