Putting output statements to check results at every step usually helps.
Putting output statements to check results at every step usually helps.
What languaje it is?C++?Visual Basic
Names, secret names
But never in my favour
But when all is said and done
It's you I love
It's a Matlab program
:sigh: it takes about two minutes for the algorithm to complete, this is getting very boring and annoying...
Yes, Iraq is peaceful. Go to sleep now. - Adrian II
I had a MATLAB program mess up on me earlier this year. The error was so hidden and insidious it took a few days to find. I had entered a numerical data value instead of the variable it represented in one of my calculations. This meant that whenever I used the test data for calculations, all of my answers were correct, but when I used any other data, my answers would be wrong. Luckily, I started early enough to detect this problem.
"Never in physical action had I discovered the chilling satisfaction of words. Never in words had I experienced the hot darkness of action. Somewhere there must be a higher principle which reconciles art and action. That principle, it occurred to me, was death." -Yukio Mishima
heh, yesterday I spent over an hour tracking down a mistake, turned out that I had written 'y2' instead of 'y1' somewhere in the bowels of the programOriginally Posted by Kongamato
![]()
I seem to have tracked down the problem now. I know i should be more careful about writing down my parameters, but how was I supposed to know my first guess was spot on ? I figured it was quite robust, not really the case I fear. Oh well, back to the drawing board I suppose![]()
Problem is also that when I look at the results I wonder if something that looks so impressive is really worth the effort![]()
![]()
Yes, Iraq is peaceful. Go to sleep now. - Adrian II
Ugh. I feel your pain doc. Such a thing is my worst nightmare. I absolutely hate re-doing something I've already done.
Once at work I spend a whole afternoon writing a program and then accidentally did a "quit without save". I was so ticked off after I realized what I had done that I immediately wrote a shell around the program editor to ask me "are you sure?" whenever I did a "quit without save" so I wouldn't repeat that mistake again.
Good luck recovering.
This space intentionally left blank
I have discovered that programming is a love hate thing. On the one hand it is very cool all the stuff you can make a computer do and it is good when you finish a program.
On the other hand computers are evil malevolent machines. When there is an error in your code, it does not tell you what is wrong or even where the error is, instead you get some insane cryptic remarks, (eg, "differs in levels of indirection"), that cause you to start shouting things like "What the hell the do you mean "differs in levels of indirection" MMMMMMAAAAAAARRRRRRR!!!". Or in the case of my friend swear like hell then walk out of the room and disappear for ~10 minutes.
The most important thing that I learnt from my first semester of Computer Games Technology BSc (Hons), is that you should spend 90% of your time far away from computers, writing pseudo-code and testing it where computers can't tell you that something differs in levels of indirection.![]()
Bookmarks