Slashdot Mirror


Do Programmers Actually Use Assertions?

P.Chalin queries: "Do programmers actually use assertions (like the assert statement of various programming languages)? If so, what should be done when errors or exceptions are raised during the evaluation of an assertion? I am collecting opinions and stats via a short questionnaire. Thanks."

10 of 170 comments (clear)

  1. No. by Saeed+al-Sahaf · · Score: 5, Funny

    Real programmers do not use them. Code works fine the first time. You have "bugs" in your code???

    --
    "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
    1. Re:No. by fornaxsw · · Score: 2, Funny

      Real programmers do not use them. Code works fine the first time. You have "bugs" in your code???

      Yeah, exactly. My code always works fine the first time, and has plenty of undocumented "features" to boot.

    2. Re:No. by sharkey · · Score: 2, Funny

      That's some assertion! You MUST be a real programmer.

      --

      --
      "Outlook not so good." That magic 8-ball knows everything! I'll ask about Exchange Server next.
  2. Dependable Software Research Group? by HopeOS · · Score: 2, Funny

    Session Timeout
    Your session has timed out. Please register again.

    Perhaps posting to slashdot wasn't the best way to collect data, but it will give them something to think about with regards to server application reliability.

    -Hope

  3. My Ass Erts by lbmouse · · Score: 5, Funny

    ...when I sit and code too long.

  4. Wait a minute... by fornaxsw · · Score: 2, Funny

    I am collecting opinions and stats via a short questionnaire. Thanks.

    No...no this is not right at all. I already got tricked into giving out my personal info in exchange for a candy bar...no more surveys for me.

    Wait, are there movie passes being given away?

  5. Re:assert ==let by AndroidCat · · Score: 3, Funny

    Dartmouth. If you used LET, did the computer really have to do it? They should have been more definite and used a MAKE, FORCE or DOITORDIE statement.

    --
    One line blog. I hear that they're called Twitters now.
  6. Why use assertions... by Look+KG486 · · Score: 1, Funny

    ...when "assumptions" will do? ;-)

    --

    "Play is the only way the highest intelligence of humankind can unfold." -- Joseph Chilton Pearce

  7. Re:How accurate can this survey be? by dejavudeux · · Score: 2, Funny

    Yeah. And that is great for me because I have an assertion-related agenda that I want to promote. And now I can stuff the survey! Mwa Ha Ha Ha Ha Ha!

  8. Re:I use Eiffel-style assertions in C++ by FuzzyDaddy · · Score: 3, Funny

    Programming by contract is all very nice until your methods start suing one another...

    --
    It's not wasting time, I'm educating myself.