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. Why aren't there...

Why aren't there...

Scheduled Pinned Locked Moved The Lounge
wpfcsharpcomarchitecturequestion
20 Posts 11 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.
  • P peterchen

    So do bugs.

    FILETIME to time_t
    | FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchy

    A Offline
    A Offline
    AspDotNetDev
    wrote on last edited by
    #11

    Right, but I personally don't purposely plant them throughout my code.

    Thou mewling ill-breeding pignut!

    P 1 Reply Last reply
    0
    • L Lost User

      Two types of comment? The 'Here's some information about this code' comment and the 'I'm commenting out this code because it probably isn't required but I want to keep it here for a bit, just in case' comment?

      MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')

      I Offline
      I Offline
      Iain Clarke Warrior Programmer
      wrote on last edited by
      #12

      In addition to #ifdef, I mostly use

      #if 0
      #endif

      Which gets over the problem of a block of code you're killing temporarily but want to leave in place for reference - and it has /* comments */ in it. Iain.

      I am one of "those foreigners coming over here and stealing our jobs". Yay me!

      1 Reply Last reply
      0
      • L Lost User

        Two types of comment? The 'Here's some information about this code' comment and the 'I'm commenting out this code because it probably isn't required but I want to keep it here for a bit, just in case' comment?

        MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')

        K Offline
        K Offline
        krumia
        wrote on last edited by
        #13

        For temporary reference, you have bookmarking features in most, if not all, IDEs. Of course that's not useful if you want to preserve the comment in the source code.

        1 Reply Last reply
        0
        • A AspDotNetDev

          Right, but I personally don't purposely plant them throughout my code.

          Thou mewling ill-breeding pignut!

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

          That's what you always say!

          FILETIME to time_t
          | FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchy

          1 Reply Last reply
          0
          • A AspDotNetDev

            Because the latter should never exist.

            Thou mewling ill-breeding pignut!

            J Offline
            J Offline
            Julien Villers
            wrote on last edited by
            #15

            AspDotNetDev wrote:

            Because the latter should never exist.

            I agree! That's what Version Control is for! You *do* have version control on your project, don't you?

            'As programmers go, I'm fairly social. Which still means I'm a borderline sociopath by normal standards.' Jeff Atwood 'I'm French! Why do you think I've got this outrrrrageous accent?' Monty Python and the Holy Grail

            1 Reply Last reply
            0
            • L Lost User

              Two types of comment? The 'Here's some information about this code' comment and the 'I'm commenting out this code because it probably isn't required but I want to keep it here for a bit, just in case' comment?

              MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #16

              _Maxxx_ wrote:

              'I'm commenting out this code because it probably isn't required but I want to keep it here for a bit, just in case' comment?

              Or even 'They say they don't want this bit anymore, but I reckon a month or two down the line they'll want it back again'.

              Every man can tell how many goats or sheep he possesses, but not how many friends.

              L 1 Reply Last reply
              0
              • L Lost User

                Two types of comment? The 'Here's some information about this code' comment and the 'I'm commenting out this code because it probably isn't required but I want to keep it here for a bit, just in case' comment?

                MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')

                G Offline
                G Offline
                GParkings
                wrote on last edited by
                #17

                Although dingleberries are to be avoided, we all know IRL people get lazy/forgetful and they happen so, yes, I could see a use for a specialized dingleberry comment. Lacking such a thing i tend to simply place a TODO in the comment, e.g.

                //TODO : remove once no longer needed for reference
                //
                //public void foo()
                //{
                // DoALLtheThings();
                //}

                Pedis ex oris Quidquid latine dictum sit, altum sonatur

                1 Reply Last reply
                0
                • L Lost User

                  Two types of comment? The 'Here's some information about this code' comment and the 'I'm commenting out this code because it probably isn't required but I want to keep it here for a bit, just in case' comment?

                  MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')

                  B Offline
                  B Offline
                  BobJanova
                  wrote on last edited by
                  #18

                  According to FXCop, there are: //// I typically use /* ... */ for commenting out old code (very temporarily, before the source control fundamentalists punch me). I wish those nested properly, though.

                  L 1 Reply Last reply
                  0
                  • L Lost User

                    _Maxxx_ wrote:

                    'I'm commenting out this code because it probably isn't required but I want to keep it here for a bit, just in case' comment?

                    Or even 'They say they don't want this bit anymore, but I reckon a month or two down the line they'll want it back again'.

                    Every man can tell how many goats or sheep he possesses, but not how many friends.

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #19

                    Many years ago I worked for a software house who were contracted at a local business. On my first day I was introduced around and the team leader gave me an easy job to get stuck into - a simple report program that required the addition of an extra column containing a computed value. easy peasy. A couple of weeks later I got a request to change a report - to remove a column that wasn't required from a report. I looked back through what passed for a changelog in those days, and found that about every 2-3 weeks, for the past year, this report had been changed - usually adding a column or removing it. I queried the boss, who told me to just do what they asked, as they were paying for our time. I did so, but followed up, spoke to the people making the requests. turns out two departments used the same report - one needed the calculated column, the other sent the report out, and did not want the calculation to be shown to their customers. Clever old me changed the report request to ask if the column was required or not. There you go, saved the client hundreds of dollars a month. My boss - not happy. The client - very happy. I ended up leaving the software house and worked permanently at the client for nearly nine years. There's probably a moral to that story.

                    MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')

                    1 Reply Last reply
                    0
                    • B BobJanova

                      According to FXCop, there are: //// I typically use /* ... */ for commenting out old code (very temporarily, before the source control fundamentalists punch me). I wish those nested properly, though.

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #20

                      I ran straight to VS - but //// just looks the same as // but with more /s I also use /*..*/ but what would be nice would be something like /! .. !/ which performed the same function as /*...*/ but a) the ide could display differently, and b) could also surround other comments.

                      MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')

                      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