You can use creative commons share alike attribution license or if you working on some utility/library, you can go with lgpl or bsd license too. All these licenses allow people to modify the code while giving credit to original creator. I personally like to release my code under GPL so that any modifications to the code have to be published again.
V
Vivek Khurana
@Vivek Khurana