Questions tagged [maintainability]

Maintainability refers to the nature, methods, theory and art of maximizing the ease with which an asset may be sustained, modified or enhanced throughout the duration of its expected useful life.

306 questions
1
vote
0 answers

Manage javascript for different type of users with PHP

I have a pretty hard time to find out how to properly manage javascript in a page for different type of user. Let me explain a bit: We have a page that's is visible for everyone but some have the right to edit content on the page directly and some…
CinetiK
  • 1,748
  • 2
  • 13
  • 19
1
vote
1 answer

Less Hacky Way Than Using System() Call?

So I have this old, nasty piece of C code that I inherited on this project from a software engineer that has moved on to greener pastures. The good news is... IT RUNS! Even better news is that it appears to be bug free. The problem is that it was…
It'sPete
  • 5,083
  • 8
  • 39
  • 72
1
vote
2 answers

What's the best design when adding in optional parameters in languages that don't support it?

Say I have void foo(int a); and I want to add in an optional parameter using a language that doesn't support it (i.e. Java): void foo(int a, int optionalParam); Lets say I'll set the default to be 0. Now in my code base I have lots of calls to…
Popcorn
  • 5,188
  • 12
  • 54
  • 87
1
vote
1 answer

How do I manage SAS formats from various sources?

I am wondering how I can efficiently manage formats in SAS for a reporting office that takes in data from various sources, some with proper lookup tables / metadata, and some without. For data sources that have proper metadata, joining tables for…
chucknelson
  • 2,328
  • 3
  • 24
  • 31
1
vote
2 answers

How can I maintainably determine sizeof(struct ...)s?

Say I have a structure: struct myStruct { int a; short b; char c; }; In Windows, MSDN states that int takes 4 bytes, short takes 2 bytes and char takes 1 byte. This totals up to 7 bytes. I understand that most compilers will pad…
Anish Ramaswamy
  • 2,326
  • 3
  • 32
  • 63
1
vote
3 answers

C#: Implement Abstract Base of An Interface With Minimal Duplication?

I often find I need the following: public interface IMyThing { void Function1(); void Function2(); void Function3(); void Function4(); void Function5(); } public abstract class BaseMyThing : IMyThing { // Implement a version…
Eddie Parker
  • 4,770
  • 3
  • 35
  • 43
1
vote
3 answers

Are the MS MVC framework and jQuery suitable for a long-lived application?

I'm working on a web-based application that is intended to have at least a 6 year lifetime. Once the application is delivered, chances are that it won't be modified during that time frame. We're considering using the asp.net MVC framework and…
chris
  • 36,094
  • 53
  • 157
  • 237
1
vote
8 answers

For loop construction and code complexity

My group is having some discussion and strong feelings about for loop construction. I have favored loops like: size_t x; for (x = 0; x < LIMIT; ++x) { if (something) { break; } ... } // If we found what we're…
Chris Nelson
  • 3,519
  • 7
  • 40
  • 51
1
vote
3 answers

What is more performant, multiple Arrays or one Array containing multiple arrays?

What will be more performant and ressource friendlier? To use $array1=Array(); $array2=Array(); $array3=Array(); or: $arr=Array(); $arr[] = Array(); $arr[] = Array(); $arr[] = Array(); And what is better to handle in the code when maintenance is…
LostPhysx
  • 3,573
  • 8
  • 43
  • 73
1
vote
8 answers

C++ Function List

I'm working on a fairly complex project, a custom encryption routine if you will (just for fun) and I've run into this issue in designing my code layout. I have a number of functions that I want to be able to call by index. Specifically, I need to…
Blank
  • 7,088
  • 12
  • 49
  • 69
1
vote
1 answer

Is it better to return values or to write them directly on a given output argument?

I was reading this pull request on dablooms To top it off, Murmur doesn't return the hash value on the stack/registers but writes it directly to a provided buffer. This makes it exceedingly easy to fill the bloom->hashes buffer with a lot of random…
AntoineG
  • 1,237
  • 4
  • 15
  • 25
1
vote
2 answers

Unit Tests maintainability and factories

EDIT: I've decided to ditch the idea completely because while it's nice to use the same method to create my instances I'm giving up for other things and complicate the problem. In my Unit Test projects I have a folder that basically contain all the…
iam3yal
  • 2,188
  • 4
  • 35
  • 44
1
vote
3 answers

Declaring variables and functions, in what order?

Context I'm learning how to code in javascript consistently, readably and maintainably. I found nothing about the order of declaration of variables and functions. Example: var example = { A: function() { var a, b, c; }, B:…
GG.
  • 21,083
  • 14
  • 84
  • 130
1
vote
5 answers

How not to repeat yourself across projects and/or languages

I'm working on several distinct but related projects in different programming languages. Some of these projects need to parse filenames written by other projects, and expect a certain filename pattern. This pattern is now hardcoded in several places…
lindelof
  • 34,556
  • 31
  • 99
  • 140
1
vote
1 answer

What data structures can be used to enhance code maintainability?

The following python code works but the maintainability is quite poor. However I'm failing to see a better way to implement the code to improve maintainability. extraval = "" if aline[0:1] == "-": extraval = '"expanded":true, ' aline =…
Paul
  • 1,068
  • 11
  • 29