Thursday, 26 September 2013

The handrolled version of *_create_custom_diff_cmd

This may or may not be a good idea, but if you enjoy this sort of thing, my latest effort at code comedy is here.

This is probably not the final version because copying Mel the Programmer's strategies is almost never a good idea, but, it just had to be done at least once ;-)

Update 30mins later:  Hah, already busted.  I take away any special end characters but if what I'm handling is not a delimiter, then I end up stealing user's chars.   Added a new test for this, now I have to fix it =)

(and why is it that every time, no matter how long I stare at my effort beforehand, the moment I commit code, I find a whopping show stopper a few minutes later? :-D )

Update on update:  Fixed.  And I should have coded that in the first place, the repetition should have made me suspicious, and I did think about it at the time, but thought that it can't be done differently for some reason.   Next time, I'll lay off the catnip before I commit.