F
16

Got told my code was 'too clever' by a senior dev

They said I was writing one-liners that no one else could read, so I started breaking it into stupid simple steps. Anyone else get called out for showing off instead of being clear?
2 comments

Log in to join the discussion

Log In
2 Comments
adam414
adam41412d ago
My old boss called me out for the same thing three years ago on a project that had like 10 people touching the same files. I was so proud of packing a whole data transformation into a single line but when he asked me to walk him through it I froze up. Now I break everything into named variables with boring names like "cleanedUserName" and it saves everyone time. It sucks getting called out but honestly it made me a better dev in the long run.
4
pat_harris
pat_harris12d ago
Too clever" is the EXACT phrase I got once. Look, I get it, writing a one-liner feels like a flex but the senior dev is probably right. The code isn't for YOU, it's for the next person who has to fix a bug at 2 AM. Breaking it into simple steps isn't stupid, it's being a team player. The real smart move is making your logic obvious to everyone, not just people who think like you.
2