The easiest way to get these is either to be in control of them yourself or for your manager to have an engineering pedigree (i.e. be a more senior developer) rather than just a manager by career.
Maybe I shouldn't be generalizing, since my sample set is very small, but the female managers I've had were great, especially the more technically-inclined ones.