Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Luke, I am your code

Discussion in 'General Discussion' started by guitarxe, Sep 17, 2014.

  1. guitarxe

    guitarxe

    Joined:
    Dec 1, 2013
    Posts:
    131
    I am getting scared. I don't write code while drunk or late at night, but I leave it for a few days or even weeks once in a while. And whenever I come back to it, it's like something has been going on while I was gone. Code that I was planning to continue writing now is already there, half-done, but I don't remember writing it! :eek:

    Is my memory that bad? Am I going crazy? Is my code going sentient? Has anyone had moments like this before?
     
    elmar1028 likes this.
  2. RockoDyne

    RockoDyne

    Joined:
    Apr 10, 2014
    Posts:
    2,234
    I think most of mine is from when I'm drunk, but I don't usually drink so much while coding that I forget what I've done. Otherwise I would say it's because I had jumped ahead to do that part way before I needed to, or a copy/paste job from something else.
     
  3. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,738
    Your code is becoming self-aware.
     
  4. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,353
    There is a ghost of a Unity developer in your house. When you are sleeping or away he writes the code for you coz he is bored!
     
  5. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,381
    but... how?...
    http://xkcd.com/323/
     
    Deleted User and elmar1028 like this.
  6. zDemonhunter99

    zDemonhunter99

    Joined:
    Apr 23, 2014
    Posts:
    478
    I think I know the perfect solutio... Wait, what am I doing here? Who am I?
     
    elmar1028 and Ryiah like this.
  7. c-Row

    c-Row

    Joined:
    Nov 10, 2009
    Posts:
    827
    Du-dun dun du-dun!

     
    BeefSupreme and elmar1028 like this.
  8. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    No.

    I'll admit, I've gained remote access to your computer and have been writing code and doing all kinds of other things while you're asleep. That's why the code you don't remember is always written vastly better than the rest of your code. :)

    Take comfort in knowing that all your files are being pirated across the internet as we speak.
     
  9. steego

    steego

    Joined:
    Jul 15, 2010
    Posts:
    967
    You've probably been writing self modifying code.
     
    randomperson42 likes this.
  10. landon912

    landon912

    Joined:
    Nov 8, 2011
    Posts:
    1,579
    Teach me master, to write code so well that it continues writing itself!
     
  11. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,500
    Yes, I've had moments like that. I stub things in as I go so that I can wire other things up to the interface before actually implementing it. As I'm stubbing, there's a lot of super simple stuff I may as well put in while I'm there - so I hash it out without really thinking about it - I leave comments as I go so that I'm reminded what I planned on doing/how other stuff expects it to work, but sometimes it's just as easy to write the code as it is to describe it, so I do that instead.

    Then later on, when I come back to implement the stubs, I sometimes find that the "stubs" already form a significant amount of the implementation, or that I've left myself literally a colour-between-the-lines where all the data is wired up and I just have to fill in a few key algorithms or data transforms or whatnot.
     
    Ryiah likes this.
  12. BeefSupreme

    BeefSupreme

    Joined:
    Aug 11, 2014
    Posts:
    279
    Yes, please, teach us all!
     
  13. Amon

    Amon

    Joined:
    Oct 18, 2009
    Posts:
    1,357
    Yes! Oh great one, bestow upon our sad unindented spaghetti code the power of the l33t. We have been waiting oh great one...........also oh great one, while our minds are poisoned by the pint clear our internet caches of 'Dirty over 30' so that our other halves cannot see it to then cast us away from thee, oh l337 master.
     
  14. c-Row

    c-Row

    Joined:
    Nov 10, 2009
    Posts:
    827
    I'd rather have him log into the Unity devs' computers at night to hurry the release of 4.6 or 5 ;)