Like Tree5Likes
  • 1 Post By phantomotap
  • 4 Post By Salem

What should I learn next?

This is a discussion on What should I learn next? within the C++ Programming forums, part of the General Programming Boards category; So I just finished my last assignment from my C++ class. I learned the usual, loops, arrays, structures, and classes/header ...

  1. #1
    Registered User
    Join Date
    Sep 2011
    Posts
    117

    What should I learn next?

    So I just finished my last assignment from my C++ class. I learned the usual, loops, arrays, structures, and classes/header files.

    Now I want to go the next step, but have little clue of where to go.

    I was thinking vectors (since I heard they are better than arrays for some reason) and/or Windows programming.

    Any reasons why I shouldn't do those or any suggestions on what to add?

    Thanks

    Edit: Also tried threads with Boost, wayyyy to complicated for me
    My Ctrl+S addiction gets in the way when using Code Blocks...

  2. #2
    - - - - - - - - oogabooga's Avatar
    Join Date
    Jan 2008
    Posts
    2,808
    Learn the entire C++ STL, etc. And all the C library as well.
    Then look into GUI programming.
    The cost of software maintenance increases with the square of the programmer's creativity. - Robert D. Bliss

  3. #3
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,498
    Try learning about template meta-programming, after which you can easily grasp the Standard Template Library, and most of the Boost libraries.
    Manasij Mukherjee | gcc-4.8.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



  4. #4
    Registered User
    Join Date
    Sep 2011
    Posts
    117
    Quote Originally Posted by oogabooga View Post
    Learn the entire C++ STL, etc. And all the C library as well.
    Then look into GUI programming.
    So these?

    C Library - C++ Reference
    STL Containers - C++ Reference

    Quote Originally Posted by manasij7479 View Post
    Try learning about template meta-programming, after which you can easily grasp the Standard Template Library, and most of the Boost libraries.
    Hmm can't find much online tutorials on it that I cannot read. To me anything with <> is a vector so I am assuming they are so. I'll learn vactors now they seem most important and then work my way up to oogabooga's suggestion then yours (increasing difficulty in my mind) thanks!
    My Ctrl+S addiction gets in the way when using Code Blocks...

  5. #5
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,498
    Quote Originally Posted by JonathanS View Post
    Hmm can't find much online tutorials on it that I cannot read. To me anything with <> is a vector so I am assuming they are so. I'll learn vactors now they seem most important and then work my way up to oogabooga's suggestion then yours (increasing difficulty in my mind) thanks!
    You do realize that vectors and other containers are based on templates ?

    At least get a basic idea. Templates - C++ Documentation
    Manasij Mukherjee | gcc-4.8.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



  6. #6
    Registered User
    Join Date
    Sep 2011
    Posts
    117
    Quote Originally Posted by manasij7479 View Post
    You do realize that vectors and other containers are based on templates ?

    At least get a basic idea. Templates - C++ Documentation
    Nope, what I said in my post is essentially all that I know. Thanks for the link.
    My Ctrl+S addiction gets in the way when using Code Blocks...

  7. #7
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,214
    Now I want to go the next step, but have little clue of where to go.
    You aren't at a position I'd recommend learning anything other than more C++.

    Once you've obtained mastery of programming language basics it will follow you everywhere. Of course, you'll never get to the point where you can actually master a new language in any unit of "24 hours", "48 hours", "7 days", "14 Days", and all those other implied miracles. That's a fantasy bad programmers tell themselves for pretend. You can get to the point where the basics of every language is all just sin and syntax.

    Without that mastery over the basics learning a library is complicated almost to the point of being nauseating because you'll constantly being trying to cope with unfamiliar facilities. With that mastery a library is just library. Sure, every library has its quirks. (Just as every language has its quirks.) Sure, you will not be able to trivially change libraries. But you will have a firm foundation to work with new libraries because you aren't likely to be unfamiliar with how the interface is used. It will not be an issue of "Which library do I learn first?" because you'll be properly prepared to learn any of them.

    If you are going to learn C++ for your first language, take the time to learn it well. Regardless of the language you've chosen, take the time to learn it well before trying to use higher level facilities written in that language. The approach will just prepare you better for learning new stuff.

    If you target is C++, read the following books and do all the exercises. When you can legitimately claim that you've done that you can program absolutely anything you want, in any language you want, with any libraries you have available. It'll just be a matter of time; you'll have all the skills you need to approach anything new in the programming world.

    Accelerated C++
    The C++ Standard Library
    Effective C++
    More Effective C++
    Effective STL
    Exceptional C++
    More Exceptional C++
    Exceptional C++ Style
    C++ Templates
    C++ Template Meta-programming
    Try learning about template meta-programming, after which you can easily grasp the Standard Template Library, and most of the Boost libraries.
    O_o

    manasij7479, that was horrible advice, and you should not give it to a newbie.

    Template meta-programming is essentially the worlds worst functional programming language which has no support for "monads". It is complicated, tiresome, and extremely difficult to debug. It has limited utility at the application level. The details of template meta-programming can be abstracted away by the library level making knowledge of it almost useless outside of actually developing libraries that can benefit from it.

    I could go on for a while.

    The standard template library uses very little template meta-programming and actually using the library requires none at all. You literally only need to understand how the generic interface can be used.

    The "Boost" library uses meta-programming in a lot of places as an implementation technique, but even then, you don't need to know meta-programming to use most of it.

    I'm really hoping that you have conflated template meta-programming and generic programming using templates. I can't stress this enough, you don't need to know template meta-programming to use or understand generic programming techniques. Even when building generic facilities, as for a library, only a small portion of template meta-programming (specifically those bits related to "CRTP" and "SFINAE") is necessary to get great results.

    I'm not saying that someone shouldn't learn template meta-programming. If they are building generics for future use some of it is even necessary. I'm only saying that someone new to C++ should hold off on learning it until they've already mastered all of the basics and much else besides.

    Soma
    manasij7479 likes this.

  8. #8
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,498
    Quote Originally Posted by phantomotap View Post
    manasij7479, that was horrible advice, and you should not give it to a newbie.

    Template meta-programming is essentially the worlds worst functional programming language which has no support for "monads". It is complicated, tiresome, and extremely difficult to debug. It has limited utility at the application level. The details of template meta-programming can be abstracted away by the library level making knowledge of it almost useless outside of actually developing libraries that can benefit from it.

    I could go on for a while.

    The standard template library uses very little template meta-programming and actually using the library requires none at all. You literally only need to understand how the generic interface can be used.

    The "Boost" library uses meta-programming in a lot of places as an implementation technique, but even then, you don't need to know meta-programming to use most of it.

    ...

    I'm not saying that someone shouldn't learn template meta-programming. If they are building generics for future use some of it is even necessary. I'm only saying that someone new to C++ should hold off on learning it until they've already mastered all of the basics and much else besides.

    Soma
    Someone who has learnt about "loops, arrays, structures, and classes/header files" and hopefully has a good grasp on it is definitely not a newbie.
    I was not recommending to learn all the ins and outs of generic programming, but just a basic idea.
    I'm speaking from experience that it is very difficult to comprehend how to use the standard library without a rudimentary idea of templates. (Imagine my surprise, an year ago, when I was introduced to the use of standard algorithms by someone here. Only after getting through a few template tutorials, I got the point. )


    I'm really hoping that you have conflated template meta-programming and generic programming using templates. I can't stress this enough, you don't need to know template meta-programming to use or understand generic programming techniques. Even when building generic facilities, as for a library, only a small portion of template meta-programming (specifically those bits related to "CRTP" and "SFINAE") is necessary to get great results.
    Yes.. and I'm still not clear about the distinction .. other than the former being a concept and the later being its implementation.
    Manasij Mukherjee | gcc-4.8.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



  9. #9
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,214
    is definitely not a newbie.
    O_o

    I was thinking vectors
    He may be a knowledgeable newbie, but he is still a newbie.

    At the point where he knows how to guide himself in furthering his own education he is no longer a newbie.

    I'm speaking from experience that it is very difficult to comprehend how to use the standard library without a rudimentary idea of templates.
    Understanding how the idea of generics work, the concept, and a little of how that is implemented by templates can be useful in using the "STL". I'm not arguing with that. That has nothing to do with template meta-programming. Though actually, most of the core "STL" facilities core concepts fall under the umbrella of "OOP"; the use of generics is just an implementation mechanism.

    Yes.. and I'm still not clear about the distinction .. other than the former being a concept and the later being its implementation.
    Well, you aren't clear about that either because that is wrong in a fundamental way.

    The trivial definition of meta-programming allows an umbrella that includes "generic programming". This, like "OOP", is due to the utility of the concept being blown out of proportion with everyone wanting a slice for a shot time. That overloaded definition, "Meta-programming is the act of writing programs that write other programs.", manages to be too abstract while implying too much.

    You should look at meta-programming as an umbrella where "generic programming with templates" and "template meta-programming" are two distinct categories.

    What you are talking about is generic programming and how C++ makes generic programming available in the form of templates. The concept in this situation is "generic programming". The implementation in this situation is "templates".

    The technique related to template meta-programming isn't about substitution. (That is simply a case of "generic programming".) Crucially, template meta-programming is about choice; a facility generated by template meta-programming is created at compile-time by running the input, examining the features a facility needs and grants, through a machine which chooses the best ways to go about building that facility.

    This distinction is clear, but problems with the distinction is obvious. Template meta-programming isn't necessary for generic facilities implemented with templates to be useful. (If you don't believe me, look at the classic definition for `std::swap'.) However, generic facilities can be made better by using template meta-programming. For that reason, it is pretty easy to conflate the two techniques. However, "generic programming with templates" relying on simple interface substitution is actually very easy while "template meta-programming" requires what is probably the ugliest purely functional programming language ever conceived to solve a problem that none intended it to solve.

    Soma

  10. #10
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by JonathanS View Post
    So I just finished my last assignment from my C++ class. I learned the usual, loops, arrays, structures, and classes/header files.
    Hmmm, that "classes" bit looks a little skimpy. If you haven't yet, do some stuff with inheritance and polymorphism until you are comfortable with both concepts. Eg, write a class with multiple inheritance, override inherited methods, write multiple classes with the same base and use them interchangeably, write virtual classes and inherit from them, etc.

    I think that is more fundamental than generic programming. You don't actually need to do generic programming in order to understand how <types> are specified for template constructors, such as vector and the other STL containers. Put another way: you do need to be competent using the major elements of the STL, but for the most part that does not require much knowledge of how templates work beyond specifying <types>. I don't really think generic programming has much application until you understand the fundamental methodologies and concerns of OOP.

    Phantomotap's book list looks pretty good. Good books go a lot more in depth than anything you will find on the web, and that's what you need.
    Last edited by MK27; 03-25-2012 at 03:13 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

  11. #11
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,649
    Never mind language constructs. Before you venture into more advanced territory, become at least proficient at using your debugger of choice.

  12. #12
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,484
    You need to learn how to use the tools you have to solve problems.

    Learning an ever increasing list of programming "facts" will just make you a walking encyclopaedia.

    Knowing "about" say std::vector is one thing. But if you can't make the design choice to use std::vector when appropriate, you're never going to be much of a programmer. No doubt very skilled at turning someone else's detailed design into code, but that is very much the bottom rung of the career ladder.

    So my suggestion is you hit the various programming puzzle and contest sites, maybe even an open source project, and apply what you know to solving actual problems.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  13. #13
    Registered User
    Join Date
    Sep 2011
    Posts
    117
    Quote Originally Posted by phantomotap View Post
    Accelerated C++
    The C++ Standard Library
    Effective C++
    More Effective C++
    Effective STL
    Exceptional C++
    More Exceptional C++
    Exceptional C++ Style
    C++ Templates
    C++ Template Meta-programming
    Ha you made this list very convenient

    Thanks, got all of them and starting reading them now!
    My Ctrl+S addiction gets in the way when using Code Blocks...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Do you ever try to learn too much?
    By Stonehambey in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 06-17-2008, 07:55 AM
  2. I need to learn more.
    By samus250 in forum C Programming
    Replies: 24
    Last Post: 03-26-2008, 04:08 AM
  3. Want to learn
    By Mobidoy in forum C# Programming
    Replies: 6
    Last Post: 05-22-2007, 12:57 PM
  4. Looking to learn C++
    By Fuzzy91 in forum C++ Programming
    Replies: 40
    Last Post: 04-13-2006, 02:38 AM
  5. You have to learn C in order to learn C++
    By gandalf_bar in forum A Brief History of Cprogramming.com
    Replies: 20
    Last Post: 07-16-2004, 10:33 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21