[SATLUG] San Antonio's Daily WTF

R. Tyler Ballance tyler at bleepsoft.com
Thu Nov 30 16:12:22 CST 2006


I mentioned a few days, weeks ago or something (the days have started  
to blur) that my current client's code, systems, corporate hierarchy,  
break room snacks, everything are absolutely ridiculously bad.

Anyways, I know that at least two and a half other SATLUGers are  
developers, so I figured I'd start a good old share-your-WTFs thread :)

Here goes nothing.


This first one comes from the legacy system I've been helping said  
client move away from, and should capture exactly what quality of  
craftsmanship I'm dealing with on a daily basis:


	assert(_state != _state);


Let that sink in. I was borderline shell-shocked after coming across  
this bit of code, that I read the assert(3) man page again. Then I  
read the man page again, trying to process what sentient being would  
ever think this would be a good idea. Ever.
(While I was digging up the files for this message, the server my new  
client interfaces with crashed because of an assertion...leaving  
assertions in production systems should be punishable by a thorough  
trout-slapping)


The second one isn't so mind boggling, just a good example of what  
happens when you let a manager/executive write code that shouldn't be  
writing code (it's C#).


	public enum UPGRADE : int { SUCCEEDED, UNKNOWN, AVAILABLE,  
INSTALLED, WAITING, PENDING, SCHEDULED, FAILED } ;
	public string[] termsUpgrade =	{ "SUCCEEDED", "", "AVAILABLE",  
"INSTALLED", "WAITING", "PENDING", "SCHEDULED", "FAILED" };

	public enum STATUS_ONLINE : int { UNKNOWN, ONLINE, OFFLINE } ;
	public string[] termsOnLineStatus =	{ "", "ONLINE", "OFFLINE" };


I don't even know where to start on this one, but I am starting to  
get an idea as to why this project is months past its originally  
projected deadline.


I showed you mine, now show me yours. Please tell me you all have  
some WTFs, else I've have to go try to drown myself in a pint of  
Guinness :)

Cheers

R. Tyler Ballance: Lead Mac Developer at bleep. software
contact: tyler at bleepsoft.com | jabber: tyler at jabber.geekisp.com




More information about the SATLUG mailing list