Questions tagged [code-maintainability]
66 questions
0
votes
2 answers
Using a separate class file (model) for Entity Framework queries instead of writing in controller itself
Is it ok to write EF queries in a separate class file inside models folder instead of writing it in controller itself.
Because I've seen in msdn writing all EF queries in controller itself. While at the same time I have also read in msdn once that…

Thameem
- 700
- 1
- 13
- 38
0
votes
1 answer
Why is it important to write the code in components/modules way?
Recently, I get to know that writing code in the modular or components way is important. But I am not sure why is it so important.
Can someone explain why is it important if you know?

Rajesh Kumar
- 1
- 3
0
votes
3 answers
JQuery:Inserting big amounts of html through DOM manipulation - maintainability?
I've found good posts on good practices inserting dom elements using jquery like this, this and this
It's ok when you just need to insert a few elements, but it seems to me that these option are very bad from the point of view of maintainability…

maverick
- 2,185
- 2
- 16
- 22
0
votes
1 answer
New ASP.NET programmer - how do you maintain existing Visual Studio auto generated code in ASP.NET?
Gridview and detailsview app: the select statements, aspx.cs codes, etc of the old program were auto generated from Visual Studio wizard. Now, they are asking to add another column to the select statement and a drop down box for this column in the…

Ann
- 1
- 1
0
votes
1 answer
In ReactJS how to integrate core and local (project specific) components as a plugin
I'm building an applications front-end using ReactJS and redux state container. This app (core) is going to be reused in some various projects in some of which I will need some additional features / extensions (plugin). These need to be separated…

romek
- 615
- 1
- 6
- 13
0
votes
1 answer
How to send model data to a view through a controller in MVC C#
I have already seen a lot of different MVC architectures. All of them are different.
I would like to know a standard way to send a model data to a view using a controller.
Is it suitable to send the model object to the view and set view fields using…

Mahdi GB
- 65
- 2
- 9
0
votes
1 answer
code management: generate source files with slight variations of various rules
I have a source file in a declarative language (twolc, actually) that I need to write many variations on: a normative version and many non-normative versions, each with one or more variations from the norm. For example, say the normative file has…

reynoldsnlp
- 1,072
- 1
- 18
- 45
0
votes
0 answers
Create svn branch for new customer - new code only for this client
We have situation that we sold application for one client and we are constantly making changes to it for this client.
On the other hand we have another client that want similar application. But there is a lot of little differences in many parts.…

apukineimakiapudjuh
- 93
- 6
0
votes
0 answers
Compatibility of python library for range and xrange
I have a python library in which I have frequently used the following type of code
for i in range(...):
# code
Now I know that for larger values, range will be a monster.
Hence I want to use xrange instead of range, but at the same time, I do…

pokemon
- 710
- 1
- 5
- 10
0
votes
2 answers
Challenges of refactoring unit-tests to be maintainable and readable when dealing with List objects
In the book The Art of Unit Testing it talks about wanting to create maintainable and readable unit tests. Around page 204 it mentions that one should try to avoid multiple asserts in one test and, perhaps compare objects with an overridden Equals…

Matt
- 14,353
- 5
- 53
- 65
0
votes
0 answers
How to manage SQL source code that currently stored in a file server
May I have your sharing on how to manage your SQL queries in a file system across all different vendors.
I am a data analyst and I write a lot of different SQL queries everyday. They are all stand alone queries and a currently all stored in a file…

E. L.
- 502
- 3
- 16
0
votes
1 answer
How do I apply nonintrusive design changes to Magento 1.X
I am having a little trouble here with a Magento installation here, which I "inherited" from a company who did some pretty heavy customizations to the theme.
I tried to rationalize most of the changes and was pretty successful with it. The problem…

func0der
- 2,192
- 1
- 19
- 29
0
votes
1 answer
Performance and maintainability of making Java calls in "then" of Drools
I'm working on a drools project where every .drl file is created dynamically from velocity template. I've written every calculation and operations to be performed after successfull condition check in the then of .drl file itself.
Lets assume a…

The Coder
- 2,562
- 5
- 33
- 62
0
votes
0 answers
Can Hiera lookups be done in a module?
I have a service implemented in Java which depends on 3 property files. I have defined 'define' for each of the property file in a common properties module and consuming them from service specific module. The 'define' for one of the property file is…

Anand Patel
- 6,031
- 11
- 48
- 67
0
votes
1 answer
Can anyone tell me why the maintainability index is only 40 for this code?
I can't figure out why the maintainability index (as calculated in Visual Studio) for this method is only 40, I literally have to remove almost all the lines except the first two to get above 60:
public void getNewPasswordDetails(Int32…

binks
- 1,001
- 2
- 10
- 26