Slashdot Mirror


Hardcore Java

Alex Garrett writes "First, a quibble. Hardcore Java is not hardcore. Hardcore is implementing coroutines in assembly language or creating a full-fledged OO system in 6K. But if you ignore the title and judge the book solely on its merits you'll find that a Java novice will find a good selection of interesting topics and even an expert will learn a few things. The expert will also find plenty of things to disagree with -- some matters of opinion and others of fact." With that start, read on for the rest of Garrett's review of Hardcore Java, a book in which he finds slightly more worth for Java novices than experts. Hardcore Java author Robert Simmons, Jr. pages 400 publisher O'Reilly rating Experts: 4/10; Novices: 6/10 reviewer Alex Garrett ISBN 0596005687 summary The path to Java guru-hood

The two fatal flaws with this book are that it suffers from a lack of cohesion and focus on its audience and that it doesn't present anything new. That the book doesn't present anything new isn't bad if its goal is to summarize, clarify, and educate the novice. But this book doesn't even work for novices because the author has misidentified his audience. At times he writes for the intermediate programmer, at other times he writes for beginners. The confusion over the audience causes the book to leave novices and experts unsatisfied in equal parts.

Detailed Review
Simmons goal is to write a book that helps "transform a [Java] developer from the intermediate level to a true guru." It is his contention that there is a distinct lack of books that target the intermediate to advanced programmer -- his shining exception is the book Secrets of the C++ Masters by Jeff Alger. While I tend to agree with his assessment, I think that he fails for the following reasons: he doesn't stay true to the audience he has chosen and he doesn't say anything particularly new about the topics he covers.

Rather than provide a review of the book as a whole, I'm going to focus on a few chapters and describe what I thought worked and what I thought didn't work. I chose chapters where I thought the author really had an opportunity to distinguish this book from other similar books. At the end of the chapter reviews I provide an overview of the book.

Chapter 1: Java in Review
In this chapter the author sets the stage for the following chapters by providing an overview of the Java concepts that the reader is expected to be familiar with.

The Good:
Assertions are one of the things that a good software engineer should understand and use. It shows good judgement on the author's part to put them at the beginning of the book so the reader can benefit from the author's impressions. I also found his discussion of initialization to be insightful and interesting. I thought I had a pretty solid understanding of the subject but I was surprised to learn that a field can be initialized by what amounts to an inline method. The author cautions that this technique shouldn't be used often, but he gives a compelling example of when it can be used. It's definitely a trick I'm going to keep in my toolkit.

The Bad:
The first problem is that none of the material in this chapter is necessary for understanding the other parts of the book. Most of it could be reduced to footnotes or sidebars if the author felt it necessary to clarify subsequent topics, but to spend time explaining the importance of the default clause in a conditional is a waste of the reader's time. There's an old saying, "Tell me and I'll forget, show me and I may remember, involve me and I'll understand." The author of a technical book needs to make a significant effort to involve the reader. If involving the reader isn't possible for some reason, the author should, at the very least, show the reader rather than simply enumerating principles divorced from a learning context. Simmons should show us how to use assertions by using them. He does a great job of this with his ubiquitious use of final. I'm less certain of how well he does with his other core concepts. I could go back to the book and look it up, but if I need to do that, it means he's already failed.

The other problem with this chapter is that the author assumes the stance that the reader is a C++ programmer approaching Java. He asserts, "To understand the advanced concepts of the Java language, there are a few core concepts that you must have firmly in mind. Without these concepts, much of this book will not make a lot of sense. The concepts of pointers in Java, its class hierarchy, and RTTI (runtime type identification) are three of the most important on this list." This list might be important for a C or C++ programmer moving to Java (which is a position I'll hazard a guess that the author found himself) but it's marginally useful for anyone else. Allow me to summarize: Java has no pointers, all objects inherit from java.lang.Object, and you can interrogate an object to determine its type at runtime. 'Nuff said.

Unfortunately, this is a theme that runs throughout the book. The author seems to assume that his audience has a C++ background and he either differentiates between the things that Java has that C++ doesn't (e.g., pointers) or he introduces bits from his C++ background that are also in Java (e.g., the ternary operator). The reason for this, I believe, is that the author has failed to separate himself sufficiently from his audience. That's to say, he's writing the book that he would have liked to have read when he was starting his Java career. This isn't a bad thing if you're sufficiently like Robert Simmons, Jr. to warrant that kind of advice, but if you're not, his exposition is going to be hit or miss.

Chapter 5: Exceptional Code
This chapter covers the use and misuse of exceptions in Java. It provides a summary of the different types of exceptions and provides some guidelines for good coding practices.

The Good:
Exceptions are an important part of Java and are misunderstood by a fair chunk of Java developers. The author recognizes this and attempts to provide an introduction to exceptions and show some of the common exception anti-idioms. His discussion on the necessity of the atomicity of transactions was valuable and clear. He shows what happens in the rare instances when a transaction fails midstream and isn't rolled back. He then provides good advice on how to write code to prevent this sort of thing from happening.

The Bad:
This is a short chapter and that's unfortunate because the topic of exceptions is rich and worth much investigation. This chapter provided an excellent opportunity for Simmons to display some virtuosity and say something significant about the subject. If nothing else, he could have elaborated on the relative merits of checked exceptions vs. unchecked exceptions; a topic that has been the subject of Holy Wars in the Java/C# community. Unfortunately, all he really mustered was an, "unchecked exceptions are Java's way of not cluttering up your code with too many 'throws' clauses." (paraphrased, but see the end of section 5.1.1)

The author seems to have some good intuitions around the use and misuse of exceptions, but rather than clearly delineating the issues and sharing his insight with the reader, he sets up a couple of toy examples that show the syntax of exception handling and waffles around the issue of when to use checked exceptions and when to use unchecked exceptions. There is little enough spoken about exception handling that this might be sufficient if Joshua Bloch hadn't already provided a solid grounding in exceptions with Effective Java. But since he has, I had hoped for some new insights, which Simmons failed to provide.

Chapters 9 & 10: Practical Reflection and Proxies
These chapters provide an introduction to Java's capabilities for introspection of types and objects, as well as describing the new JDK 1.4 DynamicProxy class. Simmons also gives some examples of how to write proxies--dynamic and static.

The Good:
In choosing to cover Java's introspection facilities, the author demonstrates that he recognizes the importance of metaprogramming as a qualification of Java expertise. It's on par with things like writing classloaders or grokking bytecode and it separates the gurus from the merely competent. If nothing else, it gives Java programmers the opportunity to do the things that smug lisp weenies are always nattering on about.

The author gives a good overview of how reflection works in Java as well as providing some examples. He also distinguishes between static proxies (like the Proxy pattern in Design Patterns) and the nifty dynamic proxy part of JDK 1.4 and shows how to use these proxies and provides some demonstrations of how they can be used.

The Bad:
As with much of the book, the examples aren't particularly compelling and Simmons doesn't take the opportunity to take the reader to the next level and show him some sweet metaprogramming. Reflection and proxies aren't complicated conceptually, and the syntax is fairly straightforward. He could have gotten the implementation details out of the way and then provided examples from the field. The JMock guys are doing some nice work in generating mock objects for unit testing with dynamic proxy and the Nanning guys have a nice aspect-oriented programming framework that uses reflection and proxies. This is the kind of work that's being done with metaprogramming and confining the discussion to toy examples is discouraging.

Overall:
The Good:
The author has a good conversational style and seems like the kind of guy that you'd enjoy working with--friendly, knowledgable, and genuinely enthusiastic about his subject. The book has plenty of interesting material. The use of final is a great way of turning logic errors into compiler errors. A knowledge of metaprogramming is becoming more important every day, and bringing metaprogramming to test-driven development is an idea with considerable merit. Someone new to Java could use this book as a sampler of some important ideas in the practice of Java programming and explore the topics in greater depth at a later point.

The Bad:
This book suffers because the author identified his audience and stated his goal and then didn't follow the path he laid out. As a result, the author winds up disappointing all readers. The novice will find that the author glosses over topics that are clearly over their heads, while the expert will be bored by the level of detail that the author devotes to relatively simple topics.

Additionally, the examples are so simple that a newcomer to Java will not have trouble following them, but someone who has used Java for more than half-a-dozen months will find them uninteresting and unchallenging. The author should have taken the opportunity to really explore the space.

Conclusion:
While this book covered some interesting and high level java topics, it covered them shallowly and its content was presented inconsistently to readers of varying levels of expertise. The author needed to stick with his audience, choose topics that fit well together, and challenge the reader. That said, I don't lay the blame entirely on the author. His editor should have made the book tighter, more compelling, and more focused on its central thesis: helping intermediate Java programmers become expert Java programmers. The technical reviewers, who are presumably experts, should have provided the feedback that Simmons needed to raise the bar.

The book would be more appropriately titled, Robert Simmons, Jr. Shares Some Cool Things from Projects He Has Worked On. I think the best thing for this book would have been for the author to cull each chapter down to one quarter of its existing size and then publish them separately as magazine articles.

Alternate Sources:
The Java Programming Language, 3ed and Effective Java together cover nearly everything in this book in much greater detail and with better authority. Ken Arnold and James Gosling are two of three authors for the first book, and Joshua Bloch, author of the java.util.Collections classes is the author of the second. If you've mastered the material in these two books, you're an expert, full stop. Unfortunately, these books don't really cover reflection and proxies. If you're an intermediate java programmer and you want a good overview of proxies and metaprogramming in Java, I recommend the source code for Nanning, a lightweight aspect-oriented programming framework for Java.

Alex Garrett is a contract programmer who mostly works with Java. For a while, he was the acquisitions editor for Manning Publications, which inclines him to be a smug publishing weenie. You can purchase Hardcore Java from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, carefully read the book review guidelines, then visit the submission page.

197 comments

  1. Hardcore by eln · · Score: 3, Insightful

    Anything that people feel the need to go out of their way to label "hardcore" isn't.

    1. Re:Hardcore by Anonymous Coward · · Score: 4, Funny

      mmmm....welll...I dunno about that. You must be severely desensitized from extended pr0n-viewing sessions to make that kind of statement ;)

    2. Re:Hardcore by Tukla · · Score: 1
      Hardcore is having a Slashdot number with fewer than six digits.

      Okay, no, it's not.

  2. I've seen this before by Stevyn · · Score: 4, Funny

    It was in an ad for Starbucks. I didn't believe it then either.

    Once computers become easy to use and fast, we won't need to resort to java.

    By that I mean coffee.

    1. Re:I've seen this before by NanoGator · · Score: 2, Interesting

      "It was in an ad for Starbucks."

      Ugh. Something Janet Jackson said a couple of years ago twisted my perception of what this ad was about. To those who don't get the reference, consider yourself lucky, and don't search for Janet Jackson coffee.

      --
      "Derp de derp."
    2. Re:I've seen this before by Anonymous Coward · · Score: 0

      What? Coffee enemas (if done correctly) can be healthy. There's merit to having an enema anyway, as most people are carrying around some extra fecal material in their bowels that got "stuck" or whatnot. An enema or colonic once a year or every six months can fix that easily.

      Aside from that, materials in the water can diffuse very easily through the intestines, stimulating parts of the body. Coffee enemas are supposed to stimulate the liver in some way, if I understand correctly (although I've never heard of actual medical evidence supporting this).

      As a side note, every once and a while you hear about someone dying because of a wine/beer/vodka/whatever enema. Alcohol gets absorbed _very_ quickly through the intestines, and without the liver to counteract it, you can get alcohol poisoning very, very easily.

  3. The author has some articles on nested classes... by tcopeland · · Score: 5, Informative

    ...on OnJava - they're excerpts from the book.

    These excerpts are pretty good - he talks thru some scoping issues that can be tricky. OuterClass.this.foo and all that sort of thing.

  4. Nonono by Uma+Thurman · · Score: 5, Funny

    Hardcore java is when you bomb the Microsoft headquarters for inventing C#.

    --
    This is America, damnit. Speak Spanish!
    1. Re:Nonono by Anonymous Coward · · Score: 5, Funny

      No way. Harcord Java is when two threads are going at it while their parents are sleeping.

    2. Re:Nonono by Defunkt · · Score: 0

      Harcord? Isn't that in Massachusetts or something?

    3. Re:Nonono by CodeMonkey4Hire · · Score: 4, Funny

      Hardcore java is when you bomb the Microsoft headquarters for inventing C#.

      Invent: to produce (as something useful) for the first time through the use of the imagination or of ingenious thinking and experiment

      While many /.ers would jump on the first bit, I was thinking more along the lines of C# being MS's clone of Java. Don't get me wrong, I like them both. I would never pay for C#, but if my boss gives it to me and tells me to use it, I'll count my blessings that it wasn't VB.

      --

      Let's go Hurricanes!!! 2006 Stanley Cup Champions!!!
    4. Re:Nonono by Anonymous Coward · · Score: 1, Insightful

      VB.NET actually isn't that bad. Fully OO, fairly intuitive language structure, and as fast as C#. There are worse things to be forced upon you.

    5. Re:Nonono by CodeMonkey4Hire · · Score: 1

      Oh, VB.NET is great. It's just C# for the VB people (which I ain't [sic]). It's VB6 that I hate.

      --

      Let's go Hurricanes!!! 2006 Stanley Cup Champions!!!
    6. Re:Nonono by Anonymous Coward · · Score: 0

      OK that is the funniest threading/programming joke I have read in a long time.

    7. Re:Nonono by molarmass192 · · Score: 1

      Amen to that ... I'd expand it to include any of the pre-.NET VB-esque languages, namely VB6-, ASP, VBA ... loosely typed and implicit declares ... WHY!?! Seriously, I'm at the tail end of porting a fair sized ASP based commercial app to JSP and I'm blown away at the number of scope bugs I've come across. Granted, it's primarily the fault of the original developers but I still have to lay some blame on the language for even allowing it in the first place ... stupid Variants.

      --

      Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws-Plato
    8. Re:Nonono by CodeMonkey4Hire · · Score: 1

      Yes, I will gladly accept a little "overhead" in exchange for true OO and strong types and strictly defined scopes, etc. If you build a stupid language, they will come.

      I pretty much view all of the .NETs as one language. At work I am doing most of my .NET in VB.NET (because I work with a bunch of VB6 programmers and I want them to be able to pick up where I left off). As a C/C++/Java programmer, I sometimes prefer to make my foundation classes in C# though, and leave the VB.NET for the GUI.

      However, I have been put back on some work requiring VB6 again, and I am having a miserable time. It's like letting a kid play with XBox/PS2 and then taking it away and giving them an Intellivision (sorry you nostalgic freaks, I just hooked up my wife's old one for her and it sucks - I appreciate it as a predecessor, but I want to throw it away now).

      --

      Let's go Hurricanes!!! 2006 Stanley Cup Champions!!!
    9. Re:Nonono by Anonymous Coward · · Score: 0

      Okay, great, thanks for making me laugh out loud while I'm supposed to be working.

  5. Hardcore? by ayjay29 · · Score: 5, Funny

    "Hardcore is implementing coroutines in assembly language or creating a full-fledged OO system in 6K."

    Didn't the word, or phrase originate from porn? Or was it in use before that? It certanly pre-dates assembly language.

    --
    Offtopic, Inflammatory, Inappropriate, Illegal, or Offensive comments might be moderated up.
    1. Re:Hardcore? by tfbastard · · Score: 5, Insightful

      The term hardcore is also applied on musical genres that are supposed to be harder and/or faster. First there was hardcore punk (think dead kennedys and black flag), 10 years later it was hardcore techno and "happy hardcore" (big, funny hat included).

      With that said, hardcore java is not an impossibility, since it's based on context.

    2. Re:Hardcore? by Anonymous Coward · · Score: 5, Funny

      Right. Originally, it was hardcore Gregorian Chanting. It was pretty much like the regular chanting, except for all the cursing.

    3. Re:Hardcore? by prell · · Score: 1
      From WordNet (r) 2.0 [wn]:

      hardcore
      adj 1: stubbornly resistant to change or improvement; "hard-core
      addicts" [syn: {hard-core}]

      How prescient!
    4. Re:Hardcore? by sketerpot · · Score: 2, Insightful
      The OO system in 6K isn't hardcore. It's cool, sure. Lots of things are cool. But it's just slightly mind-bending, since Scheme (the language used) really was designed for that sort of thing. It just takes messages in the form of symbols passed to a closure (a function with state) and looks up the corresponding member function, and does some various things for inheritance and such. I applaud the author of the OO system for making such a neat hack, but there's really nothing hardcore about using closures to make an object system. It doesn't even define any macros to make the OO system feel like a natural part of the language (deliberate, to keep the size down and make it more concise).

      Or, as the author of the OO system said, "It is actually rather easy to implement an OO system in a functional language."

    5. Re:Hardcore? by Otter · · Score: 2, Informative
      Interesting enough question to look up and...

      ...it seems that the word dates back to at least 1951, with its application to porn not coming until the 1970's. The pornography use definitely predates references to hardcore music, though.

    6. Re:Hardcore? by tolan-b · · Score: 1
      hardcore techno-\
      -> hardcore -> happy hardcore
      hardcore house--/
      Obviously we could argue about it, but that's my understanding, and I'm a huge fan of hardcore house / hardcore :)
    7. Re:Hardcore? by Anonymous Coward · · Score: 0

      What I find interesting is that the reviewer labels writing assembly code to be "hardcore" but not programming in java. Now just trust me on this one. Layers of abstraction are a good thing, maybe sometimes not implemented in the best way, but in general, a good thing. And not just in theory, but in pratice too. Assembly is itself an abstraction on top of the machine code. Add a few more layers and your writing java. What's the big deal? It's all an interface to the hardware. Bits and bytes. If someone thinkgs they are "hardcore" because they can add numbers in assemlby, I say, "write something useful". Write a fucking webserver in x86 and debug it. Write a relational database or a for that matter, a fucking text text editor.

      The only thing hardcore around here is my dick in everyone's mouth.

    8. Re:Hardcore? by Anonymous Coward · · Score: 0

      Hardcore has been used as a music reference since the 60's, when it was used for before that I don't know.

    9. Re:Hardcore? by Canberra+Bob · · Score: 1

      OK, Ill argue about it :) I would say happy hardcore had a lot of influence from early 90s European trance, with a lot more piano sounds than hardcore techno. I also see very little house or hardhouse influence in happy hardcore. Just my take on it.

      Im just curious, what exactly do you define as hardcore? I did not realise it was a genre by itself. Can you give me some examples? Are you referring to gabber? How does it differ from hardcore techno / hard house?

      Nothing can beat the good old days of real trance and techno in the early to mid 90s, before it became the "cool" thing to listen to :)

    10. Re:Hardcore? by wass · · Score: 2, Informative
      Didn't the word, or phrase originate from porn? Or was it in use before that? It certanly pre-dates assembly language.

      I've heard it used in certain physics scattering models to refer to atoms with a hard core. Ie, scattering off of something with a 'soft' outer shell and a harder core. Rutherford may have used this term first w/ his gold foil experiment that determined the hard core nature of the atomic nucleus.

      Also used in some basic solid-state physics transort equations, like the Drude model. But I don't know if they were used by the original discoverers or scientists that came later.

      But it's possible that the usage of this hard core meaning was retroactively applied after the term existed, to refer to systems that actually have a hard core.

      --

      make world, not war

    11. Re:Hardcore? by SnoBall · · Score: 1

      Does this mean that Java is taking up a career as a stripper?

      --
      Don't eat me ... *looks at nickname* ... okay, eat me.
    12. Re:Hardcore? by bnenning · · Score: 1

      Originally, it was hardcore Gregorian Chanting. It was pretty much like the regular chanting, except for all the cursing.

      Carmina Burana comes pretty close.

      --
      How to solve most of our problems: 1.Lots of nuclear plants. 2.Cure aging.
    13. Re:Hardcore? by turgid · · Score: 1
      Didn't the word, or phrase originate from porn? Or was it in use before that? It certanly pre-dates assembly language.

      Here in the UK, "hardcore" originates in the construction industry where it refers to stones or rocks used as one of the foundation layers for roads and the like.

      I used to know this guy with buck teeth and a mullet and a bottle-opener style guitar who played something he called "hardcore" too.

    14. Re:Hardcore? by Anonymous Coward · · Score: 0

      My unabridged dictionary, circa 1909, lists this definition. It comes from the use of furnace clinkers. Clinkers are what's left after the coal burns away from embedded rocks.

    15. Re:Hardcore? by tolan-b · · Score: 1

      Hardcore as a genre is primarily breakbeat, what was generally called 'rave' in the UK, from about 90/91 to 93/94 (where it started to get silly fast, lose the breakbeats and become more like gabba).
      Hardcore tracks were often recorded at relatively sedate speeds, around 120-130 bpm, but typically played back at +6 or more.

      Examples include, anything on XL around that time, The Prodigy's 'Experience' album (definitely the more commercial end, but some of the singles owned), We are ie, Lord of the Null lines, Sweet Harmony, Suburban Bass recordings, um, my brain defeats me just now, but basically it was the main UK sound for a few years, and it was Jungle came from, before it became its weak cousin drum and bass.

    16. Re:Hardcore? by Canberra+Bob · · Score: 1

      Yes, know the style you are talking about now. Going back a few years, thats for sure! And Experience was a great albume, favourite on there being 'Hyperspeed'.

      You dont know any online stores that sell dance music from the early to mid 90s by any chance? Only place I can seem to get my hands on some of the classics is when a dj sells off their vinyl collection :( which is not that often

    17. Re:Hardcore? by ACPosterChild · · Score: 1

      Actually, the cursing version came after (and was a direct result of) the "bang yourself in the head with a board" Hardcore Gregorian Chanting.

    18. Re:Hardcore? by tolan-b · · Score: 1

      best place imho is http://www.gemm.com, it's a directory of indy stores, with all their stock listed, so you can do a search and it rifles through hundreds of shops for you :)

      also hard to find records http://www.htfr.com/

      i've just started a breaks tune with a slightly oldschool flavour, bit rough round the edges, especially the break, but i think i'll pimp it anyway ;)

      http://slight.overtops.org/mp3/wuuuaaargh-04.mp3

  6. Download ??? by Retep+Vosnul · · Score: 5, Funny

    I'll just wait a couple of weeks and download the text from Limewire. I'll simply type "hardcore" in the searchbox and... ... ow.

    --
    -- forget /. It's gone.
  7. Another quibble by stratjakt · · Score: 4, Funny

    Hardcore is implementing coroutines in assembly language or creating a full-fledged OO system in 6K.

    No, hardcore is running another car into the ditch and killing the driver because they changed lanes without signalling.

    Or showing off your giant swastika tattoo to a black panthers meeting.

    Hardcore is doing coke off the blade of a knife while you make some chickenhead toss your salad as you cruise the strip in your dropped down caddy.

    That's hardcore, motherfucker.

    It has nothing to do with Java whatsoever.

    --
    I don't need no instructions to know how to rock!!!!
    1. Re:Another quibble by Tukla · · Score: 1

      You're certainly a busy person.

  8. Links and thoughts.. by ericspinder · · Score: 5, Insightful
    I find this review to be interesting and well written, but I read parts of Hardcore Java and found it to be interesting. I disagree strongly with the reviewer on one thing...
    If you've mastered the material in these two books, you're an expert, full stop.
    NEVER, think that reading one or two books will make anyone an expert on anything, let alone on such a complex topic as programming. I personally never stop learning.

    The two books that he recomended look good on Amazon (they both reviewed well). I find it interesting the both of the books are from the same publisher. (note that I am not a amazon partner) The Java(TM) Programming Language (3rd Edition)
    Effective Java Programming Language Guide
    Nanning

    --
    The grass is only greener, if you don't take care of your own lawn.
    1. Re:Links and thoughts.. by AdamInParadise · · Score: 1

      Mastering the material in a book is different from merely reading a book...

      Concerning the editor, it really doesn't matter. Those books are good because they are from the authors of Java (and maybe because Sun has some good reviewers).

      Regards,
      David

      --
      Nobox: Only simple products.
    2. Re:Links and thoughts.. by pedantic+bore · · Score: 1
      NEVER, think that reading one or two books will make anyone an expert on anything, let alone on such a complex topic as programming. I personally never stop learning.

      He didn't write "read", he wrote "mastered". There's a big difference. Since I haven't read the books, I can't comment on whether this is true, but in any case it's much different from what you're responding to.

      --
      Am I part of the core demographic for Swedish Fish?
    3. Re:Links and thoughts.. by ericspinder · · Score: 1
      That's true, mastering the material is very different than reading it. Heck, very recently I jumped on someone in this forum for taking my post incorrectly but, I don't believe that the author was recomending books as a index of the subjects to be learned, but as a definitive reading guide for the mastering of that subject. Just to be a little rude (but hopefully a little more funny),,,
      Master this subject and you will not need to learn anything thing else...
      • life
      Now pay me $39 (plus shipping)

      Even taken you way, I believe that most of my complaint is still valid, experts (even Masters) should (and almost certainly will) continue to learn.

      Concerning the editor, it really doesn't matter. Those books are good because they are from the authors of Java (and maybe because Sun has some good reviewers).
      First of all I said "the same publisher" not editor, shame on you !:). I believe that the publisher does matter, for that matter the editor is important as well. Not as important as the author, but still a consideration. The fact that both of the books are from the same publisher says something, I don't know what... I could mean that that publisher is really good, or that the reviewer is pushing books (but that's a tin-foil hat reason, which I don't think fits quite right), or ...(more seculation which we are so good at in this forum!) Also, just because someone can write good code, it doesn't mean that they are effective authors (just because apples and oranges both come from trees..). Of course , it doesn't mean that they are bad at it either, these books are both well reviewed, I look forward to making the judgement myself. Mostly because I am in intermediate Java programmer myself and was happy to read such a well written review, the reviewer is sure to make good recommendations.
      --
      The grass is only greener, if you don't take care of your own lawn.
    4. Re:Links and thoughts.. by Anonymous Coward · · Score: 0
      the reviewer indeed was recommending the books as definitive reading guides, and rightly so: they are written by the language creators and endorsed by the language maintainer (SUN). the reviewer neither stated nor implied by the recommendation of other books, that experts/masters need not learn further.

      your insinuation on the reviewer's intent, simply because those other books he recommends come from the same publisher, is a stretch and insult.

    5. Re:Links and thoughts.. by brer_rabbit · · Score: 1
      NEVER, think that reading one or two books will make anyone an expert on anything, let alone on such a complex topic as programming. I personally never stop learning.

      That's only because the current crop of programming languages are so complex. Browsing my bookshelf got seven books on C++. Why? The language requires lots of details, C++ has a decent size library, and overall is rather complex.

      Then I scan my shelf for books on C and I only find one: the K&R book, 2nd edition. It's the only book I need for C. But I don't think things have to be this way, Perl is a fairly advanced language and it only requires a single book.

    6. Re:Links and thoughts.. by Paradise+Pete · · Score: 2, Funny
      Master this subject and you will not need to learn anything thing else...

      What is this anything thing of which you speak? Sounds like Dr. Suess:

      It's the anything thing
      this thing that I bring.

      Use it for surfing
      use it to sing.

  9. tsk tsk moderators. by Dogun · · Score: 0, Offtopic

    Despite the obvious flame, the presence of the word 'swastika' I have to say that the parent is much more 'funny' than flamebait.

  10. Pretty much sums it up by Tsiangkun · · Score: 5, Funny

    two fatal flaws with this book are that it suffers from a lack of cohesion and focus

    OK, a lot of tech books lack focus when trying to cover a lot of new material.

    it doesn't present anything new.

    oh.

    --Tsiangkun

  11. This? by Anonymous Coward · · Score: 2, Funny

    Enter the coffee cure. "With the enema you can bring out the sad cells or--whatever it is--even stronger." At one point, Jackson says she needed an enema two days in a row to cleanse some particularly pesky sad cells. - e!online

  12. Hardcore Java? by ShatteredDream · · Score: 3, Funny

    Isn't that when your applet jumps out of its sandbox and gets all cozy and promiscuous with local apps?

  13. Hardcore geekery... heh heh by JessLeah · · Score: 5, Funny

    "Hardcore is implementing coroutines in assembly language or creating a full-fledged OO system in 6K."

    I can see it now. The scene: A dark alley, after dusk. A geek wearing scotch-taped glasses and with a Zaurus in his pocket confronts a group of large, scary men.

    Geek: "I'm hardcore, man! I implemented a fully-fledged object oriented system in six kilobytes of code! I even talked to a girl once!"

    Thug 1: "Let's beat Professor Einstein here up."

    Geek: "You can't touch me, knave! I'm hardcore!"

    (the beating commences...)

    Geek: "Ow! OWWW! Linus protect meeeee!"

    1. Re:Hardcore geekery... heh heh by maxwell+demon · · Score: 1

      Is implementing coroutines in assembly really that complicated? I never did it, but shouldn't it just be setting up several stacks and doing simple stack switching? Indeed, I guess implementing coroutines without assembly language would really be hardcore!

      --
      The Tao of math: The numbers you can count are not the real numbers.
  14. A Quibble with your Quibble by spankalee · · Score: 5, Insightful

    Hardcore Java might not be as h4r6c0r3 as assembly, but that doesn't mean that the title should be ignored or that there is simply no such thing as "hardcore" java.

    Harcore Java to me means writing Class Loaders or Security Managers, bypassing encapsulation or field and method visibility with reflection, choosing the right garbage collector for high performance server-side applications, dissecting the binary class file format, creating post-compilation class "enhancers" like JDO uses, etc.

    These are things that are beyond your typical Java novice, and I would expect some mention of some of these level of topics in any java book labeled "hardcore".

    So far from ignoring the title, if this book is more for novices than experts, I'd say the title might be misleading. But if I ignore the first few sentences of your review I might find it less biased and more useful.

    1. Re:A Quibble with your Quibble by chris_mahan · · Score: 1

      Ever heard of C?

      Java was meant to shield the programmer from the hardcore stuff.

      Or of assembler?

      I want to read a book titled: Business reporting and web front-ends in Java for ASP programmers. That book will fly off the shelves.

      --

      "Piter, too, is dead."

    2. Re:A Quibble with your Quibble by Bodrius · · Score: 1

      Agreed, up to a point...

      When I read the title of the review, the first thing that came to my mind was "Server-based Java Programming", from Manning editorials.

      It's one of those really good books that have been sligthly, but unfortunately misnamed. Although the motivation IS server-side code, and there's enough material covering the topic (data layers, rmi, services, etc), its best material was on class loaders and funky ways of using and abusing them.

      It was very good at explaining the implications of language features, where other books just reiterate documentation.

      I got it when I was a student playing with Servlets, and it was:
      - Almost completely unrelated to what I needed.
      - Too advanced for my level at that time.
      - One of the best programming books I've read, and one which fundamentally changed the way I program and think about other programs.

      From the review, I have very good reasons not to buy that book, ever. It's not like there is a shortage of books teaching you best practices on how to do exceptions or implement event-handlers in Java.

      --
      Freedom is the freedom to say 2+2=4, everything else follows...
  15. Re:assembly language is for pansies by I_Love_Pocky! · · Score: 4, Interesting

    Nothing could be easier to understand than finite state machines. The only trick is that you can't do as much with them. It doesn't make them hardcore.

    That is like saying hardcore is writing an english novel using only one vowel. There are a lot of novels you couldn't write that way.

  16. Good review! by lpangelrob2 · · Score: 1
    Judging by the review of his book, it sounds a heck of a lot like this one, only I happened to read that book and pick up a Java cert while the reviewed book probably didn't have that type of information.

    I'm probably being overly simplistic (I'm very interested in the examples of practical reflection and proxies, two features I've not found a use for yet and also were not on the exam), but that's my view in a nutshell.

  17. Re:nope. by I_Love_Pocky! · · Score: 2, Funny

    Hardcore would be writing a virtual machine (and write in in machine code) to run on the new processor that would emulate the old one.

  18. Is OO harcore? by Lord+Graga · · Score: 0, Troll

    I wouldn't think so. Living without OO, I am perfectly fine.

  19. No Pointers? by Anonymous Coward · · Score: 1, Informative

    Allow me to summarize: Java has no pointers

    If Java has no pointers what's going on here:

    int[] array, array2;
    array = new int[1];

    array[0] = 5;
    array2 = array;
    array2[0] = 12;

    System.out.println("" + array[0]);

    1. Re:No Pointers? by strictnein · · Score: 1

      That's a reference :p

    2. Re:No Pointers? by Anonymous Coward · · Score: 0

      If Java has no pointers what's going on here:

      An asshat is trying to get play the "geekier than thou card" and is impressing no one.

    3. Re:No Pointers? by lightsaber1 · · Score: 5, Informative

      Incidentally, Java is *all* pointers (except for a few primitives). They just abstract it away so you don't need to worry about it. The 'new' keyword should be a dead giveaway if nothing else (unless you've never used C++ I suppose).

    4. Re:No Pointers? by Milton+Waddams · · Score: 1

      good point. what do the C pointers do that Java ones can't?

    5. Re:No Pointers? by lightsaber1 · · Score: 2, Informative

      well, for one, you can increment/decrement/otherwise manipulate the address pointed to by the C pointer...not so easy in Java. But these are dangerous things to do, in general, and there are other ways to do them.

    6. Re:No Pointers? by psykocrime · · Score: 3, Informative

      That's a reference :p

      Then why do you get a NullPointerException
      instead of a NullReferenceException, if you
      try to access it while it's null? ;-)

      --
      // TODO: Insert Cool Sig
    7. Re:No Pointers? by pclminion · · Score: 4, Informative
      If Java has no pointers what's going on here:

      Call it a handle, or a reference. It is superficially like a pointer, as your example demonstrates.

      However, it clearly is not a pointer, because you cannot do this:

      array2 = array + 1;

      You also cannot do this:

      array2[1] = 12;

      Because it would cause a bounds exception. In C, you can get away with writing outside an array, and you get all the wonderful side effects of that, including random crashes, data corruption, or in the worst possible scenario, no visible bug whatsoever.

      And don't even think of trying this in Java:

      double[] foo = new double[100];
      int[] bar;
      bar = (int[])foo;

      The above is an example of a pointer typecast as it would be expressed in Java (if it was allowed), but thankfully, the above code is utter nonsense. Anyway, the entities you manipulate in Java are quite assuredly not pointers. They are handles to objects.

    8. Re:No Pointers? by SlashdotLemming · · Score: 2, Insightful

      Anyway, the entities you manipulate in Java are quite assuredly not pointers.

      If people defined their terms, there would be alot fewer arguments in the world.
      According to the Java specification, Java references are pointers. What you are saying is that Java does not have C style pointers. There are definitions of "pointer" at different levels of granulairty. Java has pointers if using a more generic definition of "pointer".

    9. Re:No Pointers? by Anonymous Coward · · Score: 0

      Crash horribly!
      of course you can also do pointer math... and crash horribly.

    10. Re:No Pointers? by Q+Who · · Score: 2, Informative

      Yes, pointers without pointer arithmetic, without ability to point to arbitrary locations inside objects, without ability to put arbitrary data to the pointed location.

      Handlers are not pointers.

      I suggest you read a book about implementing programming languages.

    11. Re:No Pointers? by Anonymous Coward · · Score: 0

      you must never have gotten a Null Pointer Exception error (or something like that, its been a while since i've done Java)

    12. Re:No Pointers? by lightsaber1 · · Score: 2, Informative
      I suggest you work on your terminology. What Java uses IS a pointer, albeit dumbed down to the extent where it is nothing more than an address. An explanation (the first one I found in a google search, albeit not the best I've seen) can be found here.

      The definition of a pointer does NOT require arithmetic, arbitrary pointing, or arbitrary data writing. Dictionary.com defines it as "A variable that holds the address of a core storage location." Java just happens to ensure you can't do these things because it thinks you'll screw it up (and in most cases it's right).

      One thing I really hate about Java is it's severe lack of function pointers. They are very very useful if used properly, and Java really should be putting them in imo.

      I suggest you read a book about implementing programming languages.

      Know any good ones that will prove what you're trying to say? Or are you talking out of your ass again?

    13. Re:No Pointers? by Anonymous Coward · · Score: 0

      use it as int.

    14. Re:No Pointers? by Anonymous Coward · · Score: 0

      Poorly written error messages?

    15. Re:No Pointers? by Anonymous Coward · · Score: 0

      On the other hand, the nearly universal definition of a pointer prior to Java was a C style pointer. Rather than overloading the existing definition, perhaps it would have been wiser for the Java creators to use a new term.

  20. OT: Java performance on AMD64? by Anonymous Coward · · Score: 2, Interesting

    I see Sun have released Java runtimes for AMD64, and wonder what the performance is like compared to plain 32-bit intel, MHz for MHz.

    There should be a decent improvement running in 64-bit mode, both for the VM and the code it's running, or?

  21. Oooh. by DrEldarion · · Score: 4, Funny

    "Hardcore Java" would be the best name for an internet cafe ever. It works on so many levels...

    1. Re:Oooh. by Anonymous Coward · · Score: 0

      A couple of local goths run a place called Twisted Pair.

    2. Re:Oooh. by kurosawdust · · Score: 1
      "Hardcore Java" would be the best name for an internet cafe ever. It works on so many levels...

      Two?

  22. Thanks by Stevyn · · Score: 1

    That's like saying "Don't look down"

  23. Hardcore Java means by Anonymous Coward · · Score: 0

    writing Java that runs as fast as "C".

    There is no such thing as hardcore java.

    1. Re:Hardcore Java means by Anonymous Coward · · Score: 0

      Granted, it'll take you five times as long to write the equivalent in C, but it's not like you're getting paid or anything.

  24. I'm not sure... by kroekle · · Score: 0, Troll

    I'm not sure if the book's hardcore, but the review sure is. A note to Alex Garrett, I don't have two hours to read a review (of only four chapters no less).

  25. Yeah... by sw155kn1f3 · · Score: 0, Offtopic

    > Book Reviews: Hardcore Java

    I'm personally waiting for "Hardcore sex in diving suit" book review. Would be fun to read. :)

    --
    - Arwen, I'm your father, Agent Smith.
    - Well, you're just Smith, but my father is Aerosmith!
  26. Re:assembly language is for pansies by MoosePirate · · Score: 1

    Computers are finite state machines. Complex ones, but they still are.

  27. Effective Java by ChiralSoftware · · Score: 5, Interesting
    by Joshua Bloch is the best programming book I have ever read in any language. It goes into detail about exceptions and how to use them properly. It sounds like it covers everything which this book covers, but it's brilliant. It's also a thin book. It is the only computer science book I have ever read multiple times, and gotten something out of it every time I have read it. Anyone else who has read this book is invited to chime in here...

    -----------
    WAP software

    1. Re:Effective Java by radish · · Score: 3, Informative

      It's the only one I recommend that everyone in my team borrows & reads, or better yet, has on their shelf. Java Thread Programming (Paul Hyde) is another nice, though more specalist title. Round here we just call Effective Java "The Book".

      --

      ---- Den ene knappen er powerknapp, den andre er Bender voice knapp "Bite My Shiny Metal Ass"

    2. Re:Effective Java by Anonymous Coward · · Score: 0

      I read 'Effective Java' by Bloch too. I thought it was quite good. I especially liked the stuff about static methods, anonymous classes and immutability. Dunno how it compare to this book though.

    3. Re:Effective Java by koehn · · Score: 1
      Effective Java is the best programming book I have ever read in any language.

      You should try reading fiction sometime. It's much more pleasant than books on programming languages.

    4. Re:Effective Java by Roman_(ajvvs) · · Score: 1
      It's much more pleasant than books on programming languages.

      It all depends on what you find pleasurable. I personally get more pleasure expanding my vision, than expanding my imagination (, which is not to say I don't get pleasure expanding the latter, merely moreso the former).

      --
      click-clack, front and back. I'm not moving this car otherwise.
    5. Re:Effective Java by obender · · Score: 1

      There's lots of fiction in programming books only it's labeled: 'hard facts with practical examples'.

  28. Writing Java is like by Anonymous Coward · · Score: 0

    writing an english novel that must read aloud very slowly.

  29. Re:assembly language is for pansies by Anonymous Coward · · Score: 0

    I'll see your flip-flop and raise you a C compiler. We'll see who gets done faster :P

  30. Re:nope. by mekkab · · Score: 1

    Okay, I'm wrong. I_LOVE_POCKY is hardcore.

    --
    In the future, I would want to not be isolated from my friends in the Space Station.
  31. Hardcore Java by herwin · · Score: 2, Interesting

    I bought the book hoping for material that I could present in an Advanced Object Oriented Design class. I was disappointed.

    1. Re:Hardcore Java by Anonymous Coward · · Score: 0

      I bought the book hoping for material that I could present in an Advanced Object Oriented Design class. I was disappointed.

      Umm, perhaps you should have looked for "Hardcore Advanced Object Oriented Design"... ya think?

    2. Re:Hardcore Java by Anonymous Coward · · Score: 0

      Why would you look at a programming book (with obvious details about the language syntax) for design information?

      You can't be serious. Must be a troll.

    3. Re:Hardcore Java by herwin · · Score: 1

      I am serious. We use Java as our teaching language. I was looking for good examples of advanced O-O design concepts.

  32. Hardcore Quiche by nick_davison · · Score: 1

    It's long been said that there are real men and quiche eaters.

    Legend has it the Seymour Cray actually toggled the first operating system for the CDC7600 in on the front panel from memory when it was first powered on. Needless to say, Seymour Cray is a Real Programmer.

    Assuming that "Real Men" and "Hardcore" are synonymous, and given that Java falls firmly in to the Quiche Eating category, can you really say you can have Hardcore Quiche?

    What's next: "AOL for Powerusers"?

    1. Re:Hardcore Quiche by Nefarious+Wheel · · Score: 2, Interesting

      My old departed friend and LGP-30 programmer once caught Cray filing down a resistor before soldering it back into the discrete circuitry. Something about tuning a pipeline cascade. Cray pretty much invented the instruction pipeline, and was known for tweaking his designs personally.

      --
      Do not mock my vision of impractical footwear
  33. Salute! by Anonymous Coward · · Score: 0

    And in true Slashdot revisionism, you have been downscored.

    I say to them: "YOU CAN'T HANDLE THE TRUTH".

  34. Why would you pay for it anyways? by brunes69 · · Score: 3, Informative

    Mono is free and open source. So is DotGNU. Rotor is made by MS themselves, free and "shared source". And the Microsoft Official .Net SDK is free as in beer as well, and free to distribute with any programs you make with it.

    With all these free implementations, and Lots of free Open Source IDEs out there for it, implying that C# development costs money is pretty much the dumbest argument you can make against it.

    1. Re:Why would you pay for it anyways? by CodeMonkey4Hire · · Score: 1

      Really, there's no need to flame me over this. I actually prefer C# over Java because of the .NET IDE. I haven't tried any of the free IDEs or compilers yet, but I am glad that they exist.

      Which IDE is the best? Does it have a compiler? If it is as easy to build forms in as .NET is, then I will finally uninstall VisualStudio 6.0. Is VB.NET supported too, or do I need to port over any of my VB.NET code to C# before trying to improve it in one of these? I have wanted to get .NET at home, but I didn't want to spend money when I had heard of mono.

      --

      Let's go Hurricanes!!! 2006 Stanley Cup Champions!!!
    2. Re:Why would you pay for it anyways? by slagdogg · · Score: 2, Insightful

      And the Microsoft Official .Net SDK is free as in beer as well ...

      ... as long as you're running their non-free, proprietary operating system.

      --
      (Score:-1, Wrong)
    3. Re:Why would you pay for it anyways? by nikster · · Score: 1

      uh, AFAIK, the windowing libraries (the GUI) are neither free nor cross platform. they are windows-only, ms-only.

      that that is what matters. ANSI c was cross platform, too. fine if you don't need a GUI.

      and, apart from technical details, there is the small matter of trusting the owner of this language - the company called microsoft - to keep it "open and free". HA HA HA. sigh.

      as soon as it poses any kind of business problem for MS, it's dead. c# development will not cost you money _right now_. but it will pretty much guarantee that you will be paying microsoft tax _somewhere_ down the road.

      kudos to Mono for being such a subversive development. Beat them with their own weapons. i just thing it's extremely risky. it just comes down to common sense, and the question: can you learn from history? M$ business ways have not changed in 20 years. what makes you think they will now?

  35. Hardcore? Or dumb? by Joseph+Vigneau · · Score: 3, Insightful

    Unless you have a really good reason (such as writing an IDE), don't do this:

    bypassing encapsulation or field and method visibility with reflection

    this:

    dissecting the binary class file format

    or this:

    creating post-compilation class "enhancers" like JDO uses

    Using the reflection libraries to get around visibility means you're just begging for a maintenance headache in the future.

    Dissecting the class file format to see how a particular compiler translated your code can be a useful technique, but you can't depend on the output being the same when you use different compilers on different platforms.

    Modifying class files after compilation is also a good way to give yourself a lot of headaches when things go wrong. It becomes very difficult to determine the cause of any problems. If you need to build classes like this, you should either generate Java code and compile that (like most JSP compilers), or use aspect-oriented programming tools like AspectJ.

  36. hardcore! by happyfrogcow · · Score: 1

    How can something without pointers be hardcore? It's li
    Aborted.

  37. Re:fp by Anonymous Coward · · Score: 0

    Offtopic, but screw it.

    Confirmed at http://www.jmsnews.com - good resource for JMS postings.

    With the talk of a new B5 project well on the way... this sucks.

    JMS's posting suggested there will be a fundraiser established soon for Richard Biggs' kids. I'm not rich but I can spare $5 and would love to show my support.

    All the best to his family - I (luckily) can't begin to fathom their loss.

  38. I perfer my java by Keruo · · Score: 1

    uninstalled from my comp and in liquid form in my coffee cup

    --
    There are no atheists when recovering from tape backup.
  39. Re:Old & Dated.... by animaal · · Score: 1

    By CSS, you mean style sheets? Useful for front-end work, but what about the other parts of a system? In any powerful system, won't there be some real program (maybe one written in Java?) producing that XML you're displaying?

    Browse a few job sites, and do a search for "Java". I think it's safe to say that Java's not about to disappear for some time yet...

  40. Jumbo Shrimp by Anonymous Coward · · Score: 2, Funny

    That's all I've got to say about that.

  41. Re:assembly language is for pansies by elid · · Score: 1

    It's kind of funny how in a Theory of Computation course one learns about finite state machines, then context-free grammars and push-down automata, and finally about Turing machines, only to go full-circle and realize that computers are simply huge finite state machines (mainly, I think, due to their limited memory as opposed to the unlimited tapes of Turing machines).

  42. eXtreme titles... bah. by jbum · · Score: 1

    What's wrong with "Advanced Java"?

  43. Hardcore isn't implementing coroutines in assembly by argent · · Score: 2

    Coroutines in assembly is trivial, one processor I worked with (the 1802, NASA's favorite processor for the '70s and '80s) uses coroutines as the basic calling mechainism. It doesn't support subroutines: you have to implement them using coroutines.

    Hardcore isn't even implementing coroutines portably in 48 lines of Forth, as I did for a control system in the '80s. Anything you can't at least prototype in 48 lines of Forth is probably something you don't understand well enough to do anyway.

    No...

    Hardcore is implementing coroutines in C using clever tricks with the subroutine calling conventions, and then building a paradigm-beating operating system like UNIX on top of it.

    Oh, I gave the punchline away. /* you are not meant to understand this. */

  44. Defining Hardcore by Maxwell309 · · Score: 1

    I like how most of the people defining hardcore programming in this forum probably don't write code.

    --
    "DRM is like violence: if it doesn't work, use more."
    1. Re:Defining Hardcore by Anonymous Coward · · Score: 0

      Take a look on dictionary.com. The reviewer's "definition" of hardcore is nowhere near correct. But it does make him sound macho...

    2. Re:Defining Hardcore by turgid · · Score: 1
      I like how most of the people defining hardcore programming in this forum probably don't write code.

      No, but they write a mean PERL script... :-)

  45. Hardcore French (and English) by Anonymous Coward · · Score: 1, Interesting

    On the topic of writing books using only one letter, there have been a few books written without the use of one letter: the letter E. Among others, La Disparition, a French novel by Georges Perec, is E-less. This book, remarkably, has been translated (by Gilbert Adair) into English. The translation, titled A Void, also E-less. Now that's hardcore.

    1. Re:Hardcore French (and English) by Anonymous Coward · · Score: 0

      dang!

    2. Re:Hardcore French (and English) by bar-agent · · Score: 1

      Wow. That is hardcore... I am impressed.

      --
      i'd hit it so hard, if you pulled me out you'd be the king of britain [bash.org]
  46. Hardcore is... by Anonymous Coward · · Score: 0
    1. Re:Hardcore is... by Tukla · · Score: 1

      Not if you didn't mean to. Then it's just stupid.

  47. It may be hardcore... by Anonymous Coward · · Score: 0

    But is it hardcore to the extreme?

  48. Re:Hardcore? Or dumb? by spankalee · · Score: 2, Interesting

    Well... I didn't say they were smart ideas, but hardcore has never meant prudent to me.

    Also, using assembly means you're just begging for a maintenance headache as well.

    It's all in why you're doing what you're doing. For some stuff you might need to get hardcore (oooh, how extreme :)

    When I was writing applets back in the 1.0 days I had to do some crazy hacks to get around Microsoft incompatibilities, or to implement double buffering or transparent widgets. Some of the hacks included changing Sun's source, recompiling and using bugs in the security manager of Netscape and IE to load new AWT base classes. Not very smart you might say, and certainly not very maintainable, but it worked, and when 1.1 came out I didn't need my hacks anymore.

    Some of JDO's techniques wouldn't be possible if it weren't for binary class enhancers. The class file format is very well documents and can handle metadata for fields and methods. JDO adds metadata to the class that enables OR mappings, and lets you use managed object just like any other.

    And, as a matter of fact, you can count on the format of the class file to be the same regardless of the compiler. It's a specified format.

  49. Things you can do with Java no one talks about.... by mysterious_mark · · Score: 2, Informative

    - Write and compile Direct X based 3D code to win32 (for video games, physics sim etc.) - Write and compile code for 68K asm, ARM etc, for various types of portable devices (much cleaner source than C/C++) - Write very fast and efficient server side apps to run on Mac OS X. But I'm sure its much more fun and easier to slander Java than do something useful with it. I'll resuming coding now... Mark

  50. Re:assembly language is for pansies by warrax_666 · · Score: 1
    That is like saying hardcore is writing an english novel using only one vowel. There are a lot of novels you couldn't write that way.

    Nonsense! You just need to find a suitable encoding.

    (Yes, that was a joke. A lame one, but still a joke.)
    --
    HAND.
  51. Re:Hardcore Java = Extra Coffeine? by Sneeka2 · · Score: 1

    If this ain't enough to wake you up in the morning : Hardcore Java! The extra caffeine kick.

    --
    Bitten Apples are still better than dirty Windows...
  52. Maybe I'm missing something.... by Zamboni · · Score: 1

    ... but I thought the whole point of Java is that it doesn't expose itself to the programmer.

    1. Re:Maybe I'm missing something.... by Anonymous Coward · · Score: 0

      Java is a programming language. Its entire purpose in life is to expose itself to the programmer. But perhaps you just missed that vital piece of information.

    2. Re:Maybe I'm missing something.... by Anonymous Coward · · Score: 0

      You mean the way you missed Zamboni's joke?

  53. Try SharpDevelop by brunes69 · · Score: 1

    It has a form designer and everything

    1. Re:Try SharpDevelop by CodeMonkey4Hire · · Score: 1

      I will then. Thanks.

      --

      Let's go Hurricanes!!! 2006 Stanley Cup Champions!!!
  54. Re:assembly language is for pansies by I_Love_Pocky! · · Score: 2, Insightful

    Well sort of... They have hardware interrupts which really complicates things. Not to mention that for nearly all intents and purposes, they have enough memory to be treated as a TM.

  55. So what? by brunes69 · · Score: 1

    I gave 3 other examples of free C# compilers.

    1. Re:So what? by slagdogg · · Score: 2, Insightful

      Mono and DotGNU as pure compilers are fine, but are "not there yet" as runtimes. Rotor is interesting but feature incomplete. I suppose we're talking about two different things here, I don't think C# has much value as just a language, so I was speaking of it in combination with the runtime (the real value, IMHO). The only production quality runtime at this time is the official Microsoft SDK.

      I like C#, don't get me wrong. But until Mono stabilizes (some areas have, yes, but much work is left) it's going to remain a tool primarily used in the non-free world.

      As far as the original point is concerned (that is, C# is a valuable invention), I agree 110%. I use both Java and C# professionally, and for a recent project involving COM automation, C#/.NET was a great technology. However, for general development I feel I have a lot more freedom (primarily wrt deployment) when using Java, and prefer it for that reason.

      --
      (Score:-1, Wrong)
  56. Listen, young one... by warrax_666 · · Score: 1

    Whether or not pointer arithmetic is allowed is irrelevant.

    A pointer is a reference is a pointer. They both embody the notion of pointing to (or equivalently referencing) something. The fact that the C/C++ type system is broken and lets you do stupid things with pointers is irrelevant. C/C++ also lets you typecast any random struct to an int (note: not pointers to ...) -- which means that pointers are not special in this regard.

    --
    HAND.
    1. Re:Listen, young one... by pclminion · · Score: 4, Informative
      A pointer is a reference is a pointer.

      No. A pointer is a memory address. A reference is an abstract object referring to another object. It might be implemented as a memory address, or it might not.

      I could very well implement references by making them indexes into a table of structs which contain type information as well as pointers to the objects themselves. Thus, the pointer would be extracted from the reference like this:

      ptr = ref_table[reference].pointer;

      In fact, this would be superior to merely using pointers as references, because it makes it explicit that the reference is not a pointer and doesn't behave like one.

    2. Re:Listen, young one... by rocksh · · Score: 0

      To clarify the difference between pointers and references can you write swap(a,b) function in Java that swaps a and b?:

      int a=3; int b=5; swap(a,b); // a=5, b=3 now

      It is easy to do with pointers in C/C++:
      void swap(int* aPtr, int* bPtr) {
      int tmp = *aPtr;
      *aPtr = *bPtr;
      *bPtr = tmp;
      }

      but impossible with references in Java.

      --
      >
    3. Re:Listen, young one... by DerWulf · · Score: 1

      class MyInteger{
      public int i = 0;
      MyInteger( int y){
      i = y;
      }
      }
      ...

      MyInteger a = new MyInteger(3);
      MyInteger b = new MyInteger(5);

      swap( a,b);

      ...
      void swap( MyInteger a, MyInteger b){
      int tmp = a.i;
      a.i = b.i;
      b.i = tmp;
      }

      What? don't tell me its complicated, I know. don't tell me members should be private either.
      --

      ___
      No power in the 'verse can stop me
    4. Re:Listen, young one... by Anonymous Coward · · Score: 1, Insightful

      template
      void swap(T& a, T& b)
      {
      T t = a;
      a = b;
      b = t;
      }

    5. Re:Listen, young one... by adz · · Score: 1

      A pointer is a memory address.

      Actually a pointer is a pointer (reference?!) to a memory address. You don't know where abouts in memory your pointer points to. ;)

    6. Re:Listen, young one... by fredrik70 · · Score: 1

      yeah, but you got to wrap the ints in a class so you can use references. mind you, this should be sorted in java 1.5 with autoboxing

      --
      if (!signature) { throw std::runtime_error("No sig!"); }
    7. Re:Listen, young one... by rocksh · · Score: 0

      I ment swapping primitive types. Surely one can wrap them in a class in Java and do similar things, but it cost performance and memory...

      --
      >
  57. Oh, and... by warrax_666 · · Score: 1

    Your argument only supports the notion that Java references and C/C++ pointers are not the same. That, however, is rather obvious since Java and C/C++ are not the same.

    --
    HAND.
    1. Re:Oh, and... by Tukla · · Score: 1
      since Java and C/C++ are not the same.

      So that's why I keep getting all of those syntax errors from javac!

  58. Cray was the prototype of the Real Programmer. by voodoo1man · · Score: 1

    The operating system (the proper terminology would probably be "monitor") for the CDC 6x00 computers was manually disassembled into symbolic assembler from the octal code Cray and his team wrote for it. According to folklore, they had a strong dislike of anything to do with programming. Another thing I've recently learned about Cray is that he designed the Cray 1 and several subsequent models as a semicircle of cabinets because he liked to meditate in the alcove they formed. If nothing else, Seymour Cray was the prototypical eccentric genius.

    --

    In the great CONS chain of life, you can either be the CAR or be in the CDR.

  59. What's this "DynamicProxy" class? by iabervon · · Score: 1

    I hope the book actually talked about the JDK 1.4 dynamic proxy class java.lang.reflect.Proxy, because people will be unhappy if they look for DynamicProxy, which doesn't exist.

    1. Re:What's this "DynamicProxy" class? by ctrimble · · Score: 1

      Thanks for the erratum. I had just been working with the mockobjects framework and I was thinking of their DynamicProxy mechanism. I should have followed my own advice and had someone give the article a tech edit. :)

    2. Re:What's this "DynamicProxy" class? by Anonymous Coward · · Score: 0

      And, of course, dynamic proxies were introduced in J2SE 1.3. But you knew that.

  60. MS-DOS Modula 2 by turgid · · Score: 1
    Allegedly, FST Modula-2 for MS-DOS (a shareware compiler) implemented co-routines. Unfortunaley I was too young and stupid to try them out. Anything other than "Hello, world!" on MS-DOS is hardcore ... by the very nature of the (lack of) design.

    Now, don't get me started on TSRs....

    I think it's all this beer they make me drink. ;-)

    Now, FORTH,... if only...

  61. Re:Things you can do with Java no one talks about. by pclminion · · Score: 1
    But I'm sure its much more fun and easier to slander Java than do something useful with it.

    <looks around> I don't see any slander here.

    Why are you so insecure about your language of choice? If it's really all you make it out to be, what does it matter if a few twirps on some message board disparage it? Not to mention you've gotten defensive even before the insults have started flying...

    Very, very odd behavior, I think.

  62. Re:assembly language is for pansies by pclminion · · Score: 2, Insightful
    assembly language is for pansies... Hardcore is finite state machines.

    All physical computers are equivalent to finite state machines, due to the fact that their memory is not infinite.

    A computer with 64 megs of RAM along with 8 32-bit registers has a total of 536871168 bits of memory. Hence, such a machine can take on a finite number of states, namely: 2^536871168 states.

    It's a collossal number of states, but the fact is, all computers with finite memory are finite state machines.

  63. Ali G Quote by dr3vil · · Score: 1

    Me gets yur book, me invites me mates round, and believe me - it ain't hardcore. They was well headcase.

  64. Wait, hardcore? by Fuzzle · · Score: 1

    Where's the xJAVAx tattoo then? Object oriented till death!

  65. Dynamic Proxy has been in Java since 1.3 by Yogurt+Earl · · Score: 0, Redundant

    Dynamic Proxy has been in Java since 1.3
    See the docs for 1.3:
    dynamic proxy docs

  66. 6K, eh? by scrytch · · Score: 1
    This implements an object-oriented forth:
    \ Mini-OOF 12apr98py
    : method ( m v -- m' v ) Create over , swap cell+ swap
    DOES> ( ... o -- ... ) @ over @ + @ execute ;
    : var ( m v size -- m v' ) Create over , +
    DOES> ( o -- addr ) @ + ;
    : class ( class -- class methods vars ) dup 2@ ;
    : end-class ( class methods vars -- )
    Create here >r , dup , 2 cells ?DO ['] noop , 1 cells +LOOP
    cell+ dup cell+ r> rot @ 2 cells /string move ;
    : defines ( xt class -- ) ' >body @ + ! ;
    : new ( class -- o ) here over @ allot swap over ! ;
    : :: ( class "name" -- ) ' >body @ + @ compile, ;
    Create object 1 cells , 2 cells ,
    --
    I've finally had it: until slashdot gets article moderation, I am not coming back.
  67. Re:The author has some articles on nested classes. by fijimf · · Score: 3, Insightful
    Actually, I think his comments on anonymous inner classes are pretty awful. In particular he makes two pretty bad points.

    First he claims that anonymous inner classes are not 'mainstream Java syntax'. Huh? He's got a fairly awkward definition of mainstream if that's the case.

    Second he rejects anonymous inner classes for GUI event handling, instead recommending making the the containing class implement XXXListener. I'll accept that they're two competing idioms, but his only argument is that his way is more readable. I think there's serious room for disagreement there (especially as the whole point of the anonymous inner class idiom is to keep the event handling code close to the control code.)

  68. Hardcore! Hardcore! by Xaroth · · Score: 1

    I always figured that "Hardcore" Java would mean Java interfacing in some sort of really dirty way.

    Like with COM.

  69. reference != pointer by Theatetus · · Score: 4, Informative

    A reference is not the same thing as a pointer. A pointer is one way to implement a reference, and judging by Java's error messages it's how most implementations have implemented them (it may be required in the spec for all I know).

    Then again, pointers aren't even in the original spec for C++, you were just supposed to use references. That never caught on among compiler writers, though.

    --
    All's true that is mistrusted
  70. Re:The author has some articles on nested classes. by tcopeland · · Score: 2, Interesting
    > definition of mainstream

    Hm, maybe. I don't know. They look cluttered to me, especially in a language where blocks aren't the done thing. In Ruby, it's common to see blocks being invoked:
    some_array.each {|x| put x }
    but to see an anonymous inner class created in Java looks sort-of-blockish-but-not-really.

    > keep the event handling code
    > close to the control code.

    I don't know. Almost every time I make an anonymous inner class for a JButton I end up extracting it to a nested class so I can also use it for a JMenuItem. But, to each his own...
  71. Re:The author has some articles on nested classes. by pjt33 · · Score: 1

    Blocks aren't the done thing? What on Earth do you mean by that? Most Java programmers use loops rather than tail recursion.

  72. What about "Hardcore Visual Basic"? by 1iar_parad0x · · Score: 2, Interesting

    A counterexample

    Mock me if you will, but there was once a book called Hardcore Visual Basic. It was one of the few intelligent books written on the subject. I'm not a big VB fan, but I can appreciate how it once was a great RAD tool. I wished all of Microsoft's VB-like documentation looked like this. It was rigorous and concise.

    I remember all of the laughs I got when I went around the office asking if anyone had ever heard of a VB book written for C++ programmers. Of course, my smart-ass smirk probably didn't help. Ironically, I found out that a good dose of the Win32 API in C++ and a 20-minute tutorial from a fellow colleague would have probably been the best route. Still, half of VB's problem is Microsoft's overall tendency to suck the brain out of the developer's head. While this might be okay for an end-user, I can't recommend doing this to developers.

    "It was the best of times; it was the worst of times."

    Like everything else in life, there's nothing wrong with bragging if you can do it. Sure, we mock such cliché verbiage, like the line above. Dickens' can pull off such an overdramatic line. I can't. I can't make a 1000 page tome interesting. Tolstoy could. So, if a book is hardcore, let it be. If it isn't, it will make a mockery of itself.

    The cruel irony

    Apparently the author got so sick of Microsoft ruining a perfectly good thing, he decided to stop coding VB altogether. You can see a copy of his vented frustrations here. His fellow VB coders mocked him for trying to get a language to do more than it was supposed to. If that ain't hardcore, I don't know what is. I think he's writing Java code now.

    --
    What do you mean my sig is repetitive? What do you mean my sig is repetitive? What do you mean....
  73. Re:Hardcore isn't implementing coroutines in assem by Russ+Nelson · · Score: 1

    Yes, coroutines in assembly are trivial. But then, unlike the kids around here, we're experienced programmers. Hehe.
    -russ

    --
    Don't piss off The Angry Economist
  74. Re:Hardcore? Or dumb? by Doomdark · · Score: 2, Interesting
    Uh? Where did he say "hardcore" equals "the right way"? I definitely think examples he mentions are pretty hard-core, as in doing things most developers aren't even aware can be done, and wouldn't dream of doing.

    My personal favourite of hard-core java things, though, is replacing default Object class that comes with JDK with your own. It was presented in the best java performance tuning available, and was rather interesting thing to do. Author just added bit more debugging, and overriding things in Object may be useful for that... you can be sure you get to debug ALL constructors your app ever invokes, even system classes' constructors.

    And I'm not saying replacing java.lang.Object is a generally useful practice, or even too smart, most of the time. Yet it's definitely hard core.

    --
    I like paying taxes. With them I buy civilization -- Oliver Wendell Holmes
  75. Re:The author has some articles on nested classes. by fijimf · · Score: 1
    I don't know. Almost every time I make an anonymous inner class for a JButton I end up extracting it to a nested class so I can also use it for a JMenuItem. But, to each his own...
    I'm cool with that, but make the enclosing class implement ActionListener? That's so Java 1.
  76. Not a good book by jjoyce · · Score: 1
    I read this book on Safari. Really, nothing in this book is advanced -- it's just about all covered much better in Bloch's Effective Java and in free articles online.

    Some parts that contribute to my bad review:

    • The first chapter tells us that RTTI is used by the compiler to prevent type errors.
    • Not only do the code examples dealing with the final keyword not work, they very obviously don't work.

    Oreilly has a good track record for their books, but this one made me think they'll give anyone a book deal.

  77. Re:The author has some articles on nested classes. by tcopeland · · Score: 1

    I think I meant blocks in the sense of passing a bit of code into a method. I mean, usually in Java if you're going to pass around behavior you use a reference to an object... an anonymous inner class looks kind of like you're just passing in a block of code.

  78. Re:The author has some articles on nested classes. by tcopeland · · Score: 1

    > make the enclosing class
    > implement ActionListener?

    Heh, you're right, that's a bit hideous. Always the problem making examples, I guess - you've got to keep it kind of short or folks lose interest, so you make some compromises...

  79. Just a note by ESqVIP · · Score: 1

    - Write and compile code for 68K asm, ARM etc, for various types of portable devices (much cleaner source than C/C++)

    Do you still run it in a virtual machine? If so, you are not compiling for portable devices.
    Don't take me wrong; I'm not here to bash Java, I'd just like to clarify you always compile it into JVM bytecodes, not into processor-specific opcodes.

  80. YOU FAIL IT by anything901 · · Score: 1

    lol

  81. Google finds a pretty damning critique by grrussel · · Score: 1
  82. Re:Hardcore? Or dumb? by sodhi1981 · · Score: 1

    Dissecting the class file format to see how a particular compiler translated your code can be a useful technique, but you can't depend on the output being the same when you use different compilers on different platforms I can't understand why this(Dissecting the class file format) should be a problem.All classes must follow the java class file format (which is a Sun standard available at javasoft.com),so no matter which compiler you use the classes produced are in the same format(for example the magic number for a class file is "CAFEBABE" in Hex. If this were not so , diffrent jvm implementations would be unable to run the class files, thus , invalidating one of the design principles of Sun to make Java a write once run anywhere language.

  83. Java and pointers by DrPizza · · Score: 1

    Allow me to summarize: Java has no pointers

    Er, yes, it does.

    Any object reference in Java is a pointer; it's why the exception is called a NullPointerException. Once one understands this, one can discard wrong-headed notions such as "Java has pass by reference", which are all too common, and all too wrong.

    Java's pointers might not have pointer arithmetic (which seems to be why people claim them to be something other than pointers), but the key feature of a pointer is that it's an indirection, not that it can perform certain kinds of arithmetic. And Java's pointers are exactly that; they're pointers into the garbage-collected heap.

  84. Re:assembly language is for pansies by Anonymous Coward · · Score: 0

    However, if you introduce a simple re-ordering technique to read the state of the finite machine in a different way, you have an infinite machine from a finite machine by induction.

    The state of the finite machine is only the state it is observed to be in, after all.

  85. Re:Hardcore? Or dumb? by captainClassLoader · · Score: 1

    spankalee says:

    "Well... I didn't say they were smart ideas, but hardcore has never meant prudent to me."

    Exactly. If you're hacking the formalism of a language and you're a reasonable practitioner of that language, my experience is that you're doing it because of some nasty constraint in the OS, the problem, or for some political reason.

    Back in the JDK1.2.2 days, I had to implement an web-based autoupdate system for a Java app that required the ability to update the JDK on the fly, and then restart the app on the new JDK from the old JDK. The reason for doing things this way was because the bosses demanded that all updates, even ones for a new JDK, involve no user interaction. Blanket constraints like "no user interaction allowed" are things that can make system design and implementation go hardcore pretty quickly under the right (or wrong) circumstances.

    --
    "The plural of anecdote is not data" -- Bruce Schneier
  86. Nice! by duggy_92127 · · Score: 1

    Sweet! I, for one, have been DYING to see Java take it right up its...

    What? Not that kind of 'hardcore'? Damn.

    Doug

  87. THIS MAN IS A DOLT! by alvint · · Score: 1

    i remember, this guy used to troll the eclipse.org newsgroups. not only was was arrogant and combative about everything, and when it came time for him to put up or shut up, his code stank! check out this thread to get an example of some of his discourse:

    http://dev.eclipse.org/newslists/news.eclipse.te ch nology/msg00654.html

    i had the 'privilege' of looking at some of his code, and not only did it have basic logic errors and would it have broken everyone else's code, but he just didn't 'get' basic concepts, like the usage of anonymous inner classes for event handling code. it's like he read all the stuff he talked about in a book but never actually wrote a program. i would bet that he certainly never collaborated on a project. i wouldn't trust him to program his way out of a for loop.

    i remember him boasting at the time about how he had a book coming out, and i honestly thought he was some twelve-year-old making it up. that's how he was acting. i can't believe this guy slipped through the cracks of some publisher, even O'reilly.

  88. Re:The author has some articles on nested classes. by lharmon · · Score: 1

    Almost every time I make an anonymous inner class for a JButton I end up extracting it to a nested class so I can also use it for a JMenuItem

    You've heard of AbstractAction, right? That allows for exactly what you want, only its a part of Swing, so other people will understand what you're doing, and you wont have to re-invent the wheel (or the Action interface, in your case).

    Anyway, it's been there since the dawn of Swing (I think, anyway at least since 1.3), so there's really no excuse to not use it.

    --
    From the Gentoo desktop of Luke Harman
  89. Re:The author has some articles on nested classes. by tcopeland · · Score: 1

    > AbstractAction

    Hm.... I guess I don't understand. You're suggesting subclassing AbstractAction, right? That sounds fine to me; it's just that if I subclass it with an anonymous inner class, I will probably need to refactor that anonymous inner class to a nested class later. Of course, it'll still subclass AbstractAction.

    I'm suprised anyone is still reading this thread :-)