Alex Rivera | Logout

Modern C++ Design Generic programming and Design Patterns Applied

Asked 2009-03-17T20:57:59.487
19

I have purchase this book for our group in the company, perhaps, to improve our design skills and ultimately have a better programming practices. As I read it, I find, mostly, a set of nifty tricks that can be used with template, and not sure if it is worthwhile - and not detrimental-to incorporate it into our code thus introducing code complexity/readability and un-maintainability.

I would like to find out from follow practitioners, what do you use from that book? What is relevant and important to professional software development, what should be avoided?

General thought about this book and how it fits into software development of large-scale system (on the same them, I love John Lakos book)?

What is the Alexandrescu effect?

Edit
Report

1 Answer

2

To me it was more of a mind-broadening experience. I read through the book and kept learning details and tricks, some of which I have used later. But the most important part is that Design with capital D is discussed in the book all along (no pun intended with the D language).

The chapter on smart pointers switch my 'provide all possible functionalities' mindset to a more conservative: consider what you offer, is it worth it? how can it break the code? will it help the user? will it make code fragile by creating subtle pitfalls?

The part of policy based design should make you thing while designing whether your classes could/should be better divided into smaller orthogonal units. While in most cases I don't end dividing into all those policy classes, the code usually ends up being cleaner as different orthogonal pieces get less entangled.

Oh, as Earwicker, my first reaction was implementing fancy stuff that really speeded part of the development, but then again, in the small company I work for I am the only one able to maintain it and that really is a problem. Don't over do it. It takes twice the brains to debug and maintain than it took to develop.

answered 2009-03-17T21:29:44.577

Your Answer