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. How many things are wrong with this code? [modified]

How many things are wrong with this code? [modified]

Scheduled Pinned Locked Moved The Weird and The Wonderful
javaquestion
7 Posts 7 Posters 35 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.
  • L Offline
    L Offline
    Leisuresuit Larry
    wrote on last edited by
    #1

    No other documentation exists except for the code below. Some may be personal preference, but I counted four problems. Maybe you can spot more. :) (The code is supposed to be compliant with Java 5.0)public interface InvitationInterface { ... public ArrayList sendMulipleInvitations (List listemailAddresses,String msg); ... }
    -- modified at 18:35 Friday 16th November, 2007

    P D L 3 Replies Last reply
    0
    • L Leisuresuit Larry

      No other documentation exists except for the code below. Some may be personal preference, but I counted four problems. Maybe you can spot more. :) (The code is supposed to be compliant with Java 5.0)public interface InvitationInterface { ... public ArrayList sendMulipleInvitations (List listemailAddresses,String msg); ... }
      -- modified at 18:35 Friday 16th November, 2007

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

      One big thing stands out. Java. Urgghhhhh. Just stop there, move along - there's nothing to see, move along.

      Deja View - the feeling that you've seen this post before.

      My blog | My articles

      V 1 Reply Last reply
      0
      • L Leisuresuit Larry

        No other documentation exists except for the code below. Some may be personal preference, but I counted four problems. Maybe you can spot more. :) (The code is supposed to be compliant with Java 5.0)public interface InvitationInterface { ... public ArrayList sendMulipleInvitations (List listemailAddresses,String msg); ... }
        -- modified at 18:35 Friday 16th November, 2007

        D Offline
        D Offline
        DavidNohejl
        wrote on last edited by
        #3
        1. I don't like that "Interface" suffix. And that Invitation is an interface (why?). And what it does anyway? Can't say without complete definition, but IInvitationSender sounds better to me. 2) sendMulipleInvitations should be sendMultipleInvitations (unless you did that typo while posting) 3) listemailAddresses - get rid of that "list" prefix 4) um, what the hell sendMulipleInvitations returns? All invitations that were sucessfully send? Or else I dunno... Either the method has wrong name, or strange return type. Anyway, yeah, List of addresses, hmm better use some EmailAddressCollectionn or List<EmailAddress> (assuming there is class like that, otherwise something like StringCollection).

        [My Blog]
        "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - RĂ¼diger Klaehn
        "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe

        1 Reply Last reply
        0
        • L Leisuresuit Larry

          No other documentation exists except for the code below. Some may be personal preference, but I counted four problems. Maybe you can spot more. :) (The code is supposed to be compliant with Java 5.0)public interface InvitationInterface { ... public ArrayList sendMulipleInvitations (List listemailAddresses,String msg); ... }
          -- modified at 18:35 Friday 16th November, 2007

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          Let's be positive about this one: 1. there IS an interface, supporting loosely coupled designs 2. it is public, everyone could use it 3. its name starts with capital I 4. all parentheses and brackets are nicely balanced 5. the elipses show where the comments could go 6. maybe documentation will be added eventually? :-D

          Luc Pattyn [Forum Guidelines] [My Articles]


          this months tips: - use PRE tags to preserve formatting when showing multi-line code snippets - before you ask a question here, search CodeProject, then Google


          1 Reply Last reply
          0
          • P Pete OHanlon

            One big thing stands out. Java. Urgghhhhh. Just stop there, move along - there's nothing to see, move along.

            Deja View - the feeling that you've seen this post before.

            My blog | My articles

            V Offline
            V Offline
            Vasudevan Deepak Kumar
            wrote on last edited by
            #5

            Pete O`Hanlon wrote:

            Java

            No official Java support from Microsoft after December 31, 2007. See this URL for details: http://www.microsoft.com/mscorp/java/default.mspx[^]

            Vasudevan Deepak Kumar Personal Homepage
            Tech Gossips
            Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.

            C J 2 Replies Last reply
            0
            • V Vasudevan Deepak Kumar

              Pete O`Hanlon wrote:

              Java

              No official Java support from Microsoft after December 31, 2007. See this URL for details: http://www.microsoft.com/mscorp/java/default.mspx[^]

              Vasudevan Deepak Kumar Personal Homepage
              Tech Gossips
              Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.

              C Offline
              C Offline
              Cristian Amarie
              wrote on last edited by
              #6

              Excellent. 'Got tired of all these "great" Java tools. (DB2 Command Center is my personal favorite). Perhaps is the moment to get back to the roots - "do one thing, and do it well".

              Nuclear launch detected

              1 Reply Last reply
              0
              • V Vasudevan Deepak Kumar

                Pete O`Hanlon wrote:

                Java

                No official Java support from Microsoft after December 31, 2007. See this URL for details: http://www.microsoft.com/mscorp/java/default.mspx[^]

                Vasudevan Deepak Kumar Personal Homepage
                Tech Gossips
                Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.

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

                Vasudevan Deepak Kumar wrote:

                No official Java support from Microsoft after December 31, 2007.

                So, at last they are burying their long dead crippled Java-look-alike obscenity? Fine. We all use SUNs VM for years now. Please do not try to sound like there will be no more Java. Someone might actually believe you. :omg: And those who do not and read the whole story will come to see you as a liar. One does not have to like Java, but at the very least one has to acknoledgr that it inspired MS to bring us .NET :laugh:


                Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all.
                Douglas Adams, "Dirk Gently's Holistic Detective Agency"

                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