anti-patterns

Singleton in go

How does one implement the Singleton design pattern in the go programming language? ...

Has using an acknowledged anti-pattern ever been proven to actually solve a problem, or be beneficial in any other way?

Has using an acknowledged anti-pattern ever been proven to actually work in a certain specific case? Did you ever solve a problem or gain any kind of benefit in one of your projects by using an anti-pattern? ...

Interface bloat

Can someone explain to me what interface bloat is (preferably with an example). Sorry I meant interface bloat in OOP ...

Does anybody recognize any pattern/antipattern in attached class diagram?

Short description: I have a doubt whether it's normal that AbstractCrudDaoImpl implements both interface and abstract class which are inherited from the same parent (ReadOnlyDao). ...

Config type data: Static global variable or pass it around?

So I'm writing a bunch or multithreaded code in library that will run in the background. So I'm having the UI pass in SynchronizationContext object so I can Post events back to the main UI thread. Many different objects have public events the UI can subscribe to. I initially just add the SyncContext object as a parameter to the creati...

Why do most spreadsheets contain a hard-coded limit on the number of rows and columns?

Why are programs like Microsoft Excel, Gnumeric and OpenOffice.org Calc designed with hard-coded limits on the number of rows and columns? This seems like an archaic programming technique from when spreadsheets were considered a demanding application and dynamic memory allocation was considered "high-end". I would guess that it indicat...

Scaling singletons

After having some difficult hours mulling over some architecture issues for my server-based application, I feel I am going to have to use singletons to accomplish my goal. Purely for the following reasons (justifying my smell): I don't need to pass expensive objects deep into a call stack I can perform functions on singleton management...

Enterprise Architecture Anti-patterns

What are the key anti-patterns to avoid when architecting applications for the enterprise? We are using C# and SQL Server and Silverlight, btw - but I imagine some of the anti-patterns will be language neutral. ...

Ravioli code - why an anti-pattern?

I recently came across a term 'God object' which was described as an 'anti-pattern'. I'd heard of bad coding practices, but I'd never heard them described thus. So I headed off to Wikipedia to find out more, and I found that there is an anti-pattern called 'Ravioli code' which is described as being "characterized by a number of small an...

What are some specific legitimate uses for singletons?

Possible Duplicate: On Design Patterns: When to use the Singleton? This question is not about whether or not singletons are "considered harmful" in general. I just want to know, from your experience, what are some SPECIFIC SITUATIONS in which singletons seem to work well. EDIT: Please, if you want to discuss the appropriateness...

Is this an anti-pattern?

The situation is this: You have two classes that both implement the same interface and both classes work together to complete some business process. For example networkUserManager and localUserManager implement IUserManager which has a method getUser(). networkUserManager.getUser() puts a request to get a User on the queue and returns...

how to block users from closing a window in javascript?

Is it possible to block users from closing the window using the exit button [X]? I am actually providing a close button in the page for the users to close the window.Basically what im trying to do is to force the users to fill the form and submit it.I dont want them to close the window till they have submitted it. guys i really apprecia...

What are the pros and cons of using a Data Services Layer?

This is a discussion that seems to reappear regularly in the SOA world. I heard it as far back as '95, but it's probably been a topic of conversation long before that. I definitely have my own opinions about it, but I'd like to hear some good, solid arguments for having a Data Services Layer, and likewise for arguments against having ...

What is the relationship between a code smell and an anti-pattern?

In my mind I think that an anti-pattern is the cause, and a code-smell is just one of man possible symptons. Is this correct? For example: God class antipattern -> large class code smell Not Invented Here Antipattern -> code that should not even be there Analysis Paralysis anti-pattern -> no code smell results, but leads to bankcruptc...

Is a generic model an antipattern?

Now I have something that I have not seen it before: the database is really generic. For example: instead of a concrete type we have a generic one: device, and it relates to a custom properties table. Unfortunatelly, the model over its entities represents those tables, so the model does not talk about the business at all. At the end p...

General Patterns for Managing Random Configuration Variables

Being the one always trying to boil things down to common patterns, I'm having a hard time figuring out the best and/or recommended ways of managing all those random properties throughout an application. I am looking for some SO wisdom. What are the random properties I'm talking about? Here's a small list: favicon alt text for rando...

Book for Anti Design Patterns

I have heard a lot about anti patterns and would like to read a book on this,which book would you suggest for Anti patterns. ...

Wrappers/law of demeter seems to be an anti-pattern...

I've been reading up on this "Law of Demeter" thing, and it (and pure "wrapper" classes in general) seem to generally be anti patterns. Consider an implementation class: class FluidSimulator { void reset() { /* ... */ } } Now consider two different implementations of another class: class ScreenSpaceEffects1 { private FluidSim...

Is this an acceptable UI design decision?

OK, while I'm on record as stating that StackExchange UI is pretty much one of the best websites and overall GUIs that I have ever seen as far as usability goes, there's one particular aspect of the trilogy that bugs me. For an example, head on to http://meta.stackoverflow.com . Look at the banner on top (the one that says "reminder --...

Initialization of components with interdependencies - possible antipattern?

I'm writing a game that has many components. Many of these are dependent upon one another. When creating them, I often get into catch-22 situations like "WorldState's constructor requires a PathPlanner, but PathPlanner's constructor requires WorldState." Originally, this was less of a problem, because references to everything needed wer...