DEV Community

Discussion on: I Am Not A Real Programmer

 
qm3ster profile image
Mihail Malo • Edited
  1. The formatter should have caught that and given you
   if (condition)
     operation1;
   operation2; // it will be execute regardless of the condition.

or better

   if (condition) operation1;
   operation2; // it will be execute regardless of the condition.

There were never two statements in a row, so the above couldn't happen.

  1. True, there are better ways to do this like a config getter.

  2. Who says it's bad code this time? Perhaps the default is at the top but this is something that should have been affected by feature/A-B testing flags.

@ben halp pls, I indented everything in point 1. by 3 spaces but it still escapes the numbered list. Your markdown is misbehaving.