Click here to Skip to main content
15,879,028 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
AnswerRe: Navel gazing on coding style? Pin
Kate-X25718-Sep-22 22:58
Kate-X25718-Sep-22 22:58 
GeneralRe: Navel gazing on coding style? Pin
honey the codewitch18-Sep-22 23:05
mvahoney the codewitch18-Sep-22 23:05 
AnswerRe: Navel gazing on coding style? Pin
dan!sh 18-Sep-22 22:58
professional dan!sh 18-Sep-22 22:58 
AnswerRe: Navel gazing on coding style? Pin
Cpichols19-Sep-22 1:52
Cpichols19-Sep-22 1:52 
GeneralRe: Navel gazing on coding style? Pin
honey the codewitch19-Sep-22 3:19
mvahoney the codewitch19-Sep-22 3:19 
AnswerRe: Navel gazing on coding style? Pin
SeattleC++19-Sep-22 6:03
SeattleC++19-Sep-22 6:03 
AnswerRe: Navel gazing on coding style? Pin
Juan Pablo Reyes Altamirano19-Sep-22 6:39
Juan Pablo Reyes Altamirano19-Sep-22 6:39 
AnswerRe: Navel gazing on coding style? Pin
Micha Berger19-Sep-22 7:14
Micha Berger19-Sep-22 7:14 
I haven't gotten any team I've worked with to buy in, but IMHO it depends what kind of coding style issue we're talking about:

1- Class, method, variable, function names... Identifiers should be logical and predictable. If your project uses getX() and setX(newX), or if it uses x() and x(newX), just do the same thing across the board! Rules like methods and functions should be verb expressions, etc.. Even whether or not to CamelCase acronyms -- is it convertToPdf() or convertToPDF()?

2- Layout: my feeling is more "Hell no!" Allow any sane code layout. The cost to the author to think about such things is too much higher than the cost to the reader to put up with them for such standards to make sense. (That said, my current team uses a plugin for Eclipse, Intellij and Jenkins to enforce the layout standard.)

Code complexity is somewhere in between, and I haven't really thought about as much as those two extremes. Code has to be maintainable. If your logic is hard to follow, the next developer to touch it is more likely to introduce a bug. Maybe I would be comfortable with longer methods IFF it means more comments are there as well.
RantI thought I knew C++ *sob* It has been inserting extra code on me this whole time. Pin
honey the codewitch17-Sep-22 14:57
mvahoney the codewitch17-Sep-22 14:57 
GeneralRe: I thought I new C++ *sob* It has been inserting extra code on me this whole time. Pin
PIEBALDconsult17-Sep-22 15:23
mvePIEBALDconsult17-Sep-22 15:23 
GeneralRe: I thought I new C++ *sob* It has been inserting extra code on me this whole time. Pin
honey the codewitch17-Sep-22 15:25
mvahoney the codewitch17-Sep-22 15:25 
GeneralRe: I thought I new C++ *sob* It has been inserting extra code on me this whole time. Pin
Randor 17-Sep-22 16:47
professional Randor 17-Sep-22 16:47 
GeneralRe: I thought I new C++ *sob* It has been inserting extra code on me this whole time. Pin
honey the codewitch17-Sep-22 16:57
mvahoney the codewitch17-Sep-22 16:57 
GeneralRe: I thought I new C++ *sob* It has been inserting extra code on me this whole time. Pin
Randor 17-Sep-22 17:06
professional Randor 17-Sep-22 17:06 
GeneralRe: I thought I new C++ *sob* It has been inserting extra code on me this whole time. Pin
honey the codewitch17-Sep-22 17:20
mvahoney the codewitch17-Sep-22 17:20 
GeneralRe: I thought I new C++ *sob* It has been inserting extra code on me this whole time. Pin
Randor 17-Sep-22 17:30
professional Randor 17-Sep-22 17:30 
GeneralRe: I thought I new C++ *sob* It has been inserting extra code on me this whole time. Pin
honey the codewitch17-Sep-22 22:20
mvahoney the codewitch17-Sep-22 22:20 
GeneralRe: I thought I new C++ *sob* It has been inserting extra code on me this whole time. Pin
k505418-Sep-22 5:04
mvek505418-Sep-22 5:04 
GeneralRe: I thought I new C++ *sob* It has been inserting extra code on me this whole time. Pin
honey the codewitch18-Sep-22 5:10
mvahoney the codewitch18-Sep-22 5:10 
GeneralRe: I thought I new C++ *sob* It has been inserting extra code on me this whole time. Pin
k505418-Sep-22 5:51
mvek505418-Sep-22 5:51 
GeneralRe: I thought I new C++ *sob* It has been inserting extra code on me this whole time. Pin
honey the codewitch18-Sep-22 6:01
mvahoney the codewitch18-Sep-22 6:01 
GeneralRe: I thought I new C++ *sob* It has been inserting extra code on me this whole time. Pin
CPallini18-Sep-22 20:48
mveCPallini18-Sep-22 20:48 
GeneralRe: I thought I new C++ *sob* It has been inserting extra code on me this whole time. Pin
honey the codewitch17-Sep-22 22:23
mvahoney the codewitch17-Sep-22 22:23 
GeneralRe: I thought I new C++ *sob* It has been inserting extra code on me this whole time. Pin
Randor 18-Sep-22 1:23
professional Randor 18-Sep-22 1:23 
GeneralRe: I thought I new C++ *sob* It has been inserting extra code on me this whole time. Pin
honey the codewitch18-Sep-22 1:28
mvahoney the codewitch18-Sep-22 1:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.