• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

This weeks giveaway

 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This week we are giving away 4 copies of Bitter Java
And the best part, the Author Bruce A. Tate is on-line to answer your questions.
Every lets give Bruce a warm JavaRanch welcome.
Thanks to the good people at Manning Publications Co. for the books.
 
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome Bruce!!!
Thanks for the marvelous book you authored. Hope it tops amazon.com's best-sellers list.
[ June 04, 2002: Message edited by: Doug Wang ]
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome Bruce,
Cud u plz tell us why u had titled the book as 'Bitter Java'.
But I guess the info which we can get out of it wud be sweet though... :-)
ChEeRs,
John
 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think I read somewhere that he didn�t like the fact 99% of titles of the books about java is something like "easy as 123 java" or "piece of cake java", etc. Please correct me if I�m wrong.
Francisco
 
Author
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the welcome,and the comments!


Thanks for the marvelous book you authored. Hope it tops amazon.com's best-sellers list.


My parents were over at my place when Bitter Java came out of nowhere and climbed all the way up to #9 on Amazon. We were all blown away. That was almost as fun as running State Line Falls (in Chapter 1). We spent a couple weeks on top of Computers and Internet, Java Shop, and Programming. The previous best at Manning was #137. Smaller publishers can't usually afford the advertising that it takes to drive a book so high. I still couldn't tell you why Bitter Java's done so well. I'm an unknown author, with a small publisher, in a down economy...someone pinch me.


Cud u plz tell us why u had titled the book as 'Bitter Java'.


I was working on a proof-of-concept team and my lead programmer was right out of the 60s. I mean, I wrote Hello, World as my first Java program, but Brady wrote an emulator. We were seeing the same mistakes over and over, and were planning to teach a session on some of those common mistakes. We were on the phone and I think we said "Bitter Java" at the same time. Of course, Brady is the one on the cover that's credited with the EJB examples.


I think I read somewhere that he didn�t like the fact 99% of titles of the books about java is something like "easy as 123 java" or "piece of cake java", etc.


Francisco, great Lord of the Rings quote. Actually, SlashDot made that point in a good review. It's kind of true, isn't it? Just about everyone trys to present every new technology as easy and bug proof. I definitely don't bash Java. In fact, you can see why it developed the way that it did when you consider the programming landscape. MicroSoft ruled the world from a development perspective. Many IBM customers were still writing huge amounts of COBOL. C++ was getting a foothold, but there was significant backlash. SmallTalk couldn't achieve the market momentum. SUN's answer? SmallTalk-like behaviors, with C++ like syntax. A little of the C++ baggage came back to bite us, but overall, allowed Java to rapidly build a community. They simply tapped the skill and used the C++ frustration as a motivator.
While I don't bash Java, I do acknowledge that there are some very real traps that can and do burn people badly. I think we need to talk about the common problems, and drill down to the root causes and motivations.
Thanks again for the welcome, and the comments.
 
Francisco A Guimaraes
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does your book cover design problems too? like design patterns and when to use them?
Francisco
 
Bruce Tate
Author
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Francisco, I cover three different types of antipatterns.
First are antipatterns for low-level design issues and idioms. Good idea; bad execution. For example, leaky caches are very common. Usually, the motivation for a cache is good, but the cache simply does not have a mechanism to invalidate old data.
Second are architectural antipatterns. Bad idea. Accessing a remote entity model is usually a bad idea because of round tripping. Instead, you should use a facade.
Third are process-oriented antipatterns. These relate not to software, but the way that we build it. For example, too many people do performance benchmarking without taking a baseline before hand. People also change more than one variable at a time. I call this antipattern performance thrash tuning.
I hope this helps.
 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bruce,
I saw that there's a mention of Extreme Programming in the book. Do you touch on XP-related topics like antipatterns/patterns for test-first programming on the server side?
Junilu
 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello to All!

Welcom Bruce!
Can u describe the title page with an old man.
What kind of patterns the book cover.
 
Francisco A Guimaraes
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what�s an antipattern?
Francisco
 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome, Bruce.
I'm enjoying patterns. Now you are sharing your bitter experience with us by anti-patterns. Interesting topics. Look forward to reading it.
Yingtang
 
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Francisco,
Pattern = designs recommended for use
Antipattern = designs to avoid
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Francisco A Guimaraes:
what�s an antipattern?
Francisco


See http://c2.com/cgi/wiki?AntiPatterns for a good explanation
 
Bruce Tate
Author
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the continued interest. Some answers (or attempts):


I saw that there's a mention of Extreme Programming in the book. Do you touch on XP-related topics like antipatterns/patterns for test-first programming on the server side?


I do touch on extreme programming, particularly the emphasis on programming hygiene and refactoring. I don't dive too deeply into testing antipatterns, though could have easily done so. If there's enough interest, I'll definitely do so in the next edition.


What's an antipattern?


Antipatterns are one of the central themes of Bitter Java. Three elements:
1) Literary forms... (descriptions; not code)
2) of commonly occurring solutions...(needs to happen frequently)
3) With negative consequences...(they need to hurt).
Simply put, antipatterns are descriptions of common designs that frequently bite programmers in the butt.
The cover is interesting. Manning has these types of figures on all of the books. I'll have to refer you to the book for a description of this one. There's a page called "The Manning People." Manning's partner and chief editor hand picked this one. If you've ever had a bad cup of coffee, you'll get the meaning of the title. Good stuff (Java) gone bad.
What kind of patterns? I kept the focus intentionally narrow: server side antipatterns for the intermediate Java programmer.
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bruce!
Love the title. The first time I saw it I thought you were bashing Java. Quickly realized that it wasn't the case at all!
Thanks for the book. Finally some reality. There are so many how too's out there that do not really get into the avoidance of bad coding practices. I also would like to commend you on your website http://www.j2life.com/bitterjava/bitterjava.html
I just finished reading "Java Performance: the top 5 pigs".
Question regarding your comment "...but the cache simply does not have a mechanism to invalidate old data." What we are doing in our design is writing the cache to a local DB and pulling the data from there upon receiving requests. We then clean this up with a DELETE statement and further do another cleanup (cron job once a day) for any data that has existed for more than 24 hours.
Any thoughts on this?
Regards,
Angelo.
[ June 04, 2002: Message edited by: Angelo Celeste ]
 
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bruce,
well going through the previous posts,it seems reading "Bitter-Java" would definately enlighten us about the anti-patterns in design and coding as well.
1)Well I would like to know whether u have covered all the design patterns as well.
2)Whether code refactoring is covered with some examples in context to J2EE framework.
3)How best can i make use of your book in the study for OOAD/UML
Rishi Singh
SCJP,SCWCD
 
Bruce Tate
Author
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Re. cache, I'd need to know a little more about your topology. Is there some reason that an in-memory cache would not work?
Re. Bitter Java, I focus on negative designs, and refactoring them to better designs. I try to choose common design patterns when they're available, but my emphasis is on antipatterns. I think that most programmers need to understand both.
 
Doug Wang
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Gerry Giese:
Pattern = designs recommended for use
Antipattern = designs to avoid


According to this book,
AntiPatterns = start point of refactoring
Patterns - the goal of refactoring
 
Rishi Singh
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bruce,
As a developer what do u recommend knowing anti-pattern first and then migrating to know what is the perfect i.e pattern or knowing what is the perfect and then trying to model urself.Well I guess both-ways one needs to follow good design principles.
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Gerry Giese:
Francisco,
Pattern = designs recommended for use
Antipattern = designs to avoid


I think this is a to simplistic statement. What is a good pattern in one context might easily be an antipattern in an other. A pattern might even degrade to an antipattern by-and-by just by changing circumstances.
Also notice that Patterns don't necessarily have to be about design.
 
Junilu Lacar
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Originally posted by Ilja Preuss:
A pattern might even degrade to an antipattern by-and-by just by changing circumstances.
Absolutely. For example, what may have been good practices in the past such as Structured Analysis and Design or Procedural Programming may not be well suited for application when using an OOAD/OOP approach. Over time, a pattern may lose it's usefulness just because of new developments that render it obsolete.
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Junilu Lacar:
Originally posted by Ilja Preuss:
A pattern might even degrade to an antipattern by-and-by just by changing circumstances.
Absolutely. For example, what may have been good practices in the past such as Structured Analysis and Design or Procedural Programming may not be well suited for application when using an OOAD/OOP approach. Over time, a pattern may lose it's usefulness just because of new developments that render it obsolete.


You are right, but I was trying to point an other case:
As the appropriatness of a pattern depends on the context, a pattern can become an antipattern if the context changes.
For example, a very well fitting Design Pattern may become an antipattern when you need to implement new features.
A process pattern may become inappropriate when cultural circumstances change, for example when the teams size changes.
etc.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I was wondering how "test-first" design and other principles of extreme prorgramming complemenet the pattern anti-pattern way of thinking?
Thanks,
Allan
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,
I am doing J2EE Project in which we used Singleton design pattern. I am eager to know about anti design patterns. From the your book review page , I got confused with whether it is preferable one to adopt or not ? Can you please give a chance to read ur book or explain ?
TAI,
Amudha Loganathan
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bruce,
Nice to know the answer from you for my doubts.
1. Whether " bitter java " explains the concept of all the anti design patterns.
2. From the review page, I came to know that this book explains the design pattern concepts from Java point of view. As I am new to Java Design team ( just Previously Java Programmer ), will your book fully explains the concept of J2EE patterns ?
3. Will it be helpful for certification ?
Thanks,
N. Ravisankar
 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Author,
From the reviews of the book, I came to know that this book deals with anti design patterns with extreme programming.
Is it explains the change of design patterns which is going to happen due to the forthcoming release of EJB 2.1 ???
 
Bruce Tate
Author
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry that I can't get to all of these.
Re. the singleton, very useful. When you use them, be careful with your memory management. If you put items in a collection anchored by a singleton, it may never get garbage collected.
Re. antipatterns and usefullness, you need both design patterns and antipatterns. Antipatterns help you avoid mistakes. For example, if you're doing maintenance, and notice the same types of bugs over and over, you should take action. Write up the behavior, tell them what to do about it, and take steps to prevent it from happening.
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sure it seems like an interesting reading. After studying java and working on it, there are still basic things which just dont fit in. This book is a nice change from the learning guides.
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Allan Jacob:
I was wondering how "test-first" design and other principles of extreme prorgramming complemenet the pattern anti-pattern way of thinking?


You might want to take a look at "Refactoring to Patterns" from http://www.industriallogic.com/xp/refactoring/ which is discussing exactly this topic.
 
reply
    Bookmark Topic Watch Topic
  • New Topic