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
2
votes
1 answer
Maintenace Tasks - Simple PHP files, microframework or Symfony2
I have several maintenance tasks which I need to update / rewrite and I'm unsure of the best approach to take.
Current the maintenance tasks are flat PHP or Perl scripts and I could use the same approach but if feels a bit haphazard and not well…

Chris Shennan
- 42
- 6
2
votes
2 answers
Maintainable mocks
Mock objects introduce a good approach to do deep behavior testing of some program unit.
You just should pass mocked dependency to the tested unit and check if it works with dependency as it should do.
Let you have 2 classes A and B:
public class…

gerichhome
- 1,872
- 2
- 15
- 21
2
votes
1 answer
Should we always eliminate calculated attributes, even when it is a critical and complicated calculation?
The "third normal form" of database design asks you to remove functional dependencies. It seeks to eliminate redundancy, removing from a table any attributes (fields) that can be calculated from the other fields. For instance, when you make a…

dividebyzero
- 2,190
- 1
- 21
- 33
2
votes
2 answers
Python loops vs comprehension lists vs map for side effects (i.e. not using return values)
TL;DR Which is the best?
1.- [r.update(r.pop('some_key')) for r in res if r.get('some_key')]
2.- map(lambda r: r.update(r.pop('some_key') if r.get('some_key') else []), res)
3.- map(lambda r: r.update(r.pop('some_key')), filter(lambda r:…

isaacbernat
- 395
- 1
- 5
- 19
2
votes
7 answers
maintaining class library assemblies utilized by multiple projects
Okay, so here's the scenario.
Project A has a class library developed for it (lets call it MyLib). I release project A (in house project) with version 1 of MyLib.
I begin development on Project B, but expand MyLib to version 2, including a few…

Firoso
- 6,647
- 10
- 45
- 91
1
vote
6 answers
how to adhere to the Don't-Repeat-Yourself (DRY) principle when there will be too many if-then-else making the code unreadable?
I'd like to adhere to the Don't-Repeat-Yourself principle, but sometimes when I write PHP together with HTML and CSS, if I re-use the same code for different situations, my code soon will have so many if-then-else that the code is not easily…

nonopolarity
- 146,324
- 131
- 460
- 740
1
vote
3 answers
when (not) to store a part of a nested data structure into a temporary variable -- pretty/ugly, faster/slower?
What's the best way to read multiple numbers/strings in one array/struct/union, which itself is nested in one or more parent arrays/structs/unions?
1st example without temporary variable:
printf("%d %d\n", a[9][3], a[9][4]);
1st example with…
anon
1
vote
3 answers
How do I make an easy-to-update makefile?
My makefile looks something like this:
FOO_OBJECT_FILES := $(OBJDIR)/Foo.cpp.o
BAR_OBJECT_FILES := $(OBJDIR)/Bar.cpp.o $(OBJDIR)Bar.c.o
ALL_OBJECT_FILES := $(FOO_OBJECT_FILES) $(BAR_OBJECT_FILES)
$(BINDIR)/Foo.a: $(FOO_OBJECT_FILES)
# Rules for…

Maxpm
- 24,113
- 33
- 111
- 170
1
vote
1 answer
Programmatically maintaining sitemaps
Hoping someone can chime in on an ideal methodology.
I don't want to run my site through a crawler every month to add new pages to my sitemap, I'd like some robust systematic method to do so, because maintaining it by hand seems very prone to ahem…

Anson Kao
- 5,256
- 4
- 28
- 37
1
vote
4 answers
Working nicely with Enums and HEX values
I have a list of enums as follows:
public enum EventID : uint
{
SAMPLE_EVENT_1 = 0xDCCA0000,
SAMPLE_EVENT_2 = 0xDCCB0001,
SAMPLE_EVENT_3 = 0xDCCA0002,
SAMPLE_EVENT_4 = 0xDCC00003,
SAMPLE_EVENT_5 = 0xDCCA0004,
...
}
The hex…

Ryan R
- 8,342
- 15
- 84
- 111
1
vote
1 answer
Is calling an API from inside an initializer in Python bad?
I have a Python class that requires some data in order to be initialized. This data is usually obtained using a function from another module, which makes calls to an API. One of the parameters my class' initializer takes is the same ID that can be…

dieortin
- 514
- 5
- 16
1
vote
2 answers
experience with play! framework big applications maintainability
Play! framework really lets you get up and running quickly, but I wonder how hard it gets to maintain applications once they start to grow in size and complexity...
anyone knows of some middle to big size play application on production, and how hard…

opensas
- 60,462
- 79
- 252
- 386
1
vote
0 answers
Should I declare a number as constant if it is passed as a parameter to a meaningful named function?
Suppose we a validation code similar to the following:
Rule(account => account.CompanyName).MaxLength(50)
Or
Rule(account => account.Balance).MustBeGreaterThan(0)
Do we still call the numbers 50 or 0 a magic number and define a constant for it,…

Kush Grover
- 363
- 1
- 6
- 16
1
vote
1 answer
A big Utility or separate into different pieces?
I am writing an application, which will a few programmers involve in. We come up with some problems when managing source code. We usually have a Utility.php, which share among different users. So, we make a big utility.php , and everyone is calling…

Tattat
- 15,548
- 33
- 87
- 138
1
vote
1 answer
Android Patterns: A Spinner where every item launches a different Activity
I'm trying to build a complex form where almost all of the elements are optional. It starts with just a single field and an "add element" button. When you click add, the form shows a Spinner of the types of elements you can add to the form…

Plutor
- 2,867
- 2
- 25
- 29