Opposite of "to my credit"?

An idiomatic phrase for this is “to my shame”. One might also say “To my discredit, I did ...”.

A Google Ngrams for six phrases (see below) shows that to my shame has appeared in print 3 to 4 times more frequently than the next most frequent phrase.

The six phrases treated in the link above are to my shame, to my detriment and to my discredit, plus those phrases with To instead of to.

The Google Ngrams picture shown below covers a shorter period than the first Ngrams link, making it easier to interpret. NGrams picture mentioned in text

Another useful Ngrams covers the phrases my detriment, my shame, my discredit, my sorrow, my chagrin.


To my chagrin, which Merriam-Webster defines as

chagrin

a feeling of being frustrated or annoyed because of failure or disappointment

The Google Ngram shows that "To my chagrin" was (until recently) a little more popular then "To my shame". However both are currently behind the Latin phrase mea culpa which means "Through my fault".


"To my detriment".

Full Definition of DETRIMENT
1 : injury, damage
2 : a cause of injury or damage
http://www.merriam-webster.com/dictionary/detriment


Popular with young people right now is: My Bad as in: My bad; I did foo, bar, and baz,"

If you you're working with software engineers, you might want to keep you writing young and hip. There's no room for old software engineers as I'm finding out :)

"There are old programmers, and there are bold programmers, but there are no old, bold programmers". Blatantly plagiarized from Chuck Yeager.