First point: by the simple act of writing the code, you've already copyrighted it -- at least assuming the Berne Convention applies where you live, which it does (at least in theory) throughout most of the world.
Second, I think the question of placing license requirements is best answered with a question back to you: if you placed requirements (e.g., attribution) and found them being violated, what, if anything would you be do to enforce those requirements?
- Do nothing but be pissed off, and have a crappy day because some people are such jerks?
- Write them an email if an address happened to be handy, but otherwise, 1).
- Really work to find an email...
- If they ignore your email, send a paper letter?
- If they ignore your letter, send another by certified mail?
- If they ignore that, pay a lawyer to send a letter?
- If they ignore the letter from your lawyer, actually go to court?
At least IMO, there are really only two choices that make real sense. If it's sufficiently valuable to you that you'd actually and honestly put in all the time, money and effort to go to court over a copyright [Edit: or license] violation, then you should register your copyright (e.g., if you're in the US, at the Electronic Copyright office), and go from there [edit: i.e., imposing and enforcing whatever license restrictions you see fit.]
If you're not willing to defend your licensing requirements in court, then you might as well not put them there in the first place. Ask nicely for attribution, and chances are that most people will give it (in fact, quite a few will whether you ask for it or not). If you run into the inevitable jerk who ignores what you've asked for, don't let it ruin your day though.