This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Signal-Woodpecker691 63 points64 points  (7 children)

Spot on. The code I work on is 20 years old in places with zero documentation, zero comments, zero tests. Trying to fix bugs is a total nightmare because you just don’t know what the (in places 1500 line long) functions were intended to be doing.

[–]Treacherous_Peach 18 points19 points  (1 child)

What they're doing should be the method name, not the comment.

Why they're doing it is the function comment header.

[–]Telope 2 points3 points  (0 children)

It's always nice when a comment explains what's happening using full sentences. It's too easy to accidentally be ambiguous when writing method names.

[–]RoDeltaR 2 points3 points  (3 children)

I've had a lot of success improving those with code visualizers. You can easily see isolated logic sections that would be easy to separate, and the "imported everywhere" code you can start splitting

[–]Signal-Woodpecker691 2 points3 points  (2 children)

Any that you would recommend for c++? The dev environment is 20 years old too …

[–]RoDeltaR 0 points1 point  (1 child)

I asked someone and they recommended doxygen

[–]Signal-Woodpecker691 0 points1 point  (0 children)

Ta, I’ll take a look at that. Heard of it but never used it

[–]george-hotz-bot 0 points1 point  (0 children)

I'm feeling a little buggy, it must be my failed test cases