I was thinking about creating a web service that would spew out the current terrorist threat level. When it got to the implementation phase, I decided that it was probably not wise to poll a web site at whitehouse.gov in order to parse out the current threat level. I thought about it, did it a few times, got it right, and decided not to deploy it.
Secret Service Agent: “Can you explain why a machine on your network has polled the whitehouse.gov exactly every hour for the past two weeks?”
The code behind this in C# is a joke (after importing the web reference using the WSDL for the service:
homeland.securitylevelService s = new homeland.securitylevelService();
string alert = s.getsecuritylevel();
lblAlert.Text = "Current homeland security level is: " + alert;
There’s a switch statement after that to color code the label’s background color based on the result. Nifty.
Yes, I was bored in class.