I've seen a few posts suggesting asking for code is bad form.
I'm inclined to agree but I'm not completely sure. I think many of us don't always post code because it's not nice and tidy. I know I haven't posted code for this reason. There are plenty of times it wouldn't bother me if I were to be asked for code I hadn't posted.
In general, if someone asks me for code, I post it.