- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
This all looks fine to me. This looks like my code on a good day.
Admin
These are quite nice. Of course, I see one of them ALL the time!
Sadly, I had to deal with code like that a lot lately.
Admin
This crap has to be intentional. It's just too freaking complicated to be an accident (how could he not have learned "int i = 1"?). He probably hates you and/or the project, and this is how he's doing. I think the javadoc proves that...
--Daniel T
Admin
He he he he he he .... :|
This is too funny
Last time i laughed like this was when i read the Windows 95 source code ( if(started) { crash(); } // and more like this )
Admin
Not to support code like this, but I can see a "reason" for something like this. What if they were converting a large project of C++ code (that as I recal doesn't have a .equals method for all objects). So there could have been a ton of calls to "compareObjects", and instead of changing them to the "if (obj1.equals(obj2) == true)" they could leave the existing code intact. I'll admit I've done things like this when converting projects between languages (for phase 1 mind you).
Granted, I would just have done "return obj1.equals(obj2)" unless I was planning on doing something later on.
Admin
It may be stupid, but it compiles under:
bash-2.05b$ java -version
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2)
Classic VM (build 1.4.2, J2RE 1.4.2 IBM build cxia321420-20040626 (JIT enabled: jitc))
What I thought should work doesn't:
bash-2.05b$ javac JBookmarkSync.java
./BookmarkBucket.java:69: cannot resolve symbol
symbol : method put (int,java.net.URL)
location: class java.util.Hashtable
urlHash.put(BM.getURL().hashCode(), BM.getURL());
^
1 error
Admin
Just my 2c.
Admin
Wut.
Admin
It makes me rather sad to see that back in 2005, nobody here complained about typos like they do now. "Purising"? Pretty sure that's not a word, not that anyone is likely to care, a jillion year after this was posted.