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
1
vote
1 answer
Spring Boot: Bring In Configuration Classes From External Jar File
I'm trying to reduce the amount of "copy/paste" code I have across multiple Spring projects, such as a custom WebSecurityConfigurerAdapter. This adapter is the exact same code across all projects I have so far, so normally in these situations I…

Logan Smith
- 139
- 1
- 8
1
vote
1 answer
Heroku website shows 'Offline for Maintenance. This app is undergoing maintenance right now. Please check back later'
I have hosted my blog on Heroku through my Github. Even after successfully deploying it, it throws an error as 'Offline for Maintenance. This app is undergoing maintenance right now. Please check back later'.
Any clue what else should I do?

user7754680
- 71
- 4
1
vote
5 answers
How could I organize this code?
myThread is a function that is executed every second, basicly it reads some data that has to be parsed and executed. The function grew a lot and it is over 1500 lines of code like the sample below with lots of [if else if else] blocks lots of…

Guapo
- 3,446
- 9
- 36
- 63
1
vote
0 answers
Create elements in JS or duplicate from HTML?
I'm writing some code to populate a list of blog posts dynamically. Each blog post in the list shares the same structure, but the text content and other attributes (e.g., href) are different.
Originally, I was creating each of them in a JS function.…

Josh Clark
- 964
- 1
- 9
- 17
1
vote
2 answers
How to reuse a single JavaScript in both server and client components of G Suite Add-on?
I have a JavaScript file that's a generated parser (let's call it MyParser), which I am using in an add-on for Google Forms.
It needs to be used in the client side's Sidebar.html where I'm including it with…

Fuhrmanator
- 11,459
- 6
- 62
- 111
1
vote
1 answer
Using c# ternary operator to keep a variable the same
I want to use the ternary operator to determine whether or not a variable should change.
The code looks as follows:
var c = "hello";
var appendWorld = false;
c = appendWorld ? string.Concat(c, " world") : c;
Since the value in case appendWorld is…

Zen Zac
- 136
- 1
- 9
1
vote
0 answers
InitializeComponent() in Code Maintainability index
Why does the function InitializeComponent in form constructor has a very low maintainability index in Visual Studio C#?
public Form1()
{
InitializeComponent();
}
In some of my forms it goes as low as 9 or 16 score.

TK-421
- 294
- 1
- 7
- 26
1
vote
1 answer
Using parameters vs global variables -- Code readability / maintainability
I'm trying to understand the sweet spot between readability vs repeating myself in my code.
I'm creating Conway's game of life in Javascript. My functions use many of the same variables over and over again like so...
const BOARD_HEIGHT = 50
const…

Kevin Price
- 389
- 2
- 5
- 11
1
vote
2 answers
Straight forward way to use your own NPM package without the NPM registry
I want to split up the code base of several of my project into isolated package like projects. Those should be easily usable by npm but they do not seem significant enough to be published to the global npm registry.
So, my question is if there is a…

Feirell
- 719
- 9
- 26
1
vote
0 answers
Is hardcoded object properties in the angular template perform better in browser when compared to having a pipe to read value
I am working on an Angular project which contains 24 modules and due to customer requirements, there are always changes to the code.
We have 2 approaches in hand
Using the object with keys directly in the template itself.
Sample code looks like :…

Sampat
- 304
- 2
- 5
- 13
1
vote
2 answers
Why is the Maintainability Index so low in this C# ctor?
I have a simple C# ctor, which initializes some variables:
public RSSSourceData()
{
RSSVersion = "";
ChannelTitle = "";
ChannelLink = "";
ChannelDescription = "";
Category = "";
Copyright = "";
Language = "";
PubDate…

Bogdan Doicin
- 2,342
- 5
- 25
- 34
1
vote
1 answer
How to write an adjustable ABAP program?
I have experienced in developing programs in ABAP and through it would like to know how can I code keeping future changes in mind.
For example recently I developed a program for a customized process on client side and initially requirements were…

Umar Abdullah
- 1,282
- 1
- 19
- 37
1
vote
1 answer
How to follow SOLID principles in Startup classes?
Is there a native mechanism in AspNet Core that allows splitting the work being done inside a monolithic Startup class, in a way as to improve readability/maintainability/scalability in the long run? If so, how does it work?
We have a somewhat small…

julealgon
- 7,072
- 3
- 32
- 77
1
vote
2 answers
Deleting from multiple tables cleanup script SQL
Answer in the bottom, found out eventually. thx for all the contributions.
I have to make a script which i will make into a stored procedure which will then run every few months. It will need to go into some specific tables and delete old records. I…

EclecticFish
- 53
- 1
- 10
1
vote
1 answer
How to deal with history-sensitivity?
So I have written a Java program that has a function handInExam() that may not be called twice in a row, thus the program is history-sensitive. The problem that then occurs is that I need a variable canHandInExam to check whether this method has…

Sophie L.
- 11
- 2