All Questions
2 questions
13
votes
6
answers
5k
views
Is it bad practice create "alias" variables to not use globals or arguments with long names in a method?
Is it OK to create a variable which only purpose is to increase readability?
Example:
public class Example
{
private final HowLongCanARepositoryNameReallyBeRepository ...
11
votes
12
answers
3k
views
Maintainability of Boolean logic - Is nesting if statements needed?
Which of these is better for maintainability?
if (byteArrayVariable != null)
if (byteArrayVariable .Length != 0)
//Do something with byteArrayVariable
OR
if ((byteArrayVariable != null)...