Co-worker uses ridiculous commenting convention, how to cope? [closed]
- by Jessica Friedman
A co-worker in the small start-up I work at writes (C++) code like this:
// some class
class SomeClass {
// c'tor
SomeClass();
// d'tor
~SomeClass();
// some function
void someFunction(int x, int y);
};
// some function
void SomeClass::someFunction(int x, int y) {
// init worker
m_worker.init();
// log
LOG_DEBUG("Worker initialized");
// find current cache
auto it = m_currentCache.find();
// flush
if (it->flush() == false) {
// return
return false
}
// return
return true
}
This is how he writes 100% of his code: a spacer line, a useless comment which says nothing other than what is plainly stated in the following statement, and the statement itself.
This is absolutely driving me insane.
A simple class written by him spans 3 times as much as it's supposed to, It looks well commented but the comments contain no new information. In fact the code is completely undocumented in any normal definition of "documentation". All of the comments are just a repetition of what is written in C++ in the following line.
I've confronted him several times about it and each time he seems to understand what I am saying but then goes on to not change his coding and not fix old code which is written like this.
I've went on and on again and again about the distinct disadvantages of writing code like this but nothing get through to him.
Other co-workers doesn't seem to mind it as much and management doesn't seem to really care.
What do I do?
(sorry for the rant)