This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Agile and Other Processes and the fly likes Code Craft: Grand designs etc. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » Agile and Other Processes
Bookmark "Code Craft: Grand designs etc." Watch "Code Craft: Grand designs etc." New topic
Author

Code Craft: Grand designs etc.

George Stoianov
Ranch Hand

Joined: Jan 15, 2006
Posts: 94
Now this is a chapter that sounds intriguing actually they all strike a note (TOC).

I have read many books on different programing language, frameworks etc. etc. but never one on writing code. What is in this book that other books concentrating on grammar and design do not show to the reader? Is it going to teach me how to make good trade offs? In situations when "The best laid plans" are impossible in the face of reality (read requirements/wishes) and the "The need for speed" is ever so present on your shoulder will I get a "Recipe for a program" that will aid with those "Grand designs" "Testing times". Sorry for the poetic excursion, I guess what I am asking is what does the book "preach" about coding and are there good stories in it to keep me reading??

I have always tried to stuff my head with different practices, ideas and directions people a lot more experienced, but I am finding that I have my own way of writing code and that I come up with solutions distinctive in their own right. Will the book expose any situations with real world example and provide the authors best advice? Can you share an example?

Thank you in advance.
George Stoianov
Ranch Hand

Joined: Jan 15, 2006
Posts: 94
I just read the sample chapter To err is human and I like it very much. It made me think and I am going to go back to some things I wrote and have a second look at my approach.

With regards to error handling how far should exceptions propagate it seems natural to me that some libraries doing basic grunt work should raise exceptions and they should go up all the way to the user interaction level and the decision of what to do with them will be made there. Is that correct??

Thanks
Pete Goodliffe
author
Greenhorn

Joined: Feb 02, 2007
Posts: 24
Hi George,

I'm glad you enjoyed the chapter.

Your question is actually a very deep one, and a thread that could run and run! Perhaps the best advice I can give you is to take a look at a great discussion by Hubert matthews on this that was published in the most recent Overload magazine.

It's available at http://www.accu.org/index.php/journals/1303 and would be a good starting point to gain an understanding of the most appropriate way to raise and handle exceptions.

I hope this helps!

Pete
George Stoianov
Ranch Hand

Joined: Jan 15, 2006
Posts: 94
Thank you for that link, that was very a very good read as well. There was a mention by the author about some anti-patterns that exist in the Java language as well when dealing with exceptions namely putting more try's in a finally block when dealing with closing sql connections.

In your mind and expereince with different languages how does Java fair in its exception handling compared to other languages?
Thank you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Code Craft: Grand designs etc.