The use of existing code for creating new software.

learn more… | top users | synonyms

0
votes
0answers
20 views

Are Components ideal for packaging and reusing find() requests?

I find myself loading several models over and over again throughout my application. Instead of typing the code to load the model, run a find, would it be reasonable to put that code in a method and ...
0
votes
2answers
52 views

Automatically propagating changes

When working on multiple similar projects there are often changes that can't be extracted into a library, but should be applied to most of the projects. I mean changes like a modified directory ...
2
votes
1answer
87 views

What is a good strategy to develop apps that run in console and as API?

I develop quite often scripts that are primary used as a console application but later they are used in other scripts, webservices and other things where it is very convenient, to just import the ...
-4
votes
2answers
80 views

Using someone else's code in your commercial products [closed]

Is it acceptable to use code made by other people that was deliberately made to be shared amongst Web developers? Things such as long libraries of code that contain hundreds of lines of code that you ...
1
vote
0answers
49 views

How do I manage a JavaScript library with TFS?

I know that I can share files between Visual Studio projects using linked files and assemblies using project references. Is there a good approach for JavaScripts? I'd rather not use linked files since ...
0
votes
0answers
131 views

Reusable and customizable charting library on top of d3js

I have started building a charting library on top of d3js using javascript's inheritance. My goal is to develop reusable and fully customizable chart components. I read the article: Towards Reusable ...
0
votes
2answers
266 views

How can I re-use object from another project?

I have a first project has a feature to viewing, inserting and updating an employee record, with this possibly I will create a java class for the UI and another for the database connection with ...
4
votes
3answers
212 views

How to avoid programmers duplicating code [duplicate]

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, ...
0
votes
0answers
52 views

subclass QAbstractTableModel - reuse as much code as possible

in my PyQt application I am heavily using the model/view approach. For every model I create, I do the following: class myModel(QtCore.QAbstractTableModel): def __init__(self, parent = None): ...
0
votes
2answers
209 views

What's a DRY alternative to c++ header files? [duplicate]

In c++, is there any other way, besides header files, to use a function defined in file A.cpp, inside file B.cpp that would be considered good programming practice?
0
votes
1answer
151 views

How to reuse c++ code? [closed]

How do I call functions defined outside a source file given you shouldn't use header files? -- EDIT: generic(?) question below So, first, a problem should be broken down into simpler subproblems. ...
-1
votes
1answer
201 views

How to reuse spaghetti code

We're working on a new firmware for our new V2 device. The company has an older V1 firmware (and hardware). Hardwares are similar to each other (but there are some differences) so basically we could ...
0
votes
0answers
133 views

DRY on API specifcations?

When developing a new RESTful application, I generally: Define tests Define routes [ e.g.: RESTful CRUD; namespaced on /api/users ] Define models [ e.g.: "Users" ] Define forms [ e.g.: in ...
0
votes
2answers
165 views

Is it better to use already build plugins/extensions or code your own in programming projects [duplicate]

I am building a web app in PHP and Symfony. Basically if we search there are plugins / extensions / bundles for almost 60% of stuff. The advantage of using them is that you can easily get your ...
0
votes
1answer
69 views

Classes and library archive [duplicate]

We are a group of 5 developers(scientists end engineers) that write code in C++. What we would like to do is to make all the code available to all the developers easily. The first step in this process ...
12
votes
3answers
436 views

Is there a software engineering principle that relates reuse and regression test cost on a production system?

I've worked on a large financial transaction system for a bank that looked after Pensions and Investments. After 15 years of feature changes, the manual regression test cost had climbed to $200K per ...
2
votes
3answers
234 views

Are projects using frameworks not as good as projects using pure programming? [duplicate]

I've been a Rails developer for a year now (originally self taught), and am at the point where I want to improve. I've been reading books on how to improve the quality of my Ruby code (I read Design ...
1
vote
1answer
146 views

Further decoupling using static libraries

I've been thinking for a while about reasons that prevent a lot of programmers — myself first of all — from writing clean, modular and expressive code while developing, for example, CocoaTouch apps. ...
11
votes
5answers
484 views

Code repetition vs multi responsible method

I try to follow the Single Responsibility Principle (SRP) and also to omit Code Repetitions. However there are often places where there are code repetitions that are nothing more than code blocks of ...
3
votes
1answer
568 views

What are the disadvantages of self-encapsulation?

Background Tony Hoare's billion dollar mistake was the invention of null. Subsequently, a lot of code has become riddled with null pointer exceptions (segfaults) when software developers try to use ...
0
votes
1answer
286 views

Good fix vs Quick fix [duplicate]

Let's start from this principle: quality is a feature that you can't add to a project in the middle of the development process. This is the scenario: two weeks to go live with my project and, one of ...
1
vote
2answers
134 views

Where in computer science education does “reuse and integration” find comprehensive coverage?

This intro is only my naive attempt at a mile-high snapshot helping me to position my question. Any user trying to answer my question, that tries to nail down one aspect of programming, will have to ...
4
votes
3answers
191 views

Where should I place my interface?

I have an interface to communicate with a DB (actually it is not a database, but this is to give a concrete example): interface DbInterface{ Result sendQuery(Query q); } And I am trying to ...
0
votes
4answers
382 views

Not copyrighting code and then reusing functions later

I'm coding something for my job to copy directories and then use regex to make all the filenames uniform. I'm an undergrad student programmer for my university and I'm not sure what a professional ...
4
votes
3answers
492 views

Is there a term for reusing code by retyping it?

I built a prototype ("one to throw away") a while ago, and I'm rebuilding it now as an alpha. My goodness, it's been worth it. I reused some of the prototype code by copy-pasting then modifying it, ...
0
votes
1answer
319 views

common infrastructure for web apps using asp.net mvc

How to build a common infrastructure for my web apps using asp.net mvc, and efficiently manage it? The goal is to increase developer productivity. The common infrastructure stuff includes visual ...
3
votes
3answers
229 views

Reusing open-source code that doesn’t specify a license

I am creating a module for a CMS. I found a PHP code in github that does some work for me. The author has not clearly stated the license for the code. Since it is in github and is publicly available, ...
0
votes
2answers
539 views

Better design for a generic doubly linked list around which I plan to make different wrappers?

I am currently writing a C code for a doubly linked list(dll) around which I want to write wrapers for implementing stack, queues etc. instead of writing separate codes for all of them. I'll be ...
2
votes
2answers
231 views

Managing Multiple Projects that Share Code + Customization [closed]

I recently became lead developer of a project at my first non-internship programming position. I've been there for 8 months since I've graduated in December. The project is a web service we offer that ...
1
vote
2answers
396 views

Should the search engine return a dictionary or strongly typed objects?

I'm building a search engine using Lucene.NET / Solr.NET, and I'm wondering should search hits be returned as a dictionary or strongly typed object. public class SearchResult { public string ...
21
votes
7answers
1k views

Does software reuse preclude process repeatability

The Problem - Code Reuse I was thinking about this question on software delivery, and I kept coming back to the issue of repeatability and / or reproducibility. They matter, because if you don’t ...
2
votes
1answer
83 views

managing information/functionality on shared common project classes [duplicate]

In my company, we have a common solution the contains common projects (2 projects so far, one for .net 3.5 and one for .net 4.5). My main problem is that during time, a lot of code is added, for ...
2
votes
3answers
205 views

Refactor working code for reuse or duplicate?

I have always avoided duplicating code regardless of the circumstance. For example, if I have a working piece of functionality that needs to be re-used by different entities, I always refactor to ...
2
votes
2answers
441 views

Code Reuse and Abstraction in FP vs OOP [closed]

I've been told that code reuse and abstraction in OOP is far more difficult to do than it is in FP, and that all the claims that have been made about Object Orientedness (for lack of a better term) ...
1
vote
2answers
365 views

Sharing business logic between server-side and client-side of web application?

Quick question concerning shared code/logic in back and front ends of a web application. I have a web application (Rails + heavy JS) that parses metadata from HTML pages fetched via a user supplied ...
0
votes
5answers
266 views

What features should a programming language have to say it has good reusability? [closed]

What should a programming language have so that it can be said to promote good reusability? Only generics and functions come to my mind when I hear the word reusability. What else make a programming ...
30
votes
4answers
3k views

What did Rich Hickey mean when he said, “All that specificity [of interfaces/classes/types] kills your reuse!”

In Rich Hickey's thought-provoking goto conference keynote "The Value of Values" at 29 minutes he's talking about the overhead of a language like Java and makes a statement like, "All those interfaces ...
2
votes
2answers
201 views

How to avoid code duplication across unrelated projects [duplicate]

I'm a contractor at a large Telco where I'm usually working on several different projects at once. The VCSs I use (mainly git and mercurial) tend to make me keep the code bases for unrelated ...
-3
votes
1answer
104 views

Refactoring methods with the same behavior [closed]

Imagine you have 2 methods : GetConsolidation([...]); GetReportOfConsolidation([...]); These 2 methods use the same "behavior" (some local variables assigned with data) like : var data = ...
1
vote
1answer
1k views

How to save useful code snippets? [duplicate]

I do a lot of web development and there are many code snippets that come up again and again so I dive back into the most recent project where I used it which isn't that efficient. How do you store ...
42
votes
7answers
3k views

How do you keep track of what classes and functions your team has written?

When working on code, I face many of the same challenges that my teammates do, and I have written some helpful functions and classes, and so have they. If there is good communication, I'll hear about ...
2
votes
2answers
330 views

How can we avoid having to build yet another CRM system from scratch

We are building an accounting web application. In our database, we store basic data about our customers, like phone number, their login informations, because these things are tied into our web ...
1
vote
1answer
132 views

Format text in a generic and reusable way

I would like to write some long text in some structure to allow a set of operations on that text. The question is which structure or format should I use, which suits best the use that I plan to do of ...
84
votes
12answers
5k views

Best practices for sharing tiny snippets of code across projects

I always try to follow the DRY principle strictly at work; every time I've repeated code out of laziness it bites back later when I need to maintain that code in two places. But often I write small ...
2
votes
0answers
332 views

Is it bad to reuse other programmer's code libraries that can perform generic tasks? [duplicate]

Reusing large amount of helpful codes made by other programmers is very tempting for me. I specifically refer to codes that can perform generic tasks, such as Data Access Layer (DAL) codes. I am ...
5
votes
4answers
520 views

Architecture suggestions on a multi-project multi-database 'intranet'

Here is the situation I have inherited: We have approximately 10 websites (Asp.net web forms) that each have their own database. Each of these databases houses some site specific data, and each has ...
9
votes
2answers
415 views

What is 'code skew'?

In the O'Reilly book on Scala, I read that copy-pasting of code creates: ... creates issues of code-bloat, maintainability and skew, I can't see any obvious definitions of the word skew in ...
3
votes
1answer
99 views

Custom templating in a web application

I want to understand the pros and cons in generating dynamic web application controls. The idea is to generate all the controls dynamically based on the database procedure output and populate the ...
0
votes
1answer
193 views

Handling table name collisions in Django

Django creates a table name by joining the app label with the model name. A project can have many apps. If two have the same label, how can both be used in the same database? I'm currently using very ...
12
votes
5answers
767 views

I released open source code that is useable to other programmers. How do I let them know about it? [duplicate]

I have a tiny project (<1k but let's say its <5k of lines). I made it open source and put it on github. I did this once before and I didn't get a single download nor fork but that was very ...