He's a computer science guy so he was basically banned from his major.
The judge didn't seem to be unbiased because he remarked that having sex with strangers was "totally inappropriate behaviour" which is 1) not particularly true, has been a thing for millenias and 2) irrelevant. It's not against the law and the judge sounds like he actually based his ruling upon the fact the guy went fishing for sex on the net. To me, it looks like yet another old man judge with an ax to grind who decided to take the law into his own hands and hand down a sentence not for the crime the guy was charged with, but for a circumstance he personally doesn't approve of.
But if you really don't want this to happen, there is only one thing to do : always ask for ID. I don't know American law but in Canada, after Osborne, the defendant must have taken all reasonable steps to ascertain a girl's age if he wants his defense of honest but mistaken belief to consent to pass, or there must be circumstances which oblong the need for these steps (presence on an adult site would be one IMO) (
http://canlii.ca/t/fsxrt). But these circumstances are always up to interpretation by the court, and we saw what that results in. That means that ideally you have to ask for ID. It is the single most reasonable step you can take. You might as well go full corner store mode and ask for driver's license or passport only. Thankfully, it doesn't matter in Canada if it's fake or not, but I heard that in some US states you can ask for ID and
still get jailed if it turns out it's fake.
Do you think about asking for ID before you fuck a girl? No, but you should, especially if you're close in age to jailbait, since you're more likely to meet them. It is one of many traps that await the uninitiated. They should replace sex ed classes by "sex law" classes, aka how to not have your life ruined by an impersonal system that rarely gives a shit. There are so many little things to keep in mind when you have sex, so many little things that seem so dumb but can make the situation do a 180 that I'm willing to bet most of us have, at one point or another, technically committed sexual assault. We're not in jail simply because our partners didn't know we raped them.
I once heard about a case where a couple had a fight, but after making up, the girl asked for a back massage. This is the way sex always started between them, so he went ahead and grabbed a boob, thinking she was trying to initiate make up sex. Turns out she wasn't, she called the cops and guy's in jail and in the sex offender's registry to boot. Ever grabbed a girl's tit (or a guy's cock) because you thought that's where it was going, but turns out it wasn't and the girl was mature enough to just tell you "no", upon which you dropped the boob like a hot potato? Doesn't matter, you fucking sex offender. You belong in jail.
You have only the rape hysterics to blame for this shit. Truth is that sexual relations are now so heavily monitored by the courts that to be really, really safe, you have to carry a stack of contracts around to get consent in writing. Pretty soon it'll be rape as soon as the complainant "feels" violated without any
mens rea to the crime whatsoever. Some are already pushing for this. Intent? Who cares about this dumb shit! All men are rapists and have intent to rape from the get go! Teach men not to rape!
Your word alone doesn't cut it anymore and probably neither will paper, but at least nobody can accuse you of not trying.
Expect to see this overturned in appeal.