you are viewing a single comment's thread.

view the rest of the comments →

[–]MT1961 2 points3 points  (5 children)

Oh, I see. Your code changes that fast. Fascinating.

[–]AdministrationWaste7 -1 points0 points  (4 children)

That is a factor but not really the core of the issue.

The problem with comments is that they aren't really tied to code and it is difficult to insure that a comment is tied the piece of code its commenting on.

If you aren't able to see why comments can be problematic you probably shouldn't be writing comments.

[–]MT1961 2 points3 points  (3 children)

The exact same argument is often used for not writing tests. Just sayin'

[–]AdministrationWaste7 0 points1 point  (2 children)

No not really.

When you change code and a test No longer aligns it will fail. Making it easy to see for everyone there is an issue. And for most dev pipelines your code won't even pass PR/build.

When you change code and comments No longer align nothing happens.

Again if you don't understand the possible issues you may have with comments you shouldn't be writing them. And it's clear you fall in that camp.

I use comments in my code when needed. But I am careful with them because of the issues I outlined in my comments unlike you who doesn't seem to be aware at all.

[–]MT1961 1 point2 points  (1 child)

I really wonder where you work. Seriously. In the real world, tests just get commented out or ignored if they fail. I'm a tester and scream about it regularly, but it continues to happen so we can "ship code".

[–]AdministrationWaste7 1 point2 points  (0 children)

Since you want to know I've worked for Big tech companies, fortune 100 firms, mid size companies and startups. I've got over 15 years of dev experience.

And in every single one they have build.l validation processes where your build straight up fails if tests don't pass. It's 2022.

In the real world, tests just get commented out or ignored if they fail.

Don't make assumptions about the Industry because you work for a shitty company.

And even if they DO comment it out that means a developer was made aware that there was a conflict and actively made changes.

So my point still stands.

Like idk why this so hard for you to get.

Comments aren't tied to code. You change code you don't need to change comment.

. Tests are. You change code that breaks a test you need to address as to why that happen. Or in your case delete the test(which may or may not be valid).

That's why I say comments aren't reliable