Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

12
  • 1
    This implies that there are no differences between best practices and other practices other than how it "feels." This is how you wind up with unmaintainable balls of mud--because to many developers, reaching out across Class boundaries, etc., "feels" just freaking wonderful. Commented Apr 25, 2013 at 20:39
  • @Amy Blankenship, I would say unequivocably that there is no one "best way" to make the choices the OP is asking about. It depends on a million things, and there are a million degrees of freedom. However, I do think there is a place for "Best Practices," and that is in a team environment, where certain choices have already been made, and we need the rest of the team to stay consistent with those earlier choices. In other words, in a specific context, there might be reasons to label certain things "best practices." But the OP hasn't given any context. He is building something and ... Commented Apr 26, 2013 at 3:36
  • ... he faces all these possible choices. There is no one "right answer" to those choices. It is driven by the goals and the pain points of the system. I guarantee you that Haskell programmers don't think all methods should be instance methods. And Linux kernel programmers don't think making things accessible to TDD is very important at all. And C++ game programmers would often rather bundle their data into a tight data structure in memory than encapsulate everything into objects. Every "Best Practice" is only a "best practice" in a given context, and is an anti-pattern in some other context. Commented Apr 26, 2013 at 3:43
  • @AmyBlankenship One more thing: I disagree that reaching out across Class boundaries "feels just freaking wonderful." It leads to unmaintainable balls of mud, which feel horrible. I think you're trying to solve the problem that some workers are sloppy/unmotivated/very inexperienced. In that case, someone who is careful, motivated & experienced should make the key choices, & call them "Best Practices." But, the person choosing those "Best Practices" is still making choices based on what "feels right," and there are no set right answers. You're just controlling who makes the choices. Commented Apr 26, 2013 at 3:48
  • I have worked with several programmers who thought of themselves as senior level and were thought of that way by management who firmly believed that statics and Singletons were absolutely the right way to handle communication issues. The static part of this question would not have even been asked if reaching out across Class boundaries like that "feels" wrong to developers, nor would the answer that advocates the static alternative receive any up votes. Commented Apr 26, 2013 at 14:52