The code culture problem
21–30 of 162 posts
Re: The code culture problem
#22This is similar to the discussion around "legacy code", which in many ways is corporate speak for "shit code". In his book "Working Effectively with Legacy Code", Michael Feathers provides an interesting definition of legacy code. He defines legacy code as code that is not under test. The idea is that if code is under test then it is easier to improve/refactor. Maybe instead of saying that code is "shitty", we should…
Re: The code culture problem
#23"Psychological projection was conceptualized by Sigmund Freud in the 1890s as a defense mechanism in which a person unconsciously rejects his or her own unacceptable attributes by ascribing them to objects or persons in the outside world." In other words, we think out own code is "shit" so instead of dealing with that, psychologically, we just attack others.
Re: The code culture problem
#24Re: The code culture problem
#25I'm sorry, but yes, it usually is. I've been in this business for over 25 years, and I'm one of the few people that actually enjoys the challenge of dealing with legacy code.
But most of the code I've seen is shit. The answer to the question "could it have been done better" is usually "yes, if it had been done by someone who understood the basic principles of the paradigm they were developing in and the tools they were using to do it, and actually gave crap".
The difference between shit code written by shit coders and less than optimal code written by good coders dealing with constraints is quite clear.
I completely agree with the point the author is trying to make about the attitude problem, especially amongst coworkers, but let's not gloss over the fact that halfway decent code written by competent developers is still very, very rare.
Most code out there is shit code. Denying it is not going to help either.
Re: The code culture problem
#26Re: The code culture problem
#27Re: The code culture problem
#28Behold, the aftermath of the brogrammer. What was seen here is a particularly insidious, caustic and ultimately, demoralizing and self-defeating attitude from your colleague (and something I've seen routinely on HN). I don't particularly think he was in any way truly convinced that it was deserving of it, however it must be thrashed in accordance with a self selected pecking order in order to assert his dominance. Th…
I don't see how this has anything to do with the brogrammer fad (as annoying as that was/is). People have been talking this way about code for a lot longer. I'll throw out one of Linus' gems as an example [1]. [1] http://staefcraeft.blogspot.com/2013/07/linus-torvalds-there...
Re: The code culture problem
#29I'm not opposed to calling out shit, even in my own work, but you ought to be able to explain the smell, even if it's something silly like curly brace location. (Ideally it's shit for a better reason... there usually is.) Besides if a rant doesn't immediately follow the declaration, you can't really claim to care all that much. If you're working on the Linux kernel and get flamed by Linus consider yourself lucky! It's because he cares. (And thinks there's still hope for you to do better.) I don't mind the rantless half-hearted calls of bullshit either; rather than leading to everyone feeling bad and trying to feel less bad by trying to make other people feel bad, I think it would sooner lead to more cynicism with insults and less taking offense and feeling bad.