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. The Lounge
  3. My Daily OHN

My Daily OHN

Scheduled Pinned Locked Moved The Lounge
collaborationquestionlearning
18 Posts 12 Posters 0 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.
  • T Todd Smith

    My Daily Oh Hell No: I just had a developer complain (yell) to me because I always run code cleanup when I see incorrectly formatted code (we use resharper with predefined settings to auto-magically format the code). This of course can make doing SVN commits a pain if it results in a manual merge. Do I give in and only do this "once a week" as requested? :sigh:

    Todd Smith

    C Offline
    C Offline
    Chris Austin
    wrote on last edited by
    #7

    Hell No. In fact I'd be pretty draconian about requiring your coding standards be meet before a single thing gets pushed back into the repo.

    And above all things, never think that you're not good enough yourself. A man should never think that. My belief is that in life people will take you at your own reckoning. --Isaac Asimov Avoid the crowd. Do your own thinking independently. Be the chess player, not the chess piece. --Ralph Charell

    1 Reply Last reply
    0
    • P peterchen

      Complain is OK, yell is not. As much as I love reformatting and improving comments, they make some maintenance tasks a pain. Having to find the significant change between two versions when 90% of the diff is formatting makes me want to yell. (Take note: want to, not do). I don't see how "once a week" would improve that, though. I'd argue for: A standard format that is achieved automatically e.g. by resharper and is USED BY ALL BEFORE COMMITTING. (see there, only almost yelling) For old code... tricky: "leave as is unless it's really really bad", or "cleanup, but rarely". Or get a merge tool that can ignore whitespace UNLESS IT'S IN A STRING. (now I did yell. Bad tools make me do that :()

      Agh! Reality! My Archnemesis![^]
      | FoldWithUs! | sighist | µLaunch - program launcher for server core and hyper-v server.

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #8

      I concur. Automate it, and have it run on every commit. :)

      Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


      Getting an article published on CodeProject now is hard and not sufficiently rewarded.


      P 1 Reply Last reply
      0
      • L Luc Pattyn

        I concur. Automate it, and have it run on every commit. :)

        Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


        Getting an article published on CodeProject now is hard and not sufficiently rewarded.


        P Offline
        P Offline
        peterchen
        wrote on last edited by
        #9

        Likely the best solution, but might be cause office wars.

        Agh! Reality! My Archnemesis![^]
        | FoldWithUs! | sighist | µLaunch - program launcher for server core and hyper-v server.

        L 1 Reply Last reply
        0
        • P peterchen

          Likely the best solution, but might be cause office wars.

          Agh! Reality! My Archnemesis![^]
          | FoldWithUs! | sighist | µLaunch - program launcher for server core and hyper-v server.

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #10

          There shouldn't be if you do it from the start. Setting it up halfway in the project's life time would cause some pain though. :)

          Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


          Getting an article published on CodeProject now is hard and not sufficiently rewarded.


          P 1 Reply Last reply
          0
          • T Todd Smith

            My Daily Oh Hell No: I just had a developer complain (yell) to me because I always run code cleanup when I see incorrectly formatted code (we use resharper with predefined settings to auto-magically format the code). This of course can make doing SVN commits a pain if it results in a manual merge. Do I give in and only do this "once a week" as requested? :sigh:

            Todd Smith

            E Offline
            E Offline
            Ennis Ray Lynch Jr
            wrote on last edited by
            #11

            My opinion: Don't change code, period, unless you have made a physical change. I have lost count how many times some errant dev has opened a file, not liked the formatting, hit a few hot-keys, and accidentally deleted something crucial, check in just formatting with full testing (because, hey, formatting can't possibly break anything) and leave for the day. Now, what I would do, if I were anal about code formatting (And I am not unless it is just plan inconsistent. I consider worrying about code formatting a sign of future project failure) I would not allow check-ins until after a code-review. You can then reject check-ins that do not meet your requirements rather than changing another developers code which causes issues.

            Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

            P 1 Reply Last reply
            0
            • T Todd Smith

              My Daily Oh Hell No: I just had a developer complain (yell) to me because I always run code cleanup when I see incorrectly formatted code (we use resharper with predefined settings to auto-magically format the code). This of course can make doing SVN commits a pain if it results in a manual merge. Do I give in and only do this "once a week" as requested? :sigh:

              Todd Smith

              P Offline
              P Offline
              Phil Martin
              wrote on last edited by
              #12

              If it were me deciding, I'd be tell you to do it either: 1) Never or b) Once per major rewrite. or c) Only on the method you are already changing or d) never. or e) Make sure you do it separate to any changes of substance or f) never.

              1 Reply Last reply
              0
              • E Ennis Ray Lynch Jr

                My opinion: Don't change code, period, unless you have made a physical change. I have lost count how many times some errant dev has opened a file, not liked the formatting, hit a few hot-keys, and accidentally deleted something crucial, check in just formatting with full testing (because, hey, formatting can't possibly break anything) and leave for the day. Now, what I would do, if I were anal about code formatting (And I am not unless it is just plan inconsistent. I consider worrying about code formatting a sign of future project failure) I would not allow check-ins until after a code-review. You can then reject check-ins that do not meet your requirements rather than changing another developers code which causes issues.

                Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

                P Offline
                P Offline
                Phil Martin
                wrote on last edited by
                #13

                After my initial knee jerk, I think you're right. What would/could be nicer is to have the source code system auto format it on extraction or checkin. Good in some ways, bad in others.

                1 Reply Last reply
                0
                • L Luc Pattyn

                  There shouldn't be if you do it from the start. Setting it up halfway in the project's life time would cause some pain though. :)

                  Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


                  Getting an article published on CodeProject now is hard and not sufficiently rewarded.


                  P Offline
                  P Offline
                  peterchen
                  wrote on last edited by
                  #14

                  Luc Pattyn wrote:

                  There shouldn't be if you do it from the start.

                  Where's that time machine again? :rolleyes:

                  Agh! Reality! My Archnemesis![^]
                  | FoldWithUs! | sighist | µLaunch - program launcher for server core and hyper-v server.

                  L 1 Reply Last reply
                  0
                  • P peterchen

                    Luc Pattyn wrote:

                    There shouldn't be if you do it from the start.

                    Where's that time machine again? :rolleyes:

                    Agh! Reality! My Archnemesis![^]
                    | FoldWithUs! | sighist | µLaunch - program launcher for server core and hyper-v server.

                    L Offline
                    L Offline
                    Luc Pattyn
                    wrote on last edited by
                    #15

                    Actually, you don't need one. This would also work, assuming you have a formatting tool that is sufficiently bug-free:

                    check everything in
                    for each item in project {
                    for each existing version {
                    check out
                    run format fixer
                    check in (keeping metadata unchanged!)
                    }
                    }

                    It may take a while... :)

                    Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


                    Getting an article published on CodeProject now is hard and not sufficiently rewarded.


                    P 1 Reply Last reply
                    0
                    • L Luc Pattyn

                      Actually, you don't need one. This would also work, assuming you have a formatting tool that is sufficiently bug-free:

                      check everything in
                      for each item in project {
                      for each existing version {
                      check out
                      run format fixer
                      check in (keeping metadata unchanged!)
                      }
                      }

                      It may take a while... :)

                      Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


                      Getting an article published on CodeProject now is hard and not sufficiently rewarded.


                      P Offline
                      P Offline
                      peterchen
                      wrote on last edited by
                      #16

                      That would solve it - I don't know if that's possible in Version Control systems. One could rebuild a "reformatted" copy faking the commit date... Sounds almost like a time machine ;)

                      Agh! Reality! My Archnemesis![^]
                      | FoldWithUs! | sighist | µLaunch - program launcher for server core and hyper-v server.

                      1 Reply Last reply
                      0
                      • T Todd Smith

                        My Daily Oh Hell No: I just had a developer complain (yell) to me because I always run code cleanup when I see incorrectly formatted code (we use resharper with predefined settings to auto-magically format the code). This of course can make doing SVN commits a pain if it results in a manual merge. Do I give in and only do this "once a week" as requested? :sigh:

                        Todd Smith

                        M Offline
                        M Offline
                        Mark_Wallace
                        wrote on last edited by
                        #17

                        Todd Smith wrote:

                        auto-magically

                        I'd yell at you for saying that, so you can't win.

                        I wanna be a eunuchs developer! Pass me a bread knife!

                        1 Reply Last reply
                        0
                        • A Abhinav S

                          Todd Smith wrote:

                          Do I give in and only do this "once a week" as requested

                          Once a month sounds more appropriate. :) Merging is an awful task.

                          Me, I'm dishonest. And a dishonest man you can always trust to be dishonest.
                          Honestly. It's the honest ones you want to watch out for...

                          P Offline
                          P Offline
                          PaulPrice
                          wrote on last edited by
                          #18

                          Agreed, 100%! Policy can take a swim for it

                          Just racking up the postings

                          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