Skip to main content
By trying to make a API method more generalized- you make it too generalized.
Anti-Pattern Name:
ULSAC Anti Pattern
Aliases:
Failed Façade Command Pattern Problem
Context
By trying to make a API method more generalized- you make it too generalized
Forces
- Trying to prevent code change
- Failing to program to interface, in the sense if the implemented class changes it should signal failures else where in the code base.
Solution
Create well defined methods (and names) that explain the exact nature of the method.
Consequences and Resulting Context
- The complexity of the call gets embedded with in a parameter.
- API can’t be readily understood.
- Functionally Overloaded method
- Hard to change.
- Difficult API to use.
What's Wrong with the Solution
Consider the following API which contains self describing methods that can be readily understood and used.

void getCustomerNumber(…);
void getCustomerAddress(…);
void getCustomerTelephone(…);


If a scenario arises in which a developer tries to prevent the API exposed to change by creating an overly generalized method

void getX(…., String actionDesc)

in which the actionDesc contains some sort of internal pseudo language which determines the correct data to return. i.e.

call getCustomerNumber(…) gets replaced with call getX(….,”CustomerNumber”);
call getCustomerNumber(…)+ call getCustomerAddress(…) gets replaced with call getX(….,”CustomerNumber,CustomerAddress”);
Lesson's Learned
Try not to make a single method be all things to everyone. Rely on programming to interface and contractible programming it allows.
Correct Patterns
Author(s):
John Wilson
Date:
01/01/2009
References
Keywords:
Example
ULSAC by JLW008 January 28, 2009
ULSAC mug front
Get the ULSAC mug.
See more merch

UL's Drop Off 

a once annual event orchestrated by a group of adolecences in which random artifacts or "junk" is collected prior to 'Goods-Exchange Day' and discarded on a fellow classmate's lawn known as UL. ensued by much laughter and boisterous behaviour.
man, did we ever hit UL with the drop- off this year!
UL's Drop Off by ajd August 30, 2004
Related Words
ulster fry ULS Ulster ulster scots ulseaphi ulsbold Ulsterman ulsa Ulsaa ULSAC
see northern ireland
Ulster by beef hallion June 11, 2003

Ulster Museum 

Large building or hole full of worthless nothingness. Don't miss sixties maniquins with eyes that follow you around the room!! and funny smelling exhibits that remind you of jungle jims. (Thanks Hugo!!) Use this as an escape from school trips to Queen's university!
I thorougly enjoyed my visit to the ulster museum! the nothingness was overwhelming.
Ulster Museum by Hendysan September 12, 2003

The red hand of Ulster 

This, rather crudely, is what happens when you masturbate a woman who is menstruating. I first heard it in Northern Ireland, which, I imagine, is its obvious place of origin and relates to the Ulster flag.
'Don't go there!'
'Why?'
'You'll get the red hand of ulster!'

ulsta rd 

Cunt of cockheads
ulsta rd by Bitch August 3, 2003

ulster fry 

A twisted and inferior take on the Full-English breakfast.
Give me a Full English over an Ulster Fry any day!
ulster fry by Brummie Stu April 15, 2006