Newbie question about different languages and what they can do (mainly C++)
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 16

Thread: Newbie question about different languages and what they can do (mainly C++)

Hybrid View

  1. #1
    Join Date
    Nov 2012
    Posts
    3

    Newbie question about different languages and what they can do (mainly C++)

    Hey

    I have been testing different languages for a while now. I have
    built up a good amount of knowledge in web page design (nothingtoo fancy though) and I have tried some C++. I am in high
    school and I want to learn a language that I can use as a base. I have read that C++ is the language to learn because you can
    adapt from it to whatever language your company uses. I know
    some of the basic (Functions and Classes...) but it seems to be
    a completely console programing language? When I was trying
    Android development, it used Java in the background and used XML for the display. Would I be right in saying that C++ is meant to be used with another language for making better looking programs in
    the same way that XML and Java work in android?

    Sorry if this is the wrong place for the question...
    Thanks

  2. #2
    Join Date
    Mar 2009
    Location
    Riga, Latvia
    Posts
    128

    Re: Newbie question about different languages and what they can do (mainly C++)

    Indeed C++ doesn't provide any libraries for GUI by default. In Windows you can use WinAPI and MFC for GUI but in this case you'll lose portability. There are third-party widget toolkits for C++ - Qt, wxWidgets, Ultimate++ to name a few. They are implemented in C++ but they are not part of the language standard.

    Java primarily uses AWT for GUI, not XML at least for desktop apps. If you need a language with GUI routines I'd peek Java or C#. (I'm using Java heavily.) It's useful for research projects etc.

    If you just need to get familiar with modern trends in programming C++, Java and C# are overall very similar. If you want to try something significantly different, try Haskell or Prolog.

  3. #3
    Join Date
    Jul 2005
    Location
    Netherlands
    Posts
    2,013

    Re: Newbie question about different languages and what they can do (mainly C++)

    Quote Originally Posted by SenatorMagenut View Post
    I have been testing different languages for a while now. I have
    built up a good amount of knowledge in web page design (nothingtoo fancy though) and I have tried some C++. I am in high
    school and I want to learn a language that I can use as a base. I have read that C++ is the language to learn because you can adapt from it to whatever language your company uses.
    If you want to have a career in programming, C++ is certainly a very valuable language to learn. Many other mainstream languages become relatively easy to learn once you have a good understanding of C++; the other way round is often not the case. Also, I believe that the fact that many errors in C++ lead to undefined behavior can help you to learn to write high quality code.

    However, C++ is not an easy language to learn. It is certainly not something you can learn by trial-and-error or just following an online tutorial. The language is pretty large, some parts of it are complicated, there are many books and people teaching it in a stupid way and the language library is quite limited, meaning you will have to learn to use third-party libraries if you want to develop a useful program. Most prominently, if you want to create GUI programs, you will have to learn to use one of the GUI libraries or application frameworks (Qt, MFC, wxWidgets,...), which is not really something you can do until you have a reasonable understanding of the basics of C++. If you want to learn C++, I'd advice trying to stick to more mathematically oriented problems to practice with at first.
    Cheers, D Drmmr

    Please put [code][/code] tags around your code to preserve indentation and make it more readable.

    As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky

  4. #4
    Join Date
    Nov 2012
    Posts
    3

    Re: Newbie question about different languages and what they can do (mainly C++)

    Ty Guys

    Ill keep up C++ then.

  5. #5
    Join Date
    May 2009
    Posts
    2,413

    Re: Newbie question about different languages and what they can do (mainly C++)

    Quote Originally Posted by SenatorMagenut View Post
    I am in high
    school and I want to learn a language that I can use as a base.
    Since you've had some exposure to Java already why not stick to it? It's still the most popular of the modern general purpose languages,

    http://www.tiobe.com/index.php/conte...pci/index.html

    If you're interested in a future in programming you shouldn't do too much programming in high school. Instead concentrate on getting good grades. Then go to college and get a degree in computer science.

  6. #6
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    3,882

    Re: Newbie question about different languages and what they can do (mainly C++)

    Quote Originally Posted by nuzzle View Post
    Since you've had some exposure to Java already why not stick to it? It's still the most popular of the modern general purpose languages,

    http://www.tiobe.com/index.php/conte...pci/index.html
    Statistics like this make me chuckle. I wonder how they got to their ratings and what "popular" in this context means.

    If it means "what would a programmer pick as preference", then it's pretty much a moot statistic, there are real life concerns at stake when picking a language, and often your "preference" isn't even an option for a certain project.
    This would seem to be the case, as a language like COBOL and Fortran aren't even in the list when they are quite present in real world scenarios. At the same time, some languages seem to be overly present when their "real world" use is much more limited than what would be listed here.

    And if it's "user preference", then whatever statistic they have come up with is going to be entirely biased towards their user base.


    Going by code produced in a year wouldn't even help, some languages are considerably more verbose than others. That's assuming you could even get at this statistic, the majority of code being produced is proprietary. You could potentially count all the open source projects, but open source projects tend to focus around development with open sourde tools, so again, is going to be biassed.


    Bottom line:
    Pick a language... Any language, and learn how to master it. Accept that your language of choice will be (very) good at some things, and lousy or impossible at others. That's why it's good to know several languages. And it's especially good if you know languages that work well together and are good at solving different things. Nobody says a good project needs to be done in a single language. And a lot of 'bigger' projects will be a combination of several languages. A main UI language, a backend language, a database language (SQL is by far the winner here), and you probably will end up with some form of scripting in more complex/larger projects.

  7. #7
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    3,882

    Re: Newbie question about different languages and what they can do (mainly C++)

    Quote Originally Posted by nuzzle View Post
    Since you've had some exposure to Java already why not stick to it? It's still the most popular of the modern general purpose languages,

    http://www.tiobe.com/index.php/conte...pci/index.html
    Statistics like this make me chuckle. I wonder how they got to their ratings and what "popular" in this context means.

    If it means "what would a programmer pick as preference", then it's pretty much a moot statistic, there are real life concerns at stake when picking a language, and often your "preference" isn't even an option for a certain project.
    This would seem to be the case, as a language like COBOL and Fortran aren't even in the list when they are quite present in real world scenarios. At the same time, some languages seem to be overly present when their "real world" use is much more limited than what would be listed here.

    And if it's "user preference", then whatever statistic they have come up with is going to be entirely biased towards their user base.


    Going by code produced in a year wouldn't even help, some languages are considerably more verbose than others. That's assuming you could even get at this statistic, the majority of code being produced is proprietary. You could potentially count all the open source projects, but open source projects tend to focus around development with open sourde tools, so again, is going to be biassed.


    Bottom line:
    Pick a language... Any language, and learn how to master it. Accept that your language of choice will be (very) good at some things, and lousy or impossible at others. That's why it's good to know several languages. And it's especially good if you know languages that work well together and are good at solving different things. Nobody says a good project needs to be done in a single language. And a lot of 'bigger' projects will be a combination of several languages. A main UI language, a backend language, a database language (SQL is by far the winner here), and you probably will end up with some form of scripting in more complex/larger projects.

  8. #8
    Join Date
    May 2009
    Posts
    2,413

    Re: Newbie question about different languages and what they can do (mainly C++)

    Quote Originally Posted by OReubens View Post
    Statistics like this make me chuckle. I wonder how they got to their ratings and what "popular" in this context means.
    Well, I prefer any statistics over handwaving. You'll find the TIOBE rating methodology at the site.

    The OP didn't ask for general language selection principles. He's in highschool and wants to "learn a language that I can use as a base". Apart from the dangers of becoming too interested in programming flunking everything else, I think Java is the best choise overall. My main motivation is that it's widely used in education. It's the language the OP will benefit the most from knowing well where he's at.
    Last edited by nuzzle; November 23rd, 2012 at 02:09 AM.

  9. #9
    Join Date
    Oct 2008
    Posts
    1,132

    Re: Newbie question about different languages and what they can do (mainly C++)

    Quote Originally Posted by nuzzle View Post
    Well, I prefer any statistics over handwaving. You'll find the TIOBE rating methodology at the site.
    I don't. A statistic should always make clear what its exact purpose is in order for it to be meaningful ( and the term "popularity" definitely doesn't convey any specific aim ). The reason being that a statistic is a kind of compression method where you lose information to focus on specific global fature of a bigger population. As OReubens pointed out, by dropping the right amount of information you can prove quite everything making vaguely-aimed statistics at best meaningless and at worst misleading, indipendently of how rigorously the statistics has been calculated. The purpose of a statistics is most important, then how it should be computed follows trivially by application of probability theory.

  10. #10
    Join Date
    May 2009
    Posts
    2,413

    Re: Newbie question about different languages and what they can do (mainly C++)

    Quote Originally Posted by superbonzo View Post
    I don't.
    Well, in line with my argumentation, I would feel more confident you were right if one thousand people agreed with you.

    Lots of independent people from all walks of life are more likely to be closer to the truth than one person alone. And the more different, direct and indirect indicators you weight in the more likely you are to spot trends correctly. You can measure almost anything to get conclusive information about almost everything. Check out the faschinating field of Multivariate Statistics if you want to know more.

    For example after having consulted TIOBE I'm very confident Java is still very popular and Objective-C is advancing. More so than I would ever be after hearing it from any one handwaving expert, how ever renowned.
    Last edited by nuzzle; November 24th, 2012 at 01:30 PM.

  11. #11
    Join Date
    Jan 2009
    Posts
    1,689

    Re: Newbie question about different languages and what they can do (mainly C++)

    It's not true that Android dev is done in Java. The SDK is java, most apps are written in it, but the system supports libraries that can be written in any language. Games are usually written in C++ and only the part that interacts with the OS is ported to the native language (java for android, cocoa for iOS.) This is how Angry Birds works on both Android and iOS, even though I'm sure that there is one code base.

  12. #12
    Join Date
    Nov 2012
    Posts
    1

    Re: Newbie question about different languages and what they can do (mainly C++)

    good one text for the day.Name:  housetwoandone.jpg
Views: 61
Size:  9.7 KBName:  housetwoandone.jpg
Views: 61
Size:  9.7 KB

  13. #13
    Join Date
    May 2009
    Posts
    2,413

    Re: Newbie question about different languages and what they can do (mainly C++)

    Quote Originally Posted by superbonzo View Post
    I wonder what do you mean by this because, read literally, it's wrong both in theory and practically
    I exaggerated somewhat to be more incisive but that's a common way to get a point across. And I did qualify my statement by refering to where it's properly treated.

    This is an informal setting. If you require people to produce dissertations you're in the wrong place.

    Yeah, it's called conformism
    One zillion flies cannot be wrong - eat sheit!

    That's conformism. Mere knowing what many flies eat is not, it's statistics.

    I find your argumentation unfocused. Do you consider exactly the TIOBE index irrelevant or do you disqualify statistics in general as a source of information for decision making? Do you dispute the ability of statistical methods to mine information out of large data sets or have you maybe even lost faith in the law of large numbers? You seem in need of a compass.
    Last edited by nuzzle; November 26th, 2012 at 02:46 AM.

  14. #14
    Join Date
    Oct 2008
    Posts
    1,132

    Re: Newbie question about different languages and what they can do (mainly C++)

    Quote Originally Posted by nuzzle View Post
    Do you consider exactly the TIOBE index irrelevant or do you disqualify statistics in general as a source of information for decision making?
    I consider good statistics the sole and only source of information for decision making, but I consider statistics good if and only if they are based on the precise statement of their purpose; in other words, what's the exact question they are trying to answer, defined in a sufficiently rigourous way in order to make the translation into a probabilistic statement straightforward. The very idea of "popularity" does not fulfil the latter requirements.

    Conversely, bad statistics gives at best no information and at worst could convey false meaning, making it potentially worse than liberally acquired opinions ( or "handwaving" as you call it ).

  15. #15
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,273

    Re: Newbie question about different languages and what they can do (mainly C++)

    You know, this sounds pretty sensible to me:
    Quote Originally Posted by nuzzle
    Since you've had some exposure to Java already why not stick to it?
    This is the point of contention:
    Quote Originally Posted by nuzzle
    It's still the most popular of the modern general purpose languages,
    I do not think that whether Java is the most popular or 20th most popular really matters as to its suitability in itself for a beginner to use for learning, except that... popular languages tend to have better support in terms of material and people with knowledge available for a beginner to learn from, and that it may have good features, library facilities etc that contributed to why it is popular, and that the beginner would have better chances of getting his/her hands dirty by contributing in some small way to a project written in that language. In this, the exact notion of popularity and hence the resulting ranking matters less than the fact that the underlying reasons for "popularity" are the important aspects.

    So yeah, I agree with superbonzo: what is the purpose of quoting that statistic? State it and move on. Beyond this, the argument about statistics here is just a distraction. Doubtless we would have found more reasons (and statistics to support them) for Java or to suggest another programming language had the effort been put into that instead of discussing a particular statistic.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center