Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results for is there a name for this pattern
Search options not deleted
3 votes
2 answers
362 views

Is there a name for this pattern?

= someTerminatingValue) { // Do something interesting } Is there a name for this pattern of assigning the value inside the while loop's expression? … If there isn't a name for it then that's fine, I'm just asking if there is one. …
BanksySan's user avatar
  • 724
3 votes
2 answers
399 views

Is there a name for this programming pattern? [closed]

A commmon pattern I've noticed in my Python code follows this simple structure: value = get_val_from_thing() value = mutate_that_val(value) I find myself first grabbing some specific value(s) from … Here's a concrete example I found in some code: paths = response[0]["job.ResultPaths"] paths = paths.split(",") paths = list(filter(None, paths) So my questions are: Is there a name for this pattern
Luke's user avatar
  • 49
6 votes
2 answers
6k views

Is there a name for this design pattern, using hooks/callbacks?

I've seen/used some objects that have a structure like so, designed to let children extend the functionality of functions without having to override them. Is there a name for this pattern? … this object. } } …
GSto's user avatar
  • 8,541
3 votes
2 answers
478 views

Is there a name for this design pattern? [closed]

But for the sake of easier unit-testing among other reasons I want to have the application object stored as a reference to all MVC classes. … So with the pattern above, the conversion at this later point in time will be easier and some of the unit testing might be easier. Is there a generally accepted name for this pattern? …
d_inevitable's user avatar
1 vote
2 answers
187 views

Is there a name for this pattern of sealing base classes to a strict set?

This allows you to use the type system to dictate control decisions with the confidence that some cowboy isn't going to come along and add a subclass that breaks everything. … This has proven very useful in my current workflow, but is there a name for this pattern? …
ScottishTapWater's user avatar
-2 votes
2 answers
288 views

Name for this pattern? [closed]

It'll have another method which will block while the counter is not zero, then perform an action while holding the lock. … Is there a name for this pattern? It's a class based on the accepted answer of my question here …
George Duckett's user avatar
-2 votes
1 answer
265 views

Is there a name for negating a condition in an if-else block?

I thought this was a confusing style, and recommended that the condition be checked as-is, and the if and else blocks be switched. … I couldn't find a name for this "negated condition in if-else" pattern, however. Is there an existing name for this pattern? …
Nate Rook's user avatar
3 votes
3 answers
523 views

Is there a name for this functional programming construct/pattern?

I wrote a function and I'd like to find out if it is an implementation of some functional programming pattern or construct. … I'd like to find out the name of this pattern or construct (if it exists)? …
snakehiss's user avatar
  • 8,675
1 vote
1 answer
292 views

Is there a name for this use of the State design pattern?

I'm looking to see if there is a particular name for this style of programming a certain kind of behavior into a program. … It's just a "press start and go" action. What would you call implementing this type of behavior? …
Chris C's user avatar
  • 645
2 votes
0 answers
86 views

Is there a name for this Registry-Slot-Updaters pattern?

Registry This class is pretty much a combination of what is known as the registry pattern: ("A well-known object that other objects can use to find common objects and services.") and some filter methods … Contrary to Registry and Updaters, the code for this is always the same except for the type of what is being selected. …
R. Schmitz's user avatar
  • 2,608
1 vote
3 answers
2k views

How is this pattern called?

Is there a name for this pattern where an API offers several variations of a method (differing in number of parameters) and internally forwards them with default parameters like this: public void doSomething …
fweigl's user avatar
  • 195
2 votes
2 answers
891 views

Is there a name for a dictionary that returns the key as the value by default? [closed]

Is there a name for this dictionary / pattern? Edit Wow, I did not expect such a backsplash. Just to make it clear, this type of dictionary is not "defective" or "broken". … It is a simple and elegant solution for a specific type of problem, and I have used this pattern with great success in my career. …
Fozi's user avatar
  • 145
0 votes
2 answers
251 views

Is there a name for this data structure pattern consisting of a list of dictionaries each wi... [closed]

There is a data structure idiom that looks something like this: [ { obj_1_id: { key1: value1_1, key2: value2_1 } }, { obj_2_id: { key1: value1 … So my first question is whether there is a name for this idiom, and the follow-up would be pattern or anti-pattern? If pattern, why would you ever use it? …
Vynce's user avatar
  • 109
2 votes
1 answer
304 views

What is this pattern called? Run finally?

Is there a name for this pattern? I've written this kind of thing a few times in JavaScript and recently found myself writing it in C#. … Thing is, I expect this has already been implemented in a library somewhere I didn't know what to look for. In pseudo code it's something like this: if (null ! …
Ian Newson's user avatar
-1 votes
1 answer
108 views

Is there a name for this pattern of composing a type safe return type from different levels ...

I'll call this the HydratedJob. I'm not sure if "hydrated" is the right term, but I've heard it used in this sense a lot. In this case the HydratedJob will contain a User object, and a Team object. … I would really like to know if this is a pattern with a name that I could research more, and if anyone knows any pitfalls of this approach as I'm looking to integrate it in my app. …
Carson Holzheimer's user avatar

1
2 3 4 5
33
15 30 50 per page