3 ms·
Please don't take this personally, but the fact that your code was N thousand lines doesn't mean the task is inherently an N-thousand line task. Also, undertak
by yid 16y ago
Please don't take this personally, but the fact that your code was N thousand lines doesn't mean the task is inherently an N-thousand line task.
Also, undertaking anything with XML in C is brave, kudos.
- ekidd 16y agoIf you know of any way to make the code shorter and more concise, please let me know. I'm always looking for ways to improve. https://gist.github.com/937200 https://gist.github.com/937200 (two sample files, totaling slightly less than half the project) Posting 10-year-old code to HN is always a little embarrassing, but please feel free to be brutal. I'll live. :-) I was definitely way too in love with the preprocessor back then. Here's the corresponding Python code, from shortly after it hit 1,000 lines in late 2001: http://hg.python.org/cpython-fullhistory/file/7b2d701ec404/Lib/xmlrpclib.py http://hg.python.org/cpython-fullhistory/file/7b2d701ec404/L... I like the Python code rather better, if only because there's so much less explicit memory management. The actual ideas stand out clearly, and there's just so much less code to read. In most cases, I'd happily sacrifice the performance.