DEV Community

Discussion on: What habit do many senior engineers have that juniors should try to avoid adopting?

Collapse
 
elliot profile image
Elliot

I agree.

But writing clever code for fun can be pretty fun.

As long as other people aren't ever going to be burdened by reading your code-golfed 5 character insertion sort, I think it's fair game :)

Collapse
 
jsn1nj4 profile image
Elliot Derhay • Edited

I was going to mention that. When using something like Codewars, it's really easy to see clever solutions by others and then possibly get into the habit of always trying to be clever too.

It is fun to try to be clever on stuff like that, but it's almost never necessary—at least not to that degree.

Thread Thread
 
napoleon039 profile image
Nihar Raote

I've been doing that a lot in CodeWars. Putting the entire code in a single return statement. I'm talking about converting a string to an array, running map and reduce on it, then converting it back to a string in a single return statement.

Thread Thread
 
elliot profile image
Elliot

Yea exactly what I'm talking about :) It's fun right!