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. A question about naming

A question about naming

Scheduled Pinned Locked Moved The Lounge
questionhtmlcom
30 Posts 21 Posters 2 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.
  • C Chris Maunder

    Jörgen Andersson wrote:

    If your application/library/class/function has developed out of scope and can no longer be considered having the right name, when is it ok to rename it?

    a. As soon as it's out of scope and can no longer be considered having the right name, and b. You can find a poor slob to do the code renaming, refactoring, updating of tables, updating of docs, rerouting of any old URLs that point to that name, corrections and redistribution of written material, changes to DNS, server naming, jobs and schedules, Unit tests and test data, and all those coffee cups with the old name on them.

    cheers Chris Maunder

    N Offline
    N Offline
    Nelek
    wrote on last edited by
    #19

    Chris Maunder wrote:

    You can find a poor slob to do the code renaming, refactoring, updating of tables, updating of docs, rerouting of any old URLs that point to that name, corrections and redistribution of written material, changes to DNS, server naming, jobs and schedules, Unit tests and test data, and all those coffee cups with the old name on them to blame when problems caused by the renaming appear

    FTFY

    M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

    1 Reply Last reply
    0
    • _ _Damian S_

      Rename it, but leave a wrapper sitting there that calls the newly renamed function with the old name, in case someone is still using the old name. Remove the old name from documentation. ;-)

      Quad skating his way through the world since the early 80's... Booger Mobile - My bright green 1964 Ford Falcon - check out the blog here!! | If you feel generous - make a donation to Camp Quality!!

      N Offline
      N Offline
      Nagy Vilmos
      wrote on last edited by
      #20

      _Damian S_ wrote:

      documentation

      +++ out of cheese error +++ MELON MELON MELON +++ redo from start +++

      1 Reply Last reply
      0
      • J Jorgen Andersson

        If your application/library/class/function has developed out of scope and can no longer be considered having the right name, when is it ok to rename it?

        Wrong is evil and must be defeated. - Jeff Ello[^]

        S Offline
        S Offline
        SortaCore
        wrote on last edited by
        #21

        I'm going with April 1st, or a Friday 13th. Conveniently, 2015 has three of those. If it's C++, go ahead and rename it and let the compiler puke all over everyone. Then accuse them of not following standards if they complain. ... or #define it to a MessageBoxA() call. ;P

        1 Reply Last reply
        0
        • M Mark_Wallace

          Jörgen Andersson wrote:

          I promise to not touch fix your code.

          So close, but you blew it.

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

          J Offline
          J Offline
          Jorgen Andersson
          wrote on last edited by
          #22

          If I promised that, I'd probably blow it anyway.

          Wrong is evil and must be defeated. - Jeff Ello Any organization is like a tree full of monkeys. The monkeys on top look down and see a tree full of smiling faces. The monkeys on the bottom look up and see nothing but assholes.

          1 Reply Last reply
          0
          • J Jorgen Andersson

            If your application/library/class/function has developed out of scope and can no longer be considered having the right name, when is it ok to rename it?

            Wrong is evil and must be defeated. - Jeff Ello[^]

            T Offline
            T Offline
            Tomz_KV
            wrote on last edited by
            #23

            For functions, create a new one (like "overload") so that the code calling the "old" function does not break.

            TOMZ_KV

            1 Reply Last reply
            0
            • _ _Damian S_

              Rename it, but leave a wrapper sitting there that calls the newly renamed function with the old name, in case someone is still using the old name. Remove the old name from documentation. ;-)

              Quad skating his way through the world since the early 80's... Booger Mobile - My bright green 1964 Ford Falcon - check out the blog here!! | If you feel generous - make a donation to Camp Quality!!

              G Offline
              G Offline
              gggustafson
              wrote on last edited by
              #24

              +1

              Gus Gustafson

              1 Reply Last reply
              0
              • J Jorgen Andersson

                If your application/library/class/function has developed out of scope and can no longer be considered having the right name, when is it ok to rename it?

                Wrong is evil and must be defeated. - Jeff Ello[^]

                RaviBeeR Offline
                RaviBeeR Offline
                RaviBee
                wrote on last edited by
                #25

                That's not one question - it's four. Methods and classes can be renamed safely as long as you continue to support the old names (be sure to deprecate them using [Obsolete]) for n releases per your SLA. Renaming assembly and file names can wreak havoc. Do this only if absolutely necessary. Renaming an app requires sales, marketing and end-user support to get involved and is the most expensive option. Do this only if your bottom line depends on it. /ravi

                My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

                1 Reply Last reply
                0
                • J Jorgen Andersson

                  If your application/library/class/function has developed out of scope and can no longer be considered having the right name, when is it ok to rename it?

                  Wrong is evil and must be defeated. - Jeff Ello[^]

                  R Offline
                  R Offline
                  rnbergren
                  wrote on last edited by
                  #26

                  gesh people, don't you know. You always start all programs with Project1 and all variables are var1, var2 etc... text boxes txt1 txt2 txt3 etc.. Got to save keystrokes here. Short people short. Seriously though. Worked with a programmer many many years ago that named everything that way. Oh my goodness her code was horrible. Anyway. Rename as soon as possible but try to keep it as general as possible. Hard balancing act to follow. I actually have a reporting project that I wasn't 'allowed' to know the name of when I started coding it. I named it DrillInSpecialReports. Unfortunately it was too general and everyone on the team has put all their special reports in that project and hung them all off each other. It is a beast now. But we know where to look for anything that is a special report.

                  To err is human to really mess up you need a computer

                  J B 2 Replies Last reply
                  0
                  • R rnbergren

                    gesh people, don't you know. You always start all programs with Project1 and all variables are var1, var2 etc... text boxes txt1 txt2 txt3 etc.. Got to save keystrokes here. Short people short. Seriously though. Worked with a programmer many many years ago that named everything that way. Oh my goodness her code was horrible. Anyway. Rename as soon as possible but try to keep it as general as possible. Hard balancing act to follow. I actually have a reporting project that I wasn't 'allowed' to know the name of when I started coding it. I named it DrillInSpecialReports. Unfortunately it was too general and everyone on the team has put all their special reports in that project and hung them all off each other. It is a beast now. But we know where to look for anything that is a special report.

                    To err is human to really mess up you need a computer

                    J Offline
                    J Offline
                    Jorgen Andersson
                    wrote on last edited by
                    #27

                    I've also worked with one of those people, he also didn't know there existed such a thing as repeaters. So we had a report with 72 (SeventyTwo) fields named Label1 through Label72.

                    Wrong is evil and must be defeated. - Jeff Ello Any organization is like a tree full of monkeys. The monkeys on top look down and see a tree full of smiling faces. The monkeys on the bottom look up and see nothing but assholes.

                    1 Reply Last reply
                    0
                    • L Lost User

                      I don't know about library, but if it's a class, never, you simply shouldn't if it used across several systems. You can extend it by sub-classsing and giving the child class an appropriate name.

                      B Offline
                      B Offline
                      Billy T
                      wrote on last edited by
                      #28

                      Kamen Nik wrote:

                      I don't know about library, but if it's a class, never, you simply shouldn't if it used across several systems.

                      Hence the ghost of NextStep that lingers on in every Mac and iDevice...

                      1 Reply Last reply
                      0
                      • J Jorgen Andersson

                        If your application/library/class/function has developed out of scope and can no longer be considered having the right name, when is it ok to rename it?

                        Wrong is evil and must be defeated. - Jeff Ello[^]

                        B Offline
                        B Offline
                        BrainiacV
                        wrote on last edited by
                        #29

                        I worked at a place where one developer named all his functions after Disney characters. He would have fit in at my last job where the first thing we were taught was that "Names mean nothing, just because a function is named 'PRINT', it may not get around to doing any." Of course the initial software had been written by consultants who had no interest in communicating how the software worked.

                        Psychosis at 10 Film at 11 Those who do not remember the past, are doomed to repeat it. Those who do not remember the past, cannot build upon it.

                        1 Reply Last reply
                        0
                        • R rnbergren

                          gesh people, don't you know. You always start all programs with Project1 and all variables are var1, var2 etc... text boxes txt1 txt2 txt3 etc.. Got to save keystrokes here. Short people short. Seriously though. Worked with a programmer many many years ago that named everything that way. Oh my goodness her code was horrible. Anyway. Rename as soon as possible but try to keep it as general as possible. Hard balancing act to follow. I actually have a reporting project that I wasn't 'allowed' to know the name of when I started coding it. I named it DrillInSpecialReports. Unfortunately it was too general and everyone on the team has put all their special reports in that project and hung them all off each other. It is a beast now. But we know where to look for anything that is a special report.

                          To err is human to really mess up you need a computer

                          B Offline
                          B Offline
                          BrainiacV
                          wrote on last edited by
                          #30

                          I can relate. At my last job I had to debug a function that the parameters were (a, b, c, d, e, f, g, h, i) and not one comment in the entire function. We were also taught names mean nothing when it came to function names. The consultants who wrote the initial program would commonly call functions that did ten different things when they were only interested in two of them and they assumed the other eight would not adversely affect the rest of the program. A coworker and I traced a subroutine down twenty-five levels like that and did not hit bottom. We quit because by that time we had no idea what the intent of the original function call was.

                          Psychosis at 10 Film at 11 Those who do not remember the past, are doomed to repeat it. Those who do not remember the past, cannot build upon it.

                          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