Jul 112007
 

Just read Bob’s post from a bit back about XML and annotations and it occurred to me that Bob’s like the rest of us. We LOVE pointing out flaws in things that annoy us! My string of “Why Hibernate Sucks” posts pulled in a ton of comments when they first appeared just like Bob’s post pulled in more comments than if he had used the P.C. name of “Annotation Myth Busters”. With my posts, as with Bob’s, the Hibernate folks pounced (the Spring guys pounced on Bob’s post) and we had some nice comments going back and forth. I decided to scaled back the titles to “Hibernate pitfalls” to be more P.C. but really I think in many ways “Hibernate sucks” and probably should have stuck to my guns a bit more.

Just to give you some context of why I changed my post names… A while ago I was working for a company and I made some comments about the programmers at that company being crazy about coding standards. Of course I phrased in a much worse manner. Well, if you did a little bit of Google searching you found my name next to these comments. The truth was the employees at the company were a bit nutso about coding standard. Member variables names must start with underscores, you must not use the this keyword, 4 spaces, no tabs, curlies on same line, no newlines, no continuation indents, etc. etc. I mean it was a like a 10 page coding standard document. Well, I loath coding standards. I code the way that makes sense to me and things like underscores don’t make sense. They are hard to type, slow me down, are ugly to me and don’t add any value except to VIM users who refuse to install plugins.

(EDIT based on comments below. I don’t hate coding standards in general. I hate being forced to use someone else’s 10 pages of coding standards that don’t feel right to me. Feel free to read my comments below to fully understand my position. Also, my moto is ‘if you can’t work in other peoples code and ignore the style, you should probably find a different type of job’)

As it turned out, my manager found these comments. He, luckily, was an awesome guy and very savvy about corporate communication. We talked about the comments and I went back and changed them to make them more PC and of course removed the company name. So, now I’m a bit more careful when it comes to what I write. But the fact still remains that sometimes I really WANT to say “Hibernate sucks”. The fact of life is that its all a game and if you piss off the wrong person, they could make your life miserable or fire you on the spot. Plus, as I’ve learned, it’s much more fun to think of intelligent ways to point out things that suck anyways.

  6 Responses to “Your framework sucks and I almost lost my job”

  1. I lost respect for your posts when you said you loath coding standards.. I think you are in the wrong industry

  2. I lost respect for you when you left a bogus website and email address and wouldn’t back up your assertion. If you love coding standards so much, fight for them. If you can’t defend your position and fight for what you believe is right, I’m certain you should be in a different industry.

    Plus, you have really no idea what I was talking about. I personally LOVE my own coding standards and I can guarantee my standards are MUCH more strict than yours are. My point was that if I forced you to use my coding standards, you would be less productive.

  3. Some times I think the same as you about Hibernate.
    It is hard to do a simple join with two columns.
    Like this:
    select a.idUser, b.name from user a inner join person b on a.idPerson=b.idPerson
    But there are interesting things about the orms frameworks. With then the refactories are easer to do. It isn’t perfect yet, but everybody are trying to become it better.
    I dislike the hibernate codification and I’m trying to do a SQL generator:
    # //Aliases aliases = new Aliases();
    # //aliases.add(new TableAliases(“a”, User.class))
    # //aliases.add(new TableAliases(“b”, Person.class))
    # //after this I put the aliases here:
    # context
    # .SELECT(
    # aliases.get(“a”).Field(User.idUser),
    # aliases.get(“b”).Field(Person.name)
    # )
    # .FROM(“a”)
    # .INNER_JOIN(“b”)
    # .ON( aliases.get(“a”).Field(User.idPerson) .EQUAL( aliases.get(“b”).Field(Person.idPerson) )
    # .AND(
    # aliases.get(“b”).Field(Person.anotherattribute) .EQUAL( ANYSTRING ) )
    # .WHERE(
    # aliases.get(“b”).Field(Person.name) .EQUAL( ANYSTRING )
    # );
    It is the SQL generator and it looks me easer and nearest of SQL than the hibernete codification. Now the errors are being shown at compile time.
    Why run away from SQL?

  4. Hello Mr. Brian Pontarelli,

    I had some problems with Hibernate and JPA too.
    I like SQL and transactions. They aren’t problems.
    I like OO too, so i’m tring to do something different about:

    My Little JAVA ORM here:
    http://www.codigorapido.com.br/testeOrm.zip
    the source are very simple to understand.
    it is just a draft, but is working. I wanna improve it.

    If someone like the idea, please send me a e-mail with the subject “I LIKE YOUR ORM” to
    luiz-unb@bol.com.br

    I’m looking for friends to make something different.

  5. Wonderful issues altogether, you just won a new reader. What might you recommend about your post that you made a few days in the past? Any sure?

  6. I agree. Hibernate makes one lose a lot of time. The design is poor complicated and cumbersome. Dont get why everyone uses it!

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">