473,320 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

learning Boost

What is the best way to pick up Boost?
Thanks
BubbaT
Sep 27 '08 #1
7 2556
On Sat, 27 Sep 2008 02:38:33 -0500, BubbaT wrote:
What is the best way to pick up Boost? Thanks
BubbaT
See
http://www.amazon.com/Beyond-Standar...duction-Boost/
dp/0321133544
Sep 27 '08 #2
BubbaT wrote:
What is the best way to pick up Boost?
Thanks
By using good sense. Try filtering useful stuff from "mental
experiments", and never assume anything (be it interface or
implementation) to be high-quality just because it is in Boost.

--
Gennaro Prota | name.surname yahoo.com
Breeze C++ (preview): <https://sourceforge.net/projects/breeze/>
Do you need expertise in C++? I'm available.
Sep 27 '08 #3
On Sep 27, 2:35 pm, Gennaro Prota <gennaro/pr...@yahoo.comwrote:
BubbaT wrote:
What is the best way to pick up Boost?
By using good sense. Try filtering useful stuff from "mental
experiments", and never assume anything (be it interface or
implementation) to be high-quality just because it is in
Boost.
To a certain degree, you can never assume quality, but Boost
seems to be significantly better than most in this regard; I'd
actually trust something from Boost more than I would extensions
and additional libraries from some compilers.

What you probably can't assume is usefulness. Some parts of
Boost are very useful: you really should be using boost::regex
and boost::array if at all possible. Others less: I certainly
wouldn't spend a lot of time learning boost::crc unless I really
had to calculate CRC's. (In that particular case, I think my
class has a better designed interface. But that's not really
the point---you shouldn't waste time learning it, either, unless
you need CRC's for something. Most code doesn't.)

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Sep 27 '08 #4
James Kanze wrote:
On Sep 27, 2:35 pm, Gennaro Prota <gennaro/pr...@yahoo.comwrote:
>BubbaT wrote:
>>What is the best way to pick up Boost?
>By using good sense. Try filtering useful stuff from "mental
experiments", and never assume anything (be it interface or
implementation) to be high-quality just because it is in
Boost.

To a certain degree, you can never assume quality, but Boost
seems to be significantly better than most in this regard;
That's a widespread opinion. I'm not sure where it comes from. What I
can say is that when I go looking at the code I rarely see anything
significantly better than other libraries. Perhaps the errors are just
less trivial. (Perhaps; it's no rocket science to avoid unnamed
namespaces in include files either, for instance). Quality depends for
most part on the author ("formal" reviews don't help: if no competent
person is interested in a proposed library you can't expect any
improvement, and all the flaws will happily remain).

[...]
What you probably can't assume is usefulness. Some parts of
Boost are very useful: you really should be using boost::regex
and boost::array if at all possible.
I don't. The code underlying most Boost components is a mess...
honestly, I avoid it like the plague. Reliability must be IMHO the first
quality in software. As I mentioned to a colleague a few months ago, I
think the only significant contribution of Boost are interfaces (when
they are valid; I've never made a mystery of the fact that e.g. I
consider dynamic_bitset is an experiment that failed).

Also, be careful: something you've used in the past may well have been
completely screwed up in subsequent releases; there's always someone who
wants to "improve"; see what lexical_cast has become, for instance (I
know that you don't use it, but just have a look). Boost.Operators,
unless it has been cleaned up recently, is another example of
unmaintainable monster. Note that changes made after acceptance are
hardly reviewed, so even a well-reviewed library may degrade beyond any
expectation once it is included in the collection.
Others less: I certainly
wouldn't spend a lot of time learning boost::crc unless I really
had to calculate CRC's. (In that particular case, I think my
class has a better designed interface. But that's not really
the point---you shouldn't waste time learning it, either, unless
you need CRC's for something. Most code doesn't.)
OTOH, all code needs testing. And Boost.Testing is one of the most
unreliable parts :-) CRC's, as you say, aren't something one uses
everyday; but iostreams... I'm still convinced of what I wrote on
c++.moderated a while ago:

I just had a quick look long ago [to Boost.Iostreams] and in the
stream class template there was neither virtual inheritance from the
streambuf nor a call to basic_ios::init() from the constructor. It
might have been fixed now, but certainly I saw the error after
acceptance of the library (so, after the review) and it is a 101
error for iostream programming. The reason why I don't recommend it,
regardless of a possible fix --and do not recommend most of boost,
anymore -- is that with the exception of a few parts the whole
collection has become an enormous, unmanageable bloat (unreadable
meta-programmed-to-perversion code and absolutely unnecessary
dependencies being probably the worst evils). I know that it has
still a high reputation but that's basically a result of the past,
IMHO; try keeping an eye at the regression reports and you'll see
that they are pretty much random number generators from a gigantic
house of cards.

--
Gennaro Prota | name.surname yahoo.com
Breeze C++ (preview): <https://sourceforge.net/projects/breeze/>
Do you need expertise in C++? I'm available.
Sep 28 '08 #5
On Sun, 28 Sep 2008 13:39:15 +0200, Gennaro Prota wrote:
I just had a quick look long ago [to Boost.Iostreams] and in the
stream class template there was neither virtual inheritance from the
streambuf nor a call to basic_ios::init() from the constructor. It
might have been fixed now, but certainly I saw the error after
acceptance of the library (so, after the review) and it is a 101
error for iostream programming.
This is probably by design. Boost abhors virtual functions calls and
OOP in general.
The reason why I don't recommend it,
regardless of a possible fix --and do not recommend most of boost,
anymore -- is that with the exception of a few parts the whole
collection has become an enormous, unmanageable bloat (unreadable
meta-programmed-to-perversion code and absolutely unnecessary
dependencies being probably the worst evils). I know that it has
still a high reputation but that's basically a result of the past,
IMHO; try keeping an eye at the regression reports and you'll see
that they are pretty much random number generators from a gigantic
house of cards.
The myth that surrounds Boost mostly stems from the intimidating
complexity they produce with C++ templates: "it's so complex therefore
it must be good". Library design for real-world applications is, first
and foremost, about usability. From the beginning Boost tried to push
the limits of 'template programming' (not C++ programming) but never
cared about ease of use and real-world applicability.
--
Roland Pibinger
"The best software is simple, elegant, and full of drama" - Grady Booch
Sep 28 '08 #6
Roland Pibinger wrote:
On Sun, 28 Sep 2008 13:39:15 +0200, Gennaro Prota wrote:
[...]
> The reason why I don't recommend it,
regardless of a possible fix --and do not recommend most of boost,
anymore -- is that with the exception of a few parts the whole
collection has become an enormous, unmanageable bloat (unreadable
meta-programmed-to-perversion code and absolutely unnecessary
dependencies being probably the worst evils). I know that it has
still a high reputation but that's basically a result of the past,
IMHO; try keeping an eye at the regression reports and you'll see
that they are pretty much random number generators from a gigantic
house of cards.

The myth that surrounds Boost mostly stems from the intimidating
complexity they produce with C++ templates: "it's so complex therefore
it must be good". Library design for real-world applications is, first
and foremost, about usability. From the beginning Boost tried to push
the limits of 'template programming' (not C++ programming) but never
cared about ease of use and real-world applicability.
My POV is that boost code is hard to read because it works with
so many different compilers. Whenever I look at the code my eyes
water because there are almost more workarounds than actual code...

Oh, and I think, while application code has to be only as good
as necessary, library code has to be as good as possible. For me,
a very important measurement for code quality is the question
how many problems it catches at compile-time. And there, boost
code often shines.

Schobi
Sep 28 '08 #7
On Sep 28, 3:06*pm, Hendrik Schober <spamt...@gmx.dewrote:
Roland Pibinger wrote:
On Sun, 28 Sep 2008 13:39:15 +0200, Gennaro Prota wrote:
[...]
* The reason why I don't recommend it,
* regardless of a possible fix --and do not recommend most of boost,
* anymore -- is that with the exception of a few parts the whole
* collection has become an enormous, unmanageable bloat (unreadable
* meta-programmed-to-perversion code and absolutely unnecessary
* dependencies being probably the worst evils). I know that it has
* still a high reputation but that's basically a result of the past,
* IMHO; try keeping an eye at the regression reports and you'll see
* that they are pretty much random number generators from a gigantic
* house of cards.
The myth that surrounds Boost mostly stems from the intimidating
complexity they produce with C++ templates: "it's so complex therefore
it must be good". Library design for real-world applications is, first
and foremost, about usability. From the beginning Boost tried to push
the limits of 'template programming' (not C++ programming) but never
cared about ease of use and real-world applicability.

* My POV is that boost code is hard to read because it works with
* so many different compilers. Whenever I look at the code my eyes
* water because there are almost more workarounds than actual code...
Yes, this is a problem for Boost, but I think it can be addressed
with an on line C++ compiler that produces fully instantiated
source code. If the output from that compiler is correct, then
it's up to the (simpler) platform specific compilers to accept it.
Such an approach would result in Boost being able to clean up some
of the code. Compiler vendors are slow to move in this direction
though. They tried to milk the status quo too much. I've been
saying this for a number of years. Meanwhile the boost authors
struggle to keep their libraries building on a large number of
configurations.

For me,
* a very important measurement for code quality is the question
* how many problems it catches at compile-time. And there, boost
* code often shines.
Good point.
Brian Wood
http://www.webEbenezer.net
Sep 29 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: nin234 | last post by:
My apologies in advance if any one is offended by this post. I have an unstable job in a start up company and thought of sharpening my skill sets. I noticed that many companies are asking for boost...
17
by: Howard Gardner | last post by:
/* If I am using boost, then how should I write this program? As it sits, this program is using SFINAE to determine whether or not a type supports particular syntax. I suspect that there is...
26
by: puzzlecracker | last post by:
It'd be interesting to compare the learning practices of c++ practitioners. I'll start with mine The C++ Programming Language C++ Primer Effective C++ More Effective C++ Effective STL The...
22
by: Marco | last post by:
Rouben Rostamian said: An attempt toward creating a set of library tools was made by some participants of this newsgroup a few years ago but it fell by the wayside. See: ...
8
by: Daz | last post by:
Hi Everyone. I am sturggling trying to find out a way in which I can delete a 'path' object. I may not need to delete it, however, I need to overwrite it. The function I am trying to code,...
5
by: Seth | last post by:
I can't get this thing made for the life of me. I've gone through every step per the Boost website regarding using bjam. Nothing. Can anyone give any advice or are there pre-made boost hpps for...
3
by: =?iso-8859-1?B?Tm9yZGz2dw==?= | last post by:
Hey there, C++ Coders! I am learning multi-threading with boost and have come up with the following code example shown below. This example implements a test of the producer-consumer design...
3
by: Stephen Torri | last post by:
Below is a class that is suppose to represent a segment of memory or a contents of a binary image (e.g. ELF executable). I have started to read Modern C++ Design and thought the best way to ensure...
4
by: yurec | last post by:
Hi I start learning boost.Today I tried to use boost::lambda but failed to compile very simple example. 2 hours of googling gave nothing. Can anybody help me? using namespace boost::lambda; ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.