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

  1. #61
    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.

  2. #62
    Registered User
    Join Date
    Sep 2008
    Posts
    47
    Quote Originally Posted by zacs7 View Post
    > Also out of curiosity ... what was the problem that Java couldn't do but C++ could?
    Women.






    Boom Tish.
    haha, nicely done.





    I apologize I didn't read later that you were just joking about it.


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

    And C++ doesn't?
    You were able to write one version of the C/C++ program and have it run on windows, *nix, and z/os?
    Last edited by mr_coffee; 05-26-2009 at 01:38 PM.

  3. #63
    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. #64
    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;
    }

  5. #65
    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

  6. #66
    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/

  7. #67
    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.

  8. #68
    Hail to the king, baby. Akkernight's Avatar
    Join Date
    Oct 2008
    Location
    Faroe Islands
    Posts
    717
    Quote Originally Posted by zacs7 View Post
    > Also out of curiosity ... what was the problem that Java couldn't do but C++ could?
    Women.






    Boom Tish.
    LOL! Pwnage! xD
    Currently research OpenGL

  9. #69
    Registered User Sharke's Avatar
    Join Date
    Jun 2008
    Location
    NYC
    Posts
    303
    Can I just say, with regards to programming forums, this is probably the best I've ever visited. Mind you the quality of some forums is just atrocious. The worst ones in my opinion are the ones where NOBODY uses code tags even though they're available. I've even posted a question on such a forum asking why nobody uses them and gotten zero replies, like the question just went right over their heads.

    The reason why I stick around here is because the level of knowledge seems to be much higher than on other forums and I learn so much just by reading a few threads every day.
    Last edited by Sharke; 06-08-2009 at 10:33 PM.

  10. #70
    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.

  11. #71
    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.

  12. #72
    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

  13. #73
    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.

  14. #74
    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

  15. #75
    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

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