Skip to main content
deleted 34 characters in body; edited tags
Source Link
gnat
  • 20.5k
  • 29
  • 117
  • 310

While I know in a perfect world where a greenfield application was scoped out from day one with great BRD's and a competent development lead constantly reviewed code by their underlings to avoid this, I'm going to ask because we all know and have all been a part of plenty of scenarios where this isn't the case... and this happens...

The problem I run into all the time with consulting gigs is you'll find ten methods all pretty much doing the same thing, and with some refactoring, could be much more efficient. However, it doesn't seem to stop the developers from creating new methods when there's one already written, or mostly written they could use.

The problem doesn't always lie with the developer(s). If it's a large application, and even in a Service Oriented Architecture scenario, you could have hundreds of services and you're bound to have duplicates there because the other developer needed to accomplish something, was being a good little coder in making a reusable class/method, but wasn't aware another good little developer has already created that method.

So my question to you all is, what have you found to be the most successful way in avoiding duplicate methods? Documentation, Communication, Automated Refactoring? But more important, how to clue in other developers coming into an existing application project with all the methods and services available to them? Any insight greatly appreciated.

While I know in a perfect world where a greenfield application was scoped out from day one with great BRD's and a competent development lead constantly reviewed code by their underlings to avoid this, I'm going to ask because we all know and have all been a part of plenty of scenarios where this isn't the case... and this happens...

The problem I run into all the time with consulting gigs is you'll find ten methods all pretty much doing the same thing, and with some refactoring, could be much more efficient. However, it doesn't seem to stop the developers from creating new methods when there's one already written, or mostly written they could use.

The problem doesn't always lie with the developer(s). If it's a large application, and even in a Service Oriented Architecture scenario, you could have hundreds of services and you're bound to have duplicates there because the other developer needed to accomplish something, was being a good little coder in making a reusable class/method, but wasn't aware another good little developer has already created that method.

So my question to you all is, what have you found to be the most successful way in avoiding duplicate methods? Documentation, Communication, Automated Refactoring? But more important, how to clue in other developers coming into an existing application project with all the methods and services available to them? Any insight greatly appreciated.

While I know in a perfect world where a greenfield application was scoped out from day one with great BRD's and a competent development lead constantly reviewed code by their underlings to avoid this, I'm going to ask because we all know and have all been a part of plenty of scenarios where this isn't the case... and this happens...

The problem I run into all the time with consulting gigs is you'll find ten methods all pretty much doing the same thing, and with some refactoring, could be much more efficient. However, it doesn't seem to stop the developers from creating new methods when there's one already written, or mostly written they could use.

The problem doesn't always lie with the developer(s). If it's a large application, and even in a Service Oriented Architecture scenario, you could have hundreds of services and you're bound to have duplicates there because the other developer needed to accomplish something, was being a good little coder in making a reusable class/method, but wasn't aware another good little developer has already created that method.

So my question to you all is, what have you found to be the most successful way in avoiding duplicate methods? Documentation, Communication, Automated Refactoring? But more important, how to clue in other developers coming into an existing application project with all the methods and services available to them?

Post Closed as "Duplicate" by CommunityBot, user16764, Sklivvz
edited tags
Link
Sklivvz
  • 5.3k
  • 21
  • 34
Change title to ask question, fix case, minor spacing, add tags.
Source Link
user40980
user40980

Best Practices on How to Avoid 2 Programmers Coding the Same Method in Applicationavoid programmers duplicating code

While I know in a perfect world where a greenfield application was scoped out from day one with great BRD's and a competent development lead constantly reviewed code by their underlings to avoid this, I'm going to ask because we all know and have all been a part of plenty of scenarios where this isn't the case...and and this happens....

The problem I run into all the time with consulting gigs is you'll find 10ten methods all pretty much doing the same thing, and with some refactoring, could be much more efficient. However, it doesn't seem to stop the developers from creating new methods when there's one already written, or mostly written they could use.

The problem doesn't always lie with the developer(s). If it's a large application, and even in a Service Oriented Architecture scenario, you could have 100'shundreds of services and you're bound to have duplicates there because the other developer needed to accomplish something, was being a good little coder in making a reusable class/method, but wasn't aware another good little developer has already created that method.

So my question to you all is, what have you found to be the most successful way in avoiding duplicate methods? Documentation, Communication, Automated Refactoring? But more important, how to clue in other developers coming into an existing application project with all the methods and services available to them? Any insight greatly appreciated.

Best Practices on How to Avoid 2 Programmers Coding the Same Method in Application

While I know in a perfect world where a greenfield application was scoped out from day one with great BRD's and a competent development lead constantly reviewed code by their underlings to avoid this, I'm going to ask because we all know and have all been a part of plenty of scenarios where this isn't the case...and this happens....

The problem I run into all the time with consulting gigs is you'll find 10 methods all pretty much doing the same thing, and with some refactoring, could be much more efficient. However, it doesn't seem to stop the developers from creating new methods when there's one already written, or mostly written they could use.

The problem doesn't always lie with the developer(s). If it's a large application, and even in a Service Oriented Architecture scenario, you could have 100's of services and you're bound to have duplicates there because the other developer needed to accomplish something, was being a good little coder in making a reusable class/method, but wasn't aware another good little developer has already created that method.

So my question to you all is, what have you found to be the most successful way in avoiding duplicate methods? Documentation, Communication, Automated Refactoring? But more important, how to clue in other developers coming into an existing application project with all the methods and services available to them? Any insight greatly appreciated.

How to avoid programmers duplicating code

While I know in a perfect world where a greenfield application was scoped out from day one with great BRD's and a competent development lead constantly reviewed code by their underlings to avoid this, I'm going to ask because we all know and have all been a part of plenty of scenarios where this isn't the case... and this happens...

The problem I run into all the time with consulting gigs is you'll find ten methods all pretty much doing the same thing, and with some refactoring, could be much more efficient. However, it doesn't seem to stop the developers from creating new methods when there's one already written, or mostly written they could use.

The problem doesn't always lie with the developer(s). If it's a large application, and even in a Service Oriented Architecture scenario, you could have hundreds of services and you're bound to have duplicates there because the other developer needed to accomplish something, was being a good little coder in making a reusable class/method, but wasn't aware another good little developer has already created that method.

So my question to you all is, what have you found to be the most successful way in avoiding duplicate methods? Documentation, Communication, Automated Refactoring? But more important, how to clue in other developers coming into an existing application project with all the methods and services available to them? Any insight greatly appreciated.

Post Migrated Here from stackoverflow.com (revisions)
Source Link
Indy-Jones
Indy-Jones
Loading