One would assume that 10 years of Android development experience, resulting in a large list of references, would be sufficient to prove one’s craftsmanship, but alas, a recruiter working for a Big Corporation™ asked me to write a small Android app to prove my Android knowledge.
The goal of this test was to implement the game of Tic-tac-toe and spend a maximum of 4 hours on it. The code had to be submitted anonymously and afterwards it would be reviewed and there would be a discussion about the choices I had made. I decided to take on the challenge to see how much best practices I could squeeze into just 4 hours of development time.
Today I have open sourced the resulting code:
- The app is 100% Kotlin and uses some Kotlin Android Extensions.
- The UI and game logic are separated using a ViewModel and LiveData.
- There are multiple unit tests that cover most of the game logic.
- There are no important Lint errors or warnings.
Maybe this code will help somebody to learn Android development. Enjoy!