Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have been interviewing candidates at my company for a while, where we have been asking (experienced) candidates to provide a code-based solution. The idea is to check the code quality.

The candidates, experienced with Java and Spring, end up providing a number of if/else conditions (best they do is a switch case) to switch between strategies. I felt many aren't aware of Spring Dependency Resolver.

So I have created a sample implementation, which I believe is not redundant, that explains how to use implement Strategy and Factory patterns in Spring boot, that will allow you to just provide a new implementation and Spring will do rest of the magic.

Feel free to share any feedback, I just want to make things easier and better for fellow engineers



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: