Mistakes you’ve probably made in your coding task for a job interview

It’s the same thing when people who are new to programming are asking: “What is the best way to do XYZ?”.

There is neither the best way or one way.

There is not such a thing as the best programming language to use or to learn.

So if you learned C++ you now look down on Javascript developers, that shows that you feel like you are in some elite squad.

It just means that you learned one tool from your toolbelt.

You now can use the Claw Hammer but not the Sledgehammer.

Yes, it will be easier to now learn the Sledgehammer but both hammers have their own pros and cons.

So please don’t say that things are easy.

Most probably they seem easy because you don’t fully understand them.

Mistake 12: you don’t write tests if the job specs say you have to know how to testIt’s always a plus to show that you can write tests.

They don’t have to be perfect.

You don’t have to have 100% code coverage.

Just write some simple tests that are testing your core functionality and you probably have a big plus point.

Mistake 13: not splitting your code into smaller filesIf you send one big file with 2000 lines of code it is hard to review that.

As someone who has to check your code, it is hard to see what is happening in this file and how the code flows.

Probably you also have to scroll from top to bottom.

Better try to split your code into smaller files.

This will also be important later for work.

Nobody wants code that only you understand but none of your team members.

Please split it up.

It’s so much easier to review.

Mistake 14: you don’t have code comments or you just write what the next line doesThis one I see people do even after some years of working as a developer.

Comments like: // Loops through an array and the next line is Array.


Yeah hello, Captain Obvious.

It would be better if you would describe what this loop does in a more abstract way.

// preparing data for sending it via AJAX or something in this direction.

So people know what the intent of the code is.

Mistake 15: your code is all over the placeconst array = [ 1, 2];array.

forEach((a ) =>{ a = a+ 1;console.

log(a) ; });This is really hard to read and also shows that you are working very carelessly.

Today we have tools like eslint and prettier.

Every bigger editor and IDE has this build in or you just need to install a plugin/extension.

So please use it.

Mistake 16: you are not naming your variables properlyconst b = true;const a = [];This is not easy to read and not helpful to understand what b is.

Way better naming could be:const isReady = true;const listOfPersons = [];Again these are just examples and every team will have its own way of naming things.

Of course, you can not guess that style, but just do what you feel is a meaningful name and stick to one style.

Mistake 17: you are just commenting out old codeI have seen this often and I still don’t understand why people are doing this.

You have a file with 100 lines of code and 70 lines are just old code which is commented out and 30 lines of an actual implementation.

Should I read the old code?.Should this show me that you did it the first time wrong and then reimplemented it?.Nobody is perfect and writes the first time the perfect code.

So please delete this code.

If I want to see if you refactored the code I should see it in the git commits with git commit messages where I can understand what you did.

Mistake 18: you did not check if your code is still runningThis happens all the time.

You get one E-Mail from an interviewee on Sunday evening.

You go to work on Monday and start to check the code and suddenly you get a second E-Mail with some updates in the code.

You also get a promise that this time it really works.

So please, before you send your code.

Stop the program, clean the cache, install the dependencies and start it again.

If it then still works then you can say that you’re ready.

Mistake 19: you changed something and did not check if it is still runningFor our full-stack developers, we have a task where they need to save variables in a database.

They can choose the database, the schema and how to save the variables.

We just say this has to be saved.

This is where people change the code and don’t check if after the changes it still really saves to the database.

For example, they change the schema or they just try it with a small file, etc.

Again before you send your task back, check if all functions are still working as they should and try to break stuff.

Nobody is saying that you need to catch every edge case but at least the most common things a user can do.

Mistake 20: you did not prepare for the coding interviewSome time has passed between sending the task and the actual interview, maybe a week or more.

Do you really still remember what you have done in that task?.Like why did you solve this task in that way and what was your thinking when you implemented your task?One of the goals of this entire process is not to see how good you are as a programmer but whether you fit the team and if you a team player.

It’s more about your soft skills than your coding skills.

Please read your own code before you go to the interview part.

These are just a few examples I have seen.

Do you have more?.Comment down below!Maybe you want me to review your code?.Or give you some tips on how to help you?.Just contact me on any of my social media accounts and I can try to help you.

Of course, I can not do the task for you but I can help with everything else!Thanks for reading!Say Hello!.Instagram | Twitter | LinkedIn | dev.


. More details

Leave a Reply