How could Wesley Crusher have been treated in Star Trek: The Next Generation, to make him identifiable and even awesome? He was apparently a blatant self-insert of Gene Roddenberry, and annoying, and because he was so disliked, when an episode focused on him, he was show-warping rather than show-enhancing. I think it would have been possible to make him identifiable rather than alienating, and with only a few tweaks to premise and casting. (Note: this is the perspective of someone who's not seen the whole show, and therefore I am pretty much guaranteed to be missing parts of Wesley's canon portrayal that might screw with what I'm proposing.) But he was basically shoved into the show without proper grounding for his existence, just a flimsy backstory, and viewers were expected to identify with him and accept him just because he was OMG TEENAGE. That ... doesn't really work.
Idea 1: Don't make him the exception.
It's a huge ship, and full of people with families, yet we rarely see children anywhere. There have got to be some other teens on board. Yes, at that age they should still be learning, and generally small children are not welcome in the workplace. However, the classroom is not the only place to train a youth. Apprenticeship, hands-on learning, is a time-honored technique. Bring in a few extras of youthful appearance (not necessarily actual teenagers), dress them in appropriate uniforms, and scatter them about in the background, working with experienced crew members. Students who are old enough and who are learning about fields of study that have applications on the ship spend, say, half the schoolday in the classroom, and half the schoolday pulling a partial shift alongside crew, as midshipmen.
In case of danger, all midshipmen are sent back to the civilian (and theoretically more protected) areas of the ship. Yellow alert means to pack up your stuff and withdraw in good order. Red alert means to run like hell and not get in the way of any senior crew also running like hell in the opposite direction. (This could lead to exciting opportunities for drama: a midshipman trapped on a dangerous deck; does the captain piss off the aliens and risk another shot and risk not only the lives of adult crew members but a midshipman, or does the captain cave and lose face? Or stall for time?)
Wesley might then be the only teenager to be promoted to ensign; the only teenager to be on the bridge at all; the only teenager who the show focuses on who occasionally can't leg it back to quarters when the alarm sounds. But he'd not be the only one at all.
Idea 2: Even on a ship that *has* teens, Wesley really doesn't have any friends his own age.
Wesley's intelligence, his relationship to ranking officers on the ship, and his special position as ensign isolate him from the other teenagers. Show some extras his age in a lounge dancing in civvies; show Wesley sitting alone with a PADD. In uniform.
Wesley is walking down the hall. A group of midshipmen are walking the other direction. After Wesley has passed, but before they are quite out of earshot, they erupt in whispers.
Wesley comes into the mess and sits down at a long table a few seats away from a group of midshipmen at the same table. They finish up their meal quickly and go.
Idea 3: Give him some non-adult friends, or at least people he has a positive relationship with.
Yes, he's a genius and socially isolated, without friends his own age. Put him to work tutoring a seven-year-old genius; show someone rightfully looking up to him as a mentor and friend. Show "And you think you can get those problems done by next week?" "I think so, Wesley." "Good. Comm me if you have any questions." Show "Sorry I'm late, Mom, I was tutoring Keisha and we lost track of time." There are a few midshipmen he works with, and they interact with perfect professionalism.
With a those few tweaks, Wesley could have been transformed from being the Only Special Snowflake in a desert, to being the Only Special Snowflake in a blizzard. He's still a Special Snowflake, but now there's more support for his existence in his own society. He becomes identifiable: not just sole teenager in a world full of adults, but teenager isolated from his peers because of his intelligence and difficulty with/disinclination for social interaction, having more meaningful interactions with adults than people his own age, yet isolated from them too due to age and social difficulties. With identification, Wesley becomes awesome and not dreaded, and the audience can buy in: this is me, this is my friend who's too smart for his own good, and there I am/he is, and OKAY THIS IS KIND OF AWESOME.
If Wesley hadn't caught on with the audience even with the changes, with a framework that inserted a pool of teenage extras into the background, another teen or two could have been brought forth as a guest star and tested for recurring character potential.