DEV Community

loading...

Discussion on: 17 Pro JavaScript tricks you didn't know

Collapse
pozda profile image
Ivan Pozderac • Edited

Have you ever worked in a team where you have senior, mid, 2+ juniors and intern?

senior and mid are like fish in the water with 'pro' code while juniors and interns feel like fish on a tree!

Clever code is ok to have on small teams where level of knowledge is similar. Having clever code in a larger teams leads to codebase nightmares.

Code should always be readable and easy to understand for everyone who will work on it. If you have to explain it, then your code is just a bad joke!

Collapse
iamreinder profile image
Reinder • Edited

I actually believe it is never okay. Not even in small teams where everybody is on the same level. You don't write the code for yourself. You write it for the company you work for or for a client. Being clever is not what being a good developer is. Code should be readable, maintainable and self-explanatory.

It's like being smart. Using big words doesn't make you smart. Being able to translate what you know into something that anyone can understand, that's smart.

Collapse
pozda profile image
Ivan Pozderac

When I think about it, I have to say that I completely agree with you.

While I'm comfortable to read 'PRO' code, I find myself writing readable code even in personal projects and stuff I'm just trying out that will never be seen by anyone else.

I guess it is a force of habit.

Clever code led us to having 'rockstar ninja developers' - writing 'PRO' code just to look clever and to confuse others to gain leverage and opportunity to explain something that shouldn't need explanation in the fist place.

You are 100% correct on this one!

Thread Thread
rahxuls profile image
Rahul Author

I can see someone understanding me. Sigh of happiness finally