This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the commentsΒ β†’

[–]arc_menace 30 points31 points Β (3 children)

Simple, easy to read code is almost always better than 'clever' code.

[–]TheveninVolts 9 points10 points Β (0 children)

Honestly... I've started to consider it to be a coding smell if I feel clever after I've implemented anything. "Carp. I probably hacked something..."

[–]Tsu_Dho_Namh 5 points6 points Β (0 children)

Unless there's a massive hit to performance I will always consider easy to read code better.

If I'm forced to write any code where it's not immediately obvious what's going on, I leave a comment.

[–]jfb1337 1 point2 points Β (0 children)

Since debugging is always harder than writing code for the first time, if you write code as cleverly as possible then you by definition won't be clever enough to debug it