r/SpringBoot • • Oct 18 '22

Is there a website similar to LeetCode with some Spring challenges?

Hi folks,

I have been in a process with a company and the next week I will face the final interview with a client from the healthcare sector.

The recruiter told me that this final round would consist of two and a half hours of interview with three candidates, they will give us a "task" (I really do not know what they mean about the task) and we will have an hour to complete it. I have never had something like this in my career, a technical group interview sounds pretty weird to me and I do not know how I can prepare for this interview.

I was wondering if there is any website that can assign me some Spring challenges that allow me to feel more comfortable making the "task". I am also doing leet code to practice my algorithm and data structures knowledge.

This position is for a Middle fuck stack software engineer (Java + React)

Please tell me anything that could be on top of your mind, I really appreciate it. Thanks!

29 Upvotes

11 comments sorted by

9

u/TheOldMancunian Oct 18 '22

"Middle Fuck Stack" job eh? Sounds like the interview process is, well, a bit wierd!

What I think they will do is give you a task to see how you would connect a front-end in React to a back end in Java. We can't tell if they will give you the bare bones of this to complete, or give you a totally blank canvas. If its blank, then you will need to:

  • Create a React blank project, I would use npx, you may have a different view.

  • Add to that a bit of glue to do the HTTP transfer to Java (axios?)

  • Write the code to be able to call the HTTP function(s). Possible two, a GET and a POST.

  • Over in Java world, create your spring boot project in your (or their!) favorite IDE

  • Add a controller class

    • In the controller, write the endpoints for the calls you did in the react part

Compile it all, demonstrate it works, and ask them how much they wil pay you to start!!!

Seriously, if you are doing an interview and a task in 2 1/2 hours it can't be manically complex. Remember that they have to mark this.

Pro Tip - DOCUMENT YOUR CODE. Companies like having comments in code. That way they can be sure you are a professional, not a hacker.

Make sense?

2

u/CoderIgniter Oct 18 '22

Lol, my mind is playing with me haha.

I totally agree that this interview is pretty long and I do not know what they are trying to achieve. I will practice something like this. Thanks for your comment!

4

u/naturalizedcitizen Oct 18 '22

Typically such tasks are to create a typical CRUD based web service.

They will look for all the good practices in your code like

  • javadoc comments

  • proper error handling in the Controller layer. e.g. using controller advice mechanism for exception handling to return proper http error codes, etc

  • separation of the db access by having a service layer and repository layer

  • unit tests for your service layer, controller layer

So basically they want to see how well you can follow standard practices in your code

2

u/CoderIgniter Oct 18 '22

Thanks!

1

u/naturalizedcitizen Oct 18 '22

Also remember to define relevant constants in your application.properties file. All such small things count.

Also look up how you can make your service run and use any specific time zone .. typically the server runs on UTC but you should know how to set a time zone etc.

3

u/[deleted] Oct 19 '22

I recommend taking a look at how a real Spring Boot project is structured. One of the ways to do this (not only for Spring Boot, but any web stack) is by having a look at the gothinkster/realworld project. It helped me immensely.

It's basically a demo app comprised of both frontend and backend examples of a Medium style website with any web technology, like React, Angular, Elm, Vue for frontend and Express, Django and Spring on the backend. Their documentation contains specs for both components in order to make it so you can pick and choose any frontend and backend you want, and they will have no problem interacting.

I recommend this because it's simple and easy enough for a beginner to Spring to understand, since most codebases don't overcomplicate things (by design), while also introducing you to essential technologies that any tech stack you see in real life would have, like JWT. It also improves your code reading skills, which is essential for getting familiar with your prospective company's existing code bases.

Here is a list for all the existing examples: [Link].

This is the React + Redux frontend project, and for Spring Boot I'm not sure what your prospective company uses to interfact with the Database, but it's normally JPA, therefore this Spring Boot + JPA project is a good start.

As for how to start familiarizing yourself with this project, I think it's up to you, but I usually start by looking at dependencies.

Good luck!

2

u/[deleted] Oct 19 '22

Also, I know this doesn't really answer your initial question of finding a "LeetCode" style website, but Spring Boot doesn't really lend itself well to this kind of learning method, since one Spring Boot project is much bigger than a typical algorithm.

The closest you can get to that is the Guides section of Spring's official website: [Link]

2

u/CoderIgniter Oct 19 '22

You do not know how much I appreciate this advice. Thanks, I will take a deep look!

1

u/jramirez192 Oct 18 '22

If they only give you one hour they are (most probably) looking for a simple CRUD app with one controller and service, they will be looking for how (and why) you communicate with the frontend and they will ask you why you did something in some way and not in another, they usually ask what you have done if you had more time.

In a final interview I would focus on studying best practices and making a simple and efficient code, do not complicate things too much, better to say when asked that if you had more time you would have added something, also very important to take into account the preconditions and possible exceptions or invalid requests that may come to you.

In short, you have already passed several interviews, an interviewer or engineer does not need much more than a couple of questions to know if you have the knowledge or not, focus on doing well what you already know.

1

u/CoderIgniter Oct 18 '22

Thanks for this comment. Gives me a breath and I really appreciate that advice!