We are not allowed to write or mention the bad deeds of others. Writing our own bad deeds is also not good because of the harm of publicizing bad deeds which can encourage others to do it. Our bad deeds must remain between us and our Creator seeking forgiveness and protection not to commit it again.
Wassalam.