7
Got told my code was 'too clever' and it stung at first
I was working on a small project to track my reading habits, and I wrote this fancy one-liner using list comprehensions and lambda functions. My friend, who's been coding for like 10 years, looked at it and said 'this is clever but nobody else can read it.' At first I was annoyed, but then I realized he was right. I spent a whole Saturday rewriting it with simple if statements and comments. Has anyone else had to dumb down their code to make it work better with a team?
2 comments
Log in to join the discussion
Log In2 Comments
shane_martinez4410d ago
Yeah clever code is just bad code when someone else has to fix it at 2am.
2
kelly.emma10d ago
omg this is so true, my friend had to fix some "genius" guy's code at 3am last week and he was ready to throw his laptop out the window lol. the guy bragged about how it was "elegant" but it was like one giant line of regex and weird variable names like 'x2' and 'zq'. took my friend almost two hours just to figure out what it was supposed to do, then another hour to rewrite it all normal. honestly, clever code is just a fancy way of saying "i'm lazy and don't care about the next person" lol.
5