Eclipse does not without me having to even look at it. IntelliJ does the same. In what situation these people had to import it by hand? They had no ide available or what?
Eclipse does not without me having to even look at it. IntelliJ does the same. In what situation these people had to import it by hand? They had no ide available or what?
Even though Eclipse does it, I'm sure you know where HashMap lives. Some people are compile-and-pray type devs. They lean on auto-complete for everything, not as a productivity tool, but because they don't know how to do even basic things. We don't want those on our team.
[edit] oh god it’s closer to 24 years. The time, how she flies.
Why?
----
I'd struggle. It's a trivia question as it has no bearing on modern Java development
Modern IDEs both collapse the import section, and auto-import on the fly
The only reason I'd see the line is:
* Looking up documentation: very rare
* Conflict on the import - unlikely
* Code Reviews - skimmed over
> No IDE, specifically to test basic ability. We use a web-based shared editor, that has syntax highlighting, and auto-tabbing, but specifically no auto-complete nor auto-import.
I can sympathize with the candidate and think the test is poor and not surprised people had to look it up.
I've been doing Java since early 2000's and off the top of my head can't tell you what package HashMap is in without looking it up except it starts with `java.` something, probably. I type `HashMap` in my IDE, hit auto complete. I haven't needed to remember the exact package name since early 2000's when I started coding so don't know it, no need to, why waste space in my head for it. If there's a second HashMap class available on the class path I can tell you the one I want from the suggestion list.
You're trying to test someones memory on something they haven't needed to remember for decades now, knowing a specific fully qualified path to a class/what package it is in isn't a useful test. Knowing what a HashMap is and how to use it is useful.
Enable auto complete/import. You don't have it disabled for your currently employed devs and they'd not function well without it and probably fail the same test.
It's a valuable skill to recognize which knowledge is important, and which is fluff you shouldn't waste cycles on. Knowing what a hashmap is useful for, when to use it, and when it's suboptimal, is important. Memorizing import paths is not.
Facebook to this day disables intellisense in their coderpad interviews.
It's fucked up.
I don't get what these tests are trying to show.
Breadth? Depth? There's other ways. Give some complicated code that touches a bunch of things and have them work with that.