Whenever a character is an expert on something the author isn't, there is only one way out: research.
However, some expertises are easier to research than others. For example, one can much more easily research specific medical areas to 'fake' a doctor character than a hacker. I know, because I've been there. Although the question is not about what makes some areas trickier than others, I think looking at it will help direct us to the right path.
1) general vs. arcane knowledge
When a certain expertise is very common, it's easier for an author to have a general idea of what and where to research. Of course there will also be plenty of myths around, but there will also be plenty of texts and videos of actual experts talking about it and busting common myths. On the other hand, some areas of expertise are focused on things the average mortal has barely considered. The general public may have a tendency to imagine the silliest things about them.
2) true vs iffy science
Some areas of expertise are simply 'high brow' and generally deemed more worthy. Those will have a greater abundance of papers circulating, allowing amators and authors to get a more general feel for what it's really like. Then there are all the other so called sciences that are deemed subjective, inaccurate and, for some, barely science at all. Those underdogs may be under-represented in terms of papers.
Some expertise areas are heavy in jargon. To make it worse, that jargon is sometimes connected to hard to understand concepts.
4) fake facts
Some expertise areas seem to breed large amounts of 'fake facts' and myths, a lot of which may have their origin in the artistic licence of films and books. After all, what does the reality of a programmer (hours on end typing code) or a spy (95% of the time waiting and acting like boring normal people) have to do with a cool action story?
So, how to research the most arcane, iffy, jargonic, myth ridden areas of expertise?
The first thing is to try and get a general feel for the area in question. Wikipedia may offer an overview that allows one to understand the core of the matter. The general feel should then be used as the starting point for a more in-depth research.
Secondly, identify why the area is looked down upon. This may help one spot blank statements that are less than true. For example, programming is often equated with 'not a real job', playing on the computer and hours of isolation in front of the screen. This ties in with the general misconceptions lots of people have about programmers (lazy, unhealthy, asocial geeks).
The third step concerns jargon and is trickier. The ideal would be for one to study the topic and learn as much as possible. Naturally, that is not always possible. Still, learning the basics is the minimum one should strive for if the main plot depends on the twists this particular expertise can spring up.
Once the basics are grasped, it may be a good idea to try and get an actual expert willing to work as a consultant. This option becomes a must if the plot relies on the 'science' of the chosen area. One wouldn't want our expert to say that the opposite of a proton is an electron (tip: it isn't) and then somehow use that 'fake fact' as the basis for dismantling an atomic bomb (because, you know, atomic bombs are about atoms and atoms have protons and electrons).
Where it comes to debunking myths and fake facts, you have to go to the source.
One could start by looking for blogs and videos of actual experts as they debunk myths. Or, if those experts simply use the medium to talk about their area, ask them specific questions (make sure you've understood the basics before, you won't help yourself if you ask a salesperson how they sell). Show you've done some research, be humble and always ask if they can point you to amator-friendly sources.
I also suggest heading to reddit or forums (inhabited by the experts one needs) and asking them directly three main questions:
1) what do films, stories, etc get wrong about your area (especially the things that really annoy you)?
2) what do films, stories, etc get right about your area?
3) what part of your job do people have more difficulty understanding?
(some people can't wrap their mind around some tasks that are part of a teacher's daily life which, keeping in mind how common teachers are, is quite strange... now imagine hackers!)