• (cs)

    Cache sloopy = new Cache(); // hang on sloopy!

  • (cs) in reply to Paul Neumann
    Paul Neumann:
    what's the bbcode for strikethrough?
    It's full of WTF. You really don't want to know.
  • (cs) in reply to dkf
    dkf:
    Paul Neumann:
    what's the bbcode for strikethrough?
    It's full of WTF. You really don't want to know.

    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.

  • Valued Service (unregistered) in reply to chubertdev
    chubertdev:
    Baboon:
    The real WTF in this is the developer in question is obviously a junior developer and has no idea what they were doing.

    The other WTF was the company didn't have someone to review the approach

    So basically, the setup of every small company out there?

    Why just small companies? It's the same here too!!!

  • (cs) in reply to chubertdev
    chubertdev:
    That's backwards.
    That's glorious in a vomit-inducing way, you know. The web is a target-rich environment when it comes to options for TRWTF…
  • (cs)

    If I had my way, the entire interwebs would be glorified text files. White background, black text.

  • Carlos M (unregistered) in reply to Tom

    Java itself is the most boring WTF ever.

  • Nagesh (unregistered) in reply to chubertdev
    chubertdev:
    If I had my way, the entire interwebs would be glorified text files. White background, black text.
    You get off my lawn this instant, young man!

    Black background, green text.

    (Or perhaps dark brown background, yellow text).

  • Bill C. (unregistered)

    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.

  • Baboon (unregistered) in reply to Carlos M

    As opposed to what? .Net haha yeah yeah, C++ maybe but whatever :)

  • Ronald (unregistered)

    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.

  • jo (unregistered) in reply to chubertdev
    chubertdev:
    If I had my way, the entire interwebs would be glorified text files. White background, black text.
    what? no Pr0n?
  • Bill C. (unregistered) in reply to jo
    jo:
    chubertdev:
    If I had my way, the entire interwebs would be glorified text files. White background, black text.
    what? no Pr0n?
    ASCII art is enough to produce fifty shades, and that puts them in the mood.
  • ._. (unregistered) in reply to jo
    jo:
    chubertdev:
    If I had my way, the entire interwebs would be glorified text files. White background, black text.
    what? no Pr0n?
    I think someone hasn't experienced ASCII Pr0n.
  • Philosopherististist (unregistered) in reply to Charles F.
    If common sense were common, this site would not exist.
    Wow, that's deep! Thanks fore the insight of the day :)
  • (cs)
    long idPK

    I don't PISSING KNOW!!!

  • taytay (unregistered)

    It is official, java programmers can't see obvious memory until it eats 20gb of heap

  • (cs) in reply to Baboon
    Baboon:
    As opposed to what? .Net haha yeah yeah, C++ maybe but whatever :)
    http://readwrite.com/2011/06/06/cpp-go-java-scala-performance-benchmark

    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.

  • jay (unregistered)

    Bug report closed. Claimed bug is impossible. It works fine on my machine.

  • jay (unregistered)

    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?

  • jay (unregistered) in reply to chubertdev
    chubertdev:
    IN-HOUSE-CHAMP:
    If anyone thinks Java is bloated, point them to the .NET framework. :-)

    I just literally spit out my water at my desk. o_O

    My favorite nerd joke:

    "Knock knock." "Who's there?"

    [20 seconds later]

    "Java."

    "Knock knock." "Who's there?" "VIEWSTATE=231328903240983429ewrpoi903248930jkle9324rweqq342ilewoir09834210983jilreqkjlre9030984323490834293429234eiuoqewroiupweqr43289034218904231erjklweqrm;2q34p193274kljkery90dg7xtqw';lek6u';ljaefo8ysag8yqw'342rf;laskluplij24590dl;fgmqw4tpotsdflkjlkjewrkj,.gklsioasest43,.w.,maskl;jwaerkljewrmal;skjseerlakjesrlakesjasdlf435435askdfalksdfiuao9w4iur.asdfjao;seiuraslekmra;dsoijfalewkmr;aloierjalkaejrlkjsdalksdasdlkfjlkas" "ASP"

  • jay (unregistered) in reply to Nagesh
    Nagesh:
    chubertdev:
    If I had my way, the entire interwebs would be glorified text files. White background, black text.
    You get off my lawn this instant, young man!

    Black background, green text.

    (Or perhaps dark brown background, yellow text).

    Hmm, I don't know. I think punch cards are much more readable when they have a white background and black text.

  • jay (unregistered) in reply to jo
    jo:
    chubertdev:
    If I had my way, the entire interwebs would be glorified text files. White background, black text.
    what? no Pr0n?

    How anti-intellectual! A well-written sex scene can be far more exciting than any photograph.

  • Ronald (unregistered) in reply to jay
    jay:
    chubertdev:
    IN-HOUSE-CHAMP:
    If anyone thinks Java is bloated, point them to the .NET framework. :-)

    I just literally spit out my water at my desk. o_O

    My favorite nerd joke:

    "Knock knock." "Who's there?"

    [20 seconds later]

    "Java."

    "Knock knock." "Who's there?" "VIEWSTATE=231328903240983429ewrpoi903248930jkle9324rweqq342ilewoir09834210983jilreqkjlre9030984323490834293429234eiuoqewroiupweqr43289034218904231erjklweqrm;2q34p193274kljkery90dg7xtqw';lek6u';ljaefo8ysag8yqw'342rf;laskluplij24590dl;fgmqw4tpotsdflkjlkjewrkj,.gklsioasest43,.w.,maskl;jwaerkljewrmal;skjseerlakjesrlakesjasdlf435435askdfalksdfiuao9w4iur.asdfjao;seiuraslekmra;dsoijfalewkmr;aloierjalkaejrlkjsdalksdasdlkfjlkas" "ASP"

    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.

  • (cs) in reply to no laughing matter
    no laughing matter:
    Baboon:
    As opposed to what? .Net haha yeah yeah, C++ maybe but whatever :)
    http://readwrite.com/2011/06/06/cpp-go-java-scala-performance-benchmark

    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.

    +25 for Java.

  • Norman Diamond (unregistered) in reply to jay
    jay:
    Nagesh:
    chubertdev:
    If I had my way, the entire interwebs would be glorified text files. White background, black text.
    You get off my lawn this instant, young man!

    Black background, green text.

    (Or perhaps dark brown background, yellow text).

    Hmm, I don't know. I think punch cards are much more readable when they have a white background and black text.
    You don't need text to read a punched card. If you have enough experience, you don't even need rows 0 through 9 to be printed with their row numbers. You don't even need to be told which character set is in use because if it's text[*] you'll figure out which character set it is.

    [* In this posting, text means text, text does not mean binary the way IBM named the binaries that compilers feed to linkers.]

  • Kyle Huff (unregistered) in reply to no laughing matter
    no laughing matter:
    Baboon:
    As opposed to what? .Net haha yeah yeah, C++ maybe but whatever :)
    http://readwrite.com/2011/06/06/cpp-go-java-scala-performance-benchmark

    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.

    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.

  • AV (unregistered)

    Java is crap, Java programmers are crappier!

  • (cs) in reply to Kyle Huff
    Kyle Huff:
    no laughing matter:
    C++ still wins, but it requires extensive tuning, (...)

    C++ "Out-of-the-box" is slower than Java or Scala.

    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.

    That is exactly what it says. The C++ OPT is the heavily optimized and tuned version.

    From the original Google paper:

    google:
    C++ Tunings Doug Rhode created a greatly improved version, which improved performance by 3x to 5x. This version will be kept in the havlak_cpp_pro directory. At the time of this writing, the code was heavily dependent on several Google internal data structures and could not be open sourced. ... Java Tunings Jeremy Manson brought the performance of Java on par with the original C++ version. This version is kept in the java_pro directory. Note that Jeremy deliberately refused to optimize the code further, many of the C++ optimizations would apply to the Java version as well. ... CONCLUSIONS We find that in regards to performance, C++ wins out by a large margin. However, it also required the most extensive tuning efforts, many of which were done at a level of sophistication that would not be available to the average programmer.
  • jay (unregistered)

    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."

  • Norman Diamond (unregistered) in reply to jay
    jay:
    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 heard a speaker say "It's not whether you win or lose, it's how you play the game."

    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?

  • Arancaytar (unregistered)

    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

  • katastrofa (unregistered)

    [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".

  • instigator (unregistered) in reply to jay

    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.

  • instigator (unregistered) in reply to no laughing matter
    no laughing matter:
    Baboon:
    As opposed to what? .Net haha yeah yeah, C++ maybe but whatever :)
    http://readwrite.com/2011/06/06/cpp-go-java-scala-performance-benchmark

    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.

    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.

  • TRWTF is TRWTF (unregistered) in reply to instigator
    instigator:
    no laughing matter:
    Baboon:
    As opposed to what? .Net haha yeah yeah, C++ maybe but whatever :)
    http://readwrite.com/2011/06/06/cpp-go-java-scala-performance-benchmark

    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.

    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.

    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.

    instigator:
    I just don't buy that java (or any managed code) is easier to maintain.

    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?

    instigator:
    You still have to manually cleanup unmanaged resources and circular references manually; those issues can difficult to track down.

    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.

  • (cs) in reply to instigator
    instigator:
    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

    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.

    • other than Android

Leave a comment on “Hangin' On”

Log In or post as a guest

Replying to comment #:

« Return to Article