The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
I have been working on and off (at home) on that single algorithm for almost 2 and half years, I think.
I am now very close to completion with an elegantly simple algorithm
Except.. it doesn't work...
After days of staring at my screen I came up with a test that shows an internal data inconsistency that will predict failure.
But... basically the validation is a loop doing some calculation at each step.. .
It came literally right after the same loop applying the calculation result.. yet it has different value than expected?!
Why, ho why? And how?
I think the forces that be are preventing me from finding the truth!
That's the only logical explanation I can come up with!
The problem with stepping through the whole algorithm manually is that there is too much data and raw numerical values don't make much sense to human eyes... it describe 2 potatoes intersection.. but when I look at the bezier's handle point values, it means little to me (except visually..)
FYI, trying to debug this vector graphic eraser issue
Anyway, just made a tiny bit more progress... In my structure I got, for some reason, an odd number of intersection (between 2 shapes)...
in all seriousness, I just got done with tackling a similar debugging issue.
Sometimes the debugger just isn't enough. As another commenter pointed out, the algorithm doesn't usually make much sense to people once it's at the point where it breaks.
So you should write more code. I dumped intermediary LALR tables to CSV for example so i could visualize them. I also made symbols and grammar rules print out string representations of themselves to the debugger to help.
In the end, write MOAR CODE until the problem reveals itself.
Sometimes using graphviz can help, in extreme cases.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
Yeah I made (some tiny bit) of progress lately.. because I wrote plenty of tools and visualisation to make the issue more understandable...
I am getting close.. When it fails I got 3 intersection between 2 shapes (best understanding, so far, about the problem) now I just have to find out why!
That can't be.. I guess I misdiagnosed a touch for an intersection.... That's a tricky one, since intersection are approximation though...