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. Comments Can Hurt

Comments Can Hurt

Scheduled Pinned Locked Moved The Weird and The Wonderful
databasedotnethardwaretoolshelp
9 Posts 7 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.
  • B Offline
    B Offline
    Brady Kelly
    wrote on last edited by
    #1

    I have a few SQL scripts as embedded resources in my app, for EF seeding. To make sure other coders, or me much later, don't go looking for these scripts, I added the following comment to the first line of each one:

    -- This file is used as an embedded resource and not included in the build output.

    Then I build a little ResourceManager that for now just reads embedded files, and when I tried it out:

    var script = ResourceManager.ReadEmbeddedTextFile("SeedIdTypes.sql");

    and hovered over the script destination var, I never saw past the comment, which I had forgotten about, saying This file is used as an embedded resource and not included in the build output, and I assumed it was the CLR complaining about my build settings for the script file. A wasted half hour later, I looked closer, and saw the SQL, realised the script was being read, and the "error message" was my own comment. :laugh: :-O

    Immanentize the Eschaton!

    Z B M R Y 5 Replies Last reply
    0
    • B Brady Kelly

      I have a few SQL scripts as embedded resources in my app, for EF seeding. To make sure other coders, or me much later, don't go looking for these scripts, I added the following comment to the first line of each one:

      -- This file is used as an embedded resource and not included in the build output.

      Then I build a little ResourceManager that for now just reads embedded files, and when I tried it out:

      var script = ResourceManager.ReadEmbeddedTextFile("SeedIdTypes.sql");

      and hovered over the script destination var, I never saw past the comment, which I had forgotten about, saying This file is used as an embedded resource and not included in the build output, and I assumed it was the CLR complaining about my build settings for the script file. A wasted half hour later, I looked closer, and saw the SQL, realised the script was being read, and the "error message" was my own comment. :laugh: :-O

      Immanentize the Eschaton!

      Z Offline
      Z Offline
      ZurdoDev
      wrote on last edited by
      #2

      Brady Kelly wrote:

      and the "error message" was my own comment.

      :laugh: :laugh: :laugh: :laugh: :thumbsup::thumbsup:

      There are two kinds of people in the world: those who can extrapolate from incomplete data. There are only 10 types of people in the world, those who understand binary and those who don't.

      1 Reply Last reply
      0
      • B Brady Kelly

        I have a few SQL scripts as embedded resources in my app, for EF seeding. To make sure other coders, or me much later, don't go looking for these scripts, I added the following comment to the first line of each one:

        -- This file is used as an embedded resource and not included in the build output.

        Then I build a little ResourceManager that for now just reads embedded files, and when I tried it out:

        var script = ResourceManager.ReadEmbeddedTextFile("SeedIdTypes.sql");

        and hovered over the script destination var, I never saw past the comment, which I had forgotten about, saying This file is used as an embedded resource and not included in the build output, and I assumed it was the CLR complaining about my build settings for the script file. A wasted half hour later, I looked closer, and saw the SQL, realised the script was being read, and the "error message" was my own comment. :laugh: :-O

        Immanentize the Eschaton!

        B Offline
        B Offline
        Brisingr Aerowing
        wrote on last edited by
        #3

        Ouch. :laugh:

        What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???

        1 Reply Last reply
        0
        • B Brady Kelly

          I have a few SQL scripts as embedded resources in my app, for EF seeding. To make sure other coders, or me much later, don't go looking for these scripts, I added the following comment to the first line of each one:

          -- This file is used as an embedded resource and not included in the build output.

          Then I build a little ResourceManager that for now just reads embedded files, and when I tried it out:

          var script = ResourceManager.ReadEmbeddedTextFile("SeedIdTypes.sql");

          and hovered over the script destination var, I never saw past the comment, which I had forgotten about, saying This file is used as an embedded resource and not included in the build output, and I assumed it was the CLR complaining about my build settings for the script file. A wasted half hour later, I looked closer, and saw the SQL, realised the script was being read, and the "error message" was my own comment. :laugh: :-O

          Immanentize the Eschaton!

          M Offline
          M Offline
          Marc Clifton
          wrote on last edited by
          #4

          Brady Kelly wrote:

          and I assumed it was the CLR complaining

          That's what happens when you create professional looking comments. If you'd written "hey, dumb*ss, you can't do this!" you would have figured it out right away! :laugh: Marc

          Latest Article - Merkle Trees Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

          B G 2 Replies Last reply
          0
          • M Marc Clifton

            Brady Kelly wrote:

            and I assumed it was the CLR complaining

            That's what happens when you create professional looking comments. If you'd written "hey, dumb*ss, you can't do this!" you would have figured it out right away! :laugh: Marc

            Latest Article - Merkle Trees Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

            B Offline
            B Offline
            Brady Kelly
            wrote on last edited by
            #5

            :laugh:

            Immanentize the Eschaton!

            1 Reply Last reply
            0
            • B Brady Kelly

              I have a few SQL scripts as embedded resources in my app, for EF seeding. To make sure other coders, or me much later, don't go looking for these scripts, I added the following comment to the first line of each one:

              -- This file is used as an embedded resource and not included in the build output.

              Then I build a little ResourceManager that for now just reads embedded files, and when I tried it out:

              var script = ResourceManager.ReadEmbeddedTextFile("SeedIdTypes.sql");

              and hovered over the script destination var, I never saw past the comment, which I had forgotten about, saying This file is used as an embedded resource and not included in the build output, and I assumed it was the CLR complaining about my build settings for the script file. A wasted half hour later, I looked closer, and saw the SQL, realised the script was being read, and the "error message" was my own comment. :laugh: :-O

              Immanentize the Eschaton!

              R Offline
              R Offline
              RedDk
              wrote on last edited by
              #6

              Brady Kelly wrote:

              comment

              ... not if I can't see them ...

              1 Reply Last reply
              0
              • B Brady Kelly

                I have a few SQL scripts as embedded resources in my app, for EF seeding. To make sure other coders, or me much later, don't go looking for these scripts, I added the following comment to the first line of each one:

                -- This file is used as an embedded resource and not included in the build output.

                Then I build a little ResourceManager that for now just reads embedded files, and when I tried it out:

                var script = ResourceManager.ReadEmbeddedTextFile("SeedIdTypes.sql");

                and hovered over the script destination var, I never saw past the comment, which I had forgotten about, saying This file is used as an embedded resource and not included in the build output, and I assumed it was the CLR complaining about my build settings for the script file. A wasted half hour later, I looked closer, and saw the SQL, realised the script was being read, and the "error message" was my own comment. :laugh: :-O

                Immanentize the Eschaton!

                Y Offline
                Y Offline
                Yusuf
                wrote on last edited by
                #7

                Ouch! I have been bitten in the rear with similar comments. Now I sign my comments with my initials and data. An added benefit, I can search for my comments.

                -- This file is used as an embedded resource and not included in the build output. [BK 20170418]

                Yusuf May I help you?

                B 1 Reply Last reply
                0
                • Y Yusuf

                  Ouch! I have been bitten in the rear with similar comments. Now I sign my comments with my initials and data. An added benefit, I can search for my comments.

                  -- This file is used as an embedded resource and not included in the build output. [BK 20170418]

                  Yusuf May I help you?

                  B Offline
                  B Offline
                  Brady Kelly
                  wrote on last edited by
                  #8

                  I used to do exactly the same, but I so seldom work on shared code-based these days, it's all my own, so that sort of ell by the wayside. Except I used to put the [BK 20170418] first, so it's always in the same left side of the sreen, regardless of comment length.

                  Immanentize the Eschaton!

                  1 Reply Last reply
                  0
                  • M Marc Clifton

                    Brady Kelly wrote:

                    and I assumed it was the CLR complaining

                    That's what happens when you create professional looking comments. If you'd written "hey, dumb*ss, you can't do this!" you would have figured it out right away! :laugh: Marc

                    Latest Article - Merkle Trees Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                    G Offline
                    G Offline
                    Gary Wheeler
                    wrote on last edited by
                    #9

                    How is it you've lucked out and never had an IDE call you a dumb*ss?

                    Software Zen: delete this;

                    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