Who are you?
I am a IT veteran and consultant with 20+ years of experience leading Full Life Cycle Application Development, from startup to the enterprise, in the Chicago-land area. (Note, Chicago no longer has gangsters. It is perfectly safe to raise your kids here. Just avoid the areas controlled by the mafia.)CORRECTION: There is no mafia in Chicago or it's surrounding suburbs, except for ...(edited).
NEW CORRECTION: There is no mafia in Chicago or it's surrounding suburbs. PERIOD.
My apologies. So I claim to be a computer veteran. This is only because my first three dreams: Rock Star, Baseball Player and Novelist, didn't quite pan out.
(AND movie producer, almost forgot that one. But if I get a camcorder, write a script, and coerce dome gullible, wannabe actors and actresses...)
Humor in the Workplace
Anyway, I digress. And now that I've diverged this far, I may as well explain. I do not think I'm funny, nor am I trying to be. This is just how it comes out when I write. If you ever hire me, please know I clean up my writing and make it professional. But I'll happily supply the first draft for your amusement. (It makes great ammunition when you have to cut costs.)However I've had requests to leave the alleged humor in my documents because "IT is so dry". Take that as you will.
Getting on track...
Semi-Qualifications
I have both given and been the recipient of many Java Architect interviews. (This is true, I'm afraid.) I've fielded questions that include "what is the difference between a class and an object", and even more challenging ones. (Also true, "you know who you are....")Service to the Community (i.e Complaints)
But first, I must do service to the IT community and complain about three things:- The interviewer asks a question looking for agreement with their opinion, despite the fact the industry is still debating the question, and the company would be better served with a diversity of opinion.
- Does any organization bother to train it's IT employees how to interview? I've had a single client that did, and the training was optional and the approach was never used
- Studies show the majority of Americans believe they are better than average drivers, LOL. My personal observation is most IT interviewers believe they are uniquely good interviewers.
Interview Best Practices
It's productive to have an informal chat with a prospect. But if I can get a client to use a lightweight process that quantifies results, they are, in most cases, SOLD!Case Study
At a client I interviewed candidates with two team leads. To prepare, I simply threw together a spreadsheet with around 5 questions for each job requirement (it's all we had time to ask).The questions ranged from simple to very advanced. Each questioned had a 'value' assigned, the simple questions having the highest, the advanced the lowest. I added simple formulas to sum results and copied the original tab for each interview.
We ended with a short list of two candidates, who seemed to be roughly equal. However I preferred the woman and my two male team leads preferred the man.
To resolve the impasse, I opened the spreadsheet and compared results. Within a minute we realized the woman answered one more question in each and every category! So we agreed to hire her, and she performed well.
The morale of the story is, with a trivial amount of extra effort, we made a better choice, because we used objective measures.
I always recommend you tech your prospective architect. In fact I've been paid to tech Java architects and developers as a part time job.
Think about it, someone decided to pay ME to interview their Java candidates.Wonders never cease.
Interview Questions
Here are some questions any good architect should know. Pains have been taken to avoid ambiguous answers, but YMMV.Select the BEST answer...
Simple Questions (15 points each)
1. xUnit is a family of frameworks that can be used for:a. Unit tests
b. Integration tests
c. Both unit and integration tests
d. xUnit has nothing to do with testing
2. TDD stands for:
a. Temporal Date Design patterns
b. Test Driven Development
c. Test Driven Design
d. Both b and c
3. One object oriented design technique is:
a. Noun Harvesting
b. Design Patterns
c. UML
d. BREAD
4. A UML Class Diagram does not sufficiently describe an OO system because:
a. It does not show interfaces
b. It does not show composition
c. It does not show class relationships
d. It is a static diagram
5. The difference between aggregation and composition is:
a. They are both the same
b. Composition is an "owning" relationship
c. Aggregation is an "owning" relationship
d. Composition groups like objects, aggregation groups family's of objects
Medium Difficulty (10 points each)
6. A domain model is:a. The entire application
b. An object oriented model that represents user interactions
c. An object oriented model of the business that the application is automating
d. An object oriented model containing the business rules
7. The difference between "rich" and "anemic" domain models is:
a. A rich model has business logic
b. A rich model has Design Patterns
c. An anemic model has no Design Patterns
d. Both b and c
8. Refactoring is:
a. A process to fix bugs introduced by programmers
b. Any general bug fix
c. A re-architecture of the code that does not change it's behavior
d. A re-architecture of the code to make it more efficient
9. Scrum is:
a. An Agile methodology
b. All you need to be "Agile"
c. Assumes developers use best development practices
d. a and c
10. Which of the following is NOT a common architectural application tier:
a. Presentation tier
b. Persistence tier
c. Object Orientated tier
d. Both a and b
Advanced Questions (5 points each)
11. The expression "favor composition over inheritance":a. Is stated in the "Gang of Four" Design Patterns book
b. Appeared after the "Gang of Four" Design Patterns book
c. Is based on the idea that inheritance is more tightly coupled than composition.
d. Is based on the idea that composition is more tightly coupled than inheritance.
e. Both A and D
f. Both A and C
12. The Liskov substitution principle:
a. Is required to support class inheritance
b. Is a mathematical model for the facade Design Pattern
c. Is a mathematical principle that has nothing to so with programming
d. Makes all computer languages work
13. GRASP is:
a. An acronym for a set of practices that lead to good UI design
b. Is Craig Larman's learning aid to help in the design of object-oriented software
c. Is Peter Coad's learning aid to help in the design of User Interfaces
d. A trick question, there is no reference to GRASP in computer literature
14. Design Patterns are:
a. Common object orientated solutions
b. New objected oriented solutions
c. Created by Java experts to teach good design
d. Only useful to architects
15. Agile methods are:
a. An example of "Waterfall" methodologies
b. A fad no longer recommended by industry leaders
c. No different than development techniques of the last 30 years
d. Considered a current industry best practice
Java version 5-7 questions (5 points each)
16. Java 5 Generics:a. Ensure compile-time type safety
b. Ensure compile and runtime type safety
c. Have nothing to do with type safety
d. Are useful only for Java collections
17. What is the most significant cause of concern for Java Annotations?
a. You cannot create your own annotations
b. They cause additional classes to be loaded, slowing performance
c. The represent a tight coupling
d. There are no significant drawbacks
18. Regarding CMP and JPA:
a. JPA and CMP are designed to work together, but CMP is optional
b. JPA and CMP are designed to work together, and CMP is required
c. JPA without CMP requires a JTA transaction controller
d. JPA replaces CMP
19. Advantages of the Spring Framework over JPA:
a. JPA is a standard
b. Spring supports Dependency Injection
c. JPA uses annotations that couple domain classes to the framework
d. Spring is free
20. Advantages of JPA over the Spring Framework:
a. None. The advantages are part of CMP
b. JPA is implemented by Hibernate "under the covers"
c. JPA provides vendor independence
d. Spring uses more libraries
New Technology
21. What is the biggest difference between Ruby and Groovy?a. Groovy uses the familiar C-based syntax while Ruby does not
b. Ruby supports runtime code compilation.
c. Groovy is meant for scripting
d. Ruby executes faster because it's written in C.
22 Grails is considered scalable:
a. Because it supports static classes
b. Because it supports multithreading while Rails does not
c. Because it is based on Spring and Hibernate
d. Grails has not been shown to scale.
23 Which is easier to learn: Grails or Rails?
a. Rails, because Ruby has a simpler syntax.
b. Rails, because it uses more common Design Patterns
c. For Java developers, Rails, because Ruby is simpler than Java.
d. For Java developers, Grails, because Groovy is mostly Java compatible.
24 NoSql database performance can be restricted by:
a. Access via services, which are slower than direct calls .
b. The CAP theorum
c. The DAP theorum
d. Both c and d.
25 Cloud computing:
a. is always hosted by a third party like Amazon, Google or Rackspace
b. requires NoSQL databases
c. cannot be used to host Java Web Applications
d. achieves economy of scale
-
-
-
F
I
L
L
E
R
-
-
-
A
N
S
W
E
R
S
B
E
L
O
W
-
-
-
Answers:
- xUnit is a family of frameworks that can be used for:
- Answer:c. Both unit and integration tests
- Note:jUnit, like other xUnit variations, can drive both unit and integration tests, as well as others.
- TDD stands for:
- Answer: d: Both b and c
- Note:TDD is alternatively called Test Driven Design or Test Driven Development
- One object oriented design technique is:
- Answer: a. Noun Harvesting
- Note:Noun harvesting is a classic OOD technique
- Note:None of the others are OOD techniques
- A UML Class Diagram does not sufficiently describe an OO system because:
- Answer:d. It is a static diagram
- Note:Class diagrams do not document object interactions
- Note:Other diagrams like sequence and activity diagrams capture dynamic interactions
- The difference between aggregation and composition is:
- Answer: Composition is an "owning" relationship
- Note:In composition, if an object is removed, it's related objects are also removed
- Note:In aggregations, related objects can exist on their own
- A domain model is:
- Answer: c. An object oriented model of the business that the application is automating
- Note:The term "domain" refers to the business domain being automated by the application
- The difference between "rich" and "anemic" domain models is:
- Answer: a. A rich model has business logic
- Note: According to Martin Fowler, a rich model contains business logic
- Note: According to Martin Fowler, an anemic model contains POJO)'s (properties, getters, setters, equals() and HashCode()).
- Refactoring is:
- Answer: c. A re-architecture of the code that does not change it's behavior
- Note: Martin Fowler wrote the refactoring "bible".
- Scrum is:
- Answer: d. a and c
- Note: Scrum is considered an Agile Methodology
- Note: Scrum assumes developers use best development practices, like Extreme Programming
- Note: A project with Scrum and traditional engineering practices is not considered "Agile".
- Which of the following is NOT a common architectural application tier:
- Answer: c. Object Orientated tier
- Note: Presentation and Persistence are common architectural tiers managing the User Interface and data persistence respectively. The "middle" tier has various names, or is sometimes just called the "middle tier".
- The expression "favor composition over inheritance":
- Answer: f. Both A and C
- Note: This advice appeared as early as the 1995 GOF Design Patterns book
- Note: We favor composition because it is more loosely coupled than inheritance
- The Liskov substitution principle:
- Answer: a. Is required to support class inheritance
- Note: The Liskov substitution principle defines how sub-types work.
- Note:It applies only to OO languages.
- GRASP is:
- Answer:b. Is Craig Larman's learning aid to help in the design of object-oriented software
- Note: Craig Larman wrote the classic book Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process
- Design Patterns are:
- Answer: a. Common object orientated solutions
- Note: Curiously the Java folks created a number of "patterns" intended to be used in web applications, which contradicts the definitions of "well known".
- Note: Most Java architects tried, then abandoned, most of the Java patterns, especially after Martin Fowler's classic PofEAA book was published.
- Agile methods are:
- Answer: d. Considered a current industry best practice
- Note:The debate has ended some time ago.
- Java 5 Generics:
- Answer: a. Ensure compile-time type safety
- Note: Generics are a compile-time only feature
- Note: IMHO, after a decade of code reviews, I have yet to see a bug that generics would have prevented.
- Note: Generics make Java code even more verbose (see Groovy)
- Note: Most IT shops I know have added generics as a coding requirement
- What is the most significant cause of concern for Java Annotations?
- Answer: C: The represent a tight coupling
- Note: (A) is not true
- Note: The overhead referred to in (B) is trivial.
- Note: Annotations represent a tight coupling to a specific framework.
- Note: Tight coupling has historically been considered a significant negative. However many Java folks are embracing annotations for code reduction. This trade-off is still being debated. However it can be confidently stated that the tight coupling annotations represent is their major concern.
- Regarding CMP and JPA:
- Answer: d. JPA replaces CMP
- Advantages of the Spring Framework over JPA:
- Answer: c. JPA uses annotations that couple domain classes to the framework
- (A) is commonly used to cite advantage for JPA, not Spring.
- (B) Both solutions support DI.
- (D) Both solutions can be obtained free of charge.
- Note: Java annotations, like any direct class reference, represents a tight coupling.
- Note: Tight coupling makes changing the dependent framework more expensive.
- Advantages of JPA over the Spring Framework:
- Answer: c. JPA provides vendor independence
- Note: (A) JPA deprecates CMP
- Note: (B) This is irrevelant to the question.
- Note: (D) The fact Spring uses more libraries is not considered an issue.
- What is the biggest difference between Ruby and Groovy?
- Answer: a. Groovy uses the familiar C-based syntax while Ruby does not
- Note: Both languages tend to keep up with each others features
- Note: Both Java and Groovy use "C" syntax, while Ruby does not
- Grails is considered scalable
- Answer: c. Because it is based on Spring and Hibernate
- Note: Grails began as an API over Spring and Hibernate, both known to scale.
- Note: At that time Rails did not support multi-threading and was restricted to small web applications.
- Note: Rails scales quite well now.
- Which is easier to learn: Grails or Rails?
- Answer: d. For Java developers, Grails, because Groovy is mostly Java compatible.
- Note: (A-C) are incorrect
- NoSql database performance can be restricted by:
- Answer: b. The CAP theorum
- Cloud computing:
- Answer: d. achieves economy of scale
- Note:(A-C) are not true
Thanks, and have a pleasant tomorrow.