- 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
Cache sloopy = new Cache(); // hang on sloopy!
Admin
Admin
That's <span style="color:black;filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-moz-transform:rotate(-180deg);-o-transform: rotate(-180deg);-webkit-transform: rotate(-180deg);position:absolute;;">backwards.
Admin
Why just small companies? It's the same here too!!!
Admin
Admin
If I had my way, the entire interwebs would be glorified text files. White background, black text.
Admin
Java itself is the most boring WTF ever.
Admin
Black background, green text.
(Or perhaps dark brown background, yellow text).
Admin
We were hangin' out, and it was hangin' out, and she hung on until she could hang on no more. Then I had to send her lots of cache.
Admin
As opposed to what? .Net haha yeah yeah, C++ maybe but whatever :)
Admin
Everything the guy did above his DAO is either incompetence or sabotage. Or maybe he felt the need to justify his own job by adding layers of useless crap. 100MB of reference data that is stored in a database does not need application-level caching. Any storage and transport mechanism that will be coded to implement such caching is unlikely to be more effective than a database (which already has caching and is relying on a storage subsystem that itself has caching) and will increase both the stress on the overall system and the odds that a bug appears. There are not a lot of Facebooks and Googles out there, programmers. Get real and use the friggin database.
Admin
Admin
Admin
Admin
Admin
I don't PISSING KNOW!!!
Admin
It is official, java programmers can't see obvious memory until it eats 20gb of heap
Admin
C++ still wins, but it requires extensive tuning, including replacing the standard container classes with hand-tuned versions.
C++ "Out-of-the-box" is slower than Java or Scala.
Admin
Bug report closed. Claimed bug is impossible. It works fine on my machine.
Admin
Okay, we all make dumb mistakes. But, umm, didn't it occur to him that there might be issues with caching data across multiple JVMs? Even if he thought his solution would work, didn't he test this?
Admin
"Knock knock." "Who's there?" "VIEWSTATE=231328903240983429ewrpoi903248930jkle9324rweqq342ilewoir09834210983jilreqkjlre9030984323490834293429234eiuoqewroiupweqr43289034218904231erjklweqrm;2q34p193274kljkery90dg7xtqw';lek6u';ljaefo8ysag8yqw'342rf;laskluplij24590dl;fgmqw4tpotsdflkjlkjewrkj,.gklsioasest43,.w.,maskl;jwaerkljewrmal;skjseerlakjesrlakesjasdlf435435askdfalksdfiuao9w4iur.asdfjao;seiuraslekmra;dsoijfalewkmr;aloierjalkaejrlkjsdalksdasdlkfjlkas" "ASP"
Admin
Hmm, I don't know. I think punch cards are much more readable when they have a white background and black text.
Admin
How anti-intellectual! A well-written sex scene can be far more exciting than any photograph.
Admin
I wonder if you typed this long string just for the purpose of that lame comeback or if you copy-pasted it from somewhere, and I can't decide which is worse.
Admin
+25 for Java.
Admin
[* In this posting, text means text, text does not mean binary the way IBM named the binaries that compilers feed to linkers.]
Admin
That is not what it says. It says that Java is 5.8 to 12.6 times slower than C++. You should not be comparing the C++ debug build to anything. It's meaningless.
Admin
Java is crap, Java programmers are crappier!
Admin
From the original Google paper:
Admin
If Program A takes 10 seconds to respond to a button click while Program B takes 1 second to respond, there's an obvious advantage to whatever language, environment, whatever was used to create Program B.
If Program A takes 10 milliseconds to respond to a button click while Program B takes 1 millisecond to respond, we could say that Program B is "better", but not in a way that matters to anyone.
The question is not whether programs written in one language are faster than those written in another, but are they faster in ways that matter?
A well-written Java program will usually be "fast enough". If other aspects of the language make it easier to debug, easier to maintain, more portable, etc, those factors may well out-weigh minor performance advantages.
I once heard a lecture (it was nothing to do with computers, it was about how to debate), where the speaker said, "Don't play games where there is no prize for winning." I apply this to software development all the time. I frequently say things to myself like, "This program is very inefficient. I bet if I worked on it for a couple of days I could really improve the performance." But then I realize, "Yeah, I could cut the run-time from half a second to a tenth of a second. And not only would this take me days of work, but by messing with it I create the possibility that I will introduce bugs into a function that has been operating successfully for several years. It's not worth it."
Admin
We should put the two speakers in a room and let them fight^H^H^H^H^Hplay it out. I wonder who will win?
Admin
I heard you like caches, so I put a cache in your cache in your cache in your cache in your cache in your cache in your cache in your cache in your
OutOfMemoryError
Admin
[q]For those unfamiliar with Java, Serializable is a marker interface which tells the JVM that the object, and everything that it contains (except transient things) should be streamed.[/q]
CAN be streamed. Not "should".
Admin
I just don't buy that java (or any managed code) is easier to maintain. You still have to manually cleanup unmanaged resources and circular references manually; those issues can difficult to track down. If you run native, you can watch the memory usage, and quickly determine if there is a leak; no profiler necessary. When you rely on a garbage collector, you can't do that. OTOH, reference counting based memory management like Boost smart pointers gives you the best of both worlds.
Admin
And here's the refuting study http://www.freewebs.com/godaves/javabench_revisited/
I expect everyone will tweak it so their horse wins. I agree with many of the posters here that for most applications performance of the language itself will be negligible. I maintain that garbage collection is a stupid way to manage memory.
Admin
Managing your own memory for a web application (the vast majority of java use) seems incredibly stupid. Way to tune for performance that probably is vastly outstripped by I/O from the DB.
Depends on the code base, but when you literally remove an entire class of problems, it really can't be harder to maintain, can it?
I have yet to see either of the problems you mention, and our codebase has millions of LOC (all properly packaged and bundled with maven). Try catch finally is idiomatic and simple and even bad java programmers don't make circular references.
Java has its faults (boilerplate, so much boilerplate), but managed memory isn't one of them. As someone who's worked in C, C++, and Java (professionally), I can't even fathom how you think java doesn't increase developer productivity.
Admin
I agree with TRWTF is TRWTF. In my experience, the only resources I've had to manage in Java are generally database connections, which are tucked away in a database class where you only have to deal with it once, and the occasional file resource. As for circular references, if you have two objects that refer to each other and nothing else refers to them, they will get garbage collected.
The only memory problem I can remember having to deal with in Java* was from a JDBC driver. Which was written in an unmanaged language, so really wasn't a memory problem in Java.