This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's General Open Topic subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Open Topic & United-TI Talk => General Open Topic
Author Message
SonicBoom95


Member


Joined: 31 Jan 2008
Posts: 237

Posted: 26 Feb 2009 08:37:58 am    Post subject:

We've all had those moments. The moments where you search tirelessly for a bug, only to discover that it's been sitting under your nose the whole time. The moments where you miss an obvious and critical optimization. The moments where you look back and say, "What was I thinking?"

This is a place to share those stories. Hopefully, we can all learn from them.

Delvars
I was tearing my hair out. My Repeat loop wasn't triggering consistently. I had code scattered around displaying every single variable. I had checked the conditionals. I had checked my nesting. And it still wasn't working.


Code:
:Delvar HDelvar YRepeat Y=14
:...
:End


I noticed the Delvar problems about five minutes after the third RAM clear.

MORAL:
{Repeat, While, For}->L1
Delvar + L1 = BAD

More to come.

EDIT: format


Last edited by Guest on 26 Feb 2009 08:39:32 am; edited 1 time in total
Back to top
darkstone knight


Advanced Member


Joined: 07 Sep 2008
Posts: 438

Posted: 26 Feb 2009 10:16:49 am    Post subject:

well... i once had a bug in this code:

LD (HL),E\ inc hl
LD (HL),D\ inc hl
...

after about 30 minutes, i figured it out, it was supposed to be this:

LD E,(HL)\ inc hl
LD D,(HL)\ inc hl

Neutral

morale of the story:
dont use ctr+V...
Back to top
Galandros


Active Member


Joined: 29 Aug 2008
Posts: 565

Posted: 26 Feb 2009 04:20:33 pm    Post subject:

hahahaha

I made a loop for testing purposes that is somewhat like the main loop but I forgot to clear gbuf before writing to it.
The result was strange screen that I didn't know what caused.
But I stand half an hour and I had the solution right in bellow. o.O
Back to top
SonicBoom95


Member


Joined: 31 Jan 2008
Posts: 237

Posted: 27 Feb 2009 08:31:26 am    Post subject:

I had finished a three-week programming project. I raised my arms in joy...while still holding my calculator. My calculator hit the ceiling, hit the floor, and did everything but tap dance and sing "Ave Maria." One battery ruptured, three keys fell off, the screen went black, and (of course) after I had repaired all the damage, it RAM cleared.

I don't raise my arms anymore.
Back to top
darkstone knight


Advanced Member


Joined: 07 Sep 2008
Posts: 438

Posted: 27 Feb 2009 09:04:25 am    Post subject:

ROFL Laughing
Back to top
Galandros


Active Member


Joined: 29 Aug 2008
Posts: 565

Posted: 27 Feb 2009 02:14:28 pm    Post subject:

Omnicalc RAM recovery is my watching angel (expression makes sense?).

And I group everything, after I make some good progress...
Back to top
simplethinker
snjwffl


Active Member


Joined: 25 Jul 2006
Posts: 700

Posted: 27 Feb 2009 03:19:48 pm    Post subject:

I was writing a (Python) program to model traffic flow in a roundabout. The collision detection was based on angular distance, so I needed a way to turn 350-10 into -20. This was for a math competition, so naturally our first thought was a trick along the lines of arccos(cos()) and it seemed to work fine. A day and a half later, with less than 16 hours until the competition was over, when we were almost done collecting the data (with full simulations taking 45 minutes) I noticed around the zero degree mark there was a huge pile-up of cars. And then we realized the image of arccosine is always positive :sick:

Last edited by Guest on 27 Feb 2009 06:49:59 pm; edited 1 time in total
Back to top
darkstone knight


Advanced Member


Joined: 07 Sep 2008
Posts: 438

Posted: 27 Feb 2009 04:02:43 pm    Post subject:

i made that cos( mistake once....

fpart( is your friend :biggrin:
Back to top
simplethinker
snjwffl


Active Member


Joined: 25 Jul 2006
Posts: 700

Posted: 27 Feb 2009 06:52:24 pm    Post subject:

darkstone knight wrote:
i made that cos( mistake once....

fpart( is your friend :biggrin:

How would fPart help (and remember this was in Python, not on a calculator, so it would be x-floor(x))
Back to top
thornahawk
μολών λαβέ


Active Member


Joined: 27 Mar 2005
Posts: 569

Posted: 27 Feb 2009 09:13:02 pm    Post subject:

Nothing too exotic for me, just misplaced or missing minus and/or plus signs. Which is infuriating if it's in the middle of a very complicated expression. ;)

Now, I try not to program anymore when sleep-deprived... ;)

thornahawk


Last edited by Guest on 27 Feb 2009 09:15:04 pm; edited 1 time in total
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 28 Feb 2009 06:20:04 am    Post subject:

thornahawk wrote:
Nothing too exotic for me, just misplaced or missing minus and/or plus signs. Which is infuriating if it's in the middle of a very complicated expression. ;)

Now, I try not to program anymore when sleep-deprived... ;)

thornahawk

CalcUtil was programmed almost entirely via sleep-deprivation. I dunno if that's a good thing or not... Razz
Back to top
Galandros


Active Member


Joined: 29 Aug 2008
Posts: 565

Posted: 28 Feb 2009 06:32:13 am    Post subject:

When I am sleep-deprived I can even see asm code. Not sure about BASIC...

But making homework is definitely bad. (classes... oh...)
Back to top
tr1p1ea


Elite


Joined: 03 Aug 2003
Posts: 870

Posted: 28 Feb 2009 06:39:13 am    Post subject:

Yeah i get silly ones from time to time, and sometimes some real strange ones that require a lot of work to discover ... most often they do occur when im really tired.

I remember i had to rewrite a section of code like 5 times because everytime it wouldnt work and id come back the next day and be puzzled as to what i was thinking when i wrote it :X.
Back to top
SonicBoom95


Member


Joined: 31 Jan 2008
Posts: 237

Posted: 01 Mar 2009 02:41:22 pm    Post subject:

Galandros wrote:
Omnicalc RAM recovery is my watching angel (expression makes sense?).


I believe the expression is "guardian angel." Close, though :biggrin:


For about three months, one of my friends had a program from me, written with the help of xLIB. I later discovered that he had run this program from MirageOS every single time he used it. The investigation was launched after his calc got so historically bricked, we had to do an OS resend twice. Moral: Documentation is your friend.
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 01 Mar 2009 03:10:46 pm    Post subject:

I've occasionally placed cos‾¹( down on accident instead of a curly brace, realizing my mistake only during testing.

Last edited by Guest on 11 Jul 2010 06:11:17 pm; edited 1 time in total
Back to top
Galandros


Active Member


Joined: 29 Aug 2008
Posts: 565

Posted: 01 Mar 2009 05:20:13 pm    Post subject:

Weregoose wrote:
I've occasionally placed cos‾¹( down on accident instead of a curly brace, realizing my mistake only during testing.

Ugh, I sometimes write a trigonometric function with ‾¹ instead of without, but I notice right after appearing in the screen...


Last edited by Guest on 11 Jul 2010 06:10:35 pm; edited 1 time in total
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 01 Mar 2009 05:32:30 pm    Post subject:

SonicBoom95 wrote:
For about three months, one of my friends had a program from me, written with the help of xLIB. I later discovered that he had run this program from MirageOS every single time he used it. The investigation was launched after his calc got so historically bricked, we had to do an OS resend twice. Moral: Documentation is your friend.
Well, a program needs a special ":" at the beginning in order to appear in MirageOS, so either your friend decided to mess with someone else's source code, in which case he incurs his own risks, or you put it there, thus encouraging him to run it in MirageOS. Either way, documentation would not have been much help Razz
Back to top
Galandros


Active Member


Joined: 29 Aug 2008
Posts: 565

Posted: 02 Mar 2009 07:20:47 am    Post subject:

magicdanw wrote:
SonicBoom95 wrote:
For about three months, one of my friends had a program from me, written with the help of xLIB. I later discovered that he had run this program from MirageOS every single time he used it. The investigation was launched after his calc got so historically bricked, we had to do an OS resend twice. Moral: Documentation is your friend.
Well, a program needs a special ":" at the beginning in order to appear in MirageOS, so either your friend decided to mess with someone else's source code, in which case he incurs his own risks, or you put it there, thus encouraging him to run it in MirageOS. Either way, documentation would not have been much help Razz
xLib documentation says what safe rams it uses. So an expert person would see if MirageOS use it or not by reading its documentation.
Back to top
WikiGuru
ADOS (Attention deficit... Oh! Shiny!)


Elite


Joined: 15 Sep 2005
Posts: 923

Posted: 02 Mar 2009 05:43:48 pm    Post subject:

I was writing some regression code, and I forgot to actually save the updated values. Took hours to see which part of the code was going wrong.
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement