The best refactoring I have ever seen
-
Apparently, one of my co-workers found out that the GetTickCount function from the Windows API isn't reliable as it seemed in the first time he used it. The solution, obviously, was to refactor our code base to use a more reliable function, like timeGetTime. I almost cried when I saw his commit changing a bunch of *.cpp files, with the following code in the beginning of every file:
#undef GetTickCount
#define GetTickCount timeGetTimeSad thing is, he doesn't take criticism well.
-
Apparently, one of my co-workers found out that the GetTickCount function from the Windows API isn't reliable as it seemed in the first time he used it. The solution, obviously, was to refactor our code base to use a more reliable function, like timeGetTime. I almost cried when I saw his commit changing a bunch of *.cpp files, with the following code in the beginning of every file:
#undef GetTickCount
#define GetTickCount timeGetTimeSad thing is, he doesn't take criticism well.
Stop being such a bore! Don't criticize, teach! ^^
My programming get away... The Blog... Taking over the world since 1371!
-
Apparently, one of my co-workers found out that the GetTickCount function from the Windows API isn't reliable as it seemed in the first time he used it. The solution, obviously, was to refactor our code base to use a more reliable function, like timeGetTime. I almost cried when I saw his commit changing a bunch of *.cpp files, with the following code in the beginning of every file:
#undef GetTickCount
#define GetTickCount timeGetTimeSad thing is, he doesn't take criticism well.
Even though it hurts my eyes a little, I must say that it does demonstrate some prettydamn good knowledge about how the C/++ compiler goes about things. At least it didn't go into stdafx.h.
He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Chinese Proverb] Jonathan C Dickinson (C# Software Engineer)
-
Apparently, one of my co-workers found out that the GetTickCount function from the Windows API isn't reliable as it seemed in the first time he used it. The solution, obviously, was to refactor our code base to use a more reliable function, like timeGetTime. I almost cried when I saw his commit changing a bunch of *.cpp files, with the following code in the beginning of every file:
#undef GetTickCount
#define GetTickCount timeGetTimeSad thing is, he doesn't take criticism well.
Oh indeed, put it in a header file; not the code files. Code files should contain very few directives.
-
Apparently, one of my co-workers found out that the GetTickCount function from the Windows API isn't reliable as it seemed in the first time he used it. The solution, obviously, was to refactor our code base to use a more reliable function, like timeGetTime. I almost cried when I saw his commit changing a bunch of *.cpp files, with the following code in the beginning of every file:
#undef GetTickCount
#define GetTickCount timeGetTimeSad thing is, he doesn't take criticism well.
I think you'll find the technical term is refuctoring.