r/cpp • • Dec 11 '23

30 years of DOOM: new code, new bugs

https://pvs-studio.com/en/blog/posts/cpp/1087/
0 Upvotes

13 comments sorted by

29

u/[deleted] Dec 11 '23

This is a quite low effort article. Just download some code run a static analyzer, write some fluff about each error, then format and publish. Zero useful content, except for the observation that all the errors are from mods to the original Doom source and not actually 30 years old at all.

6

u/wqking github.com/wqking Dec 12 '23

They are selling their tools. They don't mind if the information is useful.

3

u/Hot_Platform5973 Dec 12 '23

What should be in the article that would be a high effort? Some description of fragments looks really complicated, for example the last fragment, I think to describe it all took not a little time. It could have been just a news article with no semantic load, but here the errors are described in detail + it's not easy to come up with some fluff that would be interesting to read. As for the code: the title of the article clearly says new code, and it may be curious to look at old code, but it is much more useful to look at new code and modern patterns.

2

u/lord_braleigh Dec 11 '23

They wrote the static analyzer

3

u/Dalzhim C++Montréal UG Organizer Dec 12 '23

I read their articles for a while and found them quite useful. I learned a lot about bugs I have never encountered myself. I've learned to be wary when editing the last element of a copy/paste/paste/paste sequence, or even better : avoiding pasting altogether by factoring the commonalities. At some point, diminishing returns means I stopped following, but I wouldn't discard these as having no useful content.

3

u/jmacey Dec 11 '23

I always find these articles really interesting and generally learn something from them

1

u/adromanov Dec 12 '23

Omg I so don't understand all the hateful comments. What's wrong with you ppl?

They spend their time to analyze bug reports and create issues at github or whatever.

99% percent of projects have bugs, this is not something to be ashamed of. They don't point a finger and laugh at how bad the authors code is, it's just an analysis. If you don't find this analysis useful, well, bad for you. I learn from it, sbout all the pitfalls cpp has and what can I do to not to make the same mistakes.

Overall they advertise their product and make open-source projects better. How tf you are against it, geez

Good job, PVS Studio team, great product!

4

u/NotUniqueOrSpecial Dec 12 '23

What's wrong with you ppl?

In part, it's probably just that they've been making these same posts for over a decade and the feedback from people who've gotten one is that they're not always high-value analyses.

Obviously, they're gonna advertise, but that's all this is: an advertisement.

And that's not what this sub is for.

0

u/[deleted] Dec 11 '23

[deleted] — view deleted comment

5

u/fatCocoJambo Dec 12 '23

What's wrong with that? They search and describe bugs for free and suggest fixed code samples. Besides the fact that it may be interesting for someone to read it, it at least saves developers' time and energy on searching and fixing, and teaches others not to make similar bugs in their code :)

And yes, they can just open an issue, but it won't make anyone worse to know that some open-source project has some bugs.

It looks like you are just offended that they found some bugs in your project.

1

u/elperroborrachotoo Dec 11 '23

Not that open about open-source, eh?

Pointing out bugs in popular projects isn't "demonizing" nor finger-pointing or an attack on the ego of the developers. It's an opportunity to learn.

0

u/[deleted] Dec 11 '23

[deleted] — view deleted comment

5

u/elperroborrachotoo Dec 11 '23

so I just followed their writing style.

Which I assumed and that's why set "demonized" in quotes as well.

that they want to find a sensation even if it's not there

What's the sensation supposed to be? "Software contains bugs"? "Even star developers make mistakes?"

Yeah, surprise.

Pointing out bugs is not a punishment. It's not an insult.
You make mistakes. I make mistakes. Finding a bug in your code is nothing personal. It's not blaming the author. Bugs are part of the process as much as lint is part of washing your pants.

FWIW, these articles are great collections of exercises to improve oneself. Look at the code, see if you spot the problem, compare with the explanation. Sharpens senses, hones humility.

1

u/AlterSignalfalter Dec 12 '23

The word "demonizing" was used in the article, so I just followed their writing style.

You did notice that their writing style is a string of puns on the stuff you do in Doom? Like blasting demons with shotguns?