I was aware of what could happen. The first time it was my fault, the second time, my friend I were charged for a bag that my friend threw away when we were walking in the park near my house. He decided that he didn't want to outright admit it was his, so we were both charged. Needless to say, he's not my friend anymore.
I wish they would let me put this behind me. My lawyer was telling me that it is possible to have the offenses removed or closed off if they are preventing you from obtaining gainful employment, and it's doing a lot more than that.
How much did you have? If it was a minute amount, it's usually like a ticket more than any kind of major crime. If it was enough to distribute, it clearly shows a lack of regard for the law- not trying to be a nobk (the k is silent) but that would concern me if I was hiring, too. As far as the last incident with your former friend, if they couldn't prove you were involved with the possession of that bag, your lawyer should have been able to get you off. They have the burden of proof but with a prior possession rap, you definitely should have avoided it- sorry for the morals speech, but...
I guess the effect will have to do with the kind of jobs you're going after. Some don't mind minor offenses but will draw the line at violent crime. Also, don't let it go two weeks before they learn about it. Tell them up front, explain the situation and if you haven't given it up, do it now. The will put some distance between you and the drug.
Any employer will wonder what other laws and rules will be broken by someone who was arrested for possession of a substance that has been illegal since the '30s. I would consider talking to a job councilor about this. Look online for human resources forums where you might ask for opinions from people in that field.
Good luck.