Fog Creek Software
Discussion Board




Reflection on/in Interview...

I just had a phone interview, and the “exam” portion of the interview revolved around .NET and reflection. Now, this is the third interview where reflection was asked.

Is reflection hard to understand?  Why does this seem to be the litmus test de ‘jour for .NET candidates?

What kind of answers are they expecting?

--
ee

eclectic_echidna
Thursday, June 10, 2004

Reflection isn't that hard to understand, in theory, but I believe it is one of those things where it may be hard to see the usefulness unless you've had experience actually using it.  So by asking about it they are trying to gauge whether or not you've really used .NET or another platform that uses reflection or if you're a hardcore C++ programmer that is just winging the .NET stuff.

Sort of the way pointers are used as a high-level filter when testing for C/C++ programmers, I guess.

Mr. Fancypants
Thursday, June 10, 2004

It's one of those "how hardcore is he" things.  The assumption being that if you haven't used reflection, you're less-than someone who has.

Should be working
Thursday, June 10, 2004

Reflection became the big wank with Java when it was added to that language in about 1998.

Every little wanna-be would write and talk about reflection to boast about their "expertise." How lovely that the same opportunity is provided to them in Net.

isv
Thursday, June 10, 2004

Reflection isn't "hard" persay, but it does require a good working knowledge of the platform and OO.  Personally, I think it's better for weeding out the VB transplants who didn't really *learn* .NET and proper OO, but are just winging it on their VB6 skills.  No offense to anyone :)

Also, if you can use reflection properly, it shows you know how to abstract your thought patterns.  Ie, rather than writing a thousand lines of if-then code to handle every possible circumstance, you could use the factory pattern w/ reflection, interfaces, and config files to create a generic plugin architecture.  Stuff like that.

Of course, interviewers probably shouldn't rely on one set of tools to determine if you know a whole platform or not, as reflection obviously has its good uses and bad uses and is by no means any kind of .NET silver bullet.

Joe
Thursday, June 10, 2004

ISV is right. Reflection/Introspection was touted as a Big Deal (TM) when Java was released in 1996. It's useful but in 7 years of Java development I can't say I've had to use it day-in-day out. I'm surprised that in a interview for a .Net they'd be rabid about questioning your knowledge of the topic.

Still, as someone else pointed out, if you're a VB6 weenie it might take a while to 'grock' the usefulness of reflection.

If they really want to catch clueless .Net fraudsters who hype up their experience, then a few questions about threading should do the trick.  ;-)

TheGeezer
Thursday, June 10, 2004

"It's useful but in 7 years of Java development I can't say I've had to use it day-in-day out."

This varies from company to company, and from architecture to architecture.  Some codebases are very highly data-driven and depend heavily on reflection support, while other codebases may not have the need and/or the programmers just decided to approach the problem in a different way, for one reason or another.

Personally I'm an enormous fan of reflection, and it's at the foundation of our project's codebase (which is C++ mind you, so this isn't a .NET or Java-specific thing), so if I were interviewing someone I'd want to make sure they understood what reflection was, or at the very least they they would "get it" if it was briefly explained to them, since it's important to us.

The interviewer may have been asking reflection-related questions just for the sake of grilling you, or on the other hand they may be asking because they actually do depend on it in their architecture and they'd expect you to know it.  It's difficult for us on the outside to know your exact situation.

BadgerBadgerBadger
Thursday, June 10, 2004

What is reflection? I gotta ask. Is it a buzz word for something you could just write if you needed it but that the language does automatically for you? I know there are some concepts that do take some people some time to grasp, myself included. I know I had a java guy here who used to ask me ... "can php do this ... or that " and the word he used was foreign so I'd ask him to explain and usually I'd find another name for what he was talking about or I'd see how I could write my PHP to do what he was talking about. So please ... what's reflection .. heck ... I'll look it up .... well I was reading about it here http://today.java.net/today/2004/05/05/HardcoreJava.pdf and although it's for java I bet the concept is the same. Sounds an awful lot like just a common sense config/engine approach I use. I'll read more to see what I missed. It almost seems like an object returning its methods and its class variables which works in PHP but I only use that to verify a method exists before I call it ... I certainly don't just hope a method exists to do something.

meagain
Thursday, June 10, 2004

"Sort of the way pointers are used as a high-level filter when testing for C/C++ programmers, I guess. "

Oh. My. God.

You know, this really does explain the TERRIBLE state of C++ projects out there.

"Yep, you can do pointer arithmetic; you're a decent C++ developer... here, go design this 3000 class system...."

Arg. I hate this industry.

Katie Lucas
Friday, June 11, 2004

Katie, I think that comment was referring to the pointer question as a "trivial reject", not a "trivial accept".  There are obviously plenty more questions that people would have to answer before designing a complex system.

BadgerBadgerBadger
Friday, June 11, 2004

Like what the ';' is for?

Simon Lucy
Friday, June 11, 2004

Agree with Badger.  Understanding pointers is a necessary, but not sufficient, condition to be able to do a good C/C++ design.

NoName
Friday, June 11, 2004

*  Recent Topics

*  Fog Creek Home