Java Developer Questions

Published on February 2017 | Categories: Documents | Downloads: 35 | Comments: 0 | Views: 279
of 4
Download PDF   Embed   Report

Comments

Content

The following questions are intended to give us a feel for how you approach software
development. There are no perfect answers and we expect you to give us your opinion, rather
than give us a text book definition or an answer from the internet. (As a publishing company
we have tools to check for copy and paste!)
As this is a survey of your opinion, we request that you do not share your answers with
anyone who might pass them on to other applicants to our organisation.
There are no trick questions and we would expect only a few words of explanation, though
feel free to write more on questions which particularly matter to you.
We expect this to take you a few minutes to answer.
Example question: Why are packages important in Java?
Example answer: Packages enable us to bring together related code and concepts and keep it
separate from other parts of the system. This promotes separation of concerns and hiding
implementation details.
Example question 2: Which development activity frustrates you?
Example answer: I find user interface optimisation frustrating because my graphic design
skills let me down.
Please answer all questions. If you don't know an answer, then please put a single . in the box
to indicate you wish to skip the question.
1. What is the most important thing we can do to ensure the code we write will meet our
users' needs?
Ans: Make sure your overall application code is covered close to 97% test coverage
those are validated against each user story. make sure you have 100 % unit test covered. I
prefer Test Driven Development approach which makes application development cover
complete requirements at hand.
2. How can we be sure we're only writing code that's worth writing?
Ans: if you compare your code functionality with user story from the client it makes
sense that we are not over cooking or under cooking the code. which makes your code to the
point.
3. Suggest one really good way to ensure our teams write code at a high standard?
Ans: configure the check styles and code conventions from technology websites into
your IDE.
4. Which of class, interface or object do you think is most important and why?
Ans: interface is important because of polymorphic behaviour and coding to
interfaces makes your classes follow open closed principles.

5. If someone is using polymorphism effectively, what do you think they're mainly doing
and why is it helping?
Ans: Polymorphic application development makes your code flexible and
maintainable. it prepares your code to implement new requirements which are
uncertain at the moment.

6. What does refactoring mean to you?
Ans : Code refactoring is a result of identifying a better approach to your solution or
any requirement changes. Refactoring code based on code review comments by the
team members, comments like the code must be easy and quick to follow with
necessary comments. Makes your code extensible.
In the process of refactoring we should also make sure that the new approach is not
breaking the user story functionality . the unit tests should be still passing.

7. When is refactoring safe and when is it unsafe?
Ans: safe: your code is safe when it has passed your unit and integration tests
which will make sure I have not implemented/introduced a bug.
unsafe: your code is unsafe when we rewrite the application from scratch
where you don't have any test classes developed.
Follow test driven development for safe code always.

8. If refactoring is unsafe, what could you do to improve the code if there is not time to
do a huge amount of work?
Ans: Already in the development process I have set up my IDE to follow coding
standards , it will help a bit in writing/refactoring/inspect code which might be
eligible for refactoring in later stages of application development down the time line.

9. What is a design pattern used for?
Ans: Design pattern is used to hit the common or reoccurring coding/design
challenges in application development. it avoids reinventing the solution for the same
problem again and again. your code is more maintainable which is understood by
anyone in the team.

10. Name a design pattern you have used, what it is for, and how it helped you
I used Dependency injection, when i migrate the legacy system on to latest
technology. legacy system was using factory design patter to return a particular
product , which is not a testable code as a unit.
I mapped that factory design to Dependency Injection pattern where spring makes it
easy to write simple POJO which is testable.
I used many other patterns like Filter design pattern, used for testing if request is from
trusted source , data encoding type used by the client.
MVC design pattern , for separating the view with business logic. it helped writing
maintainable code as the concerns related to view, data and model are separated. I had
freedom to change the view technology based on the requirement changes by time.
create DAO classes this used Abstract factory design pattern , which makes DAO
more maintainable as we have specific DAO created by our factory DAO class.I used
this for accessing data from database, which makes database related code more
maintainable and layered.
My business object is free from the underlying data access complexity.

11. Which are your favourite types of automated tests? Why do they help?
Ans : Application build , automating build is very handy as we frequently change our
code in agile process which requires building application with varying code. We can
run repetitive tests against different versions of build.
UI test should be automated , it helps in identifying if new UI works fine across
different browsers on different versions. "Selenium" web driver helps me here. It also
make sure that the components are working as per the requirement.
Concurrency test, creating virtual users to access web application can test the web
application Load handling capacity and also enables us to identify areas of bottleneck
in our code.
Functional testing, it helps in identifying if the refactored code is breaking any
functionality already developed.
Integration testing , bit hard to automate but worth doing it. It helps to make sure that
my new application blends fine with legacy and works as expected

12. If we have four unconnected systems with different databases across different
technologies, what options would you consider for enabling them all to share some
core data like users or catalogues of products?
Ans: I will go for a Web service to make this information available to these different
applications, as web service is a technology independent and security can be applied
easily.
In addition if your list applications communicate different data types like xml,java
object,json,queue messages etc I will opt for Apache camel at integration layer to
make these all applications to talk/communicate data.

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close