strategy

What Are Some Examples of Design Pattern Implementations Using JavaScript?

I'm a moderately skilled programmer using JavaScript but I am no guru. I know you can do some pretty powerful things with it, I just haven't seen much other than fairly basic DOM manipulation. I'm wondering if people could provide some examples of traditional design pattern concepts such as Factory Method, Singleton, etc using JavaScript...

Clean implementation of the strategy pattern in Perl

How do I write a clean implementation of the strategy pattern in Perl? I want to do it in a way that leverages Perl's features. ...

Object Oriented Update Approach

I've been tasked with maintaining an application originally written in VB6. It has since been imported into VB .Net and to say the least the code is anything but Object Oriented. The code is riddled with classes which contain nothing more than Public Shared attributes(variables) and methods(functions), the result of which restricts the a...

Strategies for Caching on the Web?

What concerns, processes, and questions do you take into account when deciding when and how to cache. Is it always a no win situation? This presupposes you are stuck with a code base that has been optimized. ...

Parent-Child object relationship events.

Howdy, Is it an acceptable strategy for a child object in a typical parent-child OO relationship to raise an event that the parent catches then passes a value back to the child through the EventArgs? I have a situation where the child needs data from the parent, but the parent does not have that data at the time the child is instantiate...

How to safeguard an inside software development team from being outsourced?

There is a lot of talk on why outsourcing (and off-shoring) of software development jobs in a long run has an adverse effect for a business. However, most of these arguments are well understood only by folks who are heavily into software development themselves and there is an apparent difficulty in putting these arguments across to "poli...

What is a good CSS strategy?

We have a large ASP.Net website that has a single css stylesheet which is getting out of control. I am thinking of using the the following strategy (taken from http://articles.techrepublic.com.com/5100-10878_11-5437796.html) which seems logical to me... you might have one CSS file devoted to sitewide styles and separate CSS files for i...

How often should you release software updates?

Moments ago Jeff Atwood said the following on twitter: Look, I love rapid new software releases, but the frequency of WordPress releases is just ridiculous. Which makes me think, how often should you release software updates? Daily? Weekly? Monthly? Yearly? Whats the best release strategy? ...

Thinking Techniques

When you are in a meeting or while you are talking to you boss, project manager, technical leader etc. or doing something similar to these actions what strategies do you have in terms of thinking? (Question can be expanded and strategies of -answering- or -asking- or saying -OK- can be asked but since all these actions are based on think...

What is meant by 'Seat of your pants coding'?

I hear a lot of reference made to 'seat of your pants' coding, but I've never fully understood what it means. Can someone please explain? ...

log4net strategy on named loggers?

I typically declare the following in every class: private static readonly log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); and use the static member within each class to log at different levels (info, debug, etc.) I saw that somewhere and have been using it s...

What is the difference between the bridge pattern and the strategy pattern?

I tried to read many articles on dofactory, wikipedia and many sites. I have no idea what the difference is between them. I know both of them decouple an abstraction from its implementation and can change implementation at run time. But I still don't know in which situation I should use strategy or in which situation I should use brid...

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. But now I think I do: I've just had a revelation when Joel Spolsky said on the podcast that they should use QuickBooks because 'every account...

Website JavaScript Strategy - What to Include?

I've been using the jQuery library in our company website for a few weeks longer than its "official Microsoft endorsement". As we find ourselves applying it more and more throughout the site, questions are now being asked about our design vision and implementation strategy for jQuery. Currently, we have none. I've put some initial tho...

Design OOP question on Decorator and Strategy pattern C#

Say for example you have a base abstract class public abstract Foo { IFlyable _fly; ISwimmable _swim; void performSwim() { _swim.swim(); } void performFly() { _fly.fly(); } } And have behaviors/algorithm that you will have in your system interface IFlyable { void fly(); } interface ISwimmable { void swim(); } in...

WCF/Silverlight/SQL DB Caching Strategies

Ok, I have a pretty complex silverlight app that gets its data from a WCF service (asp.net hosted service layer) which in turn calls into a data layer that calls stored procedures in a SQL 2005 DB to extract the needed data. So the round trip goes like this: Silverlight App --> WCF Service --> Data Layer --> DB --> Data Layer --> WCF S...

Functor class doing work in constructor

I'm using C++ templates to pass in Strategy functors to change my function's behavior. It works fine. The functor I pass is a stateless class with no storage and it just overloads the () operator in the classic functor way. template <typename Operation> int foo(int a) { int b=Operation()(a); /* use b here, etc */ } I do this often, a...

Is it worth enlisting student programmers?

Is it worth my while letting programmers from Oxford University loose on my projects? What are universities like when you wave confidentiality agreements at them? ...

GUI, java, SWT and world map representation

Dear all, I'm trying to implement a small-scale strategy, taking turns game implemented in Java, GUI is made with JFace and SWT. My challenge is to write a GUI implementation of the world map, where countries will act as clickable buttons. However, countries have no fixed boundaries, no rectangular shape, and simply no way I can think...

What should be included in the state-of-the-art error and exception handling strategy?

I understand that this is a very broad question, but a short “it depends” kind of answer will not be accepted. Strategies are born to deal with broad issues. What issues should an application designer take into consideration when devising the error and exception handling strategy? How the strategy will differ depending on the software ...