This entry is rant so you might just want to skip it.
HP Quality Center (formerly Mercury) is a, how so amusingly called, web-based test management tool. You will find a lot of marketing information if you ask Google, most of which is irrelevant and may only have 1-800 number for support; because they know when you are looking for it on web, you are in trouble and no one can help you. Unfortunately, I've to spend a good amount of time on this tool these days and it inspired me a great deal to write my inexpressible ovation for this tool here.
As a programmer, HP Quality center is one of the worst and most annoying tools you may have to work with (some may compare it with Lotus notes though).
This tool is implemented as a giant Active X; Apparently, they didn't want to make it web-based but when sales team threatened their developers, they some how adjusted their extra-thick client to web by (evil) means of Active-X(TM) technology. It only takes one or two more minutes to load than my Eclipse instance does, in Intra-net i.e.. It works only on lame Internet Explorer, in a sense that makes it 70% less web based. To add to the insult of using this tool, you have no option but use god-forsaken IE6 (or 7 if you are slightly lucky).
HP Quality center crashes at will, each crash is designed scientifically so that you waste a few hours to get back to normal work before it crashes again. For example, I add attachment to a defect; next, I go and try to add comment on it and it crashes - right on time. I open new IE window; browse it and wait for it to load, log-in again (this special web based tool doesn't have feature to remember your password in an enterprise-wide SSO environment). After recalling what I was doing last, I go to the defect where it crashed and try to add comment again; only to discover that it still thinks I'm working on it. 'The object is locked by user: [my userid]'. You will praise arcane brilliance imbued in this tool because these problems disappears randomly once it pisses you off - it knows when.
Some more praise on it's resource utilization, so one can't wonder why it is rightfully web-based. HP Quality Center uses ~120mb of your core if you have no defects in your view. This amazing tool can make your wish to see memory usage on crack come true, have 50-40 defects in your view and see the difference.
This is only the tip of the iceberg but gives you bigger picture and idea why companies make more money in support, there's always room for new version, patch, hotfix etc. Why in the world people pay for such crap? there are ton of free alternatives which are hundred times better and are totally free. And the other day someone was complaining about open-source tool usability...
Showing posts with label Frustrations. Show all posts
Showing posts with label Frustrations. Show all posts
Tuesday, August 05, 2008
Tuesday, November 13, 2007
Hibernate won't delete child objects from database
Given a commonly known parent/child relationship in a domain model, the hibernate code below would not delete child object from database.
This detail is from hibernate manual (Section 21.3), and I have read it many times in last three years, but somehow I didn't find it intuitive thing to do and hence drawing a blank.
It's a breeze to have 'Session' object available everywhere in the code, but imagine a pile of layers hiding everything related to persistence, all you can do is play around with associative object references in the object graph.
There are many such minute intricacies in Hibernate which give surprises (and pain if that code is not covered by test cases), Endless debugging with hibernate is just as painful as dear old CMP (Container managed persistence in Entity Beans). Ironically though, Hibernate can win the "paingiving" if you use it with cglib whereby, while debugging, you see weird things in lazily loaded proxy (or object zombie if you like to call it so) where you wanted to see only a string value.
And oh I hate that AbstractEntityPersister.java with it's 4000 lines of code...
Unless you have specified 'all-delete-orphan' as the cascade value in the relation as shown below, or use 'Session' object to delete the object from db.Parent p = (Parent)session.load(Parent.class, id);
Child c = p.getChildren(0);
p.getChildren().remove(c);
c.setParent(null);
<set name="children" inverse="true" cascade="all,delete-orphan">
<key column="parent_id">
<one-to-many class="Child">
</set>
It's a breeze to have 'Session' object available everywhere in the code, but imagine a pile of layers hiding everything related to persistence, all you can do is play around with associative object references in the object graph.
There are many such minute intricacies in Hibernate which give surprises (and pain if that code is not covered by test cases), Endless debugging with hibernate is just as painful as dear old CMP (Container managed persistence in Entity Beans). Ironically though, Hibernate can win the "paingiving" if you use it with cglib whereby, while debugging, you see weird things in lazily loaded proxy (or object zombie if you like to call it so) where you wanted to see only a string value.
And oh I hate that AbstractEntityPersister.java with it's 4000 lines of code...
Thursday, October 04, 2007
Dealing with tedious job
So, You are stuck with the wrong job and want to do something different to get your inner-geek rolling. Well, my friend let me tell you what I've done so far when I'm in such situation, I get frustrated initially with all that chore and boredom, naturally. I know it makes you feel bad to do stupid work, but then you can be creative in that too!
I was supposed to work on completing a framework which was designed by senior team, what I'd been asked was to do all repetitive soporiferous work (I'm serious..Zzz..). Well I completed it pretty quickly but by then I thought I would do something interesting to take revenge and I jot down an automated test framework to test entire framework, now thaatt was pretty challenging. "Developer testing" makes you think wise, and I was able to understand framework quite easily. With all that fancy techniques put in the test framework, the "original" framework extensions are effortless to test now.
Well that was one thing, but sometimes you just get enterprise-world-weary to write data centric service layers with focus on all those if/else business requirements. Man, you know you've gotta a chance to show how creatively you can utilize design patterns to satisfy those requirements. Reuse your code - stop copying/pasting it, refactor it - clean it up a bit, you know sometimes you can be so creative, for example replacing repeating loop and other redundant Java statements with template methods and anonymous class like this(or if your language is pretty, use lamda forms):
So what I would suggest is, if you're at the place where you don't have enough challenges in your daily assignments and you can't switch job ;), you can always create some excitement on your own. Heh, if you think how will you get time for this, Man forget all these, you're 9-5 laborer.,
But, If you've done something interesting in such situation then I would be glad to know and try it.
I was supposed to work on completing a framework which was designed by senior team, what I'd been asked was to do all repetitive soporiferous work (I'm serious..Zzz..). Well I completed it pretty quickly but by then I thought I would do something interesting to take revenge and I jot down an automated test framework to test entire framework, now thaatt was pretty challenging. "Developer testing" makes you think wise, and I was able to understand framework quite easily. With all that fancy techniques put in the test framework, the "original" framework extensions are effortless to test now.
Well that was one thing, but sometimes you just get enterprise-world-weary to write data centric service layers with focus on all those if/else business requirements. Man, you know you've gotta a chance to show how creatively you can utilize design patterns to satisfy those requirements. Reuse your code - stop copying/pasting it, refactor it - clean it up a bit, you know sometimes you can be so creative, for example replacing repeating loop and other redundant Java statements with template methods and anonymous class like this(or if your language is pretty, use lamda forms):
public class IMWhateverClass {
public abstract class IMDoer {
private final Set elements;
public IMDoer(Set elements){
this.elements = elements;
}
public void process() {
while (elements.iterator().hasNext()) {
Z var = elements.iterator().next();
if(!doProcess(var))break;
}
}
abstract public boolean doProcess(Z arg);
}
public void doSomething() {
new IMDoer(new HashSet()) {
public boolean doProcess(String str) {
return str.matches("any");
}
};
new IMDoer(new HashSet()){
public boolean doProcess(Set arg) {
return arg != null;
}
};
}
}
I know it's uselessly verbose in Java but isn't that cool compared to copying and pasting it around? And over-engineering is sometimes fun..So what I would suggest is, if you're at the place where you don't have enough challenges in your daily assignments and you can't switch job ;), you can always create some excitement on your own. Heh, if you think how will you get time for this, Man forget all these, you're 9-5 laborer.,
But, If you've done something interesting in such situation then I would be glad to know and try it.
Thursday, September 20, 2007
Miscellaneous Frustrations
And now, I'm working with some few hundreds of domain classes and transfer objects generated out of various "xml" configs and database schema, they are generated in such a way that they follow the language naming rules as well as readability. Well I will tell you it meets the first objective perfectly but not the latter, it's not readable at all but yeah it makes rest of the code unreadable for sure. How clever of you to make it so complicatedly vague and ho-hum long.
Working with generated code is not as much fun as you might have guessed, Sometimes you don't just feel good to read 50+ characters long ambiguous identifier, with all kinds of bad naming conventions, just to assign it a naive 'false'. Just think about it, there are tens of such fields, and much more if you got unlucky, on each object, they needs to be checked conditionally, validated as well as copied to different persistent object properties. What it results in is what I call.. MUNDANE-F*.*N TEDIOUS CHORE that causes a mental weary which can easily prevent you from keeping your eyes open till you reach first '_' in identifier past first ten chars or something.
But there are side effects to all these which you might be interested to know, you become expert and addicted to copy/pasting (so much so that you'll find 4 characters long word a good candidate to copy/paste), you'll learn coding (or typing, does it matter?) from top-bottom/bottom-top rather than left to right, it's so much fast to copy identifier substrings vertically, like a machine. No, You are wrong, Eclipse is not a good tool to work with such task at hand, might I recommend M$Word.
Also, You'll learn quite a few things including the divine principle of copy/paste reuse, why take the pain of refactoring (and wasting time in writing those brainsick tests) for reuse when you can copy/paste so easily and fast? do you care about anyone else reading your code and fixing patching it numerous times? Of course you don't. In fact, you're so clever you've built empire of redundant code, You've replicated your favorite code everywhere in the application making it impossible to eliminate it at any cost, you know you're happy, you can always find that code to copy in need. So you see, with such ingenious techniques you can become better developer and have a great peace of mind. And did I tell you, You'd spend time in redeploying entire application, on the piece of s**t which only runs on Jr0ck1t, every so often because you know how it is - you forget to put a negation in that if statement or that minor object initialization and that misspelled variable and what not. Redeploying is cool, it keeps your cpu-cores busy, your virus scanner doesn't sit idle and you get chance to look at the interesting log statements everytime with different timestamps, compare it with writing tests which can identify this problems in seconds, how lame...
There's so much to learn just so much..
Well, writing all that makes me feel just better :)
Working with generated code is not as much fun as you might have guessed, Sometimes you don't just feel good to read 50+ characters long ambiguous identifier, with all kinds of bad naming conventions, just to assign it a naive 'false'. Just think about it, there are tens of such fields, and much more if you got unlucky, on each object, they needs to be checked conditionally, validated as well as copied to different persistent object properties. What it results in is what I call.. MUNDANE-F*.*N TEDIOUS CHORE that causes a mental weary which can easily prevent you from keeping your eyes open till you reach first '_' in identifier past first ten chars or something.
But there are side effects to all these which you might be interested to know, you become expert and addicted to copy/pasting (so much so that you'll find 4 characters long word a good candidate to copy/paste), you'll learn coding (or typing, does it matter?) from top-bottom/bottom-top rather than left to right, it's so much fast to copy identifier substrings vertically, like a machine. No, You are wrong, Eclipse is not a good tool to work with such task at hand, might I recommend M$Word.
Also, You'll learn quite a few things including the divine principle of copy/paste reuse, why take the pain of refactoring (and wasting time in writing those brainsick tests) for reuse when you can copy/paste so easily and fast? do you care about anyone else reading your code and fixing patching it numerous times? Of course you don't. In fact, you're so clever you've built empire of redundant code, You've replicated your favorite code everywhere in the application making it impossible to eliminate it at any cost, you know you're happy, you can always find that code to copy in need. So you see, with such ingenious techniques you can become better developer and have a great peace of mind. And did I tell you, You'd spend time in redeploying entire application, on the piece of s**t which only runs on Jr0ck1t, every so often because you know how it is - you forget to put a negation in that if statement or that minor object initialization and that misspelled variable and what not. Redeploying is cool, it keeps your cpu-cores busy, your virus scanner doesn't sit idle and you get chance to look at the interesting log statements everytime with different timestamps, compare it with writing tests which can identify this problems in seconds, how lame...
There's so much to learn just so much..
Well, writing all that makes me feel just better :)
Subscribe to:
Posts (Atom)