Mike and Phani's Essential C++ Techniques
The major problem This book has one killer problem: It is not aimed at C++ programmers. Let me be more specific here; it is not aimed at ANSI C++ programmers. Instead, it is aimed at Microsoft Visual C++ 6.0 programmers.
Is this a big deal? Yes. The cover of the book is rife with mentions of C++. It even mentions ANSI C++. There is one, and only one, reference to Visual C++ on the cover of the book. Even inside, the index lists only three references to Visual Studio, none to Visual C++. With quotes such as 'Hundreds of tips and techniques for advanced C++ programmers' on the cover, I was very surprised to realise this book is for Visual C++ 6.0 users only. At best, the cover of this book is misleading.
The rest of this review (and the book's rating) assumes you are still interested in the book. You therefore use only Visual C++ 6.0 and have no plans to upgrade.
Other problemsFor a book apparently aimed at intermediate and advanced programmers, this book contains a lot of tips that any experienced beginner should already know. Techniques such as ensuring you never return a pointer to an automatic variable really have no place in a book with the stated audience. Really, this book would be more suited to programmers who were still learning C++.
Except there are a number of other issues that make this book poorly suited to people learning C++. Instead of using standard C++ strings, this book chooses NULL-terminated C strings. Files are not included the C++ way (cstdio instead of stdio.h, iostream instead of iostream.h). The STL is not mentioned at all, with dynamic arrays having their own chapter rather than a simple mention of vectors and with an entire chapter devoted to code for sorting instead of showing the programmer how to use the STL sorting algorithms. The smart pointers? Either use the built-in autoptr or use boost.org's vastly superior implementation.
Some good stuffThis book is not completely without redeeming qualities. Many of these techniques are good and useful. If you are a new Visual C++ 6.0 programmer and you are learning from a substandard text, you may find this book covers some of the shortfalls of your other textbook. Similarly, if you are taking a class in C++ and your instructor is particularly lousy, this book could help you out.
SummaryMike and Phani's Essential C++ Techniques is useless to any other than the beginning Visual C++ 6.0 student. It ignores ANSI C++ to focus instead on Microsoft's implementation. It contains a number of stylistic problems, relying far too heavily on C instead of the facilities provided by C++. And finally, it only covers techniques any reasonably experienced C++ programmer should already know.
You can purchase Mike and Phani's Essential C++ Techniques from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
There are a lot of companies still using VS C++ 6.0, and alot don't want to upgrade. The complaints I got from some users for rolling out .NET on their new workstations was unbelievable....
Mike and Phani's Essential C++ Techniques is useless to any other than the beginning Visual C++ 6.0 student. It ignores ANSI C++ to focus instead on Microsoft's implementation. It contains a number of stylistic problems, relying far too heavily on C instead of the facilities provided by C++. And finally, it only covers techniques any reasonably experienced C++ programmer should already know.
I'm not a C++ programmer, but I'm very curious to know what the diferences are between ANSI C++ and MS Visual C++.
I'm sure that this is redundant, but C++: The Core Language by Gregory Satir & Doug Brown is a really good C++ for beginners book or "The Weasel/Skunk/Whatever that is Book".
I didn't see any "bright spots" in the review. Sounds like a waste of time and money. If they aren't mentioning STL, why would you even review it?
It's funny how many crappy books on C++ dribble from the presses like a chowdery diarrehea. Sorry for the analogy, but I've seen waaaay too many books just like the one the reader describes.
Stick with Scott Meyer's books, you really can't beat 'em.
https://www.accountkiller.com/removal-requested
for such a crufty and complex language, you probably do need these essential techniques just to be able to program.
-- -- --
Help my mini cause: My journal
It would have been nice to have more details on how the book was soooo heavily bent towards VC++. I would assume by the fact that he makes such a big deal out of it that these references are such that it wouldn't do any good for a non VC++ programmer? Are these things specific to the environment (visual studio, debugging, etc) or the OS (win32 api, m$ specific data types, etc).
..." and us having to just take his word for it. Even more so because of the topic and the level at which it is apparently targeted.
Overall, I think his review needs a bit more beef (i.e. more examples) vs just saying "I thought it was blah
What goes bad is that peoples like to skip past the boring stuff and try to write advanced code which leads to big maintenance mess.
I only code in C with proven and time tested princilpes and my code is as bullet proof as it gets. So many times you see bad coder write with too many tricks while trying to break the Olog(n) speed barrier and end up with big mess. Don't you be tempted.
All the best,
--Achmed
Swaribabu Consulting Inc. -- We code so you don't have to
Visual Studio C++ and advanced programming are mutually exclusive.
All Visual Studio C++ programmers, advance yourselves onto a professional platform with a quality API.
I've actually come to like Scott Meyer's books, particularly Effective C++ and More Effective C++. These books are aimed at C++ programmers to correct common mistakes, and C programmers making the migration to C++ (hence the first few chapters in Effective C++, prefer new and delete to malloc and free, etc.) The only other C++ books I really use regularly are the STL guide and C++ From the Ground Up. All of these are Ansi C++ oriented (at least there hasn't been anything that didn't work on a Ansi C++ compatible compiler). If a book is aimed at Visual C++, then it should say that in the title. Id be curious to hear what other books people use for reference (besides man pages).
In the beginners department you can't beat Accelerated C++ by Koenig and Moo. For more advanced programmers there is Scott Meyers.
You know our book wasn't suppose to be good or anything, just thick; with lots of cut and paste examples and stuff...
-Michael Hyman and Phani Vaddadi
I found this book a curious pot pourri. By no stretch of the imagination is this book going to be much use to its declared readership--advanced C++ programmers. No one in that category needs to be told such simple things as that classes designed with the expectation that they will be derived from should have virtual destructors.
Code in books such as this one should be well written. In many places the authors provide before and after code in support of their guidelines/techniques. What do you think of the following as an 'after' (it does not matter what the technique is that is being written about):
class baseClass {
public:
baseClass() : fltSalary(0.) {}
char *szName;
float fltSalary;
};
It becomes clear, long before the chapter on using Assembly that the authors are writing about C++ on a very specific platform and based on experience with a specific implementation of C++. They have little familiarity with what are rapidly becoming standard techniques among more experienced C++ users. Couple this with a pre- occupation with what I might call micro-optimisations and we finish up with a book that not only offers nothing to advanced C++ programmers, and very little to experienced ones but it also provides a dangerous mindset for inexperienced programmers.
What I find frightening is that the authors are clearly writing about the way they write C++ code. Frankly they are, in my opinion, still at the point where they have a good deal to learn about C++ techniques from the real experts of the industry.
Finally let me quote 'Technique 129: Avoid the CRT If You Can' in its entirety. I think that may give you the sense of why I think this book is wholly misguided.
--Rosie
It's not as if VC++ corners the market on non-ANSI compliant C++. I don't know of any compiler that is 100% compliant. Even GCC falls short of 100% ANSI compliance. (Ever try to call the stream manipulator "fixed" in GCC 2.9x? It's an exercise in futility, because you simply won't find it.)
I'm probably the last person on earth to jump to Microsoft's defense, but let's not be so quick to deride their compiler prior to pointing out that these deficiencies exist in every C++ compiler under the sun, in one way or another.
Good C++ programmers realize that there is nothing wrong with using C constructs such as null-terminated strings and printf to get the job done. It's obvious the reviewer needs to get a dose of programming in the real world before attempting to set himself (herself?) up as some sort of C++ expert.
I'm just suprised Michael didn't jump on it sooner and throw his unqualified opinion in.
"Techniques such as ensuring you never return a pointer to an automatic variable really have no place in a book with the stated audience"
;)
MSVC6 kicks out a warning if you do this. No programmer worth their salt ignores warnings: as a MSVC programmer, at least put a pragma around issues to disable unwanted warnings!
Personally, I've never had a problem with the APIs when developing cross-platform code implemented in ANSI C++ under MSVC6. The MSDN documentation is normally very good about declaring compatibility levels for the libraries. The biggest gotcha that's burnt me with ANSI C++ under MSVC6 was to do with 1) scope of variables in if statements; and 2) exception decoration on function/method declarations.
This is a very good review of the book. I swear you slashdot geeks are nothing but a bunch of women hating nerds.
All the best,
--Achmed
Swaribabu Consulting Inc. -- We code so you don't have to
About a half year ago i was doing some C++ programming, which i haven't been doing as much as of as i'd like to, and I had an idea. It seemed each time I started programming something in C++, I would have forgotten some of the details of the language. I wanted a reference card for C++. I searched all over the internet for free ones, and even some I had to pay for. but there weren't any!
So i wrote one. It includes all the common syntax, plus a lot of advanced reference such as library functions.
gbook.org/refcard
This post is going to get modded down, but I wanted to say how much I like the concept of a one sheet reference card better than reference books.
http://github.com/gbook/nidb
SFAIK variable scope is a bit weird in ANSI C,
for(int i;...){
}
i=123;
is valid ANSI C (for some strange reason)
for(int i;...){
j
}
j=123;
is not valid
{
for(int i;...){
}
}
i=123;
is not valid
the same is true for if and switch
this is a pain because of reuse.
for(int i;...){
}
for(int i;...){
}
is invalid ANSI C because i is still in scope in the second for loop.
thank God the internet isn't a human right.
If MSVC is your only environment try here for tips and pointers. They cover a lot of other stuff as well. For pure C++ then as others have said go with Myers / Stroustrup etc
Do not try to read the dupe, thats impossible. Instead, only try to realize the truth
What truth?
There is no dupe
It is an old book: September 1999
NullPointerException
5 -- You won't read it anyway
4 -- It comes out of your company's wallet, not yours
3 -- It's the only language left that doesn't try to be "write once, run on any toaster oven"
2 -- You still can't figure out how pointers work
1 -- It's still less crappy than the writing on Slashdot
Another joke courtesy of *nix.org
Reply or e-mail; don't vaguely moderate. Ex-O'Reilly/MIT employee, now a full-time Google employee.
This post is going to get modded down"
;)
This bugs me when people include comments about being moderated down. Have some confidence in what you're writing. Comments like this often come across as way to *avoid* being moderated down. Personally I do not see why your comment would be moderated below one - there's nothing particularly offensive about it, and it might be of interest to some people. OTOH, if I had some mod points left, I wouldn't mod it up beyond three, although I might mod it over-rated and back down to one just for the commented I quoted above
That's soooo last century. Try 3.2, or something.
I saw it for $5.99 on the discout rack...
I'd say you get what you pay for, but I got a lot of good O'reilly for $5.99 off the discout rack.
"The last thing I want to do is deal with a bunch of people who want something."
Major Major
Read a good beginner's book about C++ and update your card accordingly. It's got more problems than I care to enumerate, and that's in sample sections only.
Basic.Scope.
4 Names declared in the for-init-statement, and in the condition of if,
while, for, and switch statements are local to the if, while, for, or
switch statement (including the controlled statement), and shall not
be redeclared in a subsequent condition of that statement nor in the
outermost block (or, for the if statement, any of the outermost
blocks) of the controlled statement; see _stmt.select_."
earlier ANSI definitions didn't include the
"(including the controlled statement)" bit.
Dr. Stroustrup is the series editor for these books, and damn, they are good. A comment by Kickasso suggests the most excellent Accelerated C++, but it's not just for beginners. (Well, it's targeted for beginners, but it's also an excellent book for experts; it helps to simplify an otherwise complex environment. Kinda like studying Zen.)
Anyhow, that book is part of the In Depth series. They're easy to recognize: all red with yellow titles, and -- an important part -- all small. One of the series' rules is that the main body text must be no more than 300 pages. No more gigantic tomes of crap.
You cannot apply a technological solution to a sociological problem. (Edwards' Law)
you can only declare variables at the start of a block in C, eg for(...){int i;...} or {int i; for(...){...}}
Does my bum look big in this?
God bless slashdot. Anytime I need a good dose of revisionist history, I know where to look.
The library for 2.x (the part responsible for streams) predates the ANSI/ISO standard. It's full of "this is our best guess at what will eventually be voted on, based on the last meeting" code.
When the standard was finalized and published, the 2.x library was dropped, and a new one started from scratch. When GCC 2.x was shipped, its library was already known to be wrong, but stable and "mostly good enough". And the new one was already in the works.
For that matter, large chunks of the 2.x compiler itself had been abandoned for 2.x, knowing that it would be better to rewrite it for 3.x completely.
Boggles my mind why people expect a four-year old product to conform to a four-year old standard. (Hint: it takes a while after the standard is published to write the code.)
You cannot apply a technological solution to a sociological problem. (Edwards' Law)
For all this trouble, you get a compiler that isn't much improved. It still tells you to call Microsoft customer support at the first non-trivial use of C++. It still doesn't like non-inline template specialization.
Modest doubt is called the beacon of the wise. - William Shakespeare
What is the point in publishing this "review"?
It does not provide any useful information about
the book contents. It does not try to argue about
book's strong and weak points on the basis of its
content either. All it says is "This book talks
about Visual C++ and doesn't talk about STL. I
do not like Visual C++ and like STL, so the book
sucks because it doesn't mention my favorite things."
If you call it a "review", I wonder what you call "news"...
Modest doubt is called the beacon of the wise. - William Shakespeare
As an aside, where is that famous Intel compiler and what kind of UI toolkits for Windows does it support? I want GNUStep :-(
rotflmao
This is, by far, the worst book review ever on Slashdot. The book gets a 2/10 from someone who obviously has no use for Visual C++, which tens of thousands of professionals use daily. His primary gripe seems to be that the cover misrepresented what was inside. What kind of idiot spends $50 on technical book without examining its contents? I'm likely to read at least 20-30 pages of the book before purchasing to make sure it fits my needs and most programmers I know are the same way. I think the primary problem here is that the reviewer wasn't a member of the authors' intended audience and thus it had no value to him. I haven't even heard of the book before seeing this review and the reviewer might be right, it might totally suck. The point is though, noone should take his word for it because he didn't have any use for the book in the first place.
There are dozens of books that are more than suitable for the reviewer and his expectations. When the reviewer fails to properly identify the book's audience and it's value to that audience, they aren't doing anyone any favors. What kind of review do you think a romance novelist would give to Stroustrop's C++ book? They obviously aren't the audience the author intended and as a result, their review isn't worth the paper they wrote it on. If you get a book and find that you aren't in the intended audience, you are doing a severe injustice by providing a review. You won't be able to fully ascertain how useful the book actually is and thus won't be able to provide an insightful review. I don't ask my wife for her opinion on programming books and she doesn't ask for my opinion when it comes to interior decorating. In the same vein, I don't want Chris Thompson's opinion on this book.
CodeProject is anothe great site for programming tutorials. It features a host of great material on VC++ and MFC. It also has a good user community, and discussion boards relating to all kinds of topics (still mostly C/C++ and VC++/MFC).
I used to go to CodeGuru all the time until I found CodeProject
They are crap.
It's also a comment on a language so obfuscated that 99% of the books don't seem to get the descriptions right. If it were a sensible language, one book (ok, perhaps 5 - 6) would have been enough.
The law of excluded middle : Either I'm foo or I'm foobar
I was a writer in the field for a long time, and I dropped out completely to do something else because of how insane the publishers became. I wish I could say I see the situation getting better, but I don't.
This is truly an awful review. I wouldn't grace it with the word 'review'. It's pretty well content free. I have no feel whatsoever for what kind of book this is except that it has some stuff about C++ in it. The 'reviewer' is pissed off that the book didn't say some things that they wanted and so wrote a rant about it. This is completely irrelevant to the rest of us.
Doesn't it make you feel good to know that our freedoms are protected by politicans, lawyers and journalists.
The Association of C and C++ users has several reviews for C and C++ books. My favorites are The C++ Standard Library, by Josuttis The C++ Programming Language 3rd ed, Stroustrup I read a lot of good reviews for Accelerated C++; therefore, I have ordered it.
1. Bad signature
2. ?????
3. Profit
I use Visual C++ in my development, but I urge people to bypass such marketing tricks and pick up something really useful, like "The C++ Programming Language", by the man himself, Bjarne Stroustrup. Reading that book completely transformed my programming experience, and every serious C++ programmer should check it out.
mhack
Building a better ribosome since 1997
Let's say it did. Current GCC incarnations honor std namespace conventions way too much according to the always-changing standard, IMHO.
Let me explain and give you an example:
(I'm sorry I had to replace spaces at the beginning of lines by dots or Slashdot's <ecode> would simply eat them..)
This code won't compile. You're required to put an application-supplied utility function in namespace std (remove the comment markers above) or it just won't compile.
That's GCC 3.2 for you. :-( I'm not sure
whether it is to blame because of following strange
standard requirements, but IMHO you should not be
required to put custom functions
into namespace std just to output some data.
I mean: Polluting std namespace because of this?
Any ideas, btw?
42. Easy. What is 32 + 8 + 2?
I think the problem is using C++.
Stick to ANSI C and Java 2.1 You'll be ok
Effective C++ Second Edition by Scott Meyers . . . no decent, hardworking, c++ coder should be without it!
I'm a Java programmer in the job market. However, most employers look for C++ experience. Do you recommend a book designed to help make the transition from Java to C++?
Oh, and before you tell me "look at my favourite language": I already love it. main = interact $ unlines . reverse . lines looks so nice and clean compared to any C++ offering... until you start measuring execution time, sigh.
There is a certain amount of truth to this... the C++ standard is really quite complex. I am stunned when I pick up a book like Modern C++ Design and I find a whole new world of C++ opening up for me.
However, let's face it... the reason most learning-C++ books are so bad is because the authors really do not have a clue. For example, there's nothing complicated with teaching a programmer how to use C++-style strings rather than (or in addition to) C-style NULL-terminated strings, yet very few books actually bother.
Oceania has always been at war with Eastasia.
They just can't handle the truth, and most of them are in denial of their own stupidity.
I think you mean "Practical C++ Programming" by Steve Oualline. And I agree, it's an excellent book, a little preachy on style but I consider that better than teaching no style or inconsistent style.
It's been sitting on the shelves of the local Borders Outlet for six months or more, always several in stock, though the price is only $6 or $7. The market speaks...
The ANSI/ISO standard was finalized around 1998, wasn't it? Gcc/djgpp had STL in 1998, maybe even 1997 or 1996. There was an STL for the Borland compiler in 1998.
cstdio and iostream (vs. their .h "equivalents") is
not the M$ way of doing things it's the ANSI way.
It's just that it's a lagging feature in many compilers. The difference between stdio.h and cstdio is that the latter declares it's symbols in the std namespace when __cplusplus instead of the global namespace.
Works in gcc 3...
www.codeproject.com is leaps and bounds better than codeguru.
-c
I have discovered a truly remarkable proof which this margin is too small to contain.
Why did slashdot waste valuable bandwidth reviewing a book from 1999?.Sheesh, that is a lifetime ago and VC++ 6.0 sucked anyway.
/ ev erettcpp.html
Interestingly enough Msoft hired a whole bunch of C++ gods (like Lippman) and are claiming the next version of VC++ (in April) will be teh most ANSI compliant C++ ever. Weird if true. See
http://www.ondotnet.com/pub/a/dotnet/2002/11/18
Switch immediately to a non-crap language like Common Lisp. Or hell, even ObjC!
I'm just returning to programming after a ten year vacation. I'm going to pick C++ since that was my choice in the past. The books I have, as well as checked out from the school library, both are written with VC++ in mind. And they're old school (#include iostream.h for instance). Would QT be a good choice? My interest is developing for open source and linux. What would be a good book to purchase that covers beginner C++ programming in Linux?
Where's my sock? There it is...