11
useVim
148d

there is a dev in our company who actually does this:

if()
{
}

and not this:

if(){
}

This is unreal.

Comments
  • 6
    many do. And it's absolutely disgusting.
  • 7
    if(){
    }
    is a code word for devs with small dicks 😪

    only big-dick devs use
    if()
    {
    }
  • 8
    It does not matter
  • 7
    if();
    {
    //devs make stupid mistakes.
    }
  • 0
    @azuredivay hahahahahaha bro that was funny bro. Now go fuck yourself bro, you deserve it bro.
  • 1
    OP, this is nothing. Here read this -> https://devrant.com/rants/6142847/...
  • 0
    @C0D4 enable those compiler warnings
  • 6
    It’s a preference and the default style depends on the language.
    Personally I don’t really care too much as long as it’s consistent within the project.
  • 10
    Sorry I'm out here dealing with real software problems, come back to me when it's actually causing an issue
  • 1
    Either one is better than personal choice. Use a formatter.
  • 0
    My brother in Christ, I'm sure you can find something more meaningful to die inside.
  • 0
    This is compulsory for C# devs.

    For c++ it's optional

    For JavaScript / TypeScript it's fucking mutiny on the high seas
  • 0
    @AndroidJester speaking of C# devs, how about we capitalize MethodNames(), PropertyNames, ConstantNames and AnythingElse as well? 😂
  • 0
    It could be worse:

    if () {
  • 2
    I do the first and there is a reason for that:

    A) MS Coding Standard for C#
    B) Autoformatting VS
    C) Clients Coding standard
    D) Selecting a } marks the { and it has to be in the same indentation
    E) I actually don't give a f*** about it but I want it consistent
  • 0
    @C0D4
    if();{
    // way harder to see
    }
  • 1
    It could be _a lot_ worse
    if ( .. )
    { ...
    .... }
  • 0
    @KDSBest With 1tbs the formatter emphasizes this error by breaking the opening brace into a new line. With Allman, even after autoformatting the only difference between the correct and faulty code is the presence or absence of the semi.
  • 1
    @lorentz both scenarios my compiler throws a warning so I don't care about auto formater.
  • 3
    Wait... What!? You don't put spaces around parentheses?? Unreal.
  • 0
    ++ what others have said, it doesn't matter in the slightest as long as it's consistent within the project.

    Now, when you're dealing with multiple projects, and each uses the other style... 😭😭
Add Comment