Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

chapter 3

 
Eugene Babiev
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Chris,

i've tried to make the same tests and required classes and after that i became very confused regarding how they are organized. Your source code for 1st and 3rd chapter is actually a project with a lot of classes and tests, but really in your book there are some of them and they are different from the source code. So it is VERY hard to follow the book step-by-step, and consequently a lot of time is spent to figure out what is missing and what should be corrected. Why did you do so? For the reader it takes a lot of valuable time to complete these uncompleted by you steps...

regards
Eugene
 
Eugene Babiev
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
... moreover if you could read the Spring Live book, then you could join to my complaints, because in this wonderfull book the source code for each chapter is exactly corresponds to the code described in the book in that chapter, and additionally the book gives you the elaborate step-by-step guidance to follow the source code as it should be done properly. So in this case i can fully concentrate on the subject and save my time dramatically!!!

regards
Eugene
[ January 26, 2006: Message edited by: E u g e n e Mister ]
 
Chris Richardson
author
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eugene,

I am sorry to hear that you had a tough time with the sample code.

Unfortunately, you can only put so much code in the book and I wanted the downloaded source code to consist of realistic examples. I think its much more useful to have real examples rather than little snippets.

That is why the chapter 1 sample code consists of code and their tests. Similarly, the chapter 3 sample code shows the completed domain model and its associated tests rather than just the thin slice described in the book.

Having said that the downloadable code should be very consistent with the code in the book. In terms of class names etc. There should just be more of it.

One possibility is to expand the documentation for downloadable code to include a more comprehensive roadmap that would help you navigate it. e.g. The chapter 1 example consists of:
* Packages X, Y and Z - Java code that implements the business logic
* Packages A, B and C - Java code that implements the data access logic
* Packages P, Q and R - unit and functional tests
* Directory E - the Hibernate OR mapping files
* Directory F - the Spring configuration files that provide transactions and wire the components together.

Would this help? Please let me know. I want to find a way to make it as easy as possible. Send me an email if you would prefer to discuss this outside of the forum.

Chris
 
Eugene Babiev
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Chris,

thanks for the answer, i think that the real problem is the clear consistency on the flow of discussed code in the chapter and the source code, it should specially be noted in the chapter of how does they interrelate to each other, otherwise it takes time to grasp that meaning and it is hard to do that especially when one doesn�t familiar to the project while reading initial chapters (including 3rd chapter), for instance there are several unit tests in the 3rd chapter, but it cant be clearly understood which one should be compiled. To say more clearly, there are three examples of PlaceOrderServiceTests and unfortunately the last one is able to be compiled only, others were only written for explanation of some discussed point (as I desperately understood that), but unfortunately I had to create a lot of missed classes to make work the first instance of the PlaceOrderServiceTests test and became very abused to come to know that this one shouldn�t be compiled at all and I wasted one hour to understand that. The same sorrowful story was with the second sample test, and only after when I�ve compiled successfully the third one, I came to know that it was useless to try to compile the first two sample tests. And unfortunately the 3rd chapter doesn�t give that important guidance at all. The only hope I cherish now is that other following chapters will be clear to follow and understand. But if you could do some additional document to be downloadable with the source code where such missed guidelines will be explained, then that would be really a great job! And of course the roadmap for the sample code would be greatly appreciated!



regards
Eugene
 
Chris Richardson
author
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eugene,

Thanks for your response.
It was very enlightening.

Yes, because chapter 3 is illustrating the TDD process it shows the initial and final versions of some tests. However, only the final version is compilable/runnable with the source code you can download. As far as I can remember thats the only place in the book that does that but I will check.

It sounds like you tried to copy and paste code out of the book rather just going directly to the downloaded source code (which compiles and runs). Is that correct? I hadn't expected that!

I will work on making the docs for the source code more helpful.

Chris
 
Eugene Babiev
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Chris,

yes, copy and paste code out of the book is what i really did. Now i understand that this way was wrong. But why i did that is because the sample code to the chapter seemed to me very scary because of its massive structure and amount of classes and it was easy for me to take the code from the book. Why? Because in the 3rd chapter you wrote that first to create the unit test, then you wrote to create some missing classes, etc� and since I read previously Spring Live book written by Matt Raible, the style of writing was the similar to yours, but from his book I could do copy and paste and thus to compile the classes successfully. So that was the problem�

regards,
Eugene
 
Eugene Babiev
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Chris,

i began to work with your sample code and found out that it doesn�t contains commentaries, especially your utilities classes in the projects ormunit-hibernate, pia-util, pia-util-spring. In rare cases some classes contain very concise commentaries. I think that it I�d be best first to add consistent commentaries to these projects and thus update the downloadable sample code. Personally, I found these utilities quite useful and would be glad to have them commented for full understanding of their implementation logic, because they are used throughout all the sample projects.

regards,
Eugene
 
Chris Richardson
author
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eugene,

Thanks for the feedback. I will look into this.

Chris
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic