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. Wow, Just Wow

Wow, Just Wow

Scheduled Pinned Locked Moved The Weird and The Wonderful
help
14 Posts 14 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.
  • K Kevin Marois

    var scheduleContacts = Engine.APIProxy.GetAllCompanyInfoContactScheduleContactsByCompanyInfoContactScheduleHeaderId(schedule.Id);

    That is a REALLY long method name.

    If it's not broken, fix it until it is

    V Offline
    V Offline
    Vark111
    wrote on last edited by
    #3

    Probably someone taking the Aggregate Root concept to the extreme. Also, a horrible use of var.

    S 1 Reply Last reply
    0
    • K Kevin Marois

      var scheduleContacts = Engine.APIProxy.GetAllCompanyInfoContactScheduleContactsByCompanyInfoContactScheduleHeaderId(schedule.Id);

      That is a REALLY long method name.

      If it's not broken, fix it until it is

      R Offline
      R Offline
      Ranjan D
      wrote on last edited by
      #4

      How about stating it as below

      GetAllCompanyScheduledContactInfo(schedule.Id) or
      GetAllCompanyScheduledContactInfoByScheduleID(schedule.Id)

      Thanks,

      D K 2 Replies Last reply
      0
      • K Kevin Marois

        var scheduleContacts = Engine.APIProxy.GetAllCompanyInfoContactScheduleContactsByCompanyInfoContactScheduleHeaderId(schedule.Id);

        That is a REALLY long method name.

        If it's not broken, fix it until it is

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #5

        That's somebody who doesn't like comments. He or she has bought into the idea that code should be self commenting.

        1 Reply Last reply
        0
        • R Ranjan D

          How about stating it as below

          GetAllCompanyScheduledContactInfo(schedule.Id) or
          GetAllCompanyScheduledContactInfoByScheduleID(schedule.Id)

          Thanks,

          D Offline
          D Offline
          DaveAuld
          wrote on last edited by
          #6

          Steady on there.....should be simply;

          var results = Engine.APIProxy.GetResults(...);

          :rolleyes:

          Dave Find Me On:Web|Facebook|Twitter|LinkedIn Folding Stats: Team CodeProject

          1 Reply Last reply
          0
          • K Kevin Marois

            var scheduleContacts = Engine.APIProxy.GetAllCompanyInfoContactScheduleContactsByCompanyInfoContactScheduleHeaderId(schedule.Id);

            That is a REALLY long method name.

            If it's not broken, fix it until it is

            R Offline
            R Offline
            Rob Grainger
            wrote on last edited by
            #7

            That's kind of the opposite naming principle to my examples below. Nearly as bad.

            "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.

            1 Reply Last reply
            0
            • K Kevin Marois

              var scheduleContacts = Engine.APIProxy.GetAllCompanyInfoContactScheduleContactsByCompanyInfoContactScheduleHeaderId(schedule.Id);

              That is a REALLY long method name.

              If it's not broken, fix it until it is

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

              Nothing wrong there. It is not like you are going to type it.

              1 Reply Last reply
              0
              • K Kevin Marois

                var scheduleContacts = Engine.APIProxy.GetAllCompanyInfoContactScheduleContactsByCompanyInfoContactScheduleHeaderId(schedule.Id);

                That is a REALLY long method name.

                If it's not broken, fix it until it is

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

                The longest one I have seen was about 1000 characters long. Abbreviated. With a Namespace of ~1300 characters (excluding the '.') and a class name of ~700 characters. I remember this as I was going to use the library this was in. I quickly decided to use a different library instead (this library had a whole host of other things that would belong here, if I could remember the name of the library [it was a weird, unpronounceable, seemingly randomly generated name] I would post a link to it.)

                What do you get when you cross a joke with a rhetorical question?

                1 Reply Last reply
                0
                • K Kevin Marois

                  var scheduleContacts = Engine.APIProxy.GetAllCompanyInfoContactScheduleContactsByCompanyInfoContactScheduleHeaderId(schedule.Id);

                  That is a REALLY long method name.

                  If it's not broken, fix it until it is

                  B Offline
                  B Offline
                  Bernhard Hiller
                  wrote on last edited by
                  #10

                  What a stupid beginner! What does Engine mean? Is that a ApplicationProgrammingInterfaceProxyEngine? That's still not meaningful enough. And that APIProxy, that also needs a better name! I cannot understand that line of code because of that bad naming.

                  1 Reply Last reply
                  0
                  • K Kevin Marois

                    var scheduleContacts = Engine.APIProxy.GetAllCompanyInfoContactScheduleContactsByCompanyInfoContactScheduleHeaderId(schedule.Id);

                    That is a REALLY long method name.

                    If it's not broken, fix it until it is

                    R Offline
                    R Offline
                    Ravi Bhavnani
                    wrote on last edited by
                    #11

                    What the developer really meant to do was:

                    var scheduleContacts = Engine.APIProxy.GetAllCompanyInfoScheduleContacts()
                    .Where (p => p.ScheduleHeaderId == schedule.Id)
                    .OrderBy (p => p.CompanyInfo);

                    /ravi

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

                    1 Reply Last reply
                    0
                    • V Vark111

                      Probably someone taking the Aggregate Root concept to the extreme. Also, a horrible use of var.

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

                      Vark111 wrote:

                      Also, a horrible use of var.

                      I know what you mean! List<CompanyInfoContactScheduleContactsByCompanyInfoContactScheduleHeader> scheduleContacts = Engine.APIProxy.GetAllCompanyInfoContactScheduleContactsByCompanyInfoContactScheduleHeaderId(schedule.Id); would have been so much clearer!!! :-D

                      My programming get away... The Blog... DirectX for WinRT/C# since 2013! Taking over the world since 1371!

                      1 Reply Last reply
                      0
                      • R Ranjan D

                        How about stating it as below

                        GetAllCompanyScheduledContactInfo(schedule.Id) or
                        GetAllCompanyScheduledContactInfoByScheduleID(schedule.Id)

                        Thanks,

                        K Offline
                        K Offline
                        KP Lee
                        wrote on last edited by
                        #13

                        Ranjan.D wrote:

                        ...GetAllCompanyScheduledContactInfo(schedule.Id) or...

                        The problem with that is that you don't get to get even for outrageously long names by making them even longer and more confusing.

                        1 Reply Last reply
                        0
                        • K Kevin Marois

                          var scheduleContacts = Engine.APIProxy.GetAllCompanyInfoContactScheduleContactsByCompanyInfoContactScheduleHeaderId(schedule.Id);

                          That is a REALLY long method name.

                          If it's not broken, fix it until it is

                          M Offline
                          M Offline
                          Marc Koutzarov
                          wrote on last edited by
                          #14

                          Looks like someone has just read something about Domain Driven Development and was fiddling around a bit. :-D

                          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