r/javahelp • • Aug 01 '19

Struggling with technical interviews

Hi, guys.

After a series of disastrous technical interviews I've come to the conclusion I need help in this regard. I've realized there are things I don't quite know as well as I thought (like the Collections framework, which I know but apparently not well enough), things that are supposed to be the bread and butter of any Java developer. Could you guys tell me what knowledge and skills a 4+ years Java developer is supposed to have? I want to make sure there's nothing (or at least as few things as possible) I could be missing. Of course, any resources (books, etc) on the subject would be much appreciated.

Thanks!

28 Upvotes

15 comments sorted by

37

u/IQooLogic Aug 01 '19 edited Aug 01 '19

IMHO it is not that you do not know the answers, it is rather your brain panics and won't do what it is suppose to do :)

Because I have about 8+ years of experience I put burden on me that I have to know everything. The case is that good companies and interviewers (technical) do not want to see what you know, but rather how you think.

In february this year I had interview with a company that is Google like and was scared and didn't go. A couple weeks ago they contacted me and said to come and meet them for a relaxed talk. It turned out to be classic technical interview but I didn't overthink and was't scared and did pretty good and got the offer which I accepted :)

I impressed myself for knowing some questions which is the consequence of thinking it will be just talking and getting to know each other.

You just have to relax, do not overthink and prepare (a lot of interview questions/answers).

Another thing is try to always have answer to WHY questions. ex. Why did you use this rather than that ? Why you had to use this thing and not that thing ?

Knowing the 'WHY' is the second thing that interviewer is after along side 'how you think' :)

Questions:

  • Basic Java questions (exceptions [checked, unchecked], polymorphism, encapsulation, abstract class vs interface, final, synchronized, volatile)

  • S.O.L.I.D Principles and clean code

  • Design Patterns (Strategy, Repository, Builder, Proxy, ...)

  • Concurrency (Runnable, Callable, ExecutionService, Collections with concurrency)

  • Collections Framework

  • Libs/Frameworks stated in CV (Spring - ex. ways to autowire beans)

  • REST (ex. how to allow response body to be xml or json)

  • Database (JOIN, why did you use mongodb in your last project?)

All the best to you :)

3

u/PorkChop007 Aug 01 '19

You have no idea how much I needed this. Thank you so much!

4

u/IQooLogic Aug 01 '19 edited Aug 01 '19

I know man :) Been in the same boat. Just relax and practice the things that you know less and you are not comfortable as much. That can help you to get the confidence :)

What boosted my confidence was that I started teaching and it made me learn more and better understand all things Java :)

Best of luck :)

3

u/[deleted] Aug 01 '19

Something I just learned about technical interviews that blew me away was that I could ask for help. If they give you a white-board problem, it is totally OK to ask for help if you have been struggling for a bit. As you are working on the problem, talk through your steps and logic. When you get to a sticking point, say "I'm thinking of doing X or Y, but I'm a little stuck. Do you have any suggestions?"

3

u/lumpycrumpet Aug 01 '19

This, but especially talking through your steps and logic. If I'm interviewing someone, I'm focusing much less on the minutia of the candidates knowledge of a framework but more on what assumptions they make (and state them, don't forget to tell the interviewer if you are assuming something!) as well as what their problem solving process looks like.

The last person that I interviewed didn't know the answers to a lot of in depth questions, but walked through her thoughts on how she assumed it worked and then asked out of genuine curiosity and for her own edification. She has been one of the best coworkers that I've had.

2

u/ashdee2 Aug 01 '19

how much experience did she say she had in the language? Cause i am struggling with this. Have a degree in CS but struggled throughout school. Things that are supposed to be easy(at least easy for everyone around me so far), i just dont seem to get the logic. Same thing with some interviews(not board ones but like hackerrank screening tests), i just cant seem to figure out how to get the answer.

1

u/lumpycrumpet Aug 02 '19

6 years.

I would really recommend drawing out whatever it is you're trying to do. The logic is a lot easier if you conceptualize it in a more concrete way. It's also easier to remember the concepts and images than to remember implementation details. Practice by implementing some basic data structures based on the description, then, extending them with an example.

For instance, draw out what a Linked List would look like. Then, based on the drawing, implement the Linked List. Once you've successfully completed that, try extending the class to add a flag, let's say an integer for priority. Implement some logic that has the add method take a priority and Object to add and adds the Object Node to the Linked List based on the priority.

Another way that might be helpful is to take the concepts that you're struggling with and give yourself an assignment of creating a short presentation on how the concept works as if the audience didn't have any clue as to the basics of a computer. You'll be forced to not only really understand the concept deeply, but you'll come up with non-technical ways of explaining the material that will stay with you better.

1

u/AloticChoon Aug 02 '19

Also, remember to be honest. If you don't know something, do not be afraid to say so. Never try to bullshit your way through an answer

0

u/[deleted] Aug 01 '19

I recently had a Java technical interview that I was NOT prepared for at all, I hadn't used Java since my first ever programming class freshman year of college.

I went online and found some Java fundamental practice tests and worked through them. Anything I didn't know I read up on until I knew it. The things I didn't know I Googled, and read through the information that popped up. I ended up getting the job. This isn't exactly what you asked for but this is how I overcame that problem.

-2

u/happykal Aug 01 '19

The only thing you need to do is buy... and read a bool called "cracking the coding interview". Do the quiz questions... Cracking the Coding Interview, 6th Edition: 189 Programming Questions and Solutions https://www.amazon.co.uk/dp/0984782850/ref=cm_sw_r_cp_apa_i_5nTqDbS1RTATM

You do that... i guarantee youll blast through the interview.

0

u/[deleted] Aug 01 '19

[deleted]

5

u/PorkChop007 Aug 01 '19 edited Aug 01 '19

My problem is that I don't know what I don't know :)

For example, yesterday I had a map of <String, Integer> representing words and frequency in a text and I had to order the words by number of repetitions. Now I know how to do that (using an entry set, sorting it and all), but at that moment I was totally stuck.

I had never done that before and it worries me, given how much time I've been coding for a living. Feels like I've been wasting my time.

2

u/joequin Aug 01 '19

Next time, think out loud. Interviewers generally like that. "Well, we can get the entry set. Then we need to sort those entries...”.

1

u/[deleted] Aug 02 '19

you could also define a class with parameters of string and frequency, override the equals method to check for parameter string equality, and override the hash function to the parameter string hash, provide a comparator that compares two instances of this class based on the frequency, and then create a treeset which will do this sorting automatically.

That being said updating the frequency would not be allowed once the items are in the set.

0

u/[deleted] Aug 01 '19

[deleted]

3

u/happykal Aug 01 '19

I really dont think this is good advice. This is an computer science problem, not language specific. OP think about the input, the output and how you would achieve a solution if you had no knowledge of a particular language... just pseudo code.

0

u/[deleted] Aug 01 '19

[deleted]

1

u/happykal Aug 01 '19

The book i suggest in the other post will help.