The use of existing code for creating new software.

learn more… | top users | synonyms

1
vote
1answer
104 views

Do you maintain your own utilitiy library [duplicate]

So, i've started working as a freelancer and therefore find myself copy/pasting util methods from one class to another. Not good to say the least. I do this on my mobile frontend dev and backend ...
0
votes
0answers
20 views

How to define dependent function in node js?

I have a nodejs project in which a sample.js include two function function A depends on function B's callback . // smaple.js Both function are included in the same file function B ( ...
2
votes
1answer
252 views

Should you reuse an Entity Framework EDMX between multiple solutions?

We currently have 1 giant EDMX for our corporate database. It, along with all of the generated POCOs, are in a separate project (we'll call it the EDMX project) which we pull in to any solution that ...
0
votes
1answer
58 views

How to keep class parameters visible while using generic argument passing

After writing some classes where class initialization requires multiple options, instead of writing several parameters into constructors or setters, I started passing an associative array of ...
1
vote
2answers
183 views

How to know whether to create a general system or to hack a solution

I'm new to coding , learning it since last year actually. One of my worst habits is the following: Often I'm trying to create a solution that is too big , too complex and doesn't achieve what needs ...
3
votes
1answer
115 views

Augmenting functionality of subclasses without code duplication in C++

I have to add common functionality to some classes that share the same superclass, preferably without bloating the superclass. The simplified inheritance chain looks like this: Element -> ...
2
votes
1answer
91 views

Is this approach to CSS correct?

Reading SASS basic features on their website, I stumbled upon the @extend feature. The example they give is the following: .message { border: 1px solid #ccc; padding: 10px; color: #333; ...
1
vote
1answer
51 views

How do you wrestle the DRY principle with configs?

For instance, lets say we have an nginx config pointing at foo1, foo2, and foo3, as well as a haproxy config pointing at foo1, foo2, and foo3, and finally, a deployment tool pointing at the same ...
0
votes
0answers
31 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
58 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
93 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
103 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
57 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 ...
1
vote
0answers
181 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
336 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
253 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
111 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
285 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
203 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
226 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
141 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
170 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
70 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
456 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
243 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
154 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
506 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
768 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
303 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
137 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
195 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
400 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
503 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
371 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
266 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
658 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
265 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
463 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 ...
22
votes
7answers
1k views

Does software reuse preclude process repeatability

Code Reuse as a Problem 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
86 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 ...
3
votes
3answers
235 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
505 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) ...
2
votes
3answers
495 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 ...
-1
votes
5answers
291 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 ...
33
votes
4answers
4k 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
242 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 ...
1
vote
1answer
2k 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
373 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
141 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 ...