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. When developer give up on naming things...

When developer give up on naming things...

Scheduled Pinned Locked Moved The Lounge
databasesql-servercomsysadminquestion
29 Posts 22 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.
  • V Offline
    V Offline
    virang_21
    wrote on last edited by
    #1

    I just discovered this SQL Server STUFF() Function[^] Bad day at work ?

    Zen and the art of software maintenance : rm -rf * Maths is like love : a simple idea but it can get complicated.

    H S A Sander RosselS C 12 Replies Last reply
    0
    • V virang_21

      I just discovered this SQL Server STUFF() Function[^] Bad day at work ?

      Zen and the art of software maintenance : rm -rf * Maths is like love : a simple idea but it can get complicated.

      H Offline
      H Offline
      honey the codewitch
      wrote on last edited by
      #2

      I have a RemoveExtraNonsense() method in some code I wrote, and I have GetSolutionStuff() in another project I wrote. *hides*

      Real programmers use butterflies

      1 Reply Last reply
      0
      • V virang_21

        I just discovered this SQL Server STUFF() Function[^] Bad day at work ?

        Zen and the art of software maintenance : rm -rf * Maths is like love : a simple idea but it can get complicated.

        S Offline
        S Offline
        Super Lloyd
        wrote on last edited by
        #3

        Great find! :)

        A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

        1 Reply Last reply
        0
        • V virang_21

          I just discovered this SQL Server STUFF() Function[^] Bad day at work ?

          Zen and the art of software maintenance : rm -rf * Maths is like love : a simple idea but it can get complicated.

          A Offline
          A Offline
          Amarnath S
          wrote on last edited by
          #4

          Isn't this intended for the Verb meaning of Stuff, as in verb - fill (a receptacle or space) tightly with something. "an old teapot stuffed full of cash" Indeed, this function is filling tightly the old characters with the new ones. Or, am i missing something?

          L W W 3 Replies Last reply
          0
          • A Amarnath S

            Isn't this intended for the Verb meaning of Stuff, as in verb - fill (a receptacle or space) tightly with something. "an old teapot stuffed full of cash" Indeed, this function is filling tightly the old characters with the new ones. Or, am i missing something?

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

            It's more of a "replace" than a stuff. Patent / trademark trolls would have a field day.

            It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

            F 1 Reply Last reply
            0
            • V virang_21

              I just discovered this SQL Server STUFF() Function[^] Bad day at work ?

              Zen and the art of software maintenance : rm -rf * Maths is like love : a simple idea but it can get complicated.

              Sander RosselS Offline
              Sander RosselS Offline
              Sander Rossel
              wrote on last edited by
              #6

              Me: "What do you do at work?" Cushion maker: "Stuff." Me: "Alright then, keep your secrets."

              Best, Sander sanderrossel.com Migrating Applications to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript Object-Oriented Programming in C# Succinctly

              J K 2 Replies Last reply
              0
              • Sander RosselS Sander Rossel

                Me: "What do you do at work?" Cushion maker: "Stuff." Me: "Alright then, keep your secrets."

                Best, Sander sanderrossel.com Migrating Applications to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript Object-Oriented Programming in C# Succinctly

                J Offline
                J Offline
                Jacquers
                wrote on last edited by
                #7

                Works for a Taxidermist as well :)

                1 Reply Last reply
                0
                • L Lost User

                  It's more of a "replace" than a stuff. Patent / trademark trolls would have a field day.

                  It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

                  F Offline
                  F Offline
                  F ES Sitecore
                  wrote on last edited by
                  #8

                  Not really, replace needs target text to be replaced, this function does it on character index.

                  L 1 Reply Last reply
                  0
                  • V virang_21

                    I just discovered this SQL Server STUFF() Function[^] Bad day at work ?

                    Zen and the art of software maintenance : rm -rf * Maths is like love : a simple idea but it can get complicated.

                    C Offline
                    C Offline
                    CodeWraith
                    wrote on last edited by
                    #9

                    I can actually forgive that. This was just for demonstration's sake and does not really do anything else. Why make up fancy names that distract from what you are trying to demonstrate? I never got this obscession with code styles and conventions. We're writing code, not poetry. I'm used to writing machine code on a RISC processor. It does not get any more abstract than that, but by going down to the lowest level you really can see how little information you need when reading someone else's code. That's mostly about what resources are going to be used, what is being accomplished with them and possibly to point out critical or unusual code and the logic behind it. There actually is no need to make an art out of it.

                    I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.

                    W 1 Reply Last reply
                    0
                    • A Amarnath S

                      Isn't this intended for the Verb meaning of Stuff, as in verb - fill (a receptacle or space) tightly with something. "an old teapot stuffed full of cash" Indeed, this function is filling tightly the old characters with the new ones. Or, am i missing something?

                      W Offline
                      W Offline
                      W Balboos GHB
                      wrote on last edited by
                      #10

                      Stop paying attention to what you read - it will only confuse the rest of us.

                      Ravings en masse^

                      "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                      "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                      1 Reply Last reply
                      0
                      • C CodeWraith

                        I can actually forgive that. This was just for demonstration's sake and does not really do anything else. Why make up fancy names that distract from what you are trying to demonstrate? I never got this obscession with code styles and conventions. We're writing code, not poetry. I'm used to writing machine code on a RISC processor. It does not get any more abstract than that, but by going down to the lowest level you really can see how little information you need when reading someone else's code. That's mostly about what resources are going to be used, what is being accomplished with them and possibly to point out critical or unusual code and the logic behind it. There actually is no need to make an art out of it.

                        I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.

                        W Offline
                        W Offline
                        W Balboos GHB
                        wrote on last edited by
                        #11

                        CodeWraith wrote:

                        We're I am writing code, not poetry

                        FIFY

                        Ravings en masse^

                        "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                        "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                        C 1 Reply Last reply
                        0
                        • W W Balboos GHB

                          CodeWraith wrote:

                          We're I am writing code, not poetry

                          FIFY

                          Ravings en masse^

                          "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                          "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                          C Offline
                          C Offline
                          CodeWraith
                          wrote on last edited by
                          #12

                          Do you recite your poetry before an audience? When will you publish your next book and where must I go to hear you read from it? :-) for (X = 0, y = 42; x < math.Pi && y > 0x1A; x++, y--) { } I just can't wait...

                          I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.

                          W D M 3 Replies Last reply
                          0
                          • Sander RosselS Sander Rossel

                            Me: "What do you do at work?" Cushion maker: "Stuff." Me: "Alright then, keep your secrets."

                            Best, Sander sanderrossel.com Migrating Applications to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript Object-Oriented Programming in C# Succinctly

                            K Offline
                            K Offline
                            Kris Lantz
                            wrote on last edited by
                            #13

                            Those cushion makers have too much fun; they're always in stitches.

                            1 Reply Last reply
                            0
                            • C CodeWraith

                              Do you recite your poetry before an audience? When will you publish your next book and where must I go to hear you read from it? :-) for (X = 0, y = 42; x < math.Pi && y > 0x1A; x++, y--) { } I just can't wait...

                              I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.

                              W Offline
                              W Offline
                              W Balboos GHB
                              wrote on last edited by
                              #14

                              It is recited on hundred of desktop - every day - all day. The audience appreciation is the comfort with which they use it and the other artist who can create, because of it's natural beauty, interfaces and outputs with ease. The applause - in a special way - include the silence resulting from everything working as expected. And the audience appreciation probably extends to the bi-weekly paying customer. The site is, for now, internal, only - so you'd need to work here. Surely, by now, you've seen shit masquerading as software. They have some here, too, built by their contractors. My target is a comfortable flowing experience for the developer through users - and also keeping it eye-friendly as most of them stare at it all day.

                              Ravings en masse^

                              "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                              "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                              C 1 Reply Last reply
                              0
                              • V virang_21

                                I just discovered this SQL Server STUFF() Function[^] Bad day at work ?

                                Zen and the art of software maintenance : rm -rf * Maths is like love : a simple idea but it can get complicated.

                                O Offline
                                O Offline
                                obermd
                                wrote on last edited by
                                #15

                                I'm trying to figure out why that function even exists other than for obfuscation purposes.

                                1 Reply Last reply
                                0
                                • F F ES Sitecore

                                  Not really, replace needs target text to be replaced, this function does it on character index.

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

                                  Not really, you can have an offset and a length. There is no "find" implied in replace. It was about "word play", not implementations.

                                  It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

                                  1 Reply Last reply
                                  0
                                  • V virang_21

                                    I just discovered this SQL Server STUFF() Function[^] Bad day at work ?

                                    Zen and the art of software maintenance : rm -rf * Maths is like love : a simple idea but it can get complicated.

                                    K Offline
                                    K Offline
                                    kmoorevs
                                    wrote on last edited by
                                    #17

                                    Wow, thanks for that! Perfect timing as I just now happen to need something to swap out only the first 7 characters of an id field in a bunch of tables in multiple dbs. (prepping a demo) This works perfectly! :)

                                    "Go forth into the source" - Neal Morse

                                    1 Reply Last reply
                                    0
                                    • C CodeWraith

                                      Do you recite your poetry before an audience? When will you publish your next book and where must I go to hear you read from it? :-) for (X = 0, y = 42; x < math.Pi && y > 0x1A; x++, y--) { } I just can't wait...

                                      I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.

                                      D Offline
                                      D Offline
                                      David ONeil
                                      wrote on last edited by
                                      #18

                                      rose = Red;
                                      violet = Blue;
                                      CodeWraithsUseOfDescriptiveAndPoeticNames = 0;

                                      The forgotten roots of science | C++ Programming | DWinLib

                                      C 1 Reply Last reply
                                      0
                                      • D David ONeil

                                        rose = Red;
                                        violet = Blue;
                                        CodeWraithsUseOfDescriptiveAndPoeticNames = 0;

                                        The forgotten roots of science | C++ Programming | DWinLib

                                        C Offline
                                        C Offline
                                        CodeWraith
                                        wrote on last edited by
                                        #19

                                        F8 00 BD BE AC AD AE AF
                                        F8 FF BC BF 7A

                                        There you go. RGBA in two register pairs and the rest in a the microcontrollerish I/O flag Q. Big deal. :-)

                                        I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.

                                        W 1 Reply Last reply
                                        0
                                        • W W Balboos GHB

                                          It is recited on hundred of desktop - every day - all day. The audience appreciation is the comfort with which they use it and the other artist who can create, because of it's natural beauty, interfaces and outputs with ease. The applause - in a special way - include the silence resulting from everything working as expected. And the audience appreciation probably extends to the bi-weekly paying customer. The site is, for now, internal, only - so you'd need to work here. Surely, by now, you've seen shit masquerading as software. They have some here, too, built by their contractors. My target is a comfortable flowing experience for the developer through users - and also keeping it eye-friendly as most of them stare at it all day.

                                          Ravings en masse^

                                          "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                                          "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                                          C Offline
                                          C Offline
                                          CodeWraith
                                          wrote on last edited by
                                          #20

                                          How romantic. :-) The truth is that your audience gets my totally unromantic binaries and your poetry may or may not survive as debug information.

                                          I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.

                                          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