DEV Community

Java Developer Litmus Test Part 1

Peter Harrison on September 08, 2018

How do you get a useful idea of the skill level of a Java developer? There are of course many options to test basic knowledge of Java. More advance...
Collapse
 
brian21king21 profile image
Brian King

Okay I gave this a go and went ahead and made some changes. Here's the link git.nzoss.org.nz/brian/poorexample This was a fun little thing. I'm interested to see part 2. I'm self taught but I have never used Spring Boot.

Collapse
 
cheetah100 profile image
Peter Harrison

You correctly moved the configuration of each sender into the senders themselves. You also correctly added a interface and modified the senders to implement this rather than disparate calls.

The one thing that could have been done better is in the 'Alert' package, where you have a AlertHandler which would need to be modified if another sender is introduced. Ideally you want to end up with a system where you can simply code a new type of sender and add it to the bean configuration.

Collapse
 
brian21king21 profile image
Brian King

I see exactly what you mean. I made it more complicated than it needed to be, your solution was much simpler. I'll have to see if I can find some 'refactoring challenges' online, because this seems like a good way improve my coding/critical thinking skills. Thanks for taking the time to look it over and giving your feedback.

Collapse
 
simontrhodes profile image
Simon Rhodes • Edited

Peter,
This morning I've made an attempt at your test.
Currently I'm doing a Computer Science degree and only did OOP and Java in one module. Along with a bit of OOP in PHP.
As I've never developed in a commercial environment, I haven't come across Maven or Spring.

Overall I struggled more with Github than I did with Java.
It took me less than 1 hour, so I'm not sure if I missed anything?

My attempt is at

I look forward to some feedback.

Thanks,

Simon

Collapse
 
cheetah100 profile image
Peter Harrison

Hi Simon, congratulations on completing the task as written.

Take another look at the code with the eyes of a code reviewer. Ask yourself how you might improve or refactor the code base while introducing the new functionality. If you do make improvements note down what the changes are and how they make the code better, but keep them to yourself for now.

Next week when I publish my solution I plan to have a discussion about the different approaches people took.

Collapse
 
simontrhodes profile image
Simon Rhodes

Thank you Peter.
I did see quite a few changes that could be made.
I've removed the link from my post, until other people have had a go.

Collapse
 
alephnaught2tog profile image
Max Cerrina

I'm not sure what your goals are, but it seems kind of easy? It took me 15 minutes. Given that, I'm assuming I must've missed something. I did actively resist the urge to fix things I disliked in the code, because that wasn't asked, and my assumption jumping into anything existing is to at least first mimic it as written.

For the sake of data-gathering as I think that's your goal in terms of where it is in relation to stuff: I've been programming for almost two years total, working professionally in 100% un-Java-related fields for about four months total. I have no idea what Spring is, but it was really very clear-cut. I'm still working out how to run it, but IntelliJ at least confirms build success. I've taken two semesters of Java at a local community college, but I'm super rusty because my last course in it was a few months ago at this point.

If you really do want the repo, here: github.com/aleph-naught2tog/poorex...

Collapse
 
cheetah100 profile image
Peter Harrison

Okay, I'm kinda jumping the gun here in terms of revealing part of the purpose of the test, but one of the first aspects is to see if the applicant will resolve poor coding issues in addition to simply following the specification. The intent was to identify confident coders who will fix code quality issues proactively rather than simply follow the minimal work to complete a user story. The name of the project is 'poorexample' for a reason; it exhibits several common poor coding techniques. The instructions said applicants have a day, which is way more than any coder needs to complete the task as you correctly identified. The reason was so they would not feel overtly time constrained.

In relation to running it there is a BootStrap class which has a main method that can be run directly in the IDE.

What I recommend is taking another look to identify all the aspects you think are an issue and how you would fix them. Perhaps make the modifications to your repo and add comments to the code, or as a separate file. On Saturday I will be posting my solution.

Collapse
 
cheetah100 profile image
Peter Harrison

I actually wrote this back in 2013, so as you say it is a little dated by the approach in Spring. It has been useful in the past to me as it was possible to identify which applicants had a grasp of good coding practices. It is certainly not a IQ test. Hopefully this will inspire others to write similar tests for other languages. You are right about post test interviews, in that this test is used as a foundation to explore their reasoning processes. I appreciate your feedback.

Collapse
 
cheetah100 profile image
Peter Harrison

Solution is now available.

dev.to/cheetah100/java-developer-l...