Since its acceptable to ask a candidate for code, is it acceptable to ask your interviewer for code? I suspect some companies would refuse to show potential hires their code due to legal worries, but I am wondering if one or two files is really a big deal? Has any one seen company code during an interview?
One or two files could be cherry picked, although even then they might tell you enough...; I'd prefer something like "Could I please glance at your code base?" ... but only after I got enough experience to recognize tells at roughly a glance.<p>Even then I'm not sure it would have saved me from the worse code base I ever worked with, the only one I flat out decided had to be replaced (after spending a month fixing some bugs and learning it took days to determine how to safely fix one, the code was so tangled).<p>In reference to the NDA comments, if a company is too paranoid about that sort of thing without clearly having "special sauce" worth protecting---unfortunately, future products or product directions can also both be worth protecting and necessary to disclose to you---that's a strong sign to avoid them.
I know I've had at least a couple clients (recruiter) show some actual production code during the interview process, and there have been stories here on HN about companies giving candidates real (not scenarios) issues to address during an interview process.<p>Asking to see their code is obviously a bit different than being offered to use it in some interview coding demonstration.
I once interviewed with a game company, and 5 minutes before the interview they sprung an NDA on me and severely rushed me through signing it. I had time to notice that it said they had rights to any work I might do in the future that was "based on" anything they showed me in the interview. Since I do a lot of private development of my own game technology, I then had to specifically get them to assure me they would not show me anything proprietary in the interview.