CARVIEW |
Select Language
HTTP/2 200
date: Wed, 30 Jul 2025 23:19:05 GMT
content-type: text/html; charset=utf-8
cf-ray: 967894306cbec1a1-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=73acb6a1-0468-423e-854e-9c29dc115ffc; expires=Thu, 30 Jul 2026 23:19:05 GMT; domain=.stackexchange.com; path=/; secure; httponly
strict-transport-security: max-age=31536000; includeSubDomains
vary: Accept-Encoding
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
x-clacks-overhead: GNU Terry Pratchett
x-frame-options: SAMEORIGIN
x-request-guid: 1f2c6f54-bcb2-43b6-8b95-4d3c189e61de
x-worker-origin-response-time: 406000000
x-dns-prefetch-control: off
set-cookie: prov=73acb6a1-0468-423e-854e-9c29dc115ffc; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=vmD_gnzjI3Xr_4Ly0AiIhcaUr4XJcgNIdqvqtml9tsI-1753917545-1.0.1.1-butsbV338CkFWfQMJtvPEHPXjNyN3VpxOAhUL7KxyeDb9MoXFCR2rRiRhYfVd9z5Bpzut_EDjzAlvP5BIrT9gNWPwCtLnmg7qhONVT2AVC8; path=/; expires=Wed, 30-Jul-25 23:49:05 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=xDRG6Ic7EwX3lAOqQ_1Wvq22J4EV0lsIN1NMNSFznbw-1753917545443-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
server: cloudflare
content-encoding: gzip
Newest 'clean-code' Questions - Software Engineering Stack Exchange
Skip to main content
Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
The 2025 Developer Survey results are in. Explore insights into technology and tools, careers, community and more.
View results.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about TeamsQuestions tagged [clean-code]
The term "clean code" is used to describe computer programming code that is concise, easy to understand, and expresses the programmer's intent clearly. Questions with this tag relate to the process of writing clean code, or refactoring old "dirty" code to be clean code.
536 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
3
answers
1k
views
Scope of integration tests
I'm programming a .NET WebApi application from services and I have a question about integration tests. I'm actually trying to get a handle on it and it seems like everyone writes it a little ...
6
votes
7
answers
642
views
Why do "protected variables" tend to violate open closed principle?
According to Why is Clean Code suggesting avoiding protected variables?, I know there are tons of reasons to avoid protected variables.
However, there is a reason at the currently highest voted answer ...
0
votes
2
answers
333
views
Which is better: a chain of OR statements or IF in a loop? (Java)
Which code style is preferred in Java?
final boolean result = isCausedBy(e, ExceptionType1.class)
|| isCausedBy(e, ExceptionType2.class)
|| isCausedBy(e, ExceptionType3.class)
|...
0
votes
0
answers
64
views
Where should validation be placed? [duplicate]
Recently I asked the following question regarding Clean Architecture with some things that were unclear to me: Clean Architecture using interfaces or Mediator approach?
I think I have a better ...
2
votes
1
answer
223
views
checkNotNull vs. JEP 358: Helpful NullPointerExceptions: Should we remove existing null checks?
With the introduction of JEP 358 in Java 14, which provides more informative NullPointerException (NPE) messages, is it advisable to remove existing explicit null checks in cases where the null-check ...
0
votes
1
answer
93
views
Orchestrating Events & Third Party Services
I am developing a hobby project utilizing an event sourced + event based architecture. In this application, I can allow my users to schedule automated calls in the system. Once the call has been done ...
2
votes
4
answers
177
views
Where are random numbers generated in Clean/CQRS architected application
Assume I have a value object in my application with random numbers for underlying values. These value objects will serve as attributes to my entity (aggregate root). In my specific case (just for ...
6
votes
5
answers
783
views
doSomethingIfCondition(). Is it good naming? [closed]
Suppose, I have some method that performs some job. In this example, it's going to be void, but it doesn't matter
public void doSomething() {
// doing something
}
But then, let's imagine, I got ...
2
votes
1
answer
155
views
Should I create another API to “move” content or modify my existing API that already does something similar?
I have a Spring Boot REST API that will copy content from one Amazon S3 bucket to another. The source and destination buckets are specified in the body of a POST request sent to the API. This works ...
35
votes
11
answers
12k
views
Why don't programming languages or IDEs support attaching descriptive metadata to variables?
As developers, we often face the challenge of balancing meaningful variable names with code readability. Long, descriptive names can make code harder to read, while short names may lack context. For ...
0
votes
0
answers
94
views
Is it a good idea to have multiple derivations of Presenter (MVP) / View Model (MVVM) of a certain view and supply them externally?
So, I've an iOS project that needed to be revamped and added with a routing / navigation logic between views. We have 3 ways as the entry point of the routing: manually, push notification, and ...
0
votes
0
answers
94
views
Is it really difficult to test these “Service” methods in this Rust Clean Architecture proposal? Is there some other catch I'm not considering?
I reproduced a small example of kerkour's Rust Clean Architecture on the Rust Playground.
The code is just an example and the methods code makes no sense at all.
This architecture leaks DB information ...
2
votes
3
answers
212
views
Is it still "feature envy" if the state to make decision or the action to take after asking the state involves other classes to participate?
According to https://softwareengineering.stackexchange.com/a/212130/432039, if a class asks another class for the state, and then call methods of that class, it is called "feature envy", eg:
...
5
votes
1
answer
559
views
Confused on how abstraction and encapsulation is helpful
Using assimp I've created a function to load 3D models and it does everything I need and I don't plan to use another library or write something custom, however, I am curious how techniques such as ...
3
votes
3
answers
146
views
Is Each Table Columns on Separate Pages Considered Duplication in code?
Each table is on separate pages. Is it considered duplication (written in Angular)?
The DevOps team ran SonarQube and detected the th tags as code duplication. How can I explain to them that it's not ...
- The Overflow Blog
-
-
- Upcoming Events
-
2025 Community Moderator Electionends August 13
- Featured on Meta
-
-
-
Related Tags
coding-style × 72
java × 70
code-quality × 64
design × 60
architecture × 56
design-patterns × 46
object-oriented × 46
c# × 43
clean-architecture × 37
refactoring × 37
coding-standards × 24
code-reviews × 21
python × 18
naming × 17
c++ × 16
functions × 16
code-smell × 15
code-reuse × 13
javascript × 13
readability × 13
unit-testing × 13
php × 12
solid × 12
more related tags
Hot Network Questions
- What constitutes a 'structure' made of Force for the purposes of a Forcebreaker Weapon?
- If Satan is not omnipresent, how can he tempt or test multiple people at the same time in different places?
- Pokémon movie where Team Rocket is floating in calming water
- Does the colour force between two quarks get stronger because gluons emit more gluons or because quarks emit more gluons?
- How should I talk about definitional uncertainty in seemingly well-defined measurands, arising at high resolutions?
- What were WW2 electronics wires made of?
- What is known about the third time derivative of the expansion of the Universe?
- Is it commonplace/acceptable for university professors to not teach Evolutionary Biology based on their religious beliefs?
- US firm charging a US resident in foreign currency - legality?
- Should I simply accept the terms without reviewing them for legal appropriateness?
- Wolf and sheep probability
- Are all Universities this internally cut-throat?
- When using Da Capo, does that normally include a pick up?
- Short story about a scientific rivalry that leads to madness
- Golden-section optimization with complication
- Area of a Quadrilateral Formed by Intersecting Lines in a Triangle
- Reason why golems do not run on wheels
- History of יד/Yad appellation for Rambam's Mishneh Torah
- Ik having chaotic movement
- Finite projective plane with trivial automorphism group
- Finding one non-negative solution to a system of linear equations
- Eye-shaped arrow tip
- Uniqueness of multiple unnamed namespaces within translation unit
- Why do C compilers still prefer push over mov for saving registers, even when mov appears faster in llvm-mca?