Well, today was another day mostly spent programming on my class project. I faced a particularly nasty problem today. Something was inexplicably not working. Basically I was trying to draw something to screen but failing. Confusingly, when I drew the exact same thing to another part of the screen it was working. Let me clarify. I had two drawing windows, the drawing commands were working in one, but not the other. I talked to the TA of the class about it. After some more investigation it was apparent that the drawing list, a piece of code that's stores drawing commands, was not being shared between the two drawing windows. Very Very confusing. my TA was confused and looked up what he thought was an answer. He found a little piece of communication between a confused programmer and one of the Qt developers. He showed it to me, but it turned out to be answering a different question. It did, however, inspire me to look in the same place for an answer. I was able to find out that the windows had to be created specifically knowing baout each other in order to share the drawing lists. I changed the code accordingly and VOILA!! it worked.
This is an example of a programming demon. This one was particularly devious and subtle. It involved my ignorance and a whole lot of witch hunting (I tried several other solutions before finding this one). In the end, it was so easy to defeat, I just had to know where to strike at it.
Yay for me!
Subscribe to:
Post Comments (Atom)
1 comment:
Its like a detective story. I see a book of short stories with computer sleuths solving programming mysteries for the good of mankind ala "I Robot!"
Post a Comment