All Questions
Tagged with programming-practices code-quality
37 questions
1
vote
1
answer
139
views
What is the best approach to use a common variable in multiple method in a request in laravel [closed]
I have a $c variable that is calculated at the beginning of the request. After calculating this several nested methods use it as a part of their job. Is it better that I pass down the $c variable to ...
5
votes
8
answers
935
views
How to scale code reviews
My boss say we should find a way to scale code reviews at our company. As it is right now, we have about 16 software developers spread across 4 different teams/squads, but soon the company will close ...
-5
votes
1
answer
104
views
Should code be refactored to be more unit testable or should a framework like PowerMock be used?
Assume there's some code that's already in production that needs some unit testing. Generally speaking, would you want to refactor this code that's already in production by adding things like adding ...
-3
votes
3
answers
491
views
Writing quality code [closed]
I know there are many books on writing clean, modular, readable and whatever else you can say but frankly speaking I find it very hard to remember every advice given on those books. Frankly speaking ...
6
votes
4
answers
35k
views
A DTO class having an ArrayList of its own type - is this considered a good design?
I came across a DTO class like the below one.
class PersonDTO {
private String firstName;
private String middleName;
private String lastName;
private String dob;
// some 50 fields ...
4
votes
5
answers
3k
views
Should I comment or remove any un-used code from my Solution?
I was working in a story and in last minute, I have been asked to hide something from UI and we will used it next release.
Should i remove it or comment it
Should i remove or comment anything ...
118
votes
16
answers
24k
views
Should I add redundant code now just in case it may be needed in the future?
Rightly or wrongly, I'm currently of the belief that I should always try to make my code as robust as possible, even if this means adding in redundant code / checks that I know won't be of any use ...
7
votes
2
answers
6k
views
The concept of "quality gates" in software testing
We are using SonarQube for code quality testing. It tests the quality of code, and not the function of code. It has the concept of quality gates, so you can set for instance a 90% quality gate, ...
2
votes
1
answer
653
views
How much trouble can the use of Singleton class as Model cause?
In my latest WPF applications I've been using a Singleton class, that I call Model, to contain all my application's logic, such as file reading, information handling, etc..
In the WPF Views or ...
3
votes
3
answers
287
views
Development Time: sql in UI code vs domain model with datamapper
First, sorry for my English guys.
Currently this is my first programming job. I am labeled as the most incompetent programmer in my company that's because they measure the performance and ...
3
votes
6
answers
1k
views
Why sacrificing good software engineering practices is typically the first choice for software development projects assuming "good enough" quality [duplicate]
I have observed a correlation between a customer ordering software of "good enough" quality and the same customer not willing to pay for good engineering practices (unit testing, code reviews and the ...
3
votes
1
answer
1k
views
Suggestions on refactoring a poorly written ASP.Net MVC web application [closed]
I have recently "inherited" a project written in ASP.Net MVC which has quite a few issues
and I'm looking for suggestions on how to go about refactoring the code.
The technical issues found so far ...
0
votes
1
answer
695
views
What are the key areas to evaluate software (codebase) on? [closed]
I have been asked to do a code review of about 50 applications over a period of 6 weeks. (Management has changed and the new CTO asked for an full internal software audit)
I am wondering, what are ...
10
votes
4
answers
5k
views
Should you ever use private on fields and methods in C#?
I am somewhat new to C# and just found out that: in C# all of the fields and methods in a class are default private. Meaning that this:
class MyClass
{
string myString
}
is the same as:
class ...
0
votes
2
answers
420
views
Preventing ip resolvers in a skype-like program
I'm currently in the process of creating a Skype-like program, that uses a hybrid peer to peer system to communicate between users (i.e. server contains all users IPs, a client that wants to connect ...