[tt]I notice that this forum has been dead for almost a year.
Today I was thinking (yeah, I know, DANGEROUS) about a simple test that could be given to prospective coders to determine how well they can visualize and code on the fly. The following is what I think would separate real coders from the rest of the pack.
Let's see some code for the following problem:
Everything you need to know is posted above. There should be no reason for me to answer any questions. And, yes, this is deliberately minimal to test two things. First, how well a coder can recognize patterns. And, second, how well a coder can write code to output those patterns.
I spent about 10 minutes before I could visualize how to code this. Then I spent 20 more minutes writing/debugging C++ code to solve this problem. I am a FoxPro programmer, but chose C++ because I have about 3 HOURS total experience in C++ coding. I did not try FoxPro, but I assume that the time would be comparable.
Later I will post my C++ code for comparison purposes. I may even give stars to code that I think is exceptional (assuming that I understand your coding language).[/tt]
mmerlinn
Poor people do not hire employees. If you soak the rich, who are you going to work for?
"We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding. Answering questions for careless and sloppy thinkers is not rewarding." - Eric Raymond
Today I was thinking (yeah, I know, DANGEROUS) about a simple test that could be given to prospective coders to determine how well they can visualize and code on the fly. The following is what I think would separate real coders from the rest of the pack.
Let's see some code for the following problem:
0123456789
9876543210
1234567890
Using the above three lines as a pattern, write code that will output the above lines and all following lines until the pattern repeats. Hint: This pattern will repeat starting with the 21st line.
9876543210
1234567890
Using the above three lines as a pattern, write code that will output the above lines and all following lines until the pattern repeats. Hint: This pattern will repeat starting with the 21st line.
Everything you need to know is posted above. There should be no reason for me to answer any questions. And, yes, this is deliberately minimal to test two things. First, how well a coder can recognize patterns. And, second, how well a coder can write code to output those patterns.
I spent about 10 minutes before I could visualize how to code this. Then I spent 20 more minutes writing/debugging C++ code to solve this problem. I am a FoxPro programmer, but chose C++ because I have about 3 HOURS total experience in C++ coding. I did not try FoxPro, but I assume that the time would be comparable.
Later I will post my C++ code for comparison purposes. I may even give stars to code that I think is exceptional (assuming that I understand your coding language).[/tt]
mmerlinn
Poor people do not hire employees. If you soak the rich, who are you going to work for?
"We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding. Answering questions for careless and sloppy thinkers is not rewarding." - Eric Raymond