16 deadly code smells — Part 1

Code smells that are considered fatal during coding interviews

I will not write any more bad code
I will not write any more bad code

Coding styles

1. Inconsistent coding style

if(document.ownerId == user.id) {
doSomething();
}
if (document.ownerId == user.id){
doSomething();
}
if (document.ownerId == user.id) {
doSomething();
}
if(document.ownerId== user.id) {
doSomething();
}
if(document.ownerId==user.id){
doSomething();
}

2. Inconsistent naming

let value = 1;
let curValue = 0;
let previousVal = -1;

Dirty code

3. Duplicate code

4. Bad naming

Self-explanatory names

5. Dead code

Testing

Where are the tests?

6. No tests

7. No meaningful tests

8. Console logging

Continuously innovates and creates extraordinary impacts on digital businesses through technology excellence | https://www.linkedin.com/in/ayltai/