Perl will solve your bug!
Yesterday upon coming to work I was greeted by an e-mail saying that Detextive is having issues when large files are uploaded. It instantly felt suspicious because it didn't use to have these problems. So off I go and try a 100k word file on for size and woe and behold, the upload hung. Not to be deterred I turned on debugging and tried again, this time the culprit reared its ugly head and said hello.
The file uploaded well, but where it failed was ... counting the number of words there was. Strange huh? See the word counting "algorithm" kind of took more than 30 seconds to execute on such a monstrous text and so a timeout occured. I could've gone the usual solution, shoved it into an asynchronous process and simply wait it out, but it didn't feel right. I shouldn't have to do something like that just to bloody count how many words there were in a file. And there wasn't anything I could do with the algorithm to speed it up since regex function calls where hanging not the algorithm itself.
So I turned to python, python is cool right? It's bloody fast, has awesome string support and is overall very easy to program, especially since I already have some experience with it. But what's this? It doesn't support unicode character properties in regexes? WHAT? What the hell ... onward!
After some shuffling around and trying to figure out what to do I decided, what the hell, let's try perl. And that's exactly what I did, I learned perl from scratch just to solve a bug, crazy. Next thing you know I'm finding perl quite easy to code even though it's just about the same age I am and what's more, it counted the words and such not in a few seconds less, but in a bloody second! In light of this new discovery of perl's quickness I decided to put some other things into perl, for example in a later step I found out php's regexes and such take seven minutes to turn text into an array of words (for a 100k word file) and that's just not acceptable.
In other news, Tea Cooker has been downloaded over 120 times and yesterday reached a stage where it is in fact very useful.