Today i was stuck at a simple problem for a few good hours. The problem was that a header with menus appears on a page which isn't supposed to have them. Due to the complicated plumbing works that my company use, javascript calling modcgi page calling pm modules creating xml data and returning them to xsl which later transform into html.So i've learned my previous lesson well to not jump to conclusion and painstaking write down stuff that i find and ask better question on each step. I manage to trace down meticulously the last few steps of the process looking at the xsl, the javascript in the xsl and the pm module which produces the xml but i couldn't find anything.
And when i get frustrated i start doing really dumb shit, like try to create more empty xsl, empty whatever so i can simplify the problem and just basically not think but hack at it until shit that i can recognize as the output that i want comes out of it. Of course that was a dumb step because after a while i noticed that it's getting me no where near where i need to be.This is the pretty part where i stop to think, and good ol crazy hair einstein once said that you can't solve a problem using the same thinking which leads you there in the first place. So i try to do some paradigm shift and look at other potential page which is already capable of doing what i am trying to do and trace from there what was different.
I can't see anything in the xsl of the pm files so i trace some more until i finally hit the jackpot. The problem was in fact due to the modcgi, some genius has decided to create some method of using a session variable to keep this header and menus like a switch. So once i spotted this part, the rest of the puzzle just comes together like a good sushi piece would taste like.
I guess not giving up and believing that all problems does indeed has a solution and the only real problem that i had was i need to change my paradigm in order to see the solution.
0 comments:
Post a Comment