Linked by Thom Holwerda on Mon 24th Sep 2012 15:07 UTC, submitted by MOS6510
General Development "I've been programming professionally for about 3 years at this point, and I've noticed some interesting patterns in other programmers I've worked with. One of the key differentiators among programmers is motivation. I'm not referring to an individual's passion to simply be successful in their career, but rather the type of work they want to pursue. The thing they want to do with computers every day, the types of problems they are interested in solving."
Thread beginning with comment 536396
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[2]: Sad Truth
by JeeperMate on Tue 25th Sep 2012 10:24 UTC in reply to "RE: Sad Truth"
JeeperMate
Member since:
2010-06-12

Yes, sure... There's abs(). There are a gazillion other functions offered by various 3rd-party libraries for various purposes. Heck, one could even Google for solutions to basic programming problems. But a) we cannot always depend on 3rd-party solutions in real projects (most of the times we have to implement our own libraries or at least fork something that's closest to our requirements), and b) we need a programmer who can come up with good solutions without depending on Google Search.

If one doesn't remember such a basic thing he/she learned at school, what else has he/she forgotten?

Reply Parent Score: 1

RE[3]: Sad Truth
by phreck on Tue 25th Sep 2012 12:01 in reply to "RE[2]: Sad Truth"
phreck Member since:
2009-08-13

Now you are showing ridiculous behaviour.

You show to your working comrades a young boys code for teh lulz (which is a form of sadism), and then don't even now that abs() is a standard function?

Fellows and Me: "What."


Seriously: If you want a simple and elegant solution:

#include <algorithm>
...
std::abs(...)
...

Edited 2012-09-25 12:09 UTC

Reply Parent Score: 1

RE[4]: Sad Truth
by JeeperMate on Tue 25th Sep 2012 12:45 in reply to "RE[3]: Sad Truth"
JeeperMate Member since:
2010-06-12

Phreck, again, the question is essentially "do you have an idea how abs()" is implemented? If you answered "just use abs()," you're screwed.

The point of the question is to test basic programming knowledge and skill (i.e. to answer the question: "can this young man think like a programmer?")

If you don't like that kind of question, you can either avoid programming job interviews, or don't ask them to interviewees.

Edit: when I was in the interviewee's position (a long time ago) I was even asked to write a FizzBuzz code. Now that's ridiculous.

Edited 2012-09-25 12:49 UTC

Reply Parent Score: 1