The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
2answers
324 views

Pattern(s) about hierarchical settings overwriting

Assume that you have a hierarchy of organizational units: - Company -- Branches --- Departments ---- Teams Lets say I have some settings (for simplicity assume that they have the same properties) ...
7
votes
2answers
3k views

Storing and maintaining serialized objects in C#

What are the best practices to store and maintain serialized objects in C#? Any strategies or patterns that apply? What I have come to believe so far is this: Prefer Json over XML, both for space ...
5
votes
6answers
536 views

What are best practices when switching between projects/coming back to projects frequently?

The nature of my job is that I have to switch back and forth between projects every few weeks. I find that one of the biggest impediments to my productivity is the ramp-up time to getting all the ...
8
votes
2answers
272 views

Low coupling processing big quantities of data

Usually I achieve low coupling by creating classes that exchange lists, sets, and maps between them. Now I am developing a Java batch application and I can't put all the data inside a data structure ...
3
votes
1answer
103 views

Rpc transferring data or Replication

I have services on 10 machines that stores data in database on these machines. And I have main server that needs to pull that data from these ten machines. What is better for this. Implement some rpc ...
6
votes
4answers
900 views

Should injecting dependencies be done in the ctor or per method?

Consider: public class CtorInjectionExample { public CtorInjectionExample(ISomeRepository SomeRepositoryIn, IOtherRepository OtherRepositoryIn) { this._someRepository = ...
1
vote
1answer
343 views

What is the “Find-Fix-Verify” pattern?

What is the "Find-Fix-Verify" pattern, as related to the process of doing editing/spellchecking/debugging, etc.? Where is this pattern best described? What are some advantages and disadvantages of ...
1
vote
1answer
2k views

How frequent should the Token Updation in CSRF security be?

To start with the background, this post is what Jeff Atwood says about CSRF tokens. In this very page, he goes on to say: An even stronger, albeit more complex, prevention method is to leverage ...
2
votes
3answers
159 views

Alternate approaches to creating custom forms in a web application

We are putting together some distribution software, selling about 150K SKU's. Some of our items have additional requirements in order to be sold that are dictated by our vendors. For instance one type ...
11
votes
3answers
2k views

What is the pattern name for using method chaining to build an object?

I frequently use a pattern where I using method chaining to setup an object, similar to a Builder or Prototype pattern, but not creating new objects with each method call, instead modifying the ...
1
vote
1answer
107 views

How to prevent corrupting an hierarchical XML tree?

We have an XML tree which stores the relationship between folders and video files. So each folder could be the artists name and below it we have the videos of the artist. Also each folder can have ...
13
votes
2answers
2k views

Is using the new System.Tuple class bad design?

I like the concept of System.Tuple in that it allows me to return multiple parameters in a single function call without instantiating a new class, however does this defy any good programming practices ...
4
votes
1answer
180 views

Rapid code analysis

I have recently moved to a new company where I am tasked (in part) with evaluating the existing code base and coming up with patterns and best practices. Our development team consists of around 20 ...
36
votes
4answers
10k views

Developing a feature which sole purpose to be taken out?

What is the name of the pattern in which individual contributors (programmers/designers) developed an artifact for the sole purpose is to serve as a diversion so that management can remove that ...
2
votes
2answers
525 views

Legal Applications of Metamorphic Code

Firstly, I would like to state that I already understand the 'vx' applications for Metamorphic code. I am not here to ask a question related to any of those topics as that would be inappropriate in ...
2
votes
1answer
459 views

prism and multiple screens

OK - I am studying Prism a little because of a "free weekend" offer on Pluralsight. As this is proving too complex for me, I went to the Prism book and looked at the forward, and this is what it said: ...
10
votes
9answers
2k views

Is this an anti-pattern?

I've seen this a lot in our legacy system at work - functions that go something like this: bool todo = false; if(cond1) { ... // lots of code here if(cond2) todo = true; ... // some other ...
5
votes
1answer
126 views

Checking members and instantiating in properties

Consider this: public MyClass { private Resource _myResource; public Resource MyResource { get { if(_myResource == null) { ...
15
votes
5answers
1k views

Combining getters and setters

JavaScript libraries such as jQuery, combine 'getters' and 'setters' in the programming interface for example: $('element').css({'color','blue'}); will set the color or $('element').css(); ...
1
vote
1answer
178 views

How do you deal with errors in enumeration / list processing (lowish-level API)

Ive struggled with variants of this problem many times, experimenting with different solutions, happy with none. Abstract: Enumerating a list of items, an error for one item does not affect the ...
3
votes
3answers
853 views

New Silverlight app. MVVM. RIA Services vs CSLA

Another 2 days of reading and watching demos and here we go. For my enterprise LoB Silverlight app I'm going to use: Prism for UI aspects and modularity. MVVM pattern (using Prism) ??? to bring ...
1
vote
2answers
306 views

Are there any good tools to help implement or enforce the proper equals and hashcode patterns for c#? [closed]

A very common bug on my development team is forgetting to, or incorrectly overriding equals and hashcode. While the pattern is simple, there's a lot of boilerplate code that goes into doing this ...
4
votes
3answers
706 views

Architectural Patterns for a Game

So I've got a solution that contains a few big projects, which I'm trying to break down into smaller projects with more isolated responsibilities. This is a game I'm tinkering with -- I'm mainly a LOB ...
5
votes
4answers
526 views

How to apply one of the OOP concepts (Closed for Modification and Open for extension)?

Days before, I created Question, Quiz, and Main classes. One Quiz has one or more Questions. From the main class I first create Question objects (the constructor accepts an array of numbers). The Quiz ...
4
votes
4answers
396 views

What determines when an application requires mvvm?

I'm developing mobile applications for Windows Phone 7. This application calls some web services and occasionally sends responses out via web services. I recently started looking into MVVM and noticed ...
4
votes
3answers
4k views

What is good programming practice for structuring java project?

I have a Java project that is getting to be relatively large (a few thousand lines in all, I'd say). It's definitely a lot larger than what I've dealt with before, being that I am still a relatively ...
16
votes
4answers
3k views

What is “lambda” code?

I have recently heard people talk about code being "lambda". I have never heard of this phrase before. What does it mean?
17
votes
9answers
792 views

What to do as a new team lead on a project with maintainability problems?

I have just been put in charge of a code project with maintainability problems. What things can I do to get the project on a stable footing? I find myself in a place where we are working with a very ...
20
votes
12answers
5k views

What design patterns are the worst or most narrowly defined? [closed]

For every programming project, managers with past programming experience try to shine when they recommend some design patterns for your project. I like design patterns when they make sense or if you ...
6
votes
4answers
1k views

How does one learn to program (and think) the Ruby way? [closed]

Why I Ask this Question: I've just starting to learn Ruby (and by extension IronRuby since I work in the Microsoft world). I picked up IronRuby Unleased to teach me the basic syntax of Ruby, and any ...
3
votes
3answers
444 views

When do you use new technology and complicated design principals in an LOB app (using WPF)?

I'm building an LOB app for a very big and serious client, the app itself is not big but my client is so I have to get it right. I'm generally tempted to always use the latest stuff out there and ...
2
votes
6answers
911 views

Is “call and return” a pattern or an antipattern?

Imagine to have this code: class Foo: def __init__(self, active): self.active = active def doAction(self): if not self.active: return # do something f=Foo(false) f.doAction() ...
1
vote
3answers
756 views

Writing an application prototype - best practices?

For a project I am working I want to implement a small prototype to try things out, demonstrate some functionality to the client and learn some frameworks used in the project. Do you have any ...