I have my own code for spearfishing. I wish I had someone who I respected to guide me when I started but since I didn't I pretty much came up with it myself over time. When I see a beginner show honest interest asking if this or that fish should be taken it makes me feel good. When I see a beginner kill fish in ignorance it makes me feel bad but I reason that it's a learning phase that everyone must go through. The ones that really bug me are the ones that show no interest and no ethics.
Ethics are not absolute, what I mean is that something ethical in one situation can be unethical in another. For example in another place and time I decided not to take sea turtles with a speargun after having done so twice. It just didn't seem right to me even though the turtle was for consumption. Had I been in serious need of food however as many spearfishers in that place were it would be justifiable. Under normal circumstances the following are some things I do my best to abide by:
Not kill fish that are not for consumption. If I kill a fish then I make an honest effort to eat it. If not suitable for consumption I do not kill this fish again. Don't get me wrong, I have been tempted. I know the feeling when a huge tarpon swims by and the trigger finger is having spasms. But then I've never taken one so I don't know if the stories about its inedibility are true. If it really turns out to be inedible then I will not kill it just for the rush.
Not kill fish which I determined from experience to be low yield.
I'm proud to say that from the time I started spearfishing I have applied the above two rules without fail.
It is hard to know which shot is sure to land a fish but I refrain from taking some. Like shots that I know will injure a fish with very little possibility of landing it but a good possibility that the fish will die from the injuries later.
Dispatch fish properly as fast as possible after capture.
Utilize as much of the fish as possible. I scrape off the flesh that remains stuck to the backbone with a spoon. I also try to get the flesh on the top of the head, cheeks, and in front of the pectoral fins when possible. This actually yields a lot of flesh which can be used as "croqueta" or at the least feed to my dog.