r/learnjava • • Jan 17 '20

So I had an internship interview

I'm a second year CompSci student and as part of my degree we have to do a placement in 3rd year. I had an interview yesterday which went okay, and then I got a coding challenge at the end.

I was given 1 hour to print the fibonacci sequence for n integers input by the user. For example, user enters 5 I print 0, 1, 1, 2, 3.

So that was all good and I got it done in like 6 mins, and the interviewers came in to review it.

. They said I shouldn't have created an array because its inefficient as I was only asked to print out the code. . They also said the name fib for the array was kind of unclear and that I could have used the whole word. . Also pointed out things like putting a space between ) and {. . Said my method name printFibonacci was a bit misleading and could have been 2 methods since I also calculated it.

As much as I appreciate the advice to clean up the code, as a year 2 student intern you are still only at the stage of writing functioning code and not completely clean code. I feel quite disheartened after leaving and was just wondering if anyone else has experienced this in an interview and if so, what was the follow up like? Did you get the job?

Thanks for listening!

EDIT: I don't want it to come across as bashing the interviewer or anything like that, it did seem more like advice, was just trying to see if anyone had similar experiences with this.

EDIT: So I ended up getting a second interview last week, and today I was offered the job! Thanks all for the feedback and support!

Here is my code: https://pastebin.com/FWgX9m9U

64 Upvotes

84 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Jan 17 '20

I guess so, it's just hard in the moment to thank someone for something that comes across as an attack I suppose.

1

u/indivisible Jan 17 '20

Sure, I can understand that but it touches on what others have been saying to you up and down the thread, don't take any of it personally - learn to separate code review criticisms from criticisms of you as a person or a developer. You'll be getting lots of them if you choose to continue down the path to becoming a full time developer and if you allow every poke or prod, polite or impolite, about your code affect you you'll be an alcoholic before you're a year in.

Remember others always have their own time constraints or deadlines so maybe can't be (or just don't want to be) as verbose, positive or supportive as you'd perhaps like. It doesn't mean though that they're wrong about what they're saying and with your limited experience you just can't (yet) judge or decide what is or isn't correct/proper though you're trying to do that in some replies here.
Sometimes it's just on you to research the "why" after you've been told the "what" and maybe that's just another aspect of many professional environments you'll need to get aquatinted with.

1

u/[deleted] Jan 17 '20 edited Jan 17 '20

I understand. I don't think I have told anyone more experienced than me that their code or anything like that is incorrect, if I have I didn't realise it.

"with your limited experience you just can't (yet) judge or decide what is or isn't correct/proper though you're trying to do that in some replies here."

While I may be an inexperienced coder, I do have plenty of life experience and work experience to the point where I feel like I can judge certain aspects of how someone is communicating with me/ how someone speaks to me. In terms of whats correct/proper, that's subjective, and that's why rude people and polite people exist. They both have a different view on the correct/proper way to speak to someone. It comes down to the old saying:

"Treat other how you would like to be treated"

I don't believe I have questioned anyone's knowledge on this thread, and I certainly don't think I am in the place to do so.

EDIT: Some stuff I have taken personally is things people have commented on besides the code. Not all of the comments made to me are constructive code reviews either.

2

u/indivisible Jan 17 '20 edited Jan 17 '20

I get all that, and even agree with you on most of it. Just wanted to give you another perspective on it all to perhaps help you take it more as "criticisms of your code sample" rather than "criticisms of you as a developer" as some of your relies appear to be the direction you're coming at them from.

Last I'll say on it is that there's a very fine line professionally between rude and just terse.
That is what i was alluding to with my bit about others' time constraints and deadlines. In my experience you should see any time others give to code review as a gift regardless of tone just because it's very often a near impossible thing to get with some places/teams/sites/projects/management structures/deadlines.

1

u/[deleted] Jan 17 '20

I really appreciate you taking the time to have such a verbose conversation with me, going in depth with your advice, not just on a coding level but also on a personal level. This is advice that I will remember for years to come when I perhaps clash with a colleague in the future, or for any more posts that I may make on here. This will allow me to look at even rude criticism with a different perspective, which I think will overall just lead me to be happier in general. It has been a pleasure to speak with someone as experienced and polite as you.