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. What to name a method ?

What to name a method ?

Scheduled Pinned Locked Moved The Lounge
question
8 Posts 6 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

    So I am writing this application for key cutting machines and one of the method is to generate codes to feed to the machine that cut actual keys.... So for the next generation developer I am leaving below method signature and a very useful comment... :)

    // The Matrix has found you Neo !!!
    protected void IAmTheKeyMaker()
    {
    // And I will show you how deep the rabbit hole runs !!!

    }

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

    L G J 4 Replies Last reply
    0
    • V virang_21

      So I am writing this application for key cutting machines and one of the method is to generate codes to feed to the machine that cut actual keys.... So for the next generation developer I am leaving below method signature and a very useful comment... :)

      // The Matrix has found you Neo !!!
      protected void IAmTheKeyMaker()
      {
      // And I will show you how deep the rabbit hole runs !!!

      }

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

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

      That's rather poor naming! The method name needs to describe its purpose - at least return a boolean and rename it as "AmITheKeyMaker" ;)

      MVVM # - I did it My Way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')

      1 Reply Last reply
      0
      • V virang_21

        So I am writing this application for key cutting machines and one of the method is to generate codes to feed to the machine that cut actual keys.... So for the next generation developer I am leaving below method signature and a very useful comment... :)

        // The Matrix has found you Neo !!!
        protected void IAmTheKeyMaker()
        {
        // And I will show you how deep the rabbit hole runs !!!

        }

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

        G Offline
        G Offline
        Gary R Wheeler
        wrote on last edited by
        #3

        I would have gone with

        protected void VinzClortho(out Key key)
        {
        key = new Key();
        return key;
        }

        myself. (*) http://en.wikipedia.org/wiki/Vinz_Clortho[^]

        Software Zen: delete this;

        H 1 Reply Last reply
        0
        • G Gary R Wheeler

          I would have gone with

          protected void VinzClortho(out Key key)
          {
          key = new Key();
          return key;
          }

          myself. (*) http://en.wikipedia.org/wiki/Vinz_Clortho[^]

          Software Zen: delete this;

          H Offline
          H Offline
          H Brydon
          wrote on last edited by
          #4

          Gary R. Wheeler wrote:

          protected void VinzClortho(out Key key)
          {
          key = new Key();
          return key;
          }

          C9999: attempt to return a value from a void method

          Windows 8 is the resurrected version of Microsoft Bob. The only thing missing is the Fisher-Price logo. - Harvey

          E G 2 Replies Last reply
          0
          • V virang_21

            So I am writing this application for key cutting machines and one of the method is to generate codes to feed to the machine that cut actual keys.... So for the next generation developer I am leaving below method signature and a very useful comment... :)

            // The Matrix has found you Neo !!!
            protected void IAmTheKeyMaker()
            {
            // And I will show you how deep the rabbit hole runs !!!

            }

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

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

            This is so The Weird and The Wonderful

            1 Reply Last reply
            0
            • H H Brydon

              Gary R. Wheeler wrote:

              protected void VinzClortho(out Key key)
              {
              key = new Key();
              return key;
              }

              C9999: attempt to return a value from a void method

              Windows 8 is the resurrected version of Microsoft Bob. The only thing missing is the Fisher-Price logo. - Harvey

              E Offline
              E Offline
              ExcellentOrg
              wrote on last edited by
              #6

              H.Brydon wrote:

              Gary R. Wheeler wrote:

              protected void VinzClortho(out Key key)
              {
              key = new Key();
              return key;
              }

              C9999: attempt to return a value from a void method

              But hey, thats all protected (aka classified) info!!!! So its OK!

              1 Reply Last reply
              0
              • V virang_21

                So I am writing this application for key cutting machines and one of the method is to generate codes to feed to the machine that cut actual keys.... So for the next generation developer I am leaving below method signature and a very useful comment... :)

                // The Matrix has found you Neo !!!
                protected void IAmTheKeyMaker()
                {
                // And I will show you how deep the rabbit hole runs !!!

                }

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

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

                You could have quoted another great movie - of a somewhat different genre: Ghostbusters[^]

                Louis: [possessed by Vinz Clortho] I am The Keymaster!
                Dana Barrett: [possessed by Zuul] I am The Gatekeeper!

                But then you would have had to implement a gatekeeper method as well, of course! :laugh:

                Anything that is unrelated to elephants is irrelephant
                Anonymous
                -----
                Do not argue with an idiot. He will drag you down to his level and beat you with experience
                Greg King
                -----
                I always wanted to be somebody, but now I realize I should have been more specific.
                Lily Tomlin, Actress

                1 Reply Last reply
                0
                • H H Brydon

                  Gary R. Wheeler wrote:

                  protected void VinzClortho(out Key key)
                  {
                  key = new Key();
                  return key;
                  }

                  C9999: attempt to return a value from a void method

                  Windows 8 is the resurrected version of Microsoft Bob. The only thing missing is the Fisher-Price logo. - Harvey

                  G Offline
                  G Offline
                  Gary R Wheeler
                  wrote on last edited by
                  #8

                  protected Key VinzClortho(out Key key)
                  {
                  key = new Key();
                  return key;
                  }

                  Bitch, bitch, bitch...

                  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