Thread: What's up with Java programmers, anyway?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    >> But I guess if you have a power trip talking about your supremacy over someone else based on what language they code in

    I had hoped that I made it clear (later in the thread, at least) that I was just joking about the inferiority of Java programmers.

    >> But once I was forced to use it at work I really enjoyed having a library to do every little thing I can think of for me, why reinvent the wheel if you don't have to?

    The same could be said of C++, actually. There are thousands of free software libraries out there that can do everything that Java can do.

    >> If their library or data structure didn't fit my needs exactly I could simply EXTEND IT and MAKE IT BETTER!

    Sure, as long as you can squeeze it into a single-inheritance scheme.

    >> Oh wait so your saying my code can run on Windows, *nix, and even z/OS? Sounds neat to me!

    And C++ doesn't?

    >> (even when speed matters)

    Unless you're talking about *compiled* bytecode then that's just not true. Besides being interpreted, Java uses stack-based manipulation of operands, which is, by definition, slower than register-based execution.

    >> Look at C#, what language does that remind you of? Kind of looks like they were taking a few neat features from the java language. I also realize java took some neat features from other languages before it as well.

    I suppose it's a matter of opinion, but I see nothing revolutionary about the "features" of the Java language. Toothless and clumsy, more appropriately.

    >> Also out of curiosity ... what was the problem that Java couldn't do but C++ could? or as you said people were confused on why you would do such a thing?

    I'm currently working on a project that requires some Java coding, and I was seeking strictly Java-related advice on that particular forum. What I was actually commenting about was the clueless responses I was getting from the members there. Incidentally, seeking help elsewhere, I was able to locate much better advice, so I suppose it was just a "bad bunch" of posters making my life miserable (and thus fueling the apparent stereotype).

    >> I use to bad mouth java before I even used it simply because I was young and dumb and didn't even realize all the power java had to offer.

    To be sure, Java certainly does have it's uses, and it's overall vision of interoperability is quite admirable. In that respect, I would even go as far as to say that it has fundamentally changed the face of software development. Still, the language itself is rather limited, and could have been much better, IMO.
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  2. #2
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Quote Originally Posted by Sebastiani View Post
    To be sure, Java certainly does have it's uses, and it's overall vision of interoperability is quite admirable. In that respect, I would even go as far as to say that it has fundamentally changed the face of software development. Still, the language itself is rather limited, and could have been much better, IMO.
    Java was originally intended to be a full implimentation of C/C++ that could execute in a VM so as to protect the local machine from potentially malicious code. It never got that far of course. It turns out that a fully interpreted C/C++ machine was extremely slow on the hardware of the day (mid 90's 286-486/early pentiums) so the language never fully realized that goal. A lot of the tradeof's to get it to execute at decent speed have become inherent weaknesses in the language. Unfortunately there is so much code out there for java that it probably wont ever die, and as long as there is a VM language available that is more fully developed any new fledgling effort to build a true VM version of C/C++ will probably not receive any notice.

  3. #3
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Java was originally intended to be a full implimentation of C/C++ that could execute in a VM so as to protect the local machine from potentially malicious code.
    I don't know where you dig up all your stories.


    I have some idea, though ...
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  4. #4
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Quote Originally Posted by CornedBee View Post
    I don't know where you dig up all your stories.

    I have some idea, though ...
    Memory, I was around in those days and had some discussions on usenet with some of the guys at Sun regarding java (long before usenet turned to complete crap).

    Quote Originally Posted by Mad_guy View Post
    Can you explain some of these?
    e.g. stack based variable handling, which on a modern machine makes it run slower, was faster back then because RAM was more constrained, so implimenting the equivelant of a paging system for the VM was thrown out, because the paging routines themselves consumed processor cycles. While this could be fixed with a rewrite of the VM, that isnt likely to happen, and it may break existing code that depends on such behaviors.
    Last edited by abachler; 05-27-2009 at 06:07 AM.

  5. #5
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    >> You were able to write one version of the C/C++ program and have it run on windows, *nix, and z/os?

    Not the binary, of course, but certainly the source code (neglecting, of course, inline assembly and whatnot).

    >> I don't know where you dig up all your stories. I have some idea, though ...

    Care to let us in on your hunch?
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  6. #6
    Registered User
    Join Date
    Sep 2008
    Posts
    47
    Wow CornedBee, I remember you when I was like 14 on VBForums that was like 10 years ago

  7. #7
    Disrupting the universe Mad_guy's Avatar
    Join Date
    Jun 2005
    Posts
    258
    A lot of the tradeof's to get it to execute at decent speed have become inherent weaknesses in the language.
    Can you explain some of these?

    Either way, there's a bunch of cruft in Java these days to retain backwards compatibility - these days if I write for the JVM, I would really look at clojure as much as possible. The JVM is only getting faster too (which is nice,) I hope the new garbage collector they've developed pays off (see Garbage First Garbage Collection if you're into that kind of thing.)
    operating systems: mac os 10.6, debian 5.0, windows 7
    editor: back to emacs because it's more awesomer!!
    version control: git

    website: http://0xff.ath.cx/~as/

  8. #8
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    When I'm programming in Java I miss C++ (templates instead of generics, pointers, etc). When I'm programming in C++ I miss Java (mostly the RTTI stuff, sometimes the libraries). Sometimes when I'm programming in C++ I miss Perl (regular expressions, easy-to-use lists and hashes).

    I'm sure the same thing happens to other people.

    I think knowing a lot of programming languages can only be a good thing. If you find yourself missing features in some language too much, maybe you should switch to that language.

    And CBoard's great. I have no doubt I would be a much worse programmer if I'd never been to CBoard.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  9. #9
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    Sometimes when I'm programming in C++ I miss Perl
    I hear they have support groups for masochism. Perl brings nothing but pain.

  10. #10
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by bithub View Post
    I hear they have support groups for masochism. Perl brings nothing but pain.
    To know her is to love her.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  11. #11
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Perl brings nothing but pain.
    I don't write large programs in Perl, but it's great for twisting and mutating text in strange ways. :P
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  12. #12
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    When I see Perl, I want to hurl.
    Sure, it can do some cool things, but god damn! Did they have to make it so ugly?
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

  13. #13
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by dwks View Post
    I don't write large programs in Perl, but it's great for twisting and mutating text in strange ways. :P
    Shhh. I had to sneak this over from perlmonks. It is the number one post of all time there, by some NASA guy ("eyespoplikeamosquito") celebrating the launch of a Saturn rocket:
    Code:
    #!/usr/bin/perl
                                                                               ;;;;;;
                                                                           ;;;;;;;;;;;
                                                                       ;;;;;;;;;;;;;;;
                                                                    ;;;;;;;;;;;;;;;;;
                                                                 ;;;;;;;;;;;;;;;;;;;
                                                               ;;;;;;;;;;;;;;;;;;;;
                                                             ;;;;;;;;;;;;;;;;;;;;;
                                         +$I=sub{+s+^+     ;;;;;;;      ;;;;;;;;;
                                      $"x$_[1]+gem;$/x$_#   ;;;;        ;;;;;;;;
                                   [0].$_.$/};$W=sub{$~=!q~            ;;;;;;;
                                ~.pop();system($^O=~Win?ClS:#         ;;;;;;;
                              'clear'),print,select$Z,$Z,$Z,!"       ;;;;;;
                             "||$~for@_};$H=sub{+join$/,map($_#     ;;;;;;
                            x$_[0],pop=~m-.+-g),!_};$_=!Mima,s--   ;;;;;
                           "@{['=9+)w'^RINGS]}\%;local@{[Saturn^# ;;;;;
                          wNXIBP]}"-see;s-^#!..+?$/(?=$"+;)--is  ;;;;
                         y-;-'-;s-\w-~-gi;$S=$_;#--Beautiful]  ;;;;
                         @S=m-.+-g;$N=1+.6-!th_,$--=-82-$---  ;;;
                        $_.=$"x-(y---c-$-)for@S;$R=sub{$i#  ;;;  -d
                        =0;join$/,map{$j=$%;join!_,grep#  ;;;  Rhea
                        !($j++%$_[$%]),m-.-g}grep!($i#  ;;;  -Titan
                        ++%$_[0]),@S};$L=join!_,map#  ;;;  -Huygens
                        ~~reverse.$/,@S;@R=(&$I(q-  ;;;  -&&20,051,
                        $_=_^q-q-),&$I(20,41-!q-  ;;;  -,$_=F|K),$
                        I->(15,31,$_=&$R(4-!q-  ;;;  -)),&$I(13-!"
                      ;;",28,$_=&$R(3)),&${  ;;;  _^_^I}(10,20-!"
                    ;;;;;",$_=$R->(2)),q-  ;;;  -&&$S);@O=map&{"
                  ;;;;;;  "&&$H}($_,&${  ;;;  R.!-_}($_))x$_,!"
                 ;;;;;     "+2..2*~~2  ;;;  @Y=reverse@R#Dione
               ;;;;;;       &${m--  ;;;  S|A|T|U}(@R,$N)||!q-
             ;;;;;;;          b-  ;;;  &$W(@O[0,1,2,1,0!=!q-
            ;;;;;;;            ;;;;  -],!1!~~1);&$W($S.!q-
          ;;;;;;;;;        ;;;;;  -,$L,0.16)for$%..5+!q-
         ;;;;;;;;;;    ;;;;;;;;;    Cassini-;&{$W||q-
        ;;;;;;;;;;;;;;;;;;;;;;         -}(@Y,1.6)
       ;;;;;;;;;;;;;;;;;;;;
      ;;;;;;;;;;;;;;;;;;
     ;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;
    ;;;;;;;;;;;
      ;;;;;;
    If you know any perl at all, this will be the most insane thing you have ever seen. I almost lost my mind and jumped out the window. Just run it in a terminal if you have a *nix perl installation. It takes about 30 seconds....I *promise* nothing bad will happen.....even if you don't know perl, it is quite funny to watch.



    ps. cpjust is a loser xP. SHHHH
    Last edited by MK27; 06-10-2009 at 09:55 PM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  14. #14
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Wow, that's amazing! I'm always amazed at what people can do with obfuscated code. (I had kind of hoped that each successive frame was Perl code to generate the next one, but that would have been beyond impossible I suppose. It's impossible enough!)

    I wouldn't put that down to Perl alone, though. I saw a C program once which calculated PI (without the benefit of math.h), and the text of the code was a circle.

    Since we're alternatively bashing and uplifting Java and Perl here, anyone else have any other favourite/hated languages? Haskell, Lisp, assembly, HTML?
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  15. #15
    Registered User
    Join Date
    Aug 2008
    Location
    Belgrade, Serbia
    Posts
    163
    That's insane! :O
    Vanity of vanities, saith the Preacher, vanity of vanities; all is vanity.
    What profit hath a man of all his labour which he taketh under the sun?
    All the rivers run into the sea; yet the sea is not full; unto the place from whence the rivers come, thither they return again.
    For in much wisdom is much grief: and he that increaseth knowledge increaseth sorrow.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. java for c++ programmers book
    By qwertiop in forum Tech Board
    Replies: 3
    Last Post: 05-18-2007, 03:17 PM
  2. C#, Java, C++
    By incognito in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 10-05-2004, 02:06 PM
  3. Do programmers still like Java ?
    By dot_rain in forum Tech Board
    Replies: 3
    Last Post: 11-23-2003, 09:44 AM
  4. Calling all Java programmers...
    By face_master in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 04-14-2002, 05:43 AM
  5. Programming Puns
    By kermi3 in forum A Brief History of Cprogramming.com
    Replies: 44
    Last Post: 03-23-2002, 04:38 PM