Please only do this if you're fresh out of college (or otherwise new to interviewing for tech jobs). Interviewing candidates is hard enough on companies without spending time on people who don't even want the job.
If a candidate is in the interview, there must be a modicum of interest, and is a great chance for the employer to sell it's position. And of course, as an interviewee, it is mutually beneficial to avoid wasting both parties time by expressing disinterest as soon as possible.