Campbell Ritchie wrote:Congratulations on the job
Jeanne Boyarsky wrote:Guys - relax.
Ravi: Something missing from your list is soft skills. Reviewing projects you worked on in the past so you can talk about what it was like working with teammates, problem solving, etc.
Tim Holloway wrote:
Claude Moore wrote:I wonder if using an endless loop in the presence of a JMS listener is or not a good practice, since the listener is awakened by the JMS machinery every time a message is send to a queue or to a topic.
I'd bet "no".
I had misgivings about that too. These days, polling is usually not the preferred option. It's extra overhead and it can result in delays in processing while the thread waits to wake up.
But that's a valid poll loop, anyway. The ones you DON'T want use a counting loop instead of a sleep delay.
Tim Cooke wrote:Have another look at the requirements and tell me how many grade categories are specified?
* A score in the top 20% of all scores is an A.
* A score in the next 20% of scores is a B.
* A score in the next 20% of scores is a C.
* A score in the next 20% of scores is a D.
* A score in the bottom 20% of scores is an F.
I count 5. A, B, C, D, and F.
How many does your code have?
Liutauras Vilda wrote:1. After you get all code working, the other problem might be that you haven't demonstrated any written tests for your code. Have you got them? If no, you can not state your code works and gives correct answer.
Ravi Desigan wrote:fetchNperformersFromMasterList method does the core functionality
instructions wrote:Write a function that takes an arbitrary (possibly unsorted) score list...
You don't have any method which would take List as an argument. For some reason you assumed list must be an ArrayList. Which is not what is specified. Plus you added some extra parameter.
Some of the things you need to take from this interview are:
Need to do exactly what is asked, no more - failed on that Code must be tested, proof provided - failed on that Code must be readable - failed on that Code must be well formatted, formatting consistent - failed on that
This code is over-complicated. You were asked to write a function/method, one in total, which is accessible to the wide world, meaning one public function and the rest methods private which would serve as helper methods.
3. Less than optimum outcome is also an outcome - so try to take as much as you can from it. I assume it was home interview exercise, meaning you had fair amount of time, so you had to come up with much more solid solution and code in general.
Campbell Ritchie wrote:Not in what you quoted; there is no E.
Ravi Desigan wrote:. . . . The specification mentions Grades A through F.Where have you implemented that part?
. . . If there are two (or more) scores that are identical, then those identical numerical scores must always receive the same grade, . . . .
Tim Cooke wrote:They do have a point.
Answer me this: To split up a list of items into separate buckets where each bucket contains 20% of the items in the original list, how many buckets would you require?
Then answer me this: How many buckets (grades) does your code have?
Have you spotted where you went wrong yet?