Win a copy of Microservices in Action this week in the Web Services forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Can someone tell me how to improve the code in this project?  RSS feed

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

So, I recently applied for a job and after the screening interview they asked me to do a take home test using SpringBoot that has some provided code. I submitted the solution following all the instructions, another cevat was in the instructions it's mentioned that I shouldn't modify the provided code and hence I didn't refactor it into different packages/folders etc. After submitting the solution the feedback I got was:

Is the code readable (uses proper naming and consistent formatting)?

3

Is there excessive repetition of code?

3

Does it comply with the single-responsibility principle?

2

Does it comply with the Liskov substitution principle?

3

Does it use segregation of interfaces?

3

Does the code introduce the necessary abstractions to handle the requirements?

3

Does the code introduce any unnecessary abstraction?

2

Is this a succinct, clean and easy to evolve solution?

3

Is the test code as clean as the production code?

2

Does it use git properly, producing increments that make sense and using proper commit messages?

3

I know it's not a simple question or a particular problem I have but rather in general how could I improve the solution. I would appreciate if someone still give me pointers/hint about it. I have linked both the original code structure that I received for test as well as the final submission.
 
Bartender
Posts: 9498
184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may want to post particular snippets of code you want to have reviewed on this site, or host your project on a reputable site like GitHub.

Few users are willing to download and unpack a zip from an unknown site to review code.
 
Rancher
Posts: 624
11
Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I took a look at your code... I advice you  to follow Stephan's advice and post somthings here, since I do think there are several issues.
You're project structure in general (like putting everything in one package and not using any accesmodifiers for your classes), Naming convention, the overuse of static members...
If you need help with the conventions, look here
 
Marshal
Posts: 61805
193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why did you post on the Spring forum?

Zee Haider wrote: . . . the feedback I got was: . . . .

What do the numbers mean? Is 3 good or bad? What is the best and the worst possible score?
Maybe you are lucky getting that sort of feedback because it would allow you to improve your code.
 
Daniel Demesmaecker
Rancher
Posts: 624
11
Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:What do the numbers mean? Is 3 good or bad? What is the best and the worst possible score?
Maybe you are lucky getting that sort of feedback because it would allow you to improve your code.



I think he copy paste his assignment and that are the marks he can earn by completing the checkpoints...
 
Campbell Ritchie
Marshal
Posts: 61805
193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Daniel Demesmaecker wrote: . . . I think . . . the marks he can earn by completing the checkpoints...

Thank you I thought it meant he had been given 3 marks for that part.
 
Zee Haider
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:

Daniel Demesmaecker wrote: . . . I think . . . the marks he can earn by completing the checkpoints...

Thank you I thought it meant he had been given 3 marks for that part.


You're correct. I was given these marks for my submission in the categories I mentioned with 1 being the lowest and 5 being the highest. They didn't share with me the things where I earned higher marks.
 
Zee Haider
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Daniel Demesmaecker wrote:I took a look at your code... I advice you  to follow Stephan's advice and post somthings here, since I do think there are several issues.
You're project structure in general (like putting everything in one package and not using any accesmodifiers for your classes), Naming convention, the overuse of static members...
If you need help with the conventions, look here



Well, the reason I linked the entire projects is because I wanted to see what did I miss or how would I structure it better. As I said in the my original post it's not a specific problem that I want to get resolved by posting a code snipped but pointers on what should have I done better.

The reason, I put all the things under one package is because it was mentioned in the guide that ideally I shouldn't be modifying any provided code, that's why I didn't repackage different components or tried to change the convention. Also I used static members because I thought it would be good for the particular thing I was addressing.

As far as hosting on github is concerned, I didn't do it specifically because then it would be easily available to search and copy solution or know about the test. That's specifically why I shared the links to the uploaded file. I know the workaround is not perfect and people still have access to my solution by I just didn't want to make it that easy and I still wanted feedback on how to improve the solution.

Thanks.
 
Greenhorn
Posts: 2
Flex Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
More details about the test are needed, Can you share with us the statement of the problem ?
Regards
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!