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.
Questions tagged [maintainability]
306 questions
3
votes
1 answer
Can a scope be set for jquery.ajaxSetup()?
I'm working on something with a ton of ajax calls, most of which have the same parameters. I'm considering using jquery.ajaxSetup() to cut down on the code.
However, jQuery doesn't like it's API for this. It says:
Note: The settings specified here…

streetlight
- 5,968
- 13
- 62
- 101
3
votes
5 answers
What is the best way to persist a users choice?
In my application I want to prompt a user about a new feature with some kind of a dialog the first time they visit the screen. And on a subsequent visit this dialog is not shown.
The obvious solution is to use a cookie or save this in the database.…

Georgi Varzonovtsev
- 31
- 5
3
votes
5 answers
How to make this object more maintainable?
For example, I have something like this:
User
-FirstName
-SecondName
-Gender
and the VIPUser, which is the subclass of User
VIPUser extends User
-GiftNum
-Birthday
But suddenly the application need to change the policy, all the User must have the…

DNB5brims
- 29,344
- 50
- 131
- 195
2
votes
7 answers
How do you maintain large t-sql procedures
I'm about to inherit a set of large and complex set of stored procedures that do monthly processing on very large sets of data.
We are in the process of debugging them so they match the original process which was written in VB6. The reason they…

Hath
- 12,606
- 7
- 36
- 38
2
votes
1 answer
Angular How to easier maintain build in i18n translations
We use the build in i18n module for angular.
I successfully generated source file for my original lang (en). Then I copied the source file and created another file with (es) translation.
It is easy to regenerate source file. But the problem is that…

simply good
- 991
- 1
- 12
- 26
2
votes
1 answer
Invoke overridden virtual methods of a derived class without exposing them
I would like to write a function f which invokes two overridden virtual methods, op_1 and op_2, of a derived class in a particular order, without exposing those methods beyond f and the methods' containing classes.
I can think of a few approaches…

Manningham
- 335
- 4
- 14
2
votes
1 answer
Refactoring instanceof
On my current project, I need to convert values between types that are only known at runtime: the input type is the JSON type of the input, and the output type is defined in a configuration file loaded at runtime.
I came up with a generic solution,…

CidTori
- 351
- 4
- 17
2
votes
1 answer
Rails: stalker, rescue or something else
The actual problem
I am using Rails 3.0.4 and MongoDB through mongoid.
I am using @mailgun to deliver my emails. I send both bulk(like news-letter) and transactional(like activate account, forgot password) emails. Right now, I am using a single…

rubish
- 10,887
- 3
- 43
- 57
2
votes
4 answers
Which cast style is better and why?
Imagine in C++ two classes one named derived and another named base that is a base class of the first. If I had the following code, which is preferred:
base *b = init_value_here;
const derived *d = static_cast(b);
or
base *b =…

WilliamKF
- 41,123
- 68
- 193
- 295
2
votes
4 answers
CSS child width 100% or px question
Maybe a simple question with an easy answer.
I wondered today what is the difference between a child width in px or 100%, when the child is going to be the exact same width as the parent. The outcomes will be the same I know, but what is best to…

Basic
- 1,818
- 5
- 21
- 31
2
votes
1 answer
How to document config files?
Are there any best-practices for config-file documentation, especially for python?
Particularly in scientific computing, it is common to use a config file as the input to control a batch processing job (such as a simulation), and expect the user to…

benjimin
- 4,043
- 29
- 48
2
votes
1 answer
Developing and maintaining shell completion for bash and zsh
I have written bash-completion for a command line utility.
I need to support zsh.
What is the best/standard way to maintain completion for bash and zsh?
I could write separate zsh-completion but I don't want to maintain separate completion for each…

curusarn
- 403
- 4
- 11
2
votes
2 answers
Can't suppress CA1502
I have a class which starts off something like this:
namespace Tools.Builders
{
internal abstract class Builder
{
[SuppressMessage("Microsoft.Maintainability", "CA1502")]
private static readonly Dictionary

Dave
- 3,429
- 2
- 26
- 29
2
votes
2 answers
Best design pattern for structured sequential handling
Doing maintenance on a project I came across code, which I find unnecessary hard to read and I wish to refactor, to improve readability.
The functionality is a long chain of actions that need to be performed sequentially. The next action should only…

Tony_KiloPapaMikeGolf
- 879
- 12
- 28
2
votes
1 answer
Create myNew/myDelete to replace new/new[]/delete/delete[]
How to code my program to has flexibility to receive custom allocator in advance?
I coded some allocators, but not sure whether I will really need it.
However, I know for sure that if my custom allocator will be plugged-in, I want to use it in some…

javaLover
- 6,347
- 2
- 22
- 67