Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. Report Formatting??

Report Formatting??

Scheduled Pinned Locked Moved The Weird and The Wonderful
helpquestion
3 Posts 3 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    Oscar Bowyer
    wrote on last edited by
    #1

    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:

    C 1 Reply Last reply
    0
    • O Oscar Bowyer

      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:

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      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

      P 1 Reply Last reply
      0
      • C Colin Angus Mackay

        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

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #3

        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.

        My blog | My articles

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups