CARVIEW |
Select Language
HTTP/2 200
date: Wed, 30 Jul 2025 23:19:21 GMT
content-type: text/html; charset=utf-8
cf-ray: 96789494ed0075e9-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=ca94e1b9-c840-4493-9a55-bee1f73ea708; expires=Thu, 30 Jul 2026 23:19:21 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: 75267448-3bc4-40a8-8c7d-96bea578152e
x-worker-origin-response-time: 445000000
x-dns-prefetch-control: off
set-cookie: prov=ca94e1b9-c840-4493-9a55-bee1f73ea708; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=qeL0pHcARNFOma2F8JwSQil6z0Z7.cZfmsUbZ2n3WFI-1753917561-1.0.1.1-sd22uDN7bvG0baRF2fl9j3xpMQFX2NvQBrpmPE92EkFT482qzz4L8.BgHEVy9eaKmnwGm6i_QbvIK10gCgMzgAxciv0PaBq4e_nkmO4egX0; path=/; expires=Wed, 30-Jul-25 23:49:21 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=iEzXMl4N1UoikRYOEnpyNZCIFHwK3e0IGYxI8ZVeY5s-1753917561563-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
server: cloudflare
content-encoding: gzip
Newest 'coding-style' 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 [coding-style]
Coding style is a set of guidelines that helps readability and understanding of the source code.
1,064 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
4
answers
440
views
How to combine multiple functions into a single template based function
Threre are two functions FindMaxDistanceVector and FindMaxDistanceList whose implementation is almost same except some debug information added in FindMaxDistanceList. Note that these two functions are ...
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)
|...
-4
votes
1
answer
104
views
Feedback on custom "Orchestration" architecture
I've been doing some deep thinking on how to structure code and found myself coming up with a (for me) new pattern. The pattern is based on a highly modular approach with a large focus on indirection, ...
1
vote
3
answers
278
views
Considering IDE and text editor features when choosing a coding style
Recently, I had a debate with one of my friends on using type inference in C# (var keyword). His argument was that we should stick to using the explicit type names because "even with the ...
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:
...
10
votes
4
answers
2k
views
Is the inability to find code by searching for a class name a reason to avoid using auto in c++ variable declarations?
According to https://softwareengineering.stackexchange.com/a/180616/432039 suggested, I know the answer advised "auto" should be used instead of the actual type when declaring variables.
...
1
vote
5
answers
212
views
End method in normal flow versus exception flow
Consider the two following examples:
public Something fetchSomething(String key) {
if(somethingsMap.containsKey(key)) {
return somethingsMap.get(key);
}
throw new ...
6
votes
4
answers
3k
views
How do you honour the principle to only do "one thing" in a method in reactive streams?
Uncle Bob mentions in his book "Clean Code" that "[f]unctions should do one thing [...] only" and advocates that a method should stick to one abstraction level (I'd call it flight ...
14
votes
5
answers
5k
views
How to "Tell, don't ask" when 2 objects involves in the condition and the decision at the same time?
According to Explanation on how "Tell, Don't Ask" is considered good OO, I know the following is bad:
if(a.isX){
a.doY();
}
public class A{
public boolean isX;
public void ...
0
votes
4
answers
404
views
Code quality: expressiveness vs. conciseness
I've been wondering about code expressiveness vs. conciseness lately. What I mean by that is that a lot of modern programming languages offer features to express statements in a very short manner, ...
1
vote
2
answers
321
views
What is an appropriate length for function names? [closed]
I'm writing a C++ class, CBookSpellDef which has the following methods:
int GetIndexOf(const char *psz);
char* GetNameAtIndex(int index) { return m_spellTypes[index].szName; }
char* ...
24
votes
11
answers
8k
views
Is it logical to not use inheritance because the function is critical?
Our codebase has a typical base-class with a ton of sub-classes. The base-class already has many default functions for the sub-classes.
However, one particular function has the same verbatim ...
0
votes
1
answer
249
views
How to deal with very complex codebase? [duplicate]
I recently changed my job to a big MNC and the code I am exposed to is highly complicated, difficult to read and understand. Although it is divided in microservices and runs on local I have to keep ...
17
votes
8
answers
7k
views
How to be (more) critical during Code Reviews? [closed]
I'm a Software Engineer who sometimes need to review the code of my fellow team members. I often look at the source code and think; this looks fine. I'm having a hard time to think critical about it. ...
-2
votes
3
answers
964
views
Common practice where to place "is" word while naming predicate function: at the beginning or in the middle?
There's a lot of free or member predicate-like functions (that returns boolean value) in different programming languages and popular libraries/frameworks that have "is" as a prefix, e.g.:
...
- The Overflow Blog
-
-
- Upcoming Events
-
2025 Community Moderator Electionends August 13
- Featured on Meta
-
-
-
Related Tags
coding-standards × 151
java × 106
c++ × 100
code-quality × 95
python × 76
c# × 73
clean-code × 72
design × 55
c × 53
naming × 46
object-oriented × 46
javascript × 45
readability × 39
design-patterns × 27
php × 27
language-agnostic × 24
comments × 22
code-reviews × 19
conditions × 19
refactoring × 19
architecture × 18
functions × 17
code-formatting × 16
variables × 16
more related tags
Hot Network Questions
- In a TVS, is directionally bounded the same as bounded?
- Why RewriteRule behaves different if request URL has a trailing slash and when not?
- Eye-shaped arrow tip
- Should I simply accept the terms without reviewing them for legal appropriateness?
- Eleven Special Flashcards
- Problem with tikzcd in beamer
- Puzzlin’ Puzzle
- QuantLib `RangeAccrualFloatersCoupon` instanciation fails
- How quickly can you solve the Change Change game?
- How to create a Face Group from selected faces, similar to a Vertex Group
- using `find` to find a file in PATH
- What were WW2 electronics wires made of?
- Bell always pinging on slight jolts
- Is there a reason "replace conditional with table" isn't a standard refactoring?
- How loud were the top-of-the-range propeller aircrafts like the Lockheed Constellation when commercial jet travel appeared?
- Stepping down voltage from Li-ion to simulate 2x AAA batteries
- How to cite two part paper with different order of authors?
- Short story about a scientific rivalry that leads to madness
- EU/USA trade deal - is it really a done deal?
- Was Caiaphas a Prophet or a Villain? (John 11:51)
- What is the difference between Render Distance and Simulation Distance?
- General Two-dimensional Elliptical Gaussian Image Generator in C++
- Shakespearean grammar: "hath" and "has" in the same sentence
- Is it ethical to hire a graphic designer for a job talk?