Not sure if this is a CodeSmell or an AntiPattern. This page is not complete. I'll do it as the day progresses. -- PaulMurray As it is, it is amusingly close to a self-example :-) ---- '''CodeSmell Name''': ''Passing Nulls to constructors'' '''Type''': Design '''Problem''': [what you really want to solve; present a simple concrete example] '''Context''': [context] '''Forces''': [forces] '''Supposed Solution''': [the bad solution; explain in terms of your concrete example] '''Resulting Context''': [what happens when you apply it, good and bad] * Judging by the SetTheBozoBit page, where almost all of the contributors cheered on the AntiPattern as if it were a DesignPattern, I think this is by far the most important section, and therefore perhaps needs to be expanded. * The exterior link to this antipattern did not at '''all''' help emphasize that it was an antipattern rather than a pattern; such things need very clear emphasis. * Seductive forces: why this is so popular * Why, despite the seductiveness, this is actually a BadThing * Replacement positive patterns (leaving this until later, in the possibly left-empty "applicable positive patterns" seems too little too late; that could be regarded as sort of "see also") '''Design Rationale''': [rationale] '''Related AntiPattern''''''s''': '''Applicable Positive Patterns''': '''AntiPatternCategory''': [classify it] '''Also Known As''': [other names] ---- '''Examples in the Literature''': ---- '''Examples in Practice''': My practice: I use a large object layer for one particular kind of thing stored across many rows of the database. In order to completely initialize, it needs some parameters about how the image that it will draw on top of is laid out. Most of the time, I don't need that part of the layer. Therefore, I pass null for that parameter as the signal that I do not want it initialized. ---- CategoryCodeSmell CategoryNull CategoryDevelopmentAntiPattern