Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm more concerned with the fact that code lies. Everyone knows comments lie. Only some people know that code lies, and the biggest liars don't seem to get what the big deal is. I understand the code, they'll say, and then give a several minute explanation about how everyone else could 'easily' understand it.

Nobody wants to memorize your code. And you shouldn't want to either. You can't memorize code that other people are contributing regularly to. So either you won't know it when you come back, or you're subtly pressuring everyone to move their changes outside of your code, and leaving your code alone. Even if it has a choke hold on data flow in the system.

But that almost misses the point, which is that yes, code that doesn't look like what it actually does can cause people to miss the real problem. But code that looks like it's a potential source of the problem being investigated steals attention from the real culprit. And no amount of memorization is going to completely solve that problem. I think people mistake the notion of 'code smells' as the act of an overly fastidious mind, but the neat freak is forever asking the slob "how do you find anything in this mess?" and that problem plays out in code, but amplified. Like if you were looking for your credit card and it wasn't a matter of whether you put your wallet where it 'belongs' or if it was in your bedside table, but instead you have 9 wallets scattered around your room full of customer loyalty cards.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: