Interview - Programming Test

What's your opinion?

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

37 Replies - 8726 Views - Last Post: 09 July 2010 - 06:56 AM

#1 Antiokus  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 192
  • Joined: 06-September 06

Interview - Programming Test

Post icon  Posted 06 July 2010 - 09:41 AM

Last week I went in for a follow up interview for a .NET developer position. All was good for Q&A and even through the programming test I felt pretty confident.

Now that I've had a couple days to think about it I decided to do some research into the subject for the test - string reversal and comparison. Usually I would using the native libraries in .NET to do this (ie - the newly discovered Array.Reverse()) but I chose to write out the actual comparison loop.

The basis was a foreach loop that used a counter as an offset to compare STR1 to STR2 (which was supposed to be an exact reversal of STR1). If they weren't the same, print False else print True. Pretty straight-forward.

At the time I was pretty proud of my idea since it had little overhead and showed off my use of loops and comparison logic. But now I'm questioning which way is 'better' - Use the built in libraries to reverse a string or manually move through the string and compare it.

Any experiences in this kind of situation?

Is This A Good Question/Topic? 0
  • +

Replies To: Interview - Programming Test

#2 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1639
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Interview - Programming Test

Posted 06 July 2010 - 09:48 AM

I think I'm going to move this to Corner Cubical, so more people will actually see it.

Now for your question, my personal opinion is to always use the tools & native libraries that are available to you. I mean it's good to actually know how to do something like that the hard way, but why reinvent the wheel if you dont have to.

From someone who has had to interview and hire programmers I was more impressed with someone who could, off the top of their head, use the native libraries & tools available to them. Now this employer might have actually wanted to see something like you wrote, but remember that most employers look for speed and development time, and reinventing the wheel every time you need something will slow your development time down over using the tools readily available to you in the language you're working with (as it takes longer to write 20 lines of code then using a single line from a native library).

Keep in mind those are merely my opinions :)
Was This Post Helpful? 2
  • +
  • -

#3 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5479
  • View blog
  • Posts: 11,762
  • Joined: 02-June 10

Re: Interview - Programming Test

Posted 06 July 2010 - 09:58 AM

Personally opinion...

If you were interviewing for a .NET developer position, but answered without using the .NET tools available to you then it looks like you are unfamiliar with the methods and libraries at your disposal.

"Work smarter, not harder"

Or as Psycho said "Why re-invent the wheel?" These are tough times and shaving every minute means higher profits.
Was This Post Helpful? 0
  • +
  • -

#4 Antiokus  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 192
  • Joined: 06-September 06

Re: Interview - Programming Test

Posted 06 July 2010 - 10:02 AM

Much appreciated - I was really curious to see what others in the hiring position have to say.

I've really been fighting over the benefits of both ways. The position itself being an entry level position I can see where writing out the comparison would offer some insight into my programming habits and abilities. But I can also see where it looks like I'm not experienced in using .NET because of it.

Personally, I would rather see someone's ability to code a simple loop than see:
Array.Reverse(arr)
return new string(arr)



But I'm not a hiring manager or anything close to that. Just a simple programmer.
Was This Post Helpful? 0
  • +
  • -

#5 SixOfEleven  Icon User is offline

  • using Caffeine;
  • member icon

Reputation: 945
  • View blog
  • Posts: 6,342
  • Joined: 18-October 08

Re: Interview - Programming Test

Posted 06 July 2010 - 10:02 AM

I would also echo the opinions of PC and tlhIn'toq. Being able to do it the hard way shows you can think outside of the box but for a .NET programmer use the tools at your disposal.
Was This Post Helpful? 0
  • +
  • -

#6 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5479
  • View blog
  • Posts: 11,762
  • Joined: 02-June 10

Re: Interview - Programming Test

Posted 06 July 2010 - 10:10 AM

Ideally... It would have been nice if you had shown both techniques. Thus showing you know the .NET methods, but you are equally comfortable doing it the long way. Just a thought for next time.
Was This Post Helpful? 0
  • +
  • -

#7 KYA  Icon User is offline

  • g++ jameson.cpp -o beverage
  • member icon

Reputation: 3101
  • View blog
  • Posts: 19,141
  • Joined: 14-September 07

Re: Interview - Programming Test

Posted 06 July 2010 - 10:12 AM

*
POPULAR

The inexperienced programmer asks "How can I do this?"
The experienced programmer asks "Where has this been done before?"
Was This Post Helpful? 10
  • +
  • -

#8 Antiokus  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 192
  • Joined: 06-September 06

Re: Interview - Programming Test

Posted 06 July 2010 - 10:53 AM

It's hard to ask "where has this been done before?" when you:
a.) have never dealt with determining if a string is an exact reversal
b.) don't have access to online resources

Though I do like the expression.
Was This Post Helpful? 0
  • +
  • -

#9 dorknexus  Icon User is offline

  • or something bad...real bad.
  • member icon

Reputation: 1256
  • View blog
  • Posts: 4,618
  • Joined: 02-May 04

Re: Interview - Programming Test

Posted 06 July 2010 - 10:53 AM

*
POPULAR

The wise programmer asks "who can I make my bitch and delegate this to?"

This post has been edited by Dark_Nexus: 06 July 2010 - 10:54 AM

Was This Post Helpful? 5
  • +
  • -

#10 5thWall  Icon User is offline

  • Occasional Member

Reputation: 31
  • View blog
  • Posts: 530
  • Joined: 17-September 08

Re: Interview - Programming Test

Posted 06 July 2010 - 10:55 AM

Those types of tests are probably just unimaginative versions of the FizzBuzz test. The interviewer probably wanted to know that you could actually code.

If I ever get a question like that on an interview I'd probably do what tlhIn'toq suggested and give both. Something like: "Normally I'd use the built in methods, but you probably want to see if I can code so..."

This post has been edited by 5thWall: 06 July 2010 - 10:56 AM

Was This Post Helpful? 1
  • +
  • -

#11 Antiokus  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 192
  • Joined: 06-September 06

Re: Interview - Programming Test

Posted 06 July 2010 - 11:20 AM

Well I'm supposed to hear back towards the end of the week so now the waiting game. And trying not to lose sleep over what I SHOULD have done :)

Appreciate the tips and feedback. It was interesting to hear that they had several people with higher degrees than me walk away unable to finish the test.
Was This Post Helpful? 0
  • +
  • -

#12 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5479
  • View blog
  • Posts: 11,762
  • Joined: 02-June 10

Re: Interview - Programming Test

Posted 06 July 2010 - 11:28 AM

Quote

It was interesting to hear that they had several people with higher degrees than me walk away unable to finish the test.

Since when has a degree been any indication of skill?

I'll be the first to admit that I work for a small company... If you count bodies. But we do $1m+ a year in business in several different countries. And the only degree anyone has is one guy with a BA in English.

But that didn't stop us from beating out major companies on contracts because we have a superior product line and superior customer service.

Give me someone with skill, a good attitude and the ability to apply knowledge to solve problems. Honestly, we tend to shy away from people with college time because they have no actual experience but are just cock-sure of their ability to change the world and aire of superiority over those without a degree.
Was This Post Helpful? 3
  • +
  • -

#13 Antiokus  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 192
  • Joined: 06-September 06

Re: Interview - Programming Test

Posted 06 July 2010 - 11:38 AM

View PosttlhIn, on 06 July 2010 - 09:28 AM, said:

Since when has a degree been any indication of skill?


Definitely wasn't trying to imply that. I'm one of those non-degree holding persons. But I would have assumed that someone with some experience (even if it was only school related) would have been able to solve this.
Was This Post Helpful? 0
  • +
  • -

#14 Curtis Rutland  Icon User is online

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 4464
  • View blog
  • Posts: 7,780
  • Joined: 08-June 10

Re: Interview - Programming Test

Posted 06 July 2010 - 03:16 PM

The reality is that a lot of people just aren't programmers. That doesn't stop them from getting programming degrees, but it does keep them from excelling in their field. They can learn the basics, and even the intermediate stuff. But they don't have the mindset to apply what they learned to other concepts, and to figure things out for themselves.

That's why we all see so many braindead questions every day. "How to code the enterprise application. Is urgent, pls send me the codes for 3-tier app soon kthanxbye." These people probably have degrees, but they learned everything they know from three buttons on their keyboard: ctrl, c, and v. So when faced with something they've never done before, instead of figuring it out with resources and learning it on their own, they just find some code dump that's kinda like what they are doing and try to hack it into something passable.

I'll compare myself with one of my co-workers. We both had a project where we found LINQ was probably the best solution. It makes heavy use of Lambda expressions. Neither of us knew what a lambda is. I researched it, experimented with them, and actually gained a real understanding of what they are and do, to the point where I wrote a tutorial on this site. My coworker still doesn't know what they are or do, but he knows how to say array.Where(x=> x < 5); He doesn't know that he's using an anonymous function, he just knows that that code will get everything in the array that is less than five. But because I researched and learned what it means, I can apply lambdas to any situation where they might fit, and he has to go find some code to copy/paste when it doesn't fit his situation.

Now, I don't look down on people with degrees in general. There are probably by ratio far more intelligent programmers with degrees than braindead non-programmers with them. But the degree itself typically is only an indication of someone's patience and responsibility to stick with a 4-5 year program.
Was This Post Helpful? 4
  • +
  • -

#15 moopet  Icon User is offline

  • binary decision maker
  • member icon

Reputation: 339
  • View blog
  • Posts: 1,185
  • Joined: 02-April 09

Re: Interview - Programming Test

Posted 06 July 2010 - 03:53 PM

When I've had this kind of thing come up (which is rare, I've sat in or handled very few programming job interviews from the bench side) I've seen people use both. Talking to them afterwards is where it's at - if the test is some sort of standalone thing then it's really not very good. I've never heard of it being done that way. If it's accompanied by an interview, then afterwards you can dissect what they did, ask them their reasons. Ask them if they knew there was a built-in to do it in one line. The interviewer should have some basic understanding and be able to follow these things up. If you had a programming test without this kind of conversation after it, then I'm sorry - but they won't all be like that!
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3