MantisBT - Rosetta
View Issue Details
0000137Rosetta[All Projects] Bad Codingpublic2012-10-18 16:372013-02-26 10:58
smlewis 
Labonte 
noneminoralways
assignedopen 
 
 
all
--
0000137: Why does core::kinematics::Edge keep start and stop as int instead of core::Size?
Why does core::kinematics::Edge keep start and stop as int instead of core::Size? start and stop refer to residue indices in a Pose, which can't be negative. Holdover or is there a good reason? I bet it's related to a lot of warnings.
No tags attached.
related to 0000159assigned Labonte Size not used where it should be in Pose 
Issue History
2012-10-18 16:37smlewisNew Issue
2012-10-19 13:58LabonteNote Added: 0000121
2012-10-19 13:58LabonteAssigned To => Labonte
2012-10-19 13:58LabonteStatusnew => confirmed
2012-10-19 13:59LabonteAssigned ToLabonte =>
2012-10-19 14:52smlewisNote Added: 0000122
2012-12-09 14:52LabonteRelationship addedrelated to 0000159
2013-02-25 14:29smlewisNote Added: 0000143
2013-02-26 10:58LabonteAssigned To => Labonte
2013-02-26 10:58LabonteStatusconfirmed => assigned

Notes
(0000121)
Labonte   
2012-10-19 13:58   
It's not just Edge; a similar problem is in FoldTree. ...And in lots of other places.

As I'm going through the code removing compiler warnings, this (int instead of core::Size) issue comes up probably more than any other. It's sad how little of the code follows the coding conventions.

Anyhow, since we've cleaned out most of the warnings from core, refactoring Edge/FoldTree, etc., would likely uproot a whole ton more warnings. Might I ask that no one tries to do this until after we get a warning-free build test up?

As a side note, do you think we should post a "Bad Coding" bug report for every blatant disregard of the conventions? Because I could start a large number of bug reports, then, as we've been going through the code from the bottom up and have the pleasure of observing all sorts of fun. It could perhaps be useful, if we really do care to clean up the community's code base and want to track progress; or else it could be a little extreme. What do you think?
(0000122)
smlewis   
2012-10-19 14:52   
This code predates the coding conventions. (Most of core does).

This is a bug, not just a coding convention violation, because it allows nonsense arguments. Edge's start and stop ultimately refer to resid indices, which have to be positive, so it is flatly incorrect for them to ever have negative values as far as I understand.

I think you can and should report a bug for every little thing that annoys you. We altered the system to not email bugs except if users want to be on the bug tracker's list, or they are actually involved in the bug, so it's not like flooding the tracker is a problem. That said, for minor convention violations (especially purely stylistic like indentation), it'll cost you more time to report than just fix and move on.
(0000143)
smlewis   
2013-02-25 14:29   
At Minicon2013, official permission to fix this was granted