Quite honestly, I find the whole attitude towards psychology to be very retrograde in Star Trek.
My basic problem is this: In the Trekverse, they can fix almost anything that is wrong with the body by just flashing a light over it for a little bit. Psychological disorders are ultimately rooted in the brain (if you hold to materialism). The same technology which can be used to instantly cure broken bones and the like should also be very good at curing depression, anxiety, and various traumas quickly. Yet we don't even see people taking routine medications for mental ailments.
Devil's advocate/justification: knowledge does not necessarily advance at the same rate in every field.
Maybe they could indeed cure the brain anomaly that caused the mental illness, but don't know how to map X illness to Y clusters(s) of neurons.
There's a quote about this (author uncertain): if the human brain were so simple that we could understand it, we would be so simple that we couldn't". Bit of a depressing notion, the idea that we might never fully understand the inner workings of the brain, but a definite possibility.
Plus, as a mentally ill person, I'm not sure I'd want that operation. As much as my mental illness caused (and still causes) me a host of problems, I'm not sure I'd trust that curing it wouldn't just alter who I fundamentally am.
No matter what profession you are in, chances are if you see it depicted in TV and movies they will get lots of stuff completely wrong. General audiences won't know the difference, but it can be rather annoying to those who are in the know.
Yes, obviously, but some are less poorly portrayed than others. With CS, it's like having cop movies where the cops are armed with salt shakers. Or mechanics that are so good at fixing cars they can drive sitting on the roof!
In the worst cases, it's not even a question of profession, sometimes it's just a question of
having used a computer. Anyone who has used a computer (or even a typewriter) should know that two people on a keyboard makes no sense... the NCIS writers apparently don't. I wonder on what they type their scripts. Maybe they're all manuscript (even then: imagine 2 people writing side-by-side on the same page).