Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: For a newbie, C++ or Java or what?  (Read 13046 times)

0 Members and 1 Guest are viewing this topic.

Geek-9pm

    Topic Starter

    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
For a newbie, C++ or Java or what?
« on: February 10, 2009, 11:15:27 PM »
For a newbie, C++ or Java or what?

If a youngster comes to me and skds me what computer language should he study as his first or main language, What should I say.
Some of the things I had used are no longer very popular.

They say that the first language a person learns can influence his ability to write useful and practical programs that are easy to debug and maintain.
A few years ago Structured Programming was the order of the day.
But many popular programs do not enforce good structure. So they tell me. Never had time to make the program look nice. Just had to get it done.

It seems that now the thing today is use C++. Or maybe Java. (Do you spell it with a capital J?)  l.

So what should I tell a youngster? 
If I told him my most productive, commercial work was in
 DBASE, BASIC and Assembly his eyes might start to roll.
And he might say "That is so retro!"  ::)

Nobody even knows what Pl/M was.
So I did not put it in my list.


So what can I say? Anybody?

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: For a newbie, C++ or Java or what?
« Reply #1 on: February 10, 2009, 11:39:34 PM »
I'm almost tempted to say "batch programming" here LOL  ;D

if I was just starting, I'd go with VB .NET... I've ended up using VB6 for a long time, but I only really got into it while it was "waning" so to speak in favour of .NET- it was released in 98, after all.


So what should I tell a youngster? 
If I told him my most productive, commercial work was in
 DBASE, BASIC and Assembly his eyes might start to roll.
And he might say "That is so retro!"  ::)

If  he says that, then he knows the history of programming languages, and thus your task is completed  8)

C++ isn't really a good first language- but it is a natural step up after one learns C as a first programming language.
I was trying to dereference Null Pointers before it was cool.

Ironman



    Hopeful
  • Virtus, Veneratio, Fidelitas
  • Thanked: 15
    • Yes
    • My Personal Site
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: For a newbie, C++ or Java or what?
« Reply #2 on: February 11, 2009, 06:21:16 PM »
Personally I believe learning C is a waste of time. Although C is a smaller, less complex language than C++, and is consequently easier to master. However, it is probably easier to get up to speed with C++, if you make effective use of the standard library. Some find C to be more elegant than C++, others think it to be too "unsafe". C++ programmers generally feel that it has features that make it easier to write good, robust, readable and maintainable code in than in C.

If you do decide to learn C++, there is little point in learning C itself first. Personally I would learn Java first(that's what I did) and then try C++. If you know Java well you then already know a lot of C++ already.


ultimatum



    Intermediate
  • Thanked: 3
    Re: For a newbie, C++ or Java or what?
    « Reply #3 on: February 14, 2009, 06:13:25 PM »
    Quote
    If you know Java well you then already know a lot of C++ already.

    Same applies to C#. I've compared the two and the syntax is very similar in writing and plain simple. I find C# and Java to very easy to read unlike C++. But that's just me or may because I started learning C# before anything else.
    Its not what you know, its what you can do that counts!

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: For a newbie, C++ or Java or what?
    « Reply #4 on: February 14, 2009, 06:30:47 PM »
    that makes sense- C# is what Microsoft turned their J++ product into after the Sun lawsuit. Further enforcing this idea is the fact that the Early .NET Beta's had a new JVC compiler, IIRC.

    C++ programmers generally feel that it has features that make it easier to write good, robust, readable and maintainable code in than in C.

    If you know Java well you then already know a lot of C++ already.

    I disagree myself on both of these points- within reason. C++ can be used for maintainable code.... But this ability drops off dramatically when those C++ classes need to be exposed through COM. the number of classes doubles after adding this, via the inclusion of various Class Factories as well as the requirement of each class to implement a defined set of interfaces, Such as IUnknown and IDispatch. Wether this is made any easier by ATL is another question entirely.

    Additionally, Java and C++ use completely different paradigms.


    C++ allows you to write C compatible code- IE- no classes or objects. Java requires ALL codfe to be written in classes.

    C++ requires the programmer to manage memory. Java does so automatically via garbage collection.

    C++ allows multiple inheritance, Java allows only one inheritance- multiple implementation of interfaces only. this is good, though, since if your inheriting from multiple classes, something is usually designed badly.

    Lastly, C++ allows unmanaged pointers, whereby java will only let you make garbage collected references. Again- good for programming, but having the language run in a VM and constantly check references to object methods/fields can be the deal-breaker for time-critical applications.


    This is why I've always thought of Java as much more similar to Visual Basic. I'd even go so far as to say that VB6 is to COM what Java is to CORBA.

    I was trying to dereference Null Pointers before it was cool.

    Ironman



      Hopeful
    • Virtus, Veneratio, Fidelitas
    • Thanked: 15
      • Yes
      • My Personal Site
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: For a newbie, C++ or Java or what?
    « Reply #5 on: February 27, 2009, 10:04:29 AM »
    There are differences in Java and C++, but many(not all) concepts are the same in both languages; for example the concepts of data structures; trees, sets, maps, are extremely similar in both languages. What is was trying to say when I said
    Quote
    If you know Java well you then already know a lot of C++ already.
    I meant to say one could could make a fairly easy transition from C++ to learn Java. But I still stand by my statement that learning C is a waste of time. You may want to look over or read some things about C, but taking a class entirely about C is a waste of time.


    macdad-



      Expert

      Thanked: 40
      Re: For a newbie, C++ or Java or what?
      « Reply #6 on: February 27, 2009, 11:35:04 AM »
      for a beginner it should be BASIC or some dialect of it..(in my opinion)
      If you dont know DOS, you dont know Windows...

      Thats why Bill Gates created the Windows NT Family.

      Geek-9pm

        Topic Starter

        Mastermind
      • Geek After Dark
      • Thanked: 1026
        • Gekk9pm bnlog
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows 10
      Re: For a newbie, C++ or Java or what?
      « Reply #7 on: February 27, 2009, 11:49:06 AM »
      The academic people are down on BASIC.
      It, ah, sounds so,  ah ... basic.

      BC_Programmer


        Mastermind
      • Typing is no substitute for thinking.
      • Thanked: 1140
        • Yes
        • Yes
        • BC-Programming.com
      • Certifications: List
      • Computer: Specs
      • Experience: Beginner
      • OS: Windows 11
      Re: For a newbie, C++ or Java or what?
      « Reply #8 on: February 27, 2009, 11:57:43 AM »
      BASIC... that rules out anything after VB6.
      I was trying to dereference Null Pointers before it was cool.

      macdad-



        Expert

        Thanked: 40
        Re: For a newbie, C++ or Java or what?
        « Reply #9 on: February 27, 2009, 05:55:52 PM »
        BC,

        VB6 is just as great as .NET in my opinion(it doesnt bloat up your system as much as VB6)  ;)
        If you dont know DOS, you dont know Windows...

        Thats why Bill Gates created the Windows NT Family.

        BC_Programmer


          Mastermind
        • Typing is no substitute for thinking.
        • Thanked: 1140
          • Yes
          • Yes
          • BC-Programming.com
        • Certifications: List
        • Computer: Specs
        • Experience: Beginner
        • OS: Windows 11
        Re: For a newbie, C++ or Java or what?
        « Reply #10 on: February 27, 2009, 08:01:06 PM »
        BC,

        VB6 is just as great as .NET in my opinion(it doesnt bloat up your system as much as VB6)  ;)

         :o

        do you mean that the other way around?

        MSVBVM60.DLL: around 3MB

        .NET framework- ~23MB - for the redistributable.


        Installing these is totally different. all of Visual Studio 6 takes around 500MB- all of Visual Studio .NET (pretty much any version) usually weighs in around 3GB.

        Like I said if you think VB .NET and version <=VB6 are similar you haven't used VB6 even close to as deeply as I have... although I imagine that's a given. I'm just not about to throw out thousands of modules and classes just to jump on the latest microsoft bandwagon, because god knows when Microsoft will release some "new thing" that we all have to use.
        I was trying to dereference Null Pointers before it was cool.

        Geek-9pm

          Topic Starter

          Mastermind
        • Geek After Dark
        • Thanked: 1026
          • Gekk9pm bnlog
        • Certifications: List
        • Computer: Specs
        • Experience: Expert
        • OS: Windows 10
        Re: For a newbie, C++ or Java or what?
        « Reply #11 on: February 27, 2009, 08:20:14 PM »
        Quote
        VB6 is just as great as .NET

        I think VB6 is better that .NET,
         becaue ,NET is a cruel, oppressive monster that
        Microsoft wants to impose of on everyone.


        So that leaves out C++.

        As for plain C, just as hard to learn as Assembler.
        But without the advantages. Some Academic people say it is not a true High-Level language and does not encourage clear, logical development for use in a work group. Neither C or ASM is suitable for a teaching language.

        That you for your comments. After reading this,
        I would urge a newbie to go for Java.
        It is wildly used, and has structure.  :D

        Too bad I did not learn it.


        BC_Programmer


          Mastermind
        • Typing is no substitute for thinking.
        • Thanked: 1140
          • Yes
          • Yes
          • BC-Programming.com
        • Certifications: List
        • Computer: Specs
        • Experience: Beginner
        • OS: Windows 11
        Re: For a newbie, C++ or Java or what?
        « Reply #12 on: February 27, 2009, 08:24:01 PM »
        Quote
        VB6 is just as great as .NET

        I think VB6 is better that .NET,
         becaue ,NET is a cruel, oppressive monster that
        Microsoft wants to impose of on everyone.



        OMG! Geek...

        We AGREE on something 100%! I think this deserves a toast!  ;D

        I was trying to dereference Null Pointers before it was cool.

        Geek-9pm

          Topic Starter

          Mastermind
        • Geek After Dark
        • Thanked: 1026
          • Gekk9pm bnlog
        • Certifications: List
        • Computer: Specs
        • Experience: Expert
        • OS: Windows 10
        Re: For a newbie, C++ or Java or what?
        « Reply #13 on: February 27, 2009, 08:44:35 PM »
        I will has me some Gin over ice.
        Has me own bottle!
          :-*

        macdad-



          Expert

          Thanked: 40
          Re: For a newbie, C++ or Java or what?
          « Reply #14 on: February 28, 2009, 10:52:13 AM »
          DONT get me wrong! i still use VB6, didnt you notice my post?

          BC,

          VB6 is just as great as .NET in my opinion(it doesnt bloat up your system as much as VB6)  ;)
          If you dont know DOS, you dont know Windows...

          Thats why Bill Gates created the Windows NT Family.