How many things are wrong with this code? [modified]
-
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 -
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, 2007One 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.
-
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- 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 -
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, 2007Let'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
-
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.
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. -
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.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
-
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.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"