Is it selfish to not let others copy off my work that I worked so hard on?

You are an honor code violation waiting to happen. I hate to put it so bluntly but you need to to understand this. It’s not just the people “receiving” your help that would be cited for the violation but you would also be significantly culpable in this. My son’s E-school is cracking down on this type thing and it’s forcing students to do very little collaboration on homework. If they have problems or questions, they need to see TA’s or profs to be on the safe side, especially in the coding assignments. Like others, I’m squarely in the just say no camp