This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Meaningless Drivel and the fly likes a new method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Other » Meaningless Drivel
Bookmark "a new method" Watch "a new method" New topic
Author

a new method

Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    2

i thought this was pretty funny so, even thought the joke was on me, i am sharing.

i have been refactoring a program i wrote in CC in 2004 to fit the MVC framework i used the next year at university. i succeeded in refactoring it but there is a logic error. it might have been there in the original program, i'm not sure yet. it uses a custom PersistentLinkedBinaryTree class. because of this error i decided it would be nice if i could "erase" the knowledge base saved in this tree. i also thought the user might want to do the same.

so, i created a new MenuItem, constant, if in actionPerformed(), and the clincher, a new method in Model called new().

i bet you can imagine what the compiler thought of that!


SCJP
Visit my download page
Hebert Coelho
Ranch Hand

Joined: Jul 14, 2010
Posts: 754

If it was working back than, you did a great job! =P


[uaiHebert.com] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    2

thanks, i was on top of my game back then. but you know how it is with homework. no time for extensive testing.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: a new method
 
It's not a secret anymore!