I Can't Stand it! I Can't Stand it!

J 5 2
10 9 8
9 6 5 2
10 6 5
K 9 7 6 3 A Q 10 8
A K J 6 Q 7 5 4 2
3 J 10
J 9 8 7 2
4
3
A K Q 8 7 4
A K Q 4 3

WestNorthEastSouth
Pass Pass 1
Dbl Pass 2 3
4 Pass Pass 5
All pass

I can't stand it! I can't stand it! It's true that my partner's bidding, or rather, lack of bidding didn't have any effect on the score. It's true that this was a computer and that even if he'd left me in an unmakable contract, no one would know about the score anyway. But still it drives me up the wall that the computer -- and sometimes live opponents, er, uh, partners -- can't get this easiest of bids right.
Actually, I did have a partner once who'd dropped me in my twice-bidden club suit rather than prefer once-bidden diamonds with four of them to two clubs. Furthermore, computer or not, this program was written by a human being. So why can't anyone savvy enough to write a program that puts bids at least in the ballpark (for the most part) introduce in his bidding scheme an instruction to select the suit with the longest holding when given a choice between two minors or two majors. I won't go into further subtleties when given a choice between a major and a minor, or when you have equal length. Just the easiest of situations. Select the suit where you are longest. Why, why, why is that instruction lacking?
Here, as mentioned, 5 clubs makes neither more nor less than five diamonds on any lead. But clubs could be 4-1, and then you have a defeated contract when 5 diamonds would have been a laydown. It makes no sense at all.