I was hired on at a company to take over a project that had been contracted to a team in India. The project has apparently languished for over a year. After two weeks of triage and aggressive refactoring, its on the verge of heading off to the customer for testing. In these two weeks, I've come across any number of WTFs, but a few are just facepalm inducing...
class CommonFunctions {
public static bool CheckFileExists( string file ) {
if ( File.Exits( file )) {
return true;
} else {
return false;
}
}
Unfortunately, the project ties into Microsoft Office Communications Server as well, so this is far from the worst... Check out the documentation for the Microsoft.RTC.Collaboration namespace here. It's not cryptically sparse at all... And the whole Begin/End IAsync pattern isn't susceptible to abuse, either...
I traced the code for a significant component of the project, and followed it through a chain of more than a dozen IASync callbacks. Any of those calls could fail, and short circuit the entire process. If the process for some reason failed, a global flag that blocked the entire program would remain set indefinitely (it was unset at the very end of the chain of callbacks). To top it all off, this Jenga construction was initiated from the bowels of a harmless-looking default constructor... And all state variables were declared as static at class level, so Zombie Jesus help you if you ever spun up two of this component.
M
Megaman22
@Megaman22
0
Reputation
3
Posts
18
Profile views
0
Followers
0
Following
Best posts made by Megaman22
This user hasn't posted anything yet.
Latest posts made by Megaman22
-
Joys of Outsourcing
-
RE: This page is in Italian.
@derula said:
@MiffTheFox said:
Also the "detect language" mode seems to think that I'd usually be wanting to translate Chinese with it, and therefore putting the text box in RTL order.
Since when is Chinese RTL?
Chinese is typically TTB. At least classical Chinese;
(Top to bottom) -
RE: But it's in the logs
@tchize said:
Add a 17th server:
the log server that gather all logs :)
One log to rule them all,
One log to find them,
One log to bring them all,
and in the server bind them