Hating your own code – for good or bad, how do you deal with it? [closed]
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for […]
Less code or less operation [closed]
Closed 9 years ago.
Is there a name for CSS code smell that can be seen in class names like “float” or “white”?
I noticed some code in our projects using CSS class names such as red
, black
or float
.
I want to provide some information for people so they know to avoid it.
What’s the best way to create a static utility class in python? Is using metaclasses code smell?
Ok so I need to create a bunch of utility classes in python. Normally I would just use a simple module for this but I need to be able to inherit in order to share common code between them. The common code needs to reference the state of the module using it so simple imports wouldn’t work well. I don’t like singletons, and classes that use the classmethod decorator do not have proper support for python properties.
How to tackle a ‘branched’ arrow head anti-pattern? [duplicate]
This question already has answers here: Style for control flow with validation checks (4 answers) Approaches for checking multiple conditions? [duplicate] (3 answers) Closed 11 years ago. I recently read this question that features, the arrow anti-pattern. I have something similar in code I’m trying to refactor except that it branches. It looks a little […]
How to tackle a ‘branched’ arrow head anti-pattern? [duplicate]
This question already has answers here: Style for control flow with validation checks (4 answers) Approaches for checking multiple conditions? [duplicate] (3 answers) Closed 11 years ago. I recently read this question that features, the arrow anti-pattern. I have something similar in code I’m trying to refactor except that it branches. It looks a little […]
Reference Passing Style Anti Pattern
I’m working on a legacy VB.Net code base. There are very few functions that return values, most of the code is in subs/void methods. The general strategy seems to be to pass everything in by reference, mutate it, and then observe the mutated state.
catch(Exception ex) would this example be a code smell? [duplicate]
This question already has answers here: Is catching general exceptions really a bad thing? (12 answers) Closed 11 years ago. We have production code that is not easily deployed in a test area. We also have a new library of code that we would like to “plug in” to the production code. The production code […]
catch(Exception ex) would this example be a code smell? [duplicate]
This question already has answers here: Is catching general exceptions really a bad thing? (12 answers) Closed 11 years ago. We have production code that is not easily deployed in a test area. We also have a new library of code that we would like to “plug in” to the production code. The production code […]
catch(Exception ex) would this example be a code smell? [duplicate]
This question already has answers here: Is catching general exceptions really a bad thing? (12 answers) Closed 11 years ago. We have production code that is not easily deployed in a test area. We also have a new library of code that we would like to “plug in” to the production code. The production code […]