NetBeans 6 delivers great updates to the Matisse GUI builder. Spend a few minutes with Roman Strobl and get an expert briefing on what's new and what has changed. (sponsored)
In this, the third and final installation of Andres' Introduction to Groovy series, you learn about how Groovy handles variable numbers of arguments, named parameters, currying, and more about Groovy operators. Including, some new operators.
Swing Fuse (actually just Fuse), is a framework designed to make it easier to create your own custom desktop components. In this article, Daniel Spiewak shows you how to get started and provides sample source code you can download.
Willam Louth shows how he uses JXInsight Probes to investigate probable performance issues with code bases that he is not familiar with. He also highlights possible pitfalls in creating a benchmark, as well as in the analysis of results.
What are the wackiest interview questions you've heard when applying for a Java developer position? What are the toughest? What should they have asked you?
Wow. Those are somewhat beyond "How do you spell Java" but not much. A friend of mine once got a job at a Java startup, with similar easy questions.
He's a rather smart hacker, one of sort that, when confronted with an weird database issue (proprietary), which the company refused to fix, claiming it was not a bug, can dive into the assembly details, and show to the database company exactly where their code is wrong. Someone like Guilfanov (of WMF patch fame) I guess.
Anyway, after he left the company, their interview process, was much more difficult. Few easy questions at first, then questions about the JIT. Questions like "knowing that Java is a stack-based language, how do you take advantage of that?" What next? Describe the Von Neumann Architecture vs. Harvard Architecture?
A large search company located in the Silicon Valley, that has ambitions to go mobile, asked me,"I see you were a software architect at your previous company. Did they just hand out that title to everyone?" That struck me as a wacky and obnoxious question.
> A large search company located in the Silicon Valley,
> that has ambitions to go mobile, asked me,"I see you
> were a software architect at your previous company.
> Did they just hand out that title to everyone?" That
> struck me as a wacky and obnoxious question.
That large search company, assuming you're talking about Google, is known for asking obnoxious questions like that. But, in their defense, they aren't really being obnoxious, it's just that their requirements for a junior developer are more stringent then most companies requirements for an architect. For them to take you seriously as an "architect" you'd better have done something like invent Unix.
At the time, I found it was more humorous than obnoxious; but I think such questions tell you a lot about the company, not so much about the job requirements, which are printed in black and white.
It was asked in a condescending way, and I almost didn't take the job because I was afraid that I would have to work with that prick for the next 18 months.
As it turned out, I did take the job, and I do have to work with that prick. Funny thing is that he ended up being a pretty funny and friendly guy. I am glad I didn't end up basing my decision to take the job on that one question.
> A large search company located in the Silicon Valley,
> that has ambitions to go mobile, asked me,"I see you
> were a software architect at your previous company.
> Did they just hand out that title to everyone?" That
> struck me as a wacky and obnoxious question.
"No, we had other titles like "President", and "Secretary", so not everyone has "Software Architect"."
Cute. That's why some companies field the phone calls, then turn the resumes over to techs, for a tech review.
Where it's the flip side of the coin. So it says here you've worked with Spring, can you tell me a little about the design pattern behind Swing and why you would use it?
"Oh, actually I know about Spring, but I don't actually have experience with it..."
Another question I like to ask, just to get a feel for whether this person is really keeping up with the technology, or just pumping up his/her resume is, _especially_ if they put the version number of EJB they worked with:
"So you say you've worked with EJB 2.1, are you familiar with EJB 3.0 and how that differs from the previous version?" Similarly, I would expect someone, especially an architect, to be familiar with some of the new features of 1.5.
"We want to load images in less than 1 millisecond. Can
you do that in Java?"
Toughest (good) question:
I was shown a short Java program, asked what it would do,
and then shown it did something totally different. The interviewer then said,
"Don't worry, this is a tricky problem no one gets right the first time. How
would you figure this out?" I would step through it in a debugger,
I replied. "Fine, let's do that." The interviewer watch
as I debugged the program and figured out why it was
acting so weird. He got to see how I approached problems and that I
knew my way around a debugger.
Toughest stupid question:
"Draw a UML diagram for a reverse-polish notation
calculator." (asked in a conference room with the entire
company watching).
What they should have asked?
My favorite question to ask is, "Give a high-level
description of a major programming task and how you
solved it." This is a good ice breaker as people are usually
comfortable talking about their own work.
I interviewed a dozen Filipino guys in Manila this week. It was my second experience of 'batch interviewing' and it was an interesting experience.
I was interviewing for senior and junior java developer positions. My requirements are not to have 'API Guys'. I hate that the IT industry looks for a resume/CV that just has a bunch of keywords. However, the 'Keyword Section' was present on all of our candidates CVs, so you have to accept that and move on.
So, my interview slant was to ask questions about OO fundamentals, and Java language fundamentals. I would include a couple of questions to satisfy myself that the candidate actually enjoyed software development (and wasn't forced into it by the parents), took an active interest, and wasn't bullshitting me.
Out of a dozen candidates, 6 of them were Absolutely F**king Useless (next time I leave Sydney for Manila, I will personally filter the candidates and not rely on some 3rd party), 3 were extremely mediocre, 2 slightly better (and we will be willing to train) and one was outstanding (he turned out to be an ex-Sun employee).
However, I actually found that I had decided on whether to HIRE/NO HIRE during my first interview question, which was "can you draw me a 1000 foot view of the architecture of the system you were/are involved in, in your current/last position?".
This would assess their high level understanding and ability to communicate. The diagram would invariably be a box diagram of the physical architecture. I would then ask the candidate to explain how the solution provided value to the business and what was the business problem that it solved. If they could coherently get this far, I would ask them about how they modelled the domain (I wanted to hear the nouns and verbs) and get them to draw me a portion of the class diagram and elaborate on roles and responsibilities.
I would allocate about half an hour to this part of the interview at most, then I would move on to the OO questions.
I would ask the candidate to explain what is meant by inheritance, polymorphism and encapsulation. (I know this is obvious, but soooooooo many people cannot explain any of those concepts well).
Next I would get into Java specifics. I would show the candidate some code for a class that implemented niave synchronization which was not thread safe, and get the candidate to explain why it could produce incorrect results and in what circumstances. In my experience even 'senior' developers cannot write multithreaded code. Some of the guys I interviewed had been using Java for 8 years and thought that synchronized instance methods on a Java class could be called concurrently with each other! It's cack like this that makes you really believe that this industry needs similar rigorousness of assesment that the healthcare profession needs for doctors.... (only 2/12 candidates spotted why my class was not threadsafe).
Next I would ask them what immutable means with regard to Java classes, why is immutability useful, under what circumstances would you consider using it?
Then I would show them a class that I would tell them looks immutable, but isn't, and could they explain why, and how it could be fixed. The class was passed two strings and a date in it's constructor, and all params were assigned to private fields. Obviously, java.util.Date is not immutable, so one possible solution would be to clone the date at the constuctor before assignment to its field, and clone it before returning it in a getter.
I would also ask what an invariant is (only 3/12 got that). What could you say about hashcode() and equals() for objects a and b where a.equals(b) is true? Why?
If you could add/remove any feature to Java what would it be? If the candidate could not think of anything they were NO HIRE.
I had some other questions: some about unit testing (when would you use a mock object?), some about design patterns (here is a list of a dozen-or-so design pattersn: talk about 3 of them (all candidates would pick Singleton and MVC, so after a 4 interviews, I disallowed those, as it tells you nothing other than "everybody knows what they are")).
BUT, crucially I found that the single best candidate basically controlled the interview (in a nice way!). It went completely off-format, but in every way I was convinced that the guy was for us. In a year, I am going to be thinking "it's so good that we got this guy". I am that confident in his ability.
(I was looking for these crucial indicators among candidates: abstraction ability (thinking in OO), technical ability (in Java), confidence (people that blindly do what they are told do not interest me, I don't like robots), leadership / willingness to be lead (somethin I would look for for leadership/junior roles) and communication (how well they conveyed their own ideas during the interview).
Anyway, it's late and I'm off to bed. I hope that this proves useful to other interviewers!
>Out of a dozen candidates, 6 of them were Absolutely F**king Useless (next time I leave Sydney for Manila, I will personally filter the candidates and not rely on some 3rd party), 3 were extremely mediocre, 2 slightly better (and we will be willing to train) and one was outstanding (he turned out to be an ex-Sun employee).
If I'd ask the same questions here in New York, I'd have the same result (1 out of 12). Go easy... Here's a set of my questions that at least will allow you to hire someone:
Top Java Interview Questions
URL: simonsays
At 3:57 PM on Feb 1, 2006, Rick Ross wrote:
Fresh Jobs for Developers Post a job opportunity
Erik points out that a fellow named "Simon" (gotta love the credentialing the blogosphere provides) posted this list of questions he's been hearing the past few weeks. Take a look and see if any are familiar?
What are the best Java developer interview questions in your opinion?
25 replies so far (
Post your own)
Re: Top Java Interview Questions
My favourite is:How do you assure the quality of your code?
I think it is very open and very revealing.
Mats
Re: Top Java Interview Questions
Wow. Those are somewhat beyond "How do you spell Java" but not much. A friend of mine once got a job at a Java startup, with similar easy questions.He's a rather smart hacker, one of sort that, when confronted with an weird database issue (proprietary), which the company refused to fix, claiming it was not a bug, can dive into the assembly details, and show to the database company exactly where their code is wrong. Someone like Guilfanov (of WMF patch fame) I guess.
Anyway, after he left the company, their interview process, was much more difficult. Few easy questions at first, then questions about the JIT. Questions like "knowing that Java is a stack-based language, how do you take advantage of that?" What next? Describe the Von Neumann Architecture vs. Harvard Architecture?
Re: Top Java Interview Questions
A large search company located in the Silicon Valley, that has ambitions to go mobile, asked me,"I see you were a software architect at your previous company. Did they just hand out that title to everyone?" That struck me as a wacky and obnoxious question.Re: Top Java Interview Questions
> A large search company located in the Silicon Valley,> that has ambitions to go mobile, asked me,"I see you
> were a software architect at your previous company.
> Did they just hand out that title to everyone?" That
> struck me as a wacky and obnoxious question.
That large search company, assuming you're talking about Google, is known for asking obnoxious questions like that. But, in their defense, they aren't really being obnoxious, it's just that their requirements for a junior developer are more stringent then most companies requirements for an architect. For them to take you seriously as an "architect" you'd better have done something like invent Unix.
And, just to be clear, I don't work for them.
Re: Top Java Interview Questions
At the time, I found it was more humorous than obnoxious; but I think such questions tell you a lot about the company, not so much about the job requirements, which are printed in black and white.Re: Top Java Interview Questions
Recruitment Agent:"I see from your resume that you are a J2EE developer. Do you have any experience with Java?"
Me:
"Excuse me?...."
Re: Top Java Interview Questions
Can you tell me what an Interface is used for?It was asked in a condescending way, and I almost didn't take the job because I was afraid that I would have to work with that prick for the next 18 months.
As it turned out, I did take the job, and I do have to work with that prick. Funny thing is that he ended up being a pretty funny and friendly guy. I am glad I didn't end up basing my decision to take the job on that one question.
Re: Top Java Interview Questions
> A large search company located in the Silicon Valley,> that has ambitions to go mobile, asked me,"I see you
> were a software architect at your previous company.
> Did they just hand out that title to everyone?" That
> struck me as a wacky and obnoxious question.
"No, we had other titles like "President", and "Secretary", so not everyone has "Software Architect"."
Re: Top Java Interview Questions
Recruitment Agent:"I see from your resume that you are a Java
developer. So I assume that you have experience with J2EE."
Me:
"Excuse me?...."
---------
Me to dice.com search engine:
java
dice.com search engine response:
"Here are the jobs you requested for query "Java | J2EE".
Re: Top Java Interview Questions
Cute. That's why some companies field the phone calls, then turn the resumes over to techs, for a tech review.Where it's the flip side of the coin. So it says here you've worked with Spring, can you tell me a little about the design pattern behind Swing and why you would use it?
"Oh, actually I know about Spring, but I don't actually have experience with it..."
Another question I like to ask, just to get a feel for whether this person is really keeping up with the technology, or just pumping up his/her resume is, _especially_ if they put the version number of EJB they worked with:
"So you say you've worked with EJB 2.1, are you familiar with EJB 3.0 and how that differs from the previous version?" Similarly, I would expect someone, especially an architect, to be familiar with some of the new features of 1.5.
Re: Top Java Interview Questions
Wackiest question:"We want to load images in less than 1 millisecond. Can
you do that in Java?"
Toughest (good) question:
I was shown a short Java program, asked what it would do,
and then shown it did something totally different. The interviewer then said,
"Don't worry, this is a tricky problem no one gets right the first time. How
would you figure this out?" I would step through it in a debugger,
I replied. "Fine, let's do that." The interviewer watch
as I debugged the program and figured out why it was
acting so weird. He got to see how I approached problems and that I
knew my way around a debugger.
Toughest stupid question:
"Draw a UML diagram for a reverse-polish notation
calculator." (asked in a conference room with the entire
company watching).
What they should have asked?
My favorite question to ask is, "Give a high-level
description of a major programming task and how you
solved it." This is a good ice breaker as people are usually
comfortable talking about their own work.
Re: Top Java Interview Questions
I interviewed a dozen Filipino guys in Manila this week. It was my second experience of 'batch interviewing' and it was an interesting experience.I was interviewing for senior and junior java developer positions. My requirements are not to have 'API Guys'. I hate that the IT industry looks for a resume/CV that just has a bunch of keywords. However, the 'Keyword Section' was present on all of our candidates CVs, so you have to accept that and move on.
So, my interview slant was to ask questions about OO fundamentals, and Java language fundamentals. I would include a couple of questions to satisfy myself that the candidate actually enjoyed software development (and wasn't forced into it by the parents), took an active interest, and wasn't bullshitting me.
Out of a dozen candidates, 6 of them were Absolutely F**king Useless (next time I leave Sydney for Manila, I will personally filter the candidates and not rely on some 3rd party), 3 were extremely mediocre, 2 slightly better (and we will be willing to train) and one was outstanding (he turned out to be an ex-Sun employee).
However, I actually found that I had decided on whether to HIRE/NO HIRE during my first interview question, which was "can you draw me a 1000 foot view of the architecture of the system you were/are involved in, in your current/last position?".
This would assess their high level understanding and ability to communicate. The diagram would invariably be a box diagram of the physical architecture. I would then ask the candidate to explain how the solution provided value to the business and what was the business problem that it solved. If they could coherently get this far, I would ask them about how they modelled the domain (I wanted to hear the nouns and verbs) and get them to draw me a portion of the class diagram and elaborate on roles and responsibilities.
I would allocate about half an hour to this part of the interview at most, then I would move on to the OO questions.
I would ask the candidate to explain what is meant by inheritance, polymorphism and encapsulation. (I know this is obvious, but soooooooo many people cannot explain any of those concepts well).
Next I would get into Java specifics. I would show the candidate some code for a class that implemented niave synchronization which was not thread safe, and get the candidate to explain why it could produce incorrect results and in what circumstances. In my experience even 'senior' developers cannot write multithreaded code. Some of the guys I interviewed had been using Java for 8 years and thought that synchronized instance methods on a Java class could be called concurrently with each other! It's cack like this that makes you really believe that this industry needs similar rigorousness of assesment that the healthcare profession needs for doctors.... (only 2/12 candidates spotted why my class was not threadsafe).
Next I would ask them what immutable means with regard to Java classes, why is immutability useful, under what circumstances would you consider using it?
Then I would show them a class that I would tell them looks immutable, but isn't, and could they explain why, and how it could be fixed. The class was passed two strings and a date in it's constructor, and all params were assigned to private fields. Obviously, java.util.Date is not immutable, so one possible solution would be to clone the date at the constuctor before assignment to its field, and clone it before returning it in a getter.
I would also ask what an invariant is (only 3/12 got that). What could you say about hashcode() and equals() for objects a and b where a.equals(b) is true? Why?
If you could add/remove any feature to Java what would it be? If the candidate could not think of anything they were NO HIRE.
I had some other questions: some about unit testing (when would you use a mock object?), some about design patterns (here is a list of a dozen-or-so design pattersn: talk about 3 of them (all candidates would pick Singleton and MVC, so after a 4 interviews, I disallowed those, as it tells you nothing other than "everybody knows what they are")).
BUT, crucially I found that the single best candidate basically controlled the interview (in a nice way!). It went completely off-format, but in every way I was convinced that the guy was for us. In a year, I am going to be thinking "it's so good that we got this guy". I am that confident in his ability.
(I was looking for these crucial indicators among candidates: abstraction ability (thinking in OO), technical ability (in Java), confidence (people that blindly do what they are told do not interest me, I don't like robots), leadership / willingness to be lead (somethin I would look for for leadership/junior roles) and communication (how well they conveyed their own ideas during the interview).
Anyway, it's late and I'm off to bed. I hope that this proves useful to other interviewers!
Re: Top Java Interview Questions
James,>Out of a dozen candidates, 6 of them were Absolutely F**king Useless (next time I leave Sydney for Manila, I will personally filter the candidates and not rely on some 3rd party), 3 were extremely mediocre, 2 slightly better (and we will be willing to train) and one was outstanding (he turned out to be an ex-Sun employee).
If I'd ask the same questions here in New York, I'd have the same result (1 out of 12). Go easy... Here's a set of my questions that at least will allow you to hire someone:
http://java.sys-con.com/read/48839.htm
>BUT, crucially I found that the single best candidate basically controlled the interview (in a nice way!).
He-he-he, he probably read my other article on how to pass Java technial interviews :
http://java.sys-con.com/read/111193.htm
Re: Top Java Interview Questions
The one I have been getting recently is "I went out on the internet and searched for your name... what's this Javalobby thing?"