Recoomended order of learning boost...

This is a discussion on Recoomended order of learning boost... within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I have the boost library and have gotten it built and everything but need some advice on the order I ...

  1. #1
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901

    Recoomended order of learning boost...

    I have the boost library and have gotten it built and everything but need some advice on the order I should learn it to get kind of a full understanding of it. I'm not sure if all the libraries are meant to be interconnected but I know there are some less essential libraries. Any recommendations?

  2. #2
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,579
    I think you just read and go. Boost is in fact a collection of libraries. Some small, some large. Many quiet easy, others quiet complicated. So, it's not one can learn how to use boost. It's more one can learn how to use its individual libraries. The fact all libraries included attempt to follow the same Boost guidelines and practices helps this process.

    My initiation with boost started with the documentation as I decided to read at least the introduction on each library. As I did so, I immediately recognized uses for some libraries and skipped others entirely unknowing at the time of their usefulness. You should try that. Boost documentation is excellent.

    Other than that, make sure you don't skip

    - the smart pointer templates,
    - the regex library,
    - pointer containers,
    - min-max library,
    - boost::any
    - boost:array
    - the generalized binders library, the boost::binder and functional library,
    - iterators library

    These are, of the top of my head, some of the most useful and that I find myself using more often. But there's a whole bunch of other cool stuff in there.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  3. #3
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    I'm learning from the documentation. Unfortunately it doesn't covver compile time errors XP

  4. #4
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,579
    Hehe.... shot them on the C++ board. Almost everyone in here uses boost, latecomer
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #5
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by indigo0086 View Post
    I'm learning from the documentation. Unfortunately it doesn't covver compile time errors XP
    The actual errors that come out of a compiler when "messing up" with templates is often quite different for compiler A than compiler B, so it would be quite hard for the documentation to cover even the simpler forms, never mind what happens if you have really complicated compile time problems. Unless you mean compile time errors by boost itself [e.g using #error in a header file - those should be documented by the provider of the code, preferably both in the header file and in the documentation].

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  6. #6
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    Quote Originally Posted by Mario F. View Post
    Hehe.... shot them on the C++ board. Almost everyone in here uses boost, latecomer
    Hey man, I'm doing this in between my Java software Eng project, personal openGL projects and all that jazz. Break me a give...

  7. #7
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    The libraries aren't at all interconnected. There are a few library-building libraries that are used a lot in the others, but they're not necessary to understand the usage.

    I'd add Boost.Variant to the essentials Mario listed. Superficially similar to any, it has actually a very different application domain.
    Also, Boost.Optional.

    If you want to understand the Boost code, then you need - aside from a very good understanding of metaprogramming in general - to understand the Boost.Preprocessor library (a "standard library" for preprocessor metaprogramming), Boost.MPL (a "standard library" for template metaprogramming), and most recently Boost.Proto (a framework for creating expression template libraries - Boost.Spirit v2, Boost.Xpressive, and the next version of the binders and lambdas are based on it).
    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

  8. #8
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    The idea of metaprogramming always escapes me. I see it all the time but don't fully understand the concept. Do you recommend the beyond the standard library book?

  9. #9
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    For metaprogramming, I recommend "Modern C++ Design" and "C++ Templates".

    The core idea is two-fold. One is the generation of code that would be tedious or error-prone to write by hand, but can be the result of a program. Because it's a program generating a program, it's a meta-program. C++ has the interesting property that, with macros and templates, there are actually two metaprogramming facilities in the language, with different mechanisms and capabilities.
    The other is to take code the user writes and modify it to become something else - something more efficient, perhaps. One example would be the expression templates in the Blitz C++ matrix library. Basically, it takes the instruction of the user to "perform computation X on A and B" and turns it into "create an object that performs X on A and B as needed".
    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

  10. #10
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    all this searching on C++ metaprogramming has had me encounter some angry peoples.

  11. #11
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    Also they don't tell you what libraries to include aside from boost. Like you need winsock32 to use the Asio lib but it doesn't tell you that in the docs.

  12. #12
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,579
    Hmm... winsock32 is needed because without it you can't put the OS talking with the network layer. You will have the same requirements on any other operating systems supported by Boost. It's more or less like trying to use wxWidgets on windows without the Win32 API.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  13. #13
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    true, but I wouldn't have known that without google, I'm not familiar with win32 APIs.

  14. #14
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    The ASIO documentation is not perfect. Other libraries, like MPI, Regex and IOStreams, do tell you what else they need.
    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

  15. #15
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    *sigh* never mind.
    Last edited by indigo0086; 07-22-2008 at 11:37 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Warnings about initializer order
    By CodeMonkey in forum C++ Programming
    Replies: 5
    Last Post: 06-18-2009, 08:55 PM
  2. Laplace Expansion
    By Leojeen in forum C Programming
    Replies: 7
    Last Post: 10-29-2008, 12:26 AM
  3. Replies: 1
    Last Post: 01-06-2002, 06:28 PM
  4. API learning reference (for those who are learning)
    By steve_i83 in forum Windows Programming
    Replies: 1
    Last Post: 11-04-2001, 01:58 AM
  5. learning to code
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 10-30-2001, 08:49 AM

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