DevDisasters

The Mysterious Beeping Server

The rumor of the beeping server started out as a hushed whisper between network administrators. First, it was taken seriously. When beeping comes from a server room, something is either broken or going to break soon. However, everything -- the servers, switches, UPS units -- all checked out.

Soon, it became the stuff of urban legend and took on a life of its own. Some said that the beeping foretold that a major outage was coming. Others said that the number of beeps signaled how many points the company's stock would dive. Others dismissed the rumors as being the result of too much coffee and too little sleep on the part of the admins.

Eventually, the rumor worked itself out into the rest of the IT departments. When the rumor finally reached Jake, he felt a knot slowly forming in his stomach. He knew rumors of the beeping server must be true ... after all, it was his fault.

I'm Still Here
Awhile back, Jake had a brilliant idea: instead of writing out to the crowded common log file, why not try something different? His solution: whenever a condition was met, add a call to a Beep function. It worked great! His app happily chirped on command and saved him the pain of looking through the output logs for an "I'm Here" message.

He was positive that he had remembered to remove his genius additions, but a quick scan of source control found he had missed two function calls:

  Private Sub btnRun_Click(ByVal  
   sender As System.Object, ByVal e As 
   System.EventArgs) 
   Dim QnumAs2 As Int16 = 
    Server.HtmlEncode(Request.
    Cookies("QnumAs").Value)
   lblError.Visible = False
  If answer1.Text = 
    "" Or answer2.Text = "" Then
    Beep()
    lblError.Text = 
     "ERROR: Answers can NOT be BLANK!!!"
    lblError.Visible = True
    Exit Sub
  End If
  If (QnumAs2 > 2 And answer3.
    Text = "") Or (QnumAs2 > 3 And 
    answer4.Text = "") Or _
    (QnumAs2 > 4 And answer5.
    Text = "") Then
    Beep()
    lblError.Text = 
     "ERROR: Answers can NOT be BLANK!!!"
    lblError.Visible = True
    Exit Sub
  End If

Server-Side Function
The conditions were not often met; they were met only when a user failed to fill out all data fields, which was the good news. However, because the Beep function runs server-side, the resulting sound only appears on the physical box that's running the application.

From then on, Jake resolved to make sure that he removed his former debugging code next time he was in the application, but until then it was fairly amusing that he could mystify senior-level administrators with only two lines of code.

About the Author

Mark Bowytz is a contributor to the popular Web site The Daily WTF. He has more than a decade of IT experience and is currently a systems analyst for PPG Industries.

comments powered by Disqus

Featured

  • Cloud-Focused .NET Aspire 9.1 Released

    Along with .NET 10 Preview 1, Microsoft released.NET Aspire 9.1, the latest update to its opinionated, cloud-ready stack for building resilient, observable, and configurable cloud-native applications with .NET.

  • Microsoft Ships First .NET 10 Preview

    Microsoft shipped .NET 10 Preview 1, introducing a raft of improvements and fixes across performance, libraries, and the developer experience.

  • C# Dev Kit Previews .NET Aspire Orchestration

    Microsoft's dev team has been busy updating the C# Dev Kit, a Visual Studio Code extension that enhances the C# development experience by providing tools for managing, debugging, and editing C# projects.

  • Hands On: New VS Code Insiders Build Creates Web Page from Image in Seconds

    New Vision support with GitHub Copilot in the latest Visual Studio Code Insiders build takes a user-supplied mockup image and creates a web page from it in seconds, handling all the HTML and CSS.

  • Naive Bayes Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the naive Bayes regression technique, where the goal is to predict a single numeric value. Compared to other machine learning regression techniques, naive Bayes regression is usually less accurate, but is simple, easy to implement and customize, works on both large and small datasets, is highly interpretable, and doesn't require tuning any hyperparameters.

Subscribe on YouTube

Upcoming Training Events