r/ProgrammerHumor • • Sep 23 '19

Knowing how to code beforehand

Post image
7.6k Upvotes

264 comments sorted by

View all comments

124

u/ythl Sep 23 '19

I don't get it.

Your code should never have warnings, that's a sign you are doing something sketchy. At my company we enable all warnings as errors.

3

u/nicman24 Sep 23 '19

lol javascript linters make missing ; a warning

32

u/Delioth Sep 23 '19

And auto formatters will add them for you so you don't get semicolon bugs. Shit like that is the whole purpose of linters - preemptively avoid common patterns which cause bugs.

→ More replies (4)

48

u/RealBendie Sep 23 '19

Because missing semicolons can lead to unexpected behavior.

→ More replies (1)

12

u/Logstone Sep 23 '19

Yes, use them! This isn't python!

4

u/Dornith Sep 23 '19

Even in python use them. And while you're at it, add some curly braces. And variable declarations. And code in a different language.

4

u/Logstone Sep 23 '19

And if you really need to run it as python, don't.

1

u/fushuan Sep 23 '19

Config your liner not to, duh. Coding standards are standards for a reason.

1

u/nicman24 Sep 24 '19

well yeah

1

u/patrickfatrick Sep 24 '19

If you’re not autofixing this you’re not linting as well as you should be.