Report Formatting??
-
Found this recently during bug fix session in a "report format" library: string varA = objectA.ID.Length > 20 ? objectA.ID.SubString(0, 30) : objectA.ID; string varB = objectB.ID.Length > 20 ? objectB.ID.SubString(0, 15) : objectB.ID; The questions started: 1) Why? Can't the report tool truncate excess characters? (answer is Yes) 2) Bug is subtle, so I didn't make much of it but they are a "senior engineer" 3) On 2nd line, if the ID is > 20 why do we truncate to 15, or return 20 if not? Needless to say, code reviews are minimal at best. :rolleyes:
-
Found this recently during bug fix session in a "report format" library: string varA = objectA.ID.Length > 20 ? objectA.ID.SubString(0, 30) : objectA.ID; string varB = objectB.ID.Length > 20 ? objectB.ID.SubString(0, 15) : objectB.ID; The questions started: 1) Why? Can't the report tool truncate excess characters? (answer is Yes) 2) Bug is subtle, so I didn't make much of it but they are a "senior engineer" 3) On 2nd line, if the ID is > 20 why do we truncate to 15, or return 20 if not? Needless to say, code reviews are minimal at best. :rolleyes:
I've tried a couple of times to instigate code reviews at my place. But every time I do I seem to get more work placed on me so it never works.
Upcoming FREE developer events: * Developer Day Scotland Recent blog posts: * Mixins in C#3.0 My website | Blog
-
I've tried a couple of times to instigate code reviews at my place. But every time I do I seem to get more work placed on me so it never works.
Upcoming FREE developer events: * Developer Day Scotland Recent blog posts: * Mixins in C#3.0 My website | Blog
That's a problem if you do code reviews as a piece of review work. It's much better to do code reviews regularly and give instant feedback - it's the best way to stamp out bad practices before they become bad habits.
Deja View - the feeling that you've seen this post before.