The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
86 views

Implementing a strategy pattern with dependency injection

Okay, so the goal here is to implement a strategy pattern that can be tested using any sort of automated testing tool. I've been struggling with this problem conceptually for a few weeks now and I ...
1
vote
2answers
64 views

Inheritance vs 'specification' by fields

I'm currently reading 'Head first design patterns', and already the first chapter threw some questions towards me. This chapter introduces the 'prefer composition over inheritance' design principle, ...
1
vote
1answer
120 views

Image strategy on Android

I am creating an application with lots of photos. They will take > 100 mb on memory. So far I have 3 ideas: Place it in @drawable - app will be heavy Download by JSON and place in java ...
0
votes
2answers
228 views

Strategy with using SVN to switch between test and production server. (with maintaining configuration files)

I would like to know your opinion about my setup right now, how I do things with SVN and if you could find some better solution for me. I'd appreciate it very much if someone could come up with some ...
3
votes
2answers
990 views

Is context inheritance, as shown by Head First Design Patterns' Duck example, irrelevant to strategy pattern?

In Head First Design Patterns it teaches the strategy pattern by using a Duck example where different subclasses of Duck can be assigned a particular behavior at runtime. From my understanding the ...
2
votes
2answers
352 views

Best strategy in SQL

Recently, a colleague told me that it wasn't advisable to make conditions in the join clauses. Instead he suggested to make conditions in the where clause. He told me that the SQL engine was optimized ...
0
votes
1answer
140 views

How to handle “animated” game where the visual should “animate” instead of abruptly change?

I've been playing around and learning javascript/KineticJS by making some simple games (think like board games). I have the game model that is relatively logically simple. When a "move" is given to ...
1
vote
1answer
218 views

Do integrated systems increase development time and cause inflexibility?

I work for a large financial company that manages money for thousands of clients. This company has very complex business processes and they operate in a very dynamic environment. This is a fairly ...
2
votes
2answers
732 views

Context class in Strategy pattern

I'm trying to understand the strategy pattern and asking myself: is the context class must-have or can I leave it out without compromising pattern's purpose ? I was under the impression I needed some ...
1
vote
3answers
327 views

Where to check that a function actually did what I told it to?

Consider this function intended to kill all running instances of a subprocess: killAllFoobars() { pids = getRunningFoobars(); foreach ( pids as p ) { killOneFoobar(p); } ...
1
vote
1answer
370 views

Liskov substitution and abstract classes / strategy pattern

I'm trying to follow LSP in practical programming. And I wonder if different constructors of subclasses violate it. It would be great to hear an explanation instead of just yes/no. Thanks much! P.S. ...
0
votes
1answer
275 views

would a composite design pattern be useful for group membership?

I'm trying to think about the best way to handle group memberships on a website. People sign up and select checkboxes in a list of interests. Every week we send out interest-themed emails to those ...
1
vote
1answer
311 views

Linking application build number to svn revision

I am looking for a strategy to version an application with the following requirements. My requirements are given an exe with version number (major.minor.build-number) 1) I want to map the version to ...
2
votes
8answers
934 views

Strategy/algorithm to divide pot to chips

I want to split poker pot to chips. Example: Pot = $17.500. I have the endless piles of chips. I have the following types of chips: ChipsTypes = [$1, $5, $10, $25, $100, $500, $1.000, $5.000, ...
2
votes
2answers
1k views

Strategy vs Delegates

Can the Strategy design pattern entirely replace delegates? In Java, for example, there are no delegates. Is it possible to gain all the features of delegates by using Strategy design pattern? ...
16
votes
8answers
1k views

Strategy/algorithm to divide fair teams based on history

We are a group of people playing floorball together on a regular basis. Every session starts with the daunting task of dividing teams... So what would be better than an application to pick teams ...
6
votes
6answers
1k views

Can the Strategy pattern be implemented without significant branching?

The Strategy pattern works well to avoid huge if...else constructs and make it easier to add or replace functionality. However, it still leaves one flaw in my opinion. It seems like in every ...
0
votes
2answers
446 views

How do I share common classes between windows forms and web applications using C#?

In our environment we have multiple ERP servers plus data that are coming from multiple sources. I need to create a development roadmap for the coming years as it is obvious that side applications ...
5
votes
3answers
648 views

Can you point me to a nontrivial strategy pattern implementation?

We are faced implementing a registration workflow with many branches. There are three main flows which in some conditions lead to one another. Each flow has at least four different steps; some steps ...
3
votes
2answers
519 views

Adding more responsibilities to Activities in a flexible way

I am considering how I can add tasks to Android Activities in a flexible way. I can only use implementation inheritance for one thing in Java and I would like to use it, if I use it at all, for ...
1
vote
1answer
445 views

Best Practice: strategy regarding Website Projects and versioning

What are the best practices and strategy for designing and developing a website? The key parts I want considered are: DLL deployment IIS publishing project versioning namespace Please answer ...
2
votes
1answer
97 views

Is it OK to pass the concrete client to a method on the concrete strategy?

When using the strategy pattern, is it good practice to pass this to a method on this.strategy? I have a strategy interface with one call, TakeAction. The idea is that TakeAction decides which of ...
6
votes
2answers
3k views

Trial/Free & Full Version VS. Free App + In-app billing?

I'm just wondering what would be the best strategy to publish an application on the Android Market. If you have a free and paid version you have two codes to update (I know it will be 99% the same ...
4
votes
3answers
2k views

Starting a new startup/web application, how to choose a hosting provider? [closed]

When creating a new startup related to a web application, how to choose a hosting provider ? Assuming the code of the web application is oriented DDDD (Distributed Domain Driven Development) to ...
3
votes
4answers
795 views

Can the strategy pattern be overused?

Example: A file, representing a serialized version of an object, needs to be read and deserialized. It would simple to implement this if we only cared about a single serialization format, but many ...
1
vote
2answers
126 views

Path of Replication

I'm currently developing a replication system to keep data in-synch between an arbitrary number of servers. Some of these servers exist in one cluster on one LAN. Others exist somewhere else in the ...
17
votes
5answers
3k views

What is your application versioning strategy? [duplicate]

I would be interested to get the SO community's opinions on the best application versioning strategy. My questions: How do you keep track of your application's version number? Do you have a formal ...
12
votes
6answers
844 views

How productive is an excellent developer compared to an average one?

I believe that I read somewhere that Google has a rule of thumb that an excellent developer is around 300 times more productive than an average one. Does anyone have any rules of thumb used by large ...
9
votes
5answers
1k views

Modified Strategy Design Pattern

I've started looking into Design Patterns recently, and one thing I'm coding would suit the Strategy pattern perfectly, except for one small difference. Essentially, some (but not all) of my ...
5
votes
3answers
329 views

Hashing growth strategy

What is a good growth strategy for hash tables? If the number of elements exceeds the number of buckets, I increase the number of buckets with the following formula: n = int(n * 1.618033988749895) | ...
20
votes
14answers
1k views

How managers choose programming languages

It's not a secret to anyone that managers can and often will impose the programming language that will be used for a project. Being a programmer myself, I have never been able to understand this. ...