O'Brian is a poor guy, really - even for a generic background "bad" character he got an extremely bad deal from the writers. We're supposed to sympathise with Bear, so everything was done to O'Brian to make him as weak, annoying and unlikeable as possible - they were even so cheap as to make him unable to remember Bear's name, just in case the reader missed the point about him being soooo incompetent.I thought he mostly worked on drinking himself under the desk....
The thing is, if a guy as weak and incompetent as O'Brian is made out to be could rise in Confed to command an escort carrier (and indeed, to help design it!), that would suggest Confed had completely run out of competent personnel. So, personally, I would imagine that whatever the book's bias, O'Brian does have some competence as a military officer.