> basic reading comprehension issues
The student was assigned reading material beyond their level. They will need mentoring, which a good teacher (i.e. senior developer) is well equipped to provide and should be willing[1] to provide. The teacher should also ensure that no other student is in the same situation but is hiding it due to risk of the social stigma.
> trivial matters that could have been looked up in an obvious reference
Student is not aware of resources available to them or does not yet have this habit. Provide them with pointers to resources, or engage them in habit-forming exercises for looking up references[1].
> completely unrelated tangents, asked out of idle curiosity
Idle curiosity is the best attribute (correction: skill) you can ask for in a student (any developer). Stifling it will cause a drop in creative thinking and therefore damage problem solving skills.
An unrelated tangent is unrelated only if the teacher (senior developer) does not possess the skills necessary to relate the question back to the topic at hand. Something made the student think of the so-called tangent. In such occurrences, explore[1] the tangent and how it may possibly relate to the topic at hand, with the help of the student, as a learning opportunity (an opportunity for the teacher, rather than the student, to learn).
> questions asked solely to demonstrate "participation" (nothing wrecks a classroom like a "participation" grade)
If a student participates just to demonstrate participation, this is usually because the class dynamics (work politics) are skewed against the student (damaging their self-esteem), or the rewards for good performance are not distributed evenly -on merit.
When you think a student is participating just for show, assume good faith. That is, assume that the student is genuinely interested and explore the idea together[1] with the student. If it turns out that the student was actually interested, you just prevented a misunderstanding caused by your own burn out. If they were participating just for show, you just helped them hone in on their skills and provided guidance on how to better participate in class (meeting/workplace).
--
[1] If you are not willing to do this, stop teaching (read: either stop hiring non-senior developers or quit). Your role in the university (read: workplace) as an instructor (read: senior developer) is not only to manage and produce research (read: projects and deliverables) but also to develop your students' (read: non-senior developers') skills. Earn your salary.