• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Which programming language should I learn?

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #41
    Originally posted by VectraMan View Post
    ... C++ programmers like to look down on Java/C#'ers; no matter how you look at it to be a good C++ programmer requires a greater degree of technical understanding and ability...
    I look down on C++ programmers because, as an ABAP developer, I get paid more than them.

    Funny though - in recent years ABAP has been developed such that I'm able to use some of the cool techniques I honed on C and C++.
    Down with racism. Long live miscegenation!

    Comment


      #42
      Originally posted by doodab View Post
      Well, don't forget that C#, Java (or C++.NEt) has a static compile phase that has just as much time to do all of the optimisations that any other static compiler can.
      Except it compiles into its intermediate format, which can't know what machine it's going to end up on and so can't be optimized for it.

      At runtime the JIT can additionally take advantage of machine specific optimisations and use live profiling data to perform automatic inlining, trade speed for size and so on. You might be able to do that during a static compile but it requires multiple compilation & profiling cycles and the final executable is only going to give optimum results on the specific hardware it's tuned for.
      I guess it's possible that it could optimize the code for the particular variant of Intel chip it ends up on, but all this must add to load time.

      I think the runtime also has some advantages when it comes to inlining because it has access to type information that the static compiler doesn't.
      A static compiler has the original source, so has far more information.
      Will work inside IR35. Or for food.

      Comment


        #43
        Originally posted by d000hg View Post
        No it isn't, no they don't. Not the good ones anyway. GC is for people that don't want to be bothered with memory allocation when there isn't a need to, which is most of us. Not to mention even in C++ it's considered bad habits to use new/delete rather than STL/boost except in special cases, so manual memory allocation isn't used in day-to-day C++ coding anyway.
        True, but that wasn't so much the case in the 90s when Java was going to revolutionise everything. But the C++ programmer can choose how to handle memory allocation, which mostly means using STL these days, whereas in Java and C# the programmer has no choice but to use GC with no real control over it. In C++, if you don't want to be bothered with memory allocation, you don't have to be.

        For high-end high-performance applications, the more control you have the better, and that's why C++ tends to be used.

        Why is it that of the three major browsers (probably the world's most used software), none of them are written in Java? And none of them are written in C#? If there really were productivity benefits and no speed penalty, you'd think one of Microsoft, Mozilla and Google would have cottened onto it.
        Will work inside IR35. Or for food.

        Comment


          #44
          Originally posted by NotAllThere View Post
          I look down on C++ programmers because, as an ABAP developer, I get paid more than them.

          .
          I look down on ABAP developers because their work is so dull and they don't earn as much as me.

          To answer the OP's question, learn Python: its easy to learn, powerful and fun.
          But anyone serious about development will eventually have to learn a handful of languages.
          Hard Brexit now!
          #prayfornodeal

          Comment


            #45
            Originally posted by VectraMan View Post
            Why is it that of the three major browsers (probably the world's most used software), none of them are written in Java? And none of them are written in C#? If there really were productivity benefits and no speed penalty, you'd think one of Microsoft, Mozilla and Google would have cottened onto it.
            Because:
            - their code bases all started many years ago when Java was less stable and .NET didn't exist
            - cross-platform GUI is a real PITA
            - .NET on other platforms is there but not as well developed
            - Java/.NET are available on fewer platforms than C++

            The main reason IMO is simply that nobody wants to write a brand new browser from the ground up - even Chrome as a newcomer is based on many existing libraries written in C/C++. Your hands are tied. Getting cross-platform native GUI is a close 2nd, I'd say.

            A browser on a PC certainly doesn't need high-performance C++, apart from optimized JS engines perhaps.
            Originally posted by MaryPoppins
            I'd still not breastfeed a nazi
            Originally posted by vetran
            Urine is quite nourishing

            Comment


              #46
              Originally posted by VectraMan View Post
              Except it compiles into its intermediate format, which can't know what machine it's going to end up on and so can't be optimized for it.
              Unless you know exactly what CPU you are targeting and have one you can perform profiling on the same is true of a static compile. Even between different CPUs in the same family you can find different "optimal" code due to e.g. variations in cache size and instruction timing, and if you pursue that level of aggressive optimisation to it's conclusion you can quite easily end up with something that runs slower that it otherwise would on other machines.

              Originally posted by VectraMan View Post
              I guess it's possible that it could optimize the code for the particular variant of Intel chip it ends up on, but all this must add to load time.
              It happens at run time. Load time is kept reasonable by loading and interpreting bytecode the first few times through the code, once the JIT compiler knows that a particular code path is frequently used it can set about compiling it to native code and optimising it. Of course there is nothing to stop the a JIT caching previously compiled code between invocations, although AFAIK most of them don't by default because of difficulties enforcing the security models, or because it's quicker to compile again than read previous results from disk.

              Originally posted by VectraMan View Post
              A static compiler has the original source, so has far more information.
              Can a static compiler inline calls made via an interface based on statistical analysis of running code? Or change it's mind later? Or inline code that isn't available at compile time? Or inline different code depending on what is optimal for the particular dataset in question? Or even cache results of expensive functions for the top N arguments? (I don't think either Java or C# does this but I know some bytecode based DB procedural languages do). There is a lot of stuff you can do based on watching running code that a static compiler just cannot do, because of all the information it doesn't have.

              When java came out it was certainly the case that it was considerably slower than compiled code, and I used to be of the same opinion as you, but I changed my mind. VMs are improving all the time and they have pretty much caught up now. I'm not saying JIT code is always faster, I'm saying it's not true that statically compiled code is always faster. It's a much more even contest than you think.
              Last edited by doodab; 30 May 2011, 09:52.
              While you're waiting, read the free novel we sent you. It's a Spanish story about a guy named 'Manual.'

              Comment


                #47
                Originally posted by sasguru View Post
                But anyone serious about development will eventually have to learn a handful of languages.
                WHS.

                In fact, they should be forced to.
                While you're waiting, read the free novel we sent you. It's a Spanish story about a guy named 'Manual.'

                Comment


                  #48
                  Originally posted by sasguru View Post
                  I look down on ABAP developers because their work is so dull ...
                  SAS... hmm. Well, if you find statistics interesting, I guess you would say that.
                  Down with racism. Long live miscegenation!

                  Comment


                    #49
                    Originally posted by NotAllThere View Post
                    SAS... hmm. Well, if you find statistics interesting, I guess you would say that.
                    15% of people find statistics interesting.
                    While you're waiting, read the free novel we sent you. It's a Spanish story about a guy named 'Manual.'

                    Comment


                      #50
                      Simples, innit?

                      asid = Right(C2d(Storage(D2x(ascb + 36),2)),3)
                      dpri = Right(C2x(Storage(D2x(ascb + 43),1)),3)
                      cscb = C2d(Storage(D2x(ascb + 56),4))
                      ascbejst = C2d(Storage(D2x(ascb + 64),8))
                      cputime = ascbejst / 4096 / 1000000
                      cpuhrs = cputime % 60
                      cpuhrs = Right(cpuhrs,3,' ')!!':'
                      cpumin = (cputime // 60) * 60 % 60
                      cpumin = Right(cpumin,2,'0')!!'.'
                      cpusec = cputime // 1
                      cpusec = Substr(cpusec,3,2,'0')
                      cpu = cpuhrs!!cpumin!!cpusec
                      assb = C2d(Storage(D2x(ascb + 336),4))
                      assbvsc = C2d(Storage(D2x(assb + 32),4))
                      vio = Right(assbvsc,8)
                      assbnvsc = C2d(Storage(d2x(assb + 36),4))
                      nonvio = Right(assbnvsc,8)
                      ascbjbns = C2d(Storage(D2x(ascb + 176),4))
                      Brexit is having a wee in the middle of the room at a house party because nobody is talking to you, and then complaining about the smell.

                      Comment

                      Working...
                      X