Typically the comment should be on the TOP of the row following the same indentation as the work. For example, comments above the body of the functions, and one liner comments just above the start of a critical algorithm.

The reason is, when someone starts reading it, it becomes obvious question that why something is done in such a way; where as the person doesn't know till what point one needs to scroll for the answer. If it is on top, it is right there to see. 

Comment before or after the relevant code
I'm wanting to do a follow up to this Q&amp;A in the cooking stack regarding browning avocados. I specifically want to expand my experiment to to include the options in Wayfaring Stranger's Answer. Unfortunately, I managed to get the wrong stuff, and shipping rules make exchanging it problematic.

I am the proud owner of $500~\mathrm{g}$ of sodium bisulfate ($\ce{NaHSO4}$), instead of sodium bisulfite ($\ce{NaHSO3}$).

Dammit Jim! I'm a cook not a chemist!

What I have learned is that that both compounds are used as food additives towards the same end, and that my stuff has a slightly higher LD50. That's it.

Can anyone advise as to substituting my compound for the other? I'm not interested in tasty guacamole at this point, I'm really only looking at browning. If I'm trying to more or less duplicate the more successful experiments of the University of Florida, should I start with the same ratios? Or more or less of the additive? I can get sodium metabisulfite (also an anti-oxidant food additive) locally, if that would be a better option.

EDIT: So far, answers have all been consistent in that I have a half-kilo of white powder that is useless to me. I will make a trip to the wine-making shop and acquire some sodium metabisulfite. That still leaves me with the question of how much? The University of Florida got the results I'd like to duplicate with $30~\mathrm{mg}$ of sodium bisulfite per $100~\mathrm{g}$ of avocado. Should I start with the same ratio of sodium metabisulfite?
