vendredi 25 février 2011

Wikipedia and code...

You can find lots of useful stuff on the web. Even code. Even on wikipedia. But sometimes, its not easy to understand why what you got doesn't work....

A while ago, I was looking for some code to do DTMF detection in audio streams. On wikipedia, I found a very nice article about it, complete with a block of code. Excellent! Of course, I didn't go into the details of the algo or the implementation in the C code....

Integrated into our RTP layer, it seemed to work, _except_ for detecting 1, 2, or 3! No way to get these ones....

Didn't need the functionality immediately, gave up. And then, last month, absolutely had to do DTMF detection urgently in our product....

I returned to the wikipedia page in the hope someone had posted a fix, and found that the code had disappeared. But the great thing about wikipedia, is the history... you can see the changes back in time for each edit. And there I found who had removed the code, and that before that, someone had fixed it! Revert to that version of the page, and voila!

Long live version control!

Aucun commentaire: