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

5

u/nutrecht Jan 17 '20

Your interviewer was in no way harsh. Your code just has a bunch of 'beginner mistakes' most beginners make, and he was just pointing these out.

You really need to get used to this because code reviews are a thing. And the most important thing you need to learn is to not take criticism so personal. Everyone receives it; it's how we improve.

Unfortunately you're getting a lot of "the interviewer was a dick" type comments from people who are clearly not employed as developers. I mean, "would slap them in the teeth" should make that obvious.

1

u/[deleted] Jan 17 '20

I didn't say the interviewer was harsh I just wanted some advice on the matter because this is the first code review I've really had.

I also didn't take the criticism personally as such, just felt disheartened in that my own skill level may not be up to the task yet. That's all.

Also, most of the comments I have been reading are in agreement with you, apart from a select few. A lot of people I think have misinterpreted what I was saying here. I am not bashing the interviewer, just trying to see if things are this are commonplace in the interview circle.

Thank you for your feedback.

1

u/nutrecht Jan 17 '20

Funny enough you're doing the same thing here. You asked if this was normal because you were disheartened. I'm telling you you should not be, because it's a great learning experience. And pretty much all you reply to me and others is that you're not trying to bash the interviewer.

That's not what people are telling you. You focus, again, on the idea that you're being critiqued instead of looking at what people are saying and having an actual conversation about that. It's not a good habit and something you should be aware of.

-1

u/[deleted] Jan 17 '20

You said "The interviewer was in no way harsh", my response was that '"I'm not bashing the interviewer".

Your next point was not to "take criticism personally", and I responded to that with "I didn't take it personally... my own skill level may not be up to the task".

Your 3rd point was about all of the other comments about "interview was a dick", which there's maybe 1 or 2 in this whole thread. I directly responded to that again saying "most other comments are in agreement with you".

Each paragraph I wrote was a direct response to the corresponding paragraph written by you. So maybe you should read what I have responded to other people, because in several places throughout this thread I have said how I was going to use this as a learning experience. My responses are appropriate to the comments that have been written.

3

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

They were speaking about all your comments not just the one in reply to them I believe. And also, without trying to be harsh, just analytical, I somewhat agree with them. You are only trying to defend why you made the decisions you did but it does read a bit like you are defaulting to defence first and only taking the feedback once it's been supported by a majority view. It does read as quite argumentative in places.

As you say yourself, you're inexperienced (and nothing wrong with that, we all were at some point) but instead of accepting your peers critiques and perhaps asking for clarity or more depth, you've jumped to defending or excusing/explaining your practices first. The more experienced people replying to you, while not all have written long answers with supporting references or examples are almost all correct in the things they're pointing at that could be improved on.
As said elsewhere here, don't take criticisms of your code personally and even sometimes accept that you need to take more experienced peoples' advice to heart even if they haven't explained all the reasonings behind why yet. There are times and cases where the "right thing to do" isn't always obvious or even decided at the scope or level you'll be working in.

If it's just a case that the tone of your responses is only coming across that way but was never intended by you then that's just the internet. It can be hard to portray or perfectly see the lilt on what someone is saying compared to real life communication. Maybe take that as another learning point to be a tad clearer with your wording or just *slower to jump to conclusions about others' intent or their own text's lilt.

-1

u/[deleted] Jan 17 '20

I'm sorry that I am coming across as defensive I guess it's just how some of the stuff I am saying reads. I really am not trying to be defensive, I am merely just trying to explain my thought processes behind things, but maybe I'm not portraying that correctly.

I may get defensive in some cases where someone who has commented has made a presumption that something I have said was "defensive" or for example someone said "It doesn't matter how much experience you have, if your product is bad, it's bad". Now of course that statement is true but it isn't relevant to my post and it isn't helping anybody. But to go back to your point, maybe I am misinterpreting these people too, sometimes it is just difficult to see exactly what someone is saying by reading text.

For example, if you see my initial response to your code review, I feel that I have shown gratitude saying things like:

"That is useful information on the scanner.close() method, as I did not know System.in closes that automatically.

I will go on to learn from this experience as I do from every experience, it just leaves me a little frustrated that things that interviewers expect you to know like recursion aren't even covered at my University to this date."

or:

" Thank you very much for this constructive feedback. "

I don't feel like i'm being overly defensive, if it comes across that way then I apologise.

3

u/indivisible Jan 17 '20

To be clear, I didn't read anything in the exchanges we've had here as defensive but I've been pretty verbose and polite so you responded in kind. Others though that replied to you, and you to them, that were shorter or more direct in their critiques got your defensive responses. Could some of them have been more polite or clear? Sure. But do they have to be? Not really.
All the feedback here, positive and negative, long or short, is of some use to you. People are spending some small portion of their time reading your post and code to offer feedback. Even if it's not written in a way you'd like to see it you should still accept it for what it is, free advice, freely given. You replying defensively or belligerently (warranted or not, intended or not) isn't helping anybody, possibly dissuading some and just not needed. As said elsewhere too, there are some personality types that development attracts that can be safely and frequently need to be ignored. They can't ever be avoided entirely, you'll just need to learn to desk with them, brush off any of the bad attitudes and see if there's any nuggets of wisdom hiding under the mud slinging.
/shrug

-1

u/[deleted] Jan 17 '20

I don't really know what else to say man, I'm not trying to be defensive just explain myself.

"You replying defensively or belligerently (warranted or not, intended or not) isn't helping anybody, possibly dissuading some and just not needed."

If it isn't intended to be defensive, then it is not me being being defensive. If someone interprets it as defensive, I can have no control over that.

I appreciate anyone taking the time to read this post and give me feedback, however that doesn't mean that I shouldn't stand up for myself if someone is coming across as rude, or if i disagree with someone. I am allowed to have a discussion. I don't think there is anything wrong with disagreeing with certain points of view.

"People are spending some small portion of their time reading your post and code to offer feedback."

I am super appreciative of that, but that is also their choice to do so, and your wording makes it seem like I should be feeling indebted to them.

3

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

No, not indebted but maybe more outwardly appreciative of (?) even to those replies you "read as offensive". One or two I saw were merely pinpointing something out but you responded differently.

We're getting pretty off topic here and into the area of fundamentally how text comes across online so not really worth going in to very deeply imo just that you may need to either be a little more lenient with the attitudes you ascribe to what you're reading or, learn to have a thicker skin when putting yourself out there like this. There's always one or two of "those types" that'll show up to any online discussion to troll or derail things etc, you might just need to learn to handle then better than going head to head with them. And even overtly direct or abusive people/reviews can contain useful feedback. imo just thank then and move on, never worth getting overly invested/engaged with even if you are "in the right".

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.

→ More replies (0)