Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Uncle DT's Random Image Thread
I was able to experience another "glitch" with a witness today. I was reviewing some code with another developer and he has the Copilot extension that is AI driven. Anyway, we're trying to diagnose an issue with some possible timing issues on a callback method. Since we can't have breakpoints we're going to just log some timing values in the console. So he creates a new property and initializes it with a the current date time. Now we need some code for checking how much time elapsed since the last callback and we figure 500 milliseconds should be good enough. As soon as he types "if(curDateTime" the Copilot finishes the rest so it looks like this:
if(curDateTime && curDate.getTime() - lastTime.getTime() < 1000) {
}

We were both like WTF just happened? I think we would be even more shocked if it used 500 instead of 1000. But still, how'd it know? And just as a note, we don't have any code in our code base that uses any kind of timing protocols or anything, so it's not like it was just using some existing boiler plate code it found somewhere else in our project...


Attached Files Thumbnail(s)
   
Reply


Messages In This Thread
Uncle DT's Random Image Thread - by admin - 03-04-2017, 11:55 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)