Archive for April, 2006

CodeFutures stuck in the past

Thursday, April 27th, 2006

It is perhaps unsurprising to see vendors who are harmed by Java EE lash out against it. The latest such foray in fan fiction comes from none other than CodeFutures.

CodeFutures, for those who don’t know (and nobody can blame you, they’re a bunch of nobodies desperate to sell a product nobody wants), provides Java persistence code generators. Basically they generate a bunch of poop around hibernate or whatever else you happen to be using. Potentially useful sometimes, hardly earth shattering, and is one of those funny little products that owes some of its success to how much ejb2 entities sucked.

Anyway, that’s all good and well, but today they had to brag about how application servers are dead. They go about this in a way that’s rather reminiscent of 2003; they attack J2EE 1.3.

Lets go through their claims, shall we? First, they insist that J2EE is too complex for most problems. That’s a shocking liberal use of the words ‘complex’ and ‘problems’. What are most problems? intranet CRUD apps? Million hit staticy public facing sites? Personal homepages? Penis pump vendors? Java EE 5 has in fact hugely lowered the complexity and barrier to entry. It’s shocking that a vendor who prides itself on any sort of up to date Java work would be so blind to the platform and where it’s going.

Next up, they do the furious arm waving dance that is ’scalability and performance problems’. So, how many examples do we have of applications using appservers that ‘don’t scale’, or having problems doing so? How many vendors don’t support clustering? (answer: Just one, Geronimo, but that’s not a real appserver anyway). More importantly for the purposes of their deranged ranting is how this issue is specific to EE. They rail against server farms saying they’re a ‘traditional’ approach, and that you don’t double your performance when you plop in a new CPU. Duh, we were all amazed at that back in 1991, but if you find anyone who thinks so in this day and age then they’re probably the kind of people who say ‘my internet is broken.’

Next up we have the commoditisation argument. Unlike anyone else who has ever made this point, CodeFutures manages to sound both incoherent and clueless at the same time. Yes, commoditisation of EE is happening, and vendors are latching onto the idea. Many of the EE 5 API’s can be cherry picked and plopped into any environment. Saying that the major vendors are not pushing SOA is a huge compliment to them that is sadly misplaced. You’d be hard pressed to find a high level guy not waving every limb and flappable item of genitalia he possesses in the general direction of SOA. You’d be equally hard pressed to find an actual developer who gives a monkey’s ass about it. SOA is a cloudfest, and nobody in the real world develops with clouds.

Then we have the rise of SOA. As the internet puts it…OMGWTFBBQ. SOA is lightweight? Since when? Did someone redefine it while I wasn’t looking? It’s loosely coupled huh, I guess that depends on how loosely coupled you think a schemaorgy is. Highly distributed? That’s certainly true. Shame it contradicts an earlier point about ‘most problems’. Are they now saying that most problems in fact require remote/distributed solutions?

PJ Murray, the author of this article, seems to be about as clueless as they become. I’d strongly suggest a horizontal career move to that of a TSS commenter, he has the tone and mental acumen to fulfill THAT role sufficiently, at least. The article would look far more at home on JavaLobby than on a corporate blog, since one would imagine most corporations tend to have idiot-filters that prevent their deranged employees from soiling themselves so thoroughly in public. Alas, not so this time.

Why I hate tomcat

Thursday, April 20th, 2006

Everyone uses tomcat, and nobody believes the tiny minority of us who hate it. Tomcat sucks, plain and simple. For such an important piece of infrastructure, you’d like to think that smart people who know a thing or two about good java code were involved. So, in an attempt to prove my point, I will discuss a single class in Tomcat, and we can all have a look at how brilliant the code is. I specifically picked a class that was written by ‘important’ people, just to ensure you idiots know not to trust these monkeys ever, ever again. This is just ONE class, there are many many worse ones.

The class we’ll look at is Tomcat’s DefaultServlet, written by Remy Maucherat (jboss monkey now, I believe) and Craig youknowwho.

Where does one start, really? Any intern at my company who writes code like this would earn a serious ‘talking to’. It’s in fact probably wiser to just take them out back and shoot them, doing both them and the world a favour. Alas, opensores has no such safeguards, and both of these wankers are alive and well, still defecating out huge reams of code in the community’s general direction.

So let’s get started. The first issue is the fact that everywhere, Throwable is caught. Yes, even Error type exceptions are caught. Things that god and Sun never intended for applications to even try to handle, tomcat will (silently) catch and ignore. After all, when you run out of memory, best thing to do is keep going right?

We also have methods that happily check for exception message strings (search for broken pipe), so I’d advice you to never use that string in any of your own exceptions. The comment around that bit of code is also particular amusing. The exception is caught, next comment says //ignore it, and the next line? You guessed it, throw the exception!

If you’ve ever wondered what the urge to chew off your own face feels like, then look no further than the parseRange and copyRanges methods. It’s like the authors fell off the antipattern tree and hit every branch on the way down, while somehow also managing to do things to exceptions that’d make your mother blush. We have returning concrete collection types when an interface will do, a million random exit points halfway through the method, using exceptions for logic flow rather than…well…exceptions. Hell, copyRanges even RETURNS an exception (which is ignored, sometimes). Come on Craig, you work at Sun, just go down the hall and for fuck’s sake, ask someone to explain exceptions to you. You’re bound to find SOMEONE who understands the very basics.

At no point in the code is any stream closed in a finally clause, needless to say.

The pain goes on and on, and never really ends with this class. We have an impressive ignorance of how basic numeric handling in java works, as evidenced by // To avoid 0.0 for non-zero file, we bump to 0.1. We also have renderSize and displaySize, both of which do equally fucked up shit.

Ok, so maybe these kids don’t know the basics of elegant java code, that’s fine, many people don’t. At least they know idiomatic usage of java, right? They understand things like naming methods, idempotent methods, and so on. Haha, right. Calling validate on a range can have an interesting side effect of modifying the end of that range. Cool huh? You could avoid that ludicrous I’m-too-fucking-stupid-to-know-how-to-keep-it-valid-so-I’ll-guard-against-it approach by just having a length() method, that is calculated based on start and end. Anything that reduces the amount of work you people need to exert can only be a good thing, given your intellectual capacity.

This code is so abysmally bad in fact that I know of at least one person (this is NOT a joke) who uses it in interviews, asks people to identify all the things wrong with it. These are potential employees who I’m sure would be paid a lot less than Craig or Remy, but had they the same coding ability, wouldn’t be allowed in. The whole thing would make a fine contribution to dailyWTF, I’m sure.

Of course, I’m sure the tomcat fanboys would quickly whip out their collective penis and wave it about angrily. After all, it’s still popular, right? Who cares if the code is ugly, it does its job! Who cares if it’s riddled with inefficiencies, is confusing to read, can’t be maintained or picked up easily, or a million of those criteria that real developers actually care about, even though nobody else does? You’re right, nobody cares. Tomcat is a great example of how good code is, as I’ve always insisted, irrelevant.

WebWork doesn't Get AJAX

Monday, April 17th, 2006

My adventure with WebWork 2 continues, and the disappointments keep piling on. The problem stems from the fact that almost every framework that sports ‘ajax’ support seems intent on shoehorning it into the existing paradigms, and so ends up failing miserably when you actually want to do Cool Stuff.

Here’s a simple example. I have an administration page, which has a number of checkboxes on it. These checkboxes toggle various bits of functionality. So for example, I could click the ‘tug penis’ checkbox, and that’d result in the server commencing penis tuggage. Ajax fappery means that I don’t have to have a submit, I can wire up (in theory) the checkbox to some method on the server, right? Nope, quite quite wrong in fact. This trivial example was in fact too complicated for poor old WebWork, and is not possible. Instead, you have to pretty much do all the wiring yourself.

The ajax support is in fact as pitiful as it could possibly get. All it does is do the odd bit of form validation. It won’t do ajaxified double select lists, it won’t really add any new cool components (not even standard ones like autocomplete boxes), it’ll just sprinkle some retard newbie myfirstajax type code in various places with no real thought or innovation.

Here’s a tip to all you web framework authors out there. If you’re going to stencil ajax on your collective genitalia, make sure you can deliver. You’re lucky that most of your users are struts rejects and have the communication skills of Kirk Pepperdine, and are thus unable to coherently form sentences vaguely describing their expectations, needs, wants, or even thought processes. Hell, you’re lucky your users more often than not don’t even seem to exhibit thought processes, let alone ones that can be expressed. It takes more than the odd ajaxy validation to impress. I want my ajax support to actually utilise ajax, instead of being a pathetic little demo for one gayass corner case.

Of course, it’s not surprising that nobody has really figured this out. There are now more ajax frameworks than there are web frameworks. There are frameworks that now layer over other frameworks. Most of these are even worse documented than web frameworks. In fact, the ajax landscape right now makes one really look back fondly at the Java web framework arena, which (amazingly) has a great deal of coherence by comparison.

For WebWork, I still find myself fighting the framework. It’s astounding that after all these years, web frameworks still don’t feel natural or elegant. My requirements really are simple:

  • Scalable (the site currently handles about a million hits a day)
  • Doesn’t have that moronic fuckwitty we-separate-concerns-but-still-demand-a-1to1mapping-between-pages-and-code. If my action class is GenitaliaManager, I should be able to have genitaliaUpdate.jsp, genitaliaRemove.jsp, and /genitalia/contribute.jsp if I want, all going off that same class.
  • No pretentious developers who look down on jsp as a view technology. Velocity is by, and for wankers.
  • Reasonable ajax support (optional).
  • No XML hell, annotations all the way.
  • Actually uses Java5.
  • Basic documentation.

    It’s depressing that based on what I know, no such beast exists. I’d be thrilled to be proven wrong, but it’s sad and pitiful that in this day and age, we still have no frameworks with these very basic capabilities. Am I missing something?

  • Vanity Fair

    Wednesday, April 12th, 2006

    I am writing this on behalf of very many people. A huge throng of JBoss ill-wishers, who are dismayed and saddened by their current fortunate turn of events; namely, the RedHat purchase.

    One has to give them due credit though. It’s impressive to be so publicly abusive to a buyer, and have that buyer still cough up untold millions of dollars as a reward. Maybe we should all take a leaf out of that book and fling virtual poo in the vicinity of anyone we’d like to retaliate with some money in our general direction.

    There is much hilarity to be had from Marc’s quotes, as many have pointed out. His initial (now deleted) posting was actually surprisingly accurate, if hypocritical. Marc’s insight into RedHat’s model is in fact a perfect illustration of jboss employee mentality; attack anyone you don’t like for the exact crimes you’re busy committing. RedHat does indeed provide no value, as his garlicness asserted, It’s a vendor for the stupid, the ignorant, and the poor bastards who have to use some third party software from bigco that is only supported on RedHat. Sounds familiar?

    That Marc has a strong personality and a certain kind of magnetism cannot be denied. Sure, he has a miasma of drug related anecdotes floating about him (all of which are pretty funny, to be fair), but he’s smart enough to know how to surround himself with the appropriate coterie of sycophants. After all, in the land of the blind, the one-eyed man is king. The blind in this case constitute the overweight middle aged men, the fat insecure geeky types, and the young my-dad-molested-me-when-I-was-6-so-I-must-find-myself-a-French-American-father-figure types. Naturally, these types can’t believe that they have found someone who is able to construct coherent sentences (without uhmmm, arrrs, and ehhhs, and without each sentence juddering out like it needs to be expelled before it picks another orifice to exit from - anyone who guesses who THAT jboss employee is wins a free copy of the upcoming bileblog book), someone who is in fact able to interact with people in a very impressive approximation of a normal person, and thus maybe even rub off some of the ‘cool’ on them! Having said that, it’s still mildly perplexing how these people’s chosen idol could be someone who has managed to combine the worst parts of American and French culture into one odious personality.

    That is not to say that all JBoss employees are fuckwits. The public mouthpieces all certainly are, but it’s certainly quite plausible to sit down and have an honest conversation with some of them, and interact with them as any functional human being would interact with any other. What is surprising however is how many are incapable of that simple act. They’re a bunch of self-centered religious insecure despicable worms; their every word a constant battle between the urge to finally be loved, respected and admired, and the wild lashing out at being unloved, disrespected, and viewed as wayward children at best, lying scheming cunts at worst. There are few companies that I can think of where the top staff have all lied, cheated, and been so thoroughly unprofessional as this lot. There is certainly a grim sort of entertainment value in following their antics, which I am sure will continue for the foreseeable future.

    It’s a shame really that the Oracle buyout didn’t work out. The best thing that could have happened would have been a buyout by some other Java EE vendor. JBoss would be quietly gutted over the years, and the culprits slowly turfed out on their dirty little asses. Sadly in RedHat’s worthless world, even piles of dogpoo like JBoss seem like a significant offering.

    Of course, it’s easy for jboss fanboys to dismiss all this as jealousy. Let me assure you, it’s far from jealousy. It’s disgust, hatred, and a fundamental lack of goodwill. It’s the same feeling that biblethumpers feel towards prochoicers. The same feeling that lefties feel towards the US, Americans feel towards Arabs, and Germans towards Nazis.

    See? It’s very far from jealousy. We wish you the very worst. May your penises wilt at inappropriate times. May your significant others develop scat fetishes and copulate with your pets. May you suffer dangleberries while armed with a 1-ply unquilted single square of TP. May the world finally, against all odds, punish Evil, for a change. If I cared enough, I’d even download Geronimo in protest. Haha, only joking. I’m not THAT deranged with grief.

    TSSJS, slouching towards irrelevance

    Tuesday, April 4th, 2006

    It could be that I’m jaded and cynical. It could be that I’ve seen one too many events in Vegas. This year’s TSSJS was sadly very….tedious.

    The conference stunk of TechTarget’s cheapskate approach in so so many ways. For one thing, trying to cajole speakers into doing at least two talks limits the coverage of the conference, and harms attendees. The entry price was also jacked up (double, I believe) which drove away a bunch of people.

    The talks were pretty much same old same old, but I suppose that’s par for the course. Again, this could just be me, but the whole thing felt tired and bored, a cynical attempt at making money first and foremost, if users accidentally happen to have benefited along the way, then that’s fine too. Previous conferences on the other hand made many attendees feel like they’re seeing new stuff, cool stuff, shiny toys for all.

    Instead what do we get this year? Vendor stalls, and more vendor sponsored talks. These are now cleverly interspersed with real talks, and the titles often make it sound like it’s actually a useful or interesting talk. If however you’re stupid enough to attend, the bottom line for all of them is ‘buy our product’.

    Another turn for the worse this year was the lack of a wiki or any kind of community/attendee driven interaction. It was quite fun last year for example to check the wiki regularly and see ad-hoc BOFs created, meetups arranged, drinks schedules, and so on.

    There’s also a carelessness that’s surprising to see in any environment that pretends to be professional. At least one slide in every intro given by Nitin (conference manager) had one typo. Some were funny, most were just sad and pitiful.

    We had the same little doodahs for live voting that we’ve had before. Instead of being amusing, interesting, or even a worthwhile endeavour, this time it was a mad rush to see if we could get to the end of the question. The doodahs often didn’t work, the questions sometimes didn’t match the answers, and just as you were about to vote, chances are Nitin had already shown the results and moved on to the next question.

    End result? I’d say the attendance this year was the lowest of the last 3, with much of the content rehashed from previous years.

    All is not lost however, I’m still glad I went, if for nothing more than the regularly nightly plane masturbation poll, or the (for better or worse) ‘pantyless Friday’ event. I’m not sure either though are a good way to sell a tech conference.

    UPDATE: I’ve gotten a number of mails from other attendees who also had other things to bitch it. This list (by no means exhaustive, sadly) includes the far inferior food quality (no real breakfast, sandwich for lunch), no liquor during the pool party, and most annoying during such an event, having to pay a ludicrous amount for wireless access.