The tag has no wiki summary.

learn more… | top users | synonyms

9
votes
1answer
334 views

Writing my own voice recognition code

Problem Description I am wanting to use voice recognition as part of a hardware project, which I would like to be completely self containing (I'm using small low power, low speed devices such as ...
1
vote
6answers
265 views

Finally block for methods - is it a bad idea?

The finally block for a try-catch structure is well known, and gives a really easy and elegant way to deal with some must-be-done code. Therefore, I can see no reason why It shouldn't be good for ...
0
votes
0answers
69 views

How to implement inventory analysis pattern?

I read about Martin Fowler's inventory analysis pattern from here: http://www.martinfowler.com/apsupp/accounting.pdf. It is interesting, but somehow I can't find a way to implement the pattern in a ...
2
votes
2answers
140 views

Should I split out synchronization from my class and what's it called?

When thinking about testability and modular code, I recently thought about whether I should split out the synchronization part of a class from the actual behavior part. By example: The app "needs" ...
0
votes
0answers
61 views

Multi tenancy like problem in a single application

I have a web site that is, at a simple level, a document that contains a series of forms and a workflow as to how that document is managed. There are other systems which are outside of the document ...
7
votes
1answer
1k views

Design pattern for object conversion (java)

I don't use design patterns very often, besides an occasional factory and MVC, and I want to start using them more. I have a concrete case at hand that I would like your opinion on the use of design ...
4
votes
4answers
246 views

Language for Chess Position Evaluation (experimental)

My aim is to, via pattern analysis and statistics, (as well as piece mobility and position) build a chess position evaluation analyzer (rather than simply going brute force ply-searching). Id like ...
1
vote
1answer
135 views

Am I missing a pattern?

I have a class that is a singleton and off of the singleton are properties that hold the instances of all the performance counters in my application. public interface IPerformanceCounters { ...
19
votes
6answers
2k views

LSP vs OCP / Liskov Substitution VS Open Close

I am trying to understand the SOLID principles of OOP and I've come to the conclusion that LSP and OCP have some similarities (if not to say more). the open/closed principle states "software ...
2
votes
1answer
215 views

Microkernel architectural pattern and applicability for business applications

We are in the business of building customizable web applications. We have the core team that provides what we call as the core platform (provides services like security, billing etc.) on top of which ...
1
vote
1answer
105 views

How to implement string matching based on a pattern

I was asked to build a tool that can identify if a string match a pattern. Example: {1:20} stuff t(x) {a,b,c} would match: 1 stuff tx a 20 stuff t c It is a sort of regex but with a ...
2
votes
1answer
92 views

Separating validation from persistence in models?

Models in an MVC application gets kind of hard to test when validation of data and persistence of data is baked together in the model. I would like to test those separately to prevent doing ...
30
votes
11answers
2k views

Is this a decent use-case for goto in C?

I really hesitate to ask this, because I don't want to "solicit debate, arguments, polling, or extended discussion" but I'm new to C and want to gain more insight into common patterns used in the ...
3
votes
4answers
247 views

Entity and pattern validation vs DB constraint

When it comes to performance: What is the better way to validate the user input? If you think about a phone number and you only want numbers in the database, but it could begin with a 0, so you will ...
2
votes
2answers
471 views

Dual Inspection / Four Eyes Principle

I have the requirement to implement some kind of dual inspection or four-eyes principle as a feature of my software, meaning that every change of an object done by user A has to be checked by user B. ...
11
votes
2answers
3k views

Relationship between Repository and Unit of Work

I am going to implement a repository, and I would like to use the UOW pattern since the consumer of the repository could do several operations, and I want to commit them at once. After read several ...
10
votes
5answers
496 views

Is overloading an example of the Open/closed principle?

Wikipedia says "software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification" The word functions caught my eyes, and I now wonder if we can ...
1
vote
1answer
179 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 ...
3
votes
3answers
263 views

Optimal communication pattern to update subscribers

What is the optimal way to update the subscriber's local model on changes C on a central model M? ( M + C -> M_c) The update can be done by the following methods: Publish the updated model M_c to ...
3
votes
2answers
119 views

Learning system instead of using sed/replace for reviewing test results

For every build of my software I run it through a series of tests that execute a number of commands on a command line and captures the results. Most of the time the output is a combination of: - ...
7
votes
3answers
596 views

Architectural patterns for software development [closed]

What are the architectural patterns, not design patterns, available for software development? Everybody talks about MVC but we usually don't know what else lies out there. I took a look at the ...
1
vote
3answers
235 views

Is the “exposer (hack) pattern” a newly identified pattern or does it have another name?

EDITED FOR CLARIFICATION In the past, I have seen a whole manner of resolutions and fudges. Some really stand out. One particular resolution that I initially thought of as a fudge possibly deserves a ...
4
votes
1answer
114 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 ...
4
votes
4answers
123 views

How do you proactively guard against errors of omission?

I'll preface this with I don't know if anyone else who's been programming as long as I have actually has this problem, but at the very least, the answer might help someone with less xp. I just stared ...
19
votes
8answers
2k views

How to implement DRY principle when using 'using' keyword?

Consider these methods: public List<Employee> GetAllEmployees() { using (Entities entities = new Entities()) { return entities.Employees.ToList(); } } public ...
3
votes
1answer
173 views

How to prevent hardcoding addresses in a web project?

In a fairly complicated web application, there are almost hundreds of redirecting to another page, or linking to another page, etc. Imagine that you have a page called ...
6
votes
2answers
393 views

Patterns to avoid long switch block in UI?

Sometimes you have many entities which have common parts, but also should be addressed uniquely in UI. For example, in a CMS, you have many content types (like news, images, articles, pages, etc.) ...
1
vote
2answers
220 views

Name for this pattern?

I'm writing a class that will handle thread synchronisation. It would have a begin method which would increment a counter and an end method that would de-increment a counter. It'll have another ...
4
votes
2answers
601 views

How do you decide to Queue/Dispatch events Sync or Async? (in Observer Pattern)

Consider the following elements in an event-driven architecture: Observable Object Event Dispatcher Observer(Listener) Now, we have two messages: From Observable Object to Event Dispatcher From ...
3
votes
6answers
446 views

What do you call this pattern/technique?

Lately I've used this technique a few times, and I'm trying to figure out if it has a name, if it's one of the patterns, etc. In complicated situations where I might normally have a number of giant ...
0
votes
3answers
159 views

What is the best practice for verify if a client has already dowloaded information from server?

I need to verify what data wasn't downloaded yet. For example, how does Twitter or Facebook verify if a specific client has already dowloaded a piece of information? When a mobile app like twitter ...
18
votes
7answers
4k views

Why avoid Java Inheritance “Extends”

Good day! Jame Gosling said “You should avoid implementation inheritance whenever possible.” and instead, use interface inheritance. But why? How can we avoid inheriting the structure of an object ...
7
votes
2answers
625 views

Open/Closed principle and reopening Ruby Classes

In OOP there is the Open/Closed principle that states that "software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification". Taking in ...
44
votes
8answers
3k views

Are design patterns really essential nowadays? [duplicate]

I was reading "Coders at Work" and have faced the fact that some of the professionals interviewed in the book are not so enthusiastic about design patterns. I think that there are 2 main reasons for ...
2
votes
7answers
1k views

Architectural patterns for interaction beyond MVC? [closed]

We all know the venerable Model-View-Controller pattern used to design interaction [mostly] with human users. It is the de-facto standard in OOP environment. What are some other architectural ...
18
votes
12answers
2k views

What design patterns are the worst or most narrowly defined?

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 ...
2
votes
6answers
728 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() ...