Tuesday, April 8, 2008

Huh? That Was It?

It's always an anti-climax when you tweak something that might work, and it fixes the whole goddamn problem! As weird as it might sound, I feel always somewhat deflated when that happens - a bit of tweaking here, a bit of fixing here, and *boom* it works, entirely unexpectedly!

I'm used to big fights. Hunting that off-by-one error, tracing variables through recursions of calls back and forth between classes and finally finding that logical error where I took the value out of the wrong method. No, not this time.

I just rewrote about five lines of code and the whole heap of tests just flies through the tests, passes each and every one of them. So, yes, I have if-then-else with elseif completely working. But I got it working before I even started trying. I guess I should not be disappointed. Not when I got the routine halved by the amount of lines from the original implementation. I've almost done everything that I did the previous round, and I've got rid of about a third of the old LOCs.

I guess I should scoot onwards, then, start fighting with the foreach-loops.

Update: Safari really sucks when it comes to rich text editing, it appears.

No comments: