I originally posted this post on my blog a long time ago in a galaxy far, far away.
Take-home coding exercises aren't rare in interviews.
I've found from 4-hour exercises to 2-day exercises to a Pull Request in an open-source project.
Even though, in my CV I had links to my GitHub profile (with some green squares, not just cricket sounds) and my personal blog (with some recent posts), I've been asked to finish take-home exercises.
Yes, hiring is broken!
For my last job, I had to solve a take-home challenge when applying as a C#/.NET backend software engineer. It was a decent company and I wanted to play the hiring game. So I accepted.
After I joined I was assigned to review applicants' solutions.
Here are 13 short tips to help you solve your next take-home interview exercise. These are the same guidelines I used to review other people's take-home exercises.
1. Stick to Standards
Follow good practices and stick to coding standards. Write clean code.
1. Write descriptive names. Don't use Information
or Info
as name suffixes, like AccountInfo
. Keep names consistent all over your code. If you used AddAccount
in one place, don't use AccountAdd
anywhere else.
2. Use one single "spoken" language. Write variables, functions, classes, and all other names in the same language. Don't mix English and your native language if your native language isn't English. Always prefer the language you will be using at the new place.
3. Remove commented-out code. And don't have extra blank lines. Use linters and extensions to keep your code tidy.
4. Use third-party libraries to solve common problems. But don't keep unused libraries or NuGet packages around.
5. Have clearly separated responsibilities. Use separate classes, maybe Services and Repositories or Commands and Queries. But stay away from Helper and Utility classes full of static methods. Often, they mean you have wrong abstractions.
6. Add unit or integration tests, at least for the main parts of your solution.
2. Version Control Your Solution
Use Git.
7. Write small and incremental commits. Don't just use a single commit with "Finished homework" as the message.
8. Write good commit messages. Don't use "Uploading changes," "more changes," or anything along those lines.
9. Use GitHub, GitLab, or any hosting service, unless you have different instructions for your take-home exercise.
3. Write a Good README File
Don't miss this one! Seriously!
10. Add installation instructions. Make it easy for reviewers to install and run your solution. Consider using Docker or deploying your solution to a free hosting provider.
11. Add instructions to run and test your solution. Maybe, some step-by-step instructions with screenshots or a Postman collection with the endpoints to hit. You get the idea!
12. Tell what third-party tools you used. Include what libraries, NuGet packages, or third-party APIs you used.
13. Document any major design choices. Did you choose any architectural patterns? Any storage layer? Tell why.
Voilà! These are my best tips to succeed at your next take-home interview challenge. Remember, it's your time to shine. Write code as clean as possible and maintain consistency. Good luck!
If you want to see how I followed these tips on a real take-home coding exercise, check SignalChat on my GitHub account. It's a simple browser-based chat application using ASP.NET Core and SignalR.
Starting out or already on the software engineering journey? Join my free 7-day email course to refactor your coding career and save years and thousands of dollars' worth of career mistakes.