10

One of my coworker change the code from

```
void foo() {
if (condition)
{
}
else
{
}
}
```

to

```
condition ? ifTrue : ifFalse;
```

and add it to changelog

```
- fix bugs // yes with an "s"
- feature added
- some list of the bug fixed.
```

I refer back to the commit, only one Fucking commit and on changes. Bro, what the fuck?

Comments
  • 6
    I'm getting PTSD.
  • 1
    @C0D4 Oh no... cool bro ..
  • 6
    @C0D4 You could also use:

    while(condition) { /*some code*/; break }

    Or when you need 2 alternative ways

    while(condition) { /*some code*/; goto end; } /*alternative code*/ ; end:;
  • 10
    Or even more unreadable:

    void functionCase0(int bla)

    { /*some code*/ }

    void functionCase1(int bla)

    { /*some code*/ }

    void functionCase2(int bla)

    { /*some code*/ }

    void functionCase6(int bla)

    { /*some code*/ }

    int main(void)

    {

    /*some code*/

    void (*functionTarget[7]) (int) =

    {

    [0]=functionCase0,

    [1]=functionCase1,

    [2]=functionCase2,

    [6]=functionCase6,

    };

    functionTarget[in](5);

    return 0;

    }

    Just make sure in is either 0,1,2 or 6 and not anything else.
  • 0
  • 4
    @happygimp0 I'm starting to not like you 🫣
  • 1
    add PR review to any change to master bra
  • 1
    @happygimp0 If you were in my team and wrote code like that, I would quit the company right away lol.
Add Comment