Questions tagged [code-maintainability]

66 questions
3
votes
3 answers

Unreal Engine: Can it be done primarily with C++/scripting instead of Blueprints?

I'm considering my options for a game engine. I did the Twin Stick Shooter tutorial. What frustrated me most is that most of the programming is done in Blueprints, which is this ugly (being subjective here, but not for long) graphical programming.…
3
votes
1 answer

Add/remove columns of a table - code maintenance / optimisation

What is the best way to maintain code of a big project? Let's say you have 1000 stored procedures, and you have to add a new column to a table (or remove) There might be 1-2 or 30 stored procedures, that might be affected. Just a single "search" for…
Ash
  • 1,269
  • 3
  • 25
  • 49
2
votes
2 answers

ASP.NET MVC to Existing ASP.NET App with BusinessLayer.Better way to load ViewModel objects from Existing BusinessLayer?

I have a legacy asp.net web application which has 2 layers , UI and BusinessLayer. The UI project is of type ASP.NET website and BL is of type class library. The BL project has classes for entities of my app like Customer,User,Empoloyee etc.. Each…
Happy
  • 1,767
  • 6
  • 22
  • 26
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
2 answers

Computational complexity for regular expressions

Regular expressions rapidly become too complex (for me) to understand. Even something so simple as [ab][cd], has several logical branches. My goal is to improve the maintainability of our code base, so answers to these questions could help us…
2
votes
4 answers

(avoid) splitting code to .cpp and .h in C++ and efficient compilation

The common practice in C++ is to separate declarations in .h (or .hpp) and implementation into .cpp. I know about two main reasons ( maybe there are others ): Compilations speed ( you do not have to recomplie everything when you change just one…
Prokop Hapala
  • 2,424
  • 2
  • 30
  • 59
2
votes
1 answer

How to maintain code so that it can be used in multiple software?

I need to understand the best practices to use the same source code/libraries into multiple applications. The requirement is, e.g. I am selling my code/library to some company, lets say xyx, then I should use xyz as company name in my packages(and…
Dev_Vikram
  • 123
  • 2
  • 9
2
votes
1 answer

When to use Microsoft Reporting Services

These days I’m having a training in Microsoft Reporting Service. Although it’s a good tool but I can’t find any examples that using it will be useful. To me is always better implementing reports using c# code in combination of javascript controls.…
2
votes
1 answer

Is there a way to query Oracle DB server name and use in conditional compilation?

I got bit trying to maintain code packages that run on two different Oracle 11g2 systems when a line of code to be changed slipped by me. We develop on one system with a specific data set and then test on another system with a different data…
Marc
  • 778
  • 7
  • 18
2
votes
1 answer

How to design an algorithm that iterates through many lists in an unknown order at compile time?

I'm creating a program which processes data according to user-defined settings. During the processing, I have a few related lists that must be iterated through according to these user-defined settings; the user decides the order in which these lists…
Nicholas Miller
  • 4,205
  • 2
  • 39
  • 62
2
votes
2 answers

Choosing value in SQL query vs (Java) code

I need to choose one of three values of an integer using the value of a column on a nullable column of a table. There are at least two approaches: 1) use SQL to do all the work: test null values, and choose between the other values, or 2) read the…
ArturoTena
  • 713
  • 5
  • 15
1
vote
2 answers

Making an enum with stored LinkedHashMap values

I'm somewhat of a beginner to java, although I understand the basics. I believed this was the best implementation for my problem, but obviously I may be wrong. This is a mock example I made, and I'm not interested in looking for different…
1
vote
0 answers

Why some package can import a module that does *not* exist in the folder that it means to import from?

When I try to look at the implementation of some numpy functions, I realized a strange thing (description below). In this python script: /Users/myname/opt/anaconda3/envs/ml/lib/python3.7/site-packages/numpy/core/multiarray.py Inside this file: from…
Jason
  • 3,166
  • 3
  • 20
  • 37
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,…
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