Questions tagged [default-values]
The default-values tag has no summary.
19 questions
0
votes
1
answer
67
views
Wrapper Auxiliary Method VS Default Arguments for Initialization: Pros/Cons
I have a class in which there are several methods that can act as an "entry point" to its private innards (or the "fruit" thereof).
Said functions might be called multiple times ...
-1
votes
2
answers
7k
views
Should I assign a default value for this property in the constructor?
I'm currently creating a class in C# that will be utilized to help standardize calls to restful web services in my company's code. While the majority of my code has been written and well tested, I ...
0
votes
2
answers
644
views
Should default values be explicitly stated in configuration files for libraries or frameworks?
In one of the projects I work for, we have just added karma to run unit tests.
When reviewing the MR of a coworker, I noticed the karma.conf.js (the configuration file) has 120 lines, which seems to ...
3
votes
2
answers
2k
views
Should default configuration for deployed services be set as per production usage?
Today, I and my colleague had a difference of opinion regarding the usage of default values in software configuration. We both agreed that for a consumer software, the default configuration should be ...
3
votes
1
answer
532
views
Miroservices default value for Fallback scenarios
Default values are often suggested to be part of failover mechanism for microservices. At a high level, for any services (say microservices here) the nature of the operation can be broadly classified ...
3
votes
3
answers
440
views
Can a default value for a business process be set in the database column definition?
The business team in my company has come up with a new field to add to one of our entities. For new instances of this entity, it'll be calculated dynamically, but for previously existing instances, we ...
3
votes
1
answer
10k
views
OOP best practice: Optional referenced-type parameter
I know in C#, by default, referenced type variables are passed by reference to a method. I have a function which sometimes I just need its return value and sometimes both return value and the changes ...
4
votes
6
answers
2k
views
Is it bad practice to resolve null arguments to default static variables?
First, let me show you an example (written in ActionScript 3.0):
class GameObject {
public static function MakeFromName( pName:String,
pAtlas:TextureAtlas ...
2
votes
1
answer
175
views
Does automatic returning affect performance?
There's a bunch of languages that automatically return the last value in a function (mostly functional) like Ruby, Haskell, Lisp, etc.
Does this feature (or what do you call it) affect the ...
5
votes
5
answers
5k
views
The Default State of Unused Memory
In an embedded device, during the initializing of memory locations, is there any convention that are being practiced.
I mean, say setting every byte to zero or 0xFF or any other value.