Nihilistic code?



  • I came across this code today (VB.NET of course): 

    If Me Is Nothing OrElse [i]... (some more checks)[/i]

     



  • @djork said:

    I came across this code today (VB.NET of course): 
    If Me Is Nothing OrElse [i]... (some more checks)[/i]
     
    You know you're screwed when me or this is nothing or null. It's important to check this at every step to make sure you still exist. I mean, what if the garbage collector got you?



  • if an object becomes null, and it has no listeners registered, does it still cry out in pain?



  • @kaamoss said:

    if an object becomes null, and it has no listeners registered, does it still cry out in pain?

    I like to think it does. Still, it depends on what school of quantum mechanics you belong to.



  • This might be nearing the point of off topic, but the other night after getting very drunk, I had this dream. In the dream, I was all of the objects instantiated from an abstract factory class which made various widget objects. I started to get bored after a while and started to create different objects than expected, and then I was deleted and replaced after the code author couldn't figure out why I was buggy.

    I should probably try drinking less before I goto sleep... 



  • @kaamoss said:

    This might be nearing the point of off topic, but the other night after getting very drunk, I had this dream. In the dream, I was all of the objects instantiated from an abstract factory class which made various widget objects. I started to get bored after a while and started to create different objects than expected, and then I was deleted and replaced after the code author couldn't figure out why I was buggy.

    I should probably try drinking less before I goto sleep...

    Or drinking more.  There's bound to be a good outcome somewhere in that direction, too. 



  • @bstorer said:

    Or drinking more. There's bound to be a good outcome somewhere in that direction, too. 

    You've been drinking too much, or too little, I forget how it works with you. Anyway, you haven't drunk exactly the right amount.

    -Futurama



  • If Me Is Nothing OrElse ... (some more checks)

    If you are nothing, better do some more checks, or else...



  • @bstorer said:

    @kaamoss said:

    This might be nearing the point of off topic, but the other night after getting very drunk, I had this dream. In the dream, I was all of the objects instantiated from an abstract factory class which made various widget objects. I started to get bored after a while and started to create different objects than expected, and then I was deleted and replaced after the code author couldn't figure out why I was buggy.

    I should probably try drinking less before I goto sleep...

    Or drinking more.  There's bound to be a good outcome somewhere in that direction, too. 

    The problem is that you're using GOTO. Your time isn't structured enough. Try this:

    while (!asleep) {
      ++booze;
    }

    Works for me every time. You could try --booze, but only if you consider caffeine to be negative alcohol. Of course, there's a danger of an infinite loop there.



  • @kaamoss said:

    This might be nearing the point of off topic, but the other night after getting very drunk, I had this dream. In the dream, I was all of the objects instantiated from an abstract factory class which made various widget objects. I started to get bored after a while and started to create different objects than expected, and then I was deleted and replaced after the code author couldn't figure out why I was buggy.


    I wish I had dreams like that...



  • @The General said:

    @bstorer said:
    @kaamoss said:

    This might be nearing the point of off topic, but the other night after getting very drunk, I had this dream. In the dream, I was all of the objects instantiated from an abstract factory class which made various widget objects. I started to get bored after a while and started to create different objects than expected, and then I was deleted and replaced after the code author couldn't figure out why I was buggy.

    I should probably try drinking less before I goto sleep...

    Or drinking more.  There's bound to be a good outcome somewhere in that direction, too. 

    The problem is that you're using GOTO. Your time isn't structured enough. Try this:

    while (!asleep) {
      ++booze;
    }

    Works for me every time. You could try --booze, but only if you consider caffeine to be negative alcohol. Of course, there's a danger of an infinite loop there.

    Changing it to take advantage of the Ballmer Peak might be a good idea.



  • @The General said:

    The problem is that you're using GOTO. Your time isn't structured enough. Try this:

    while (!asleep) {
      ++booze;
    }

    Works for me every time. You could try --booze, but only if you consider caffeine to be negative alcohol. Of course, there's a danger of an infinite loop there.

     Heh, that's pretty much my general mode of operation right there, you've got me pegged all too well...I'd also asume that speed in place of caffine would deffinitly result in an infinite loop as well.
     


Log in to reply