Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. Clever Code
  4. Clever comment?

Clever comment?

Scheduled Pinned Locked Moved Clever Code
question
3 Posts 3 Posters 26 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member 2053006
    wrote on last edited by
    #1

    A timer is fired to attempt to recover a connection. At the end of the catch block where the connection has not been recovered is this comment:

    // Better luck next time.

    That made me chuckle at least...

    V 1 Reply Last reply
    0
    • M Member 2053006

      A timer is fired to attempt to recover a connection. At the end of the catch block where the connection has not been recovered is this comment:

      // Better luck next time.

      That made me chuckle at least...

      V Offline
      V Offline
      Vitaly Tomilov
      wrote on last edited by
      #2

      I've done maintenance on all kinds of weird code, even something like shown below:

      private string ShouldIReturnTheStringOrJustNullAndLetThisDamnAccountBurn()
      {
      // catch-me-if-you-can,-for-i'm-long-gone type of code:
      return null;
      }

      private IDispose GetInstance()
      {
      var s = "I don't give a shit if it doesn't work!";
      return (IDispose)s;
      }

      D 1 Reply Last reply
      0
      • V Vitaly Tomilov

        I've done maintenance on all kinds of weird code, even something like shown below:

        private string ShouldIReturnTheStringOrJustNullAndLetThisDamnAccountBurn()
        {
        // catch-me-if-you-can,-for-i'm-long-gone type of code:
        return null;
        }

        private IDispose GetInstance()
        {
        var s = "I don't give a shit if it doesn't work!";
        return (IDispose)s;
        }

        D Offline
        D Offline
        dojohansen
        wrote on last edited by
        #3

        You're just making it up, and we can tell since strings aren't even disposable. (Of course, you are now going to hide behind the "something like" provision. I'll maintain whatever it was, it was "nothing like" what you've posted!)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups