floof.org

Pippin friendica

A colleague asked to see the code he's going to write the next version of. I plastered it with apologies and statements that it's awful before showing him and *still* got a response of "are you serious?!" This is why I don't show people my code very often. It's a disaster and I know it. :p

(Yes, it's been in production for 5 years, and yes, it does use a sed program full of complicated regular expressions to transform XML messages into SQL procedure calls to update a database. Yes there have been some bugs, but only in my Python code, where the STOMP library I'm using to stream the XML from an activeMQ server does weird *weird* undocumented things regarding threading and error handling I've had to try to code around. I think since it went live I have not found *any* bugs in my sed/mysql code - or the shell script that generates the sed code. The one big problem it's had is simply performance - unsurprising given how regexp-heavy it is.)