Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is Perl a quantic programming language ?


Well, how else do you think http://www.bennylingbling.com/tag/schrodingers-bug/ originated


My professor's favorite joke:

Java: Write once, run anywhere

Perl: Write once, run away


My best example is a Perl bug I corrected.

It occurred only 27 second by year! Just to think about the probability to detect it knowing the code is used only about twice a week.


I'll bite: how did that happen?


I don't remember all details. My co-workers searched to understand the bug and he discovered that changing the creation date for just some second made the bug disappear. I then discovered he called the function with a bad argument. Strangely using an integer instead of a time object (I am not sure about that but you get the idea) will render the exact same result most of the time. I corrected the bug by using the right function call. I then tried a brute force search to discover for how many time the bug occurs. And if remember well there were two close period of a few second each during wich the function bad called render a different result. It was something like 17 second and 3 minutes later another 10 second. I believe I simply tried for the current year. I might have tweeted about it some years ago.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: