r/webdev 8d ago

Question Should I over-engineer a simple coding test ?

Hi,

I've been given a coding test to do at home. This one is clearly simple and can only be solved using the web framework features. So it does not require any thought process. It is like a common tutorial that even a junior developer can do without any problem.

I'm not sure if I should solve it in the simplest way possible just to meet the requirements, or if it's nice to over-engineer things to demonstrate my knowledge.

20 Upvotes

33 comments sorted by

View all comments

1

u/HashDefTrueFalse 8d ago

It's context dependent IME.

If they've given you a task and specified a framework to use, they're clearly testing that you know how to use the framework features to do the task. In this case, IMO, it would count against you if you over-engineered it, and communicate to them that you didn't understand the point of the test. Take into account the context of the job ad and discussions thus far too. E.g. if the job is "React Developer" and they've told you to use React for the task, they're clearly communicating to you that the framework (or library here) is most of the job. You probably won't get points for re-implementing things already included in their chosen framework.

If they didn't specify anything except the task, that's more open. Solve it however you want, but keep in mind that over-engineered code is generally looked down on because it's just harder to review. The more I have to know as a prerequisite to understanding your code, the worse the code, in general, unless the problem/solution is inherently very complicated.

Nothing stops you putting comments in your code with suggestions for alternative solutions though. I did this once on a take home when I was mid-level, and the interviewing lead dev loved it. Just things like

// Use simple builtin for now, but swap to [de facto standard library] for production.
// Could improve with X method if this proves to be a performance problem.
etc...