views:

945

answers:

10

The reason for this, I find myself being asked to make replacement classes for boost's classes in a commercial project. And I am asked to test them against the boost class's behaviour.

This makes absolutely no sense to me. I seldom see a license as open as boost's.

Maybe there will be added functionality in the future, but since boost's classes are quite extensible, I really am ... flabbergasted?

Added: I am about to advise my employer against doing this, but I wanted to do this in an informed way.

Edit: clarification. They only asked me for a few classes. Remaking boost seems not to be the intention, but some selective parts of it. Still. I see no reason.

EDIT: Well, 2 meetings afterward, I think I know what the problems are. (I only work as a freelancer so I am not briefed in every detail) It is really a mixture of distrust towards externally and not commercially supported libraries, unwieldiness/overcomplexity of boost if you aren't really proficient, project bloat and some bad experiences with not fully compliant compilers for embedded devices, that may be targeted in the future.

They want something they can fumble around in, without being template maniacs. I am aware that there may be some other libs out there, and I will surely be able to borrow some OS code, but alea iacta est

Well, let there be yet another xplatform utility class framework :) Sometimes reinventing wheels is fun.

Thanks for all your hints. Some of them where quite on the spot, but I think It's fair, that I will not choose one of them as correct. I have given +1 to everybody who contributed to my thought processes.

Thanks!

+9  A: 

Regardless what the license says, your employer might have a different opinion about including third-party sourcecode into the project.

Dave Van den Eynde
Why downvote? That is a valid concern.
Mank
They might not be aware how well supported and 'immortal' boost is. This sounds reasonable. Thx.
AndreasT
Some companies, Microsoft including, have very strict policies about including outside sourcecode. Even their open sourced projects (ASP.NET MVC included!) don't accept outside contributions.
Dave Van den Eynde
Just guessing: Microsoft doesn't want to find themselves the target of a lawsuit for accepting code the contributor didn't have the rights to. With their big bank account, they're lawyer bait - can't blame them for being paranoid at all. See my own answer for more.
Mark Ransom
@Mark: nobody does :)
JP Alioto
I already worked in a company which chose not to use boost because, according to "them", the boost license was not a strong enough protection. Basically, the fear was that somebody could just steal some private code and stick it in there. As far as I'm concerned, that's the only BIG catch with boost (which I love btw).
+12  A: 

The catch: you have to use it too reap the benefits of all the work.

But seriously reinventing boost is madness. Find what their (management) concerns are and work to break those issues down.

Or accept the pay, and keep your head down, Or start looking.

Madness all round.

Simeon Pilgrim
+1 for "keep your head down and start looking." For real.
Electrons_Ahoy
Well that IS good advice :) however, I intend to be an asset, not an ass set ;-)
AndreasT
I also want to be an asset, I agree your after constructive arguments to help in the good fight. Half the battle can be knowing their arguments. If they are stuck in their 'logic' then that's where my second part kick in.
Simeon Pilgrim
You might have worked around a bug in boost in your own code, which, when fixed in a boost update, breaks your code. If that's the sort of concern they're having, consider a copy of boost in your code's repository rather than using a system-wide install. Which you might be doing already, of course.
@unwesen, assuming that comment was targeted at Hrvoje's answer, based on that was my initial response to his answer also.
Simeon Pilgrim
@Simeon: Kind of. I read your answer to him after my comment here, and mainly felt it would possibly add a little.
Documented member function became a global function, a documented macro definition disappeared with no depreciation. I was using a local boost install and before updating (wanted to use a new lib) I specifically looked in the change log to see if anything I already used was changed. Doesn't sound like bugs in my code :)
Hrvoje Prgeša
+2  A: 

Boost has one of the least restrictive licences I am aware of, so it is hard to see what any catch there could be.

Of course there is a catch to trying to re-create Boost: there are a lot of subtleties to the operation of the Boost libraries that will be very hard to re-create. Follow the Boost mailing list for a while to see the kind of depth of inspection and detail to which the libraries are subjected to on an ongoing basis.

Rather than just challenging the approach, start by asking why this approach is being proposed.

Richard
+3  A: 

The version in the debian repositories isn't the newest and when downloading a new version of boost, you have to download almost 30MB and compile the libraries you want to use, which is extremely horrible, and you have to read some of the documentation twice before understanding it.
(Sorry, these are the only negative points I found.)

tstenner
Well, especially some of the documentation tends totake the metaprogramming-beginner by surprise, and it has gotten big, so +1.But you usually don't have to use the complete library. Some parts can be left out without worries.Other than that... hmmm...
AndreasT
+1: It is just too big to use on a small device, extracted but uncompiled it is 260MB, just too big for my eee. I tried extracting some part from it but it was too messy and it had too much dependencies. If it was easy to just select parts of the library I would use it a lot more.
rve
@rve: The compiled version is generally much smaller than that, and yes, you can pick and choose which libraries you use.
Jasper Bekkers
@tstenner: Regarding your comment that downloading almost 30MB of sources and compiling is "extremely horrible" -- I do think that for the OP it would be much, much more horrible to really *develop* the corresponding functionality!
Pukku
All headers and date_time, filesystem, graph, regex, system and thread compiled take less than 100MB on my disk, if I stripped out the parts I never use (spirit, wave, etc.) it would be even smaller."extremely horrible" wasn't meant seriously, btw.
tstenner
Debian has an old version. AndreasT would have to start from scratch; that's way less.
MSalters
+10  A: 

Nothing wrong with the boost licence, but the developer guidelines are a bit to relaxed - once a library is in the developer can change anything he wants - behavior and interface.

It happened to me with boost::exception (1.37 -> 1.38) where parts of the documented interface (functions and macros) just changed or simply dissapeared (without even a notice in the change log). Similar thing happened with boost::range behavior recently (dough the behavior was never precisely documented).

The official answer is that you should view each boost version as a different product. The problem with that is that the bug fixes will almost never end up in the previous versions if the library versions advanced.

The quality of any boost library depends on the quality and dedication of it's author! And sometimes there are no authors/maintainers anymore.

That being said, I still find some of the libraries genius and use then often.

Hrvoje Prgeša
+1, quietly changing documented interfaces is definitely a bad thing. (Justifiable to some extent, but certainly bad from the point of view of maintenance of client code.)
j_random_hacker
As I understand the policies, the devs can not change the interface without consulting with the mailing list.Is this not an enforced practice?
AndreasT
@AndreasT - I'm not sure it's required. Even if it is, one post can easily get lost in the list. There has been some effort to standardize the requirements for the devs: https://svn.boost.org/trac/boost/wiki/Guidelines/MaintenanceGuidelinesBut these are only guidelines (which are usually broken).
Hrvoje Prgeša
Well, everything that Hrvoje said I faced myself too. Not to mention Boost documentation is not that great, and it's so complicated, imo. (On the other hand, I found Qt documentation to be quite well written.)
ShaChris23
+6  A: 

Some parts of boost are very incestuous. To use a small boost library, often you end up (unknowingly) #including a huge amount of "junk". It is actually quite astonishing if you generate a dependency graph. Perhaps you don't need to support the dozen or so platforms that boost does, so a smaller amount of code would be easier to maintain.

Your employer or the environment your product must work in may be "security related". Certain national agencies that review your code may object to 3rd party code developed by unknown entities (even though the source code is clearly visible). Certain national agencies may not be comfortable with the coding standards used to develop boost. They may want you to take ownership of that boost code and bring it up to their (ancient and backward) coding standards. In that case it may be far less expensive to develop your own version of the boost code. Most likely your version will not have the usefuleness or scope of the boost code in this case, and may in fact take hours of painful debugging to make it correct, but it may be just fine for your application.

I'm not saying I agree with the above (because I don't), but that's the environment some of us find ourselves in. :(

Brian Neal
+5  A: 

Here are some possible issues:

  • boost is a big dependency to have on your project. Maybe they're weary of adding such a dependency only for a few classes. You can get around this by using the bcp tool to extract only the parts of boost that you need.
  • related to the former: once boost is in, it's possible that some programmers on the team will go wild with lambdas, mpl and such and increase the code size compile time. Good luck with those template metaprogramming error messages too!
  • perhaps they're afraid of using an open source project without any support. BoostPro computing offers commercial boost support!
  • watch out for Boost X projects that are not really part of boost. e.g: Boost Logging and projects that were only proposed for inclusion.
  • perhaps they had trouble with compiling boost in the past (it used to be a bit difficult), but now you can download boost precompiled for some of the supported platforms from BoostPro.
  • maybe they've heard bad rumors about boost's code bloat or hard to understand error messages.

That's about it... I'm afraid that you'll have to ask about these possible issues and be prepared with arguments. The request could be a silly mistake, but it could also make a lot of sense.

rpg
+1  A: 

No matter how awesome and pure the code is, there might come a time when somebody with lots of lawyers will assert some kind of claim over it. Perhaps somebody worked on it while being under obligation to some BigCo, something like that. It's a legitimate business concern to be paranoid about such things, as unlikely as they may be.

Mark Ransom
Any BigCo with lots of lawyers can come in at any time anyway. Being part of a large group (like boost users) protects you, if only by sheer numbers.
MSalters
+1  A: 

Boost seems to increasy my compile time alot.

Michael
I completely agree with @Michael's assertion. Found the same thing happened for my project. I use Boost.Asio library.
ShaChris23
+1  A: 

Boost is the primary source for C++'s standard library TRs so using it is a good advice. Rewriting Boost is nonsense. It's free and peer reviewed by many unbiased C++ experts and nothing can beat that. Ask your boss to really reconsider this or else you should consider quiting.