A Review of Beginning C# Object-oriented Programming
Buy it now
One Minute Bottom Line
It has some bright spots but they are far outweighed by the lack of any real hands on experience. Every one of the activities is an exercise in cutting and pasting and as a result the book is a case of giving a man some code rather than teaching a man to code. Even worse after reading this book you may only be prepared to read another beginner book.
I expect several things from a successful beginner book regardless of the language or paradigm used:
- A thorough grounding in the theory underlying the language or methodology the book covers.
This should include a list of the pros and cons (Too many authors focus solely on the pros) of the language or methodology. An examination of the type of problems it was designed to solve, and a discussion of when and why I should and should not use the language or methodology
- Lots of sample code, including at least one production ready example.
Simply put the best way to learn to code is by doing; the second best is by reading other developer’s high quality code. I place a high value on the inclusion of a complete production level code example because of my experience teaching others to code. Think back to when you were first learning to code and you saw a note indicating that the code was not production level. Did you have any idea what needed to be done to make it production level code (error handling, security considerations, coding standards, unit and integration tests etc.; and if you did know what was missing did you know how to implement it?
- A collection of tips and best practices.
- An overview of the range of things I can do with my newly learned skills.
- A list of additional resources to further develop my new skills.
- Enough hands on exercises to build my confidence and demonstrate my understanding of the material presented.
This book meets most or exceeds most of these expectations. Especially noteworthy was the emphasis placed on the design phase of a project (section 1 chapters 1-4). This section accounts for more than a quarter of the total page count in this very short (just over 200 pages) brief book. The author provided the best beginner level tutorial I have seen on design phase deliverables (e.g. UML diagrams, sequence and activity diagrams and use cases). I initially questioned his choice of UML tool UMLet, but it is both open source and has a much simpler interface compared to MS Visio or similar enterprise level tools, making it a much better choice for the beginner. However, this linking of design deliverable and theory is not exploited to best effect. When polymorphism is introduced the author misses a golden opportunity to reinforce the concept with a demonstration of how this should be represented in the class diagram. Similarly, I think the large gap introduced by inserting Section 2 between developing the specification for the books final application, and the beginning of the implementation of that application, weakens the link between design and development.
No book no matter how many pages can introduce you to all of what C# and Visual Studio provide the OOP programmer, but the author clearly demonstrates his experience teaching through his choice of topics for section 2. I know from experience that data access and GUI programming represent some of the toughest concepts to teach new developers. The author does an excellent job giving the noobie just the right amount of information here; though again I think a few of the concepts could have benefited from the inclusion of a diagram or table (e.g. the demo database structure). As I stated above reading code is the second best way to learn to program. So I think a couple of things presented in the code snippets from this section (e.g. partial classes and the prefixing of an underscore to a variable name), which pass without explanation, deserved at least a note of explanation from the author. While the author provides a great introduction to debugging in Visual Studio this represents one of the most enigmatic issues of the entire book – as it is never really used or needed (see below for why).
The third section is where you are supposed to put into practice all that you have learned to this point, but it is this hands-on component where this book fails. Nowhere in the book is the reader given the opportunity to code something on their own – every one of the activities is an exercise in cutting and pasting. You are told what to type or paste and where to paste it. In my experience a reader or student gains little knowledge or confidence in their abilities from this approach. Why not make use of the design discussion and documents developed in the first part of the book and ask the reader to implement a class based on one of the class diagrams or to code a subclass that overrides a parent classes’ method, and then compare their solution with the author’s.
The author clearly understands the role and importance of “doing”, which makes this omission all the more glaring. The book’s introduction includes the following quote:
“One of the most important aspects of learning is doing. You can’t learn to ride a bike without jumping on a bike, and you can’t learn to program without cranking out code. Any successful training program needs to include both a theory component and a hands-on component.
I have included both components throughout this book. It is my hope that you will take seriously the Activities I have added and work through them thoroughly—even repeatedly. Contrary to some students’ perception that these activities are ‘exercises in typing.’ This is where you get a chance to make the theory concrete and where true simulation of the concepts occurs.”
Despite the fact that the author congratulates the reader on “now being a C# programmer (albeit a neophyte - pg.180),” without writing any code can anyone be called a programmer? I don’t think you can. Not only can you not be called a programmer, but after finishing this book you are really only prepared to read another beginner book. In the end this book is a case of giving a man some code rather than teaching a man to code, as a result I cannot in good conscience recommend it to others
Without some actual code writing the reader has little chance to develop the confidence that comes from doing and after finishing this book may only be prepared to read another beginner book. In the end this book is a case of giving a man some code rather than teaching a man to code, as a result I feel that its faults outweigh the positives and I cannot recommend it to others
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)