Pages

Saturday, February 15, 2020

Restful app demo and explanation (recruitment code challenge)


Today I did a code challenge that a recruiter gave me. Is for a vacancy at a London company.
I thought to record a demo explaining the code that i implemented and some of my thoughts, just to have here for future reference. I uploaded the code to this repo: https://github.com/SFRJ/offers
In the requirements it says to publish in github, so if I am allowed to publish in github, maybe I am allowed to also publish on the blog and on youtube :)

Here the demo:



bonus using vavr(formerly javaslang)
The exercise said that I could choose any tool I like, I was thinking in doing vavr but since is not so well known maybe the reviewers don't like it. But just for myself I decided to modify the code to use vavr and upload it in a separate repository on github(https://github.com/SFRJ/offersvavr). This a very short video with some of the changes i did to introduce vavr:



Update(morning after)
When I was uploading the video in youtube i was just previewing and I noticed there was a little bug. I added tests for it and fixed it. Interesting, this situation made me thing about the importance of QA(Quality Assurance). I did not write automated acceptance tests but AAT are basically programmatic quality assurance. Maybe with AAT I woulda catch that but earlier. Doing the technique used to bring QA before code implementation is called ATDD(Acceptance Test Driven Development). Link to article written in this blog some time back on the topic: 


I uploaded this other video with the explanation of the bug:

 I just noticed that in the video I didn't explain that I refactored that overridden cancel method I was talking about at the end, since that method extraction was not really needed if I call again the repository in both get and cancel methods.

No comments:

Post a Comment

Share with your friends