Go to Post FIRST always talks about grandmothers and making them proud. So FIRST---you made my grandmother proud. - Collin Fultz [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
  #46   Spotlight this post!  
Unread 06-05-2006, 15:30
lukevanoort lukevanoort is offline
in between teams
AKA: Luke Van Oort
no team
 
Join Date: Oct 2005
Rookie Year: 2005
Location: Waterloo, ON, Canada
Posts: 1,873
lukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond repute
Send a message via AIM to lukevanoort
Re: Stupidest Programming Mistakes

At the meeting last week, I managed to finish the exponential drive code (Excel saved my butt there) and loaded it into the robot. Putting it up on blocks (always a good idea with new code) I noticed that it ran fine in reverse, but when the joystick was pushed forward the wheels started turning fast then slowed to a stop. My problem? I had forgotten to add 127 to the value from the look-up table... stupid stupid stupid.
__________________
Team 1219: 2009 - Mentor
Team 587: 2005 - Animator, 2006-2008 - Team Captain
  #47   Spotlight this post!  
Unread 16-05-2006, 10:40
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: Stupidest Programming Mistakes

When i was testing my custom joystick mixing code i forgot to add 2000 to the value before i sent it to the Limit_Mix Function. The robot was on the floor and wnet full reverse it ran over one person and finaly ran into a workbench before anyone could shut it off.
__________________
Eric Haskins KC9JVH
  #48   Spotlight this post!  
Unread 16-05-2006, 20:22
Joe_Widen's Avatar
Joe_Widen Joe_Widen is offline
Registered User
FRC #1675 (The Ultimate Protection Squad)
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Milwaukee
Posts: 215
Joe_Widen has much to be proud ofJoe_Widen has much to be proud ofJoe_Widen has much to be proud ofJoe_Widen has much to be proud ofJoe_Widen has much to be proud ofJoe_Widen has much to be proud ofJoe_Widen has much to be proud ofJoe_Widen has much to be proud of
Re: Stupidest Programming Mistakes

While one of our programmers was cleaning up the code, he accidentally deleted a line that said *DO NOT DELETE THIS LINE*. Well anyways it gave us quite a few headaches in Milwaukee.
__________________
Finally in college =]


2009 Midwest Regional Champions - Thanks 111 and 1625
  #49   Spotlight this post!  
Unread 16-05-2006, 22:57
Adam Shapiro's Avatar
Adam Shapiro Adam Shapiro is offline
Registered User
FRC #0555 (Montclair Robotics)
Team Role: Alumni
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Montclair, NJ
Posts: 401
Adam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud of
Send a message via AIM to Adam Shapiro
Re: Stupidest Programming Mistakes

Quote:
Originally Posted by Joe_Widen
While one of our programmers was cleaning up the code, he accidentally deleted a line that said *DO NOT DELETE THIS LINE*. Well anyways it gave us quite a few headaches in Milwaukee.
That happened to us 3 years ago. One of our programmers accidentally deleted the PutData line about 2 minutes before a match. We ended up on the field with a code error and a loss to our record.
__________________
Mentor to Teams 555, 1929, and 2070!
Currently working in hardware design at Cisco.
Cornell University DARPA Urban Challenge - http://www.cornellracing.com
Co-Captain Team 555 - 2003,2004,2005
Trust, Love, and Magic
  #50   Spotlight this post!  
Unread 17-05-2006, 17:18
coldabert's Avatar
coldabert coldabert is offline
The Dude
FRC #0888 (Robotiators)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2003
Location: MD
Posts: 83
coldabert is a glorious beacon of lightcoldabert is a glorious beacon of lightcoldabert is a glorious beacon of lightcoldabert is a glorious beacon of lightcoldabert is a glorious beacon of light
Send a message via AIM to coldabert
Re: Stupidest Programming Mistakes

This isnt as stupid as it was an accident but I'm still not going to mention the guy who wrote it:

We had a winch system that would connect to our drive motors. The point was to engage the winch when the cable was taken off the robot and hooked on the bar (2 years ago). Well, he engaged the winch during autonomous and the aircraft cable (which doesnt break) was wraped around the frame of the robot and the dead reckoning code simply drove the motors. The cable just got tighter and tighter. Needless to say the 1/2 inch steel tubing was a little bent and the entire frame looked like a car wreck.

Thats when we decided that only one guy should make the programming mistakes.
  #51   Spotlight this post!  
Unread 20-05-2006, 01:00
aaronm_k aaronm_k is offline
Registered User
no team
 
Join Date: Jan 2006
Rookie Year: 2006
Location:  
Posts: 10
aaronm_k is on a distinguished road
Post Re: Stupidest Programming Mistakes

Quote:
Originally Posted by Eldarion
One of the things that keeps tripping us up is that the MPLAB compiler does not follow standard C data type promotion rules.

For example, given the statement below, standard C would promote both data types to integer, then multiply. The MPLAB compiler, however, multiplies a and b as unsigned chars and then sticks the result in the integer value, resulting in an overflow where you least expect it!

Code:
unsigned char a = 127:
unsigned char b = 127;
int result;

result = (a * b);
You can turn on integer promotions by going to "Project" > "Build Options" > "Project" in MPLAB, clicking the "MPLAB C18" tab, and adding "-Oi " to the beginning of the "Use Alternate Settings" text box. (Checking the "Enable integer promotions" check box will NOT work.) Believe me, I had plenty of trouble with this too!
  #52   Spotlight this post!  
Unread 21-05-2006, 00:15
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Stupidest Programming Mistakes

The stupidest programming mistake:

Assuming the programmer is driving.
  #53   Spotlight this post!  
Unread 07-08-2006, 14:50
Robert Flanagan's Avatar
Robert Flanagan Robert Flanagan is offline
Robert Flanagan
FRC #1390 (Welethedawgsout)
Team Role: Programmer
 
Join Date: May 2005
Rookie Year: 2004
Location: ST. Cloud
Posts: 11
Robert Flanagan is an unknown quantity at this point
Re: Stupidest Programming Mistakes

Hehehe, of course semicolons r an issue.

The biggest mistake was working on autonomous. It was at nationals and I still dont know what I did wrong but fixed it. As soon as autonomous started the bot drove forward then started spinning to the left firing into the crowds, judges, everywhere else.
__________________
Everywhere and nowhere, like the wind

Robert Flanagan, Programmer, team 1390
  #54   Spotlight this post!  
Unread 07-08-2006, 14:51
Alexa Stott's Avatar
Alexa Stott Alexa Stott is offline
All I do is twin.
AKA: elixir
FRC #0025 (Raider Robotix)
Team Role: College Student
 
Join Date: Oct 2005
Rookie Year: 2006
Location: No. Bruns., NJ/College Park, MD
Posts: 781
Alexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond repute
Send a message via AIM to Alexa Stott
Re: Stupidest Programming Mistakes

One stupid mistake I made at one point was that I forgot to close something off. I was too lazy to go back and look for it, so I just added a random "}" at the end of the code. Problem fixed!
__________________
|Email:alexastott[at]gmail.com|Facebook|@zelixir|Google+|
[University of Maryland Computer Science, Psychology]
[Brunswick Eruption]
  #55   Spotlight this post!  
Unread 07-08-2006, 14:53
Robert Flanagan's Avatar
Robert Flanagan Robert Flanagan is offline
Robert Flanagan
FRC #1390 (Welethedawgsout)
Team Role: Programmer
 
Join Date: May 2005
Rookie Year: 2004
Location: ST. Cloud
Posts: 11
Robert Flanagan is an unknown quantity at this point
Re: Stupidest Programming Mistakes

Quote:
Originally Posted by Joe_Widen
While one of our programmers was cleaning up the code, he accidentally deleted a line that said *DO NOT DELETE THIS LINE*. Well anyways it gave us quite a few headaches in Milwaukee.

That's why you always save a copy of the default code.
__________________
Everywhere and nowhere, like the wind

Robert Flanagan, Programmer, team 1390
  #56   Spotlight this post!  
Unread 07-08-2006, 15:13
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: Stupidest Programming Mistakes

Quote:
Originally Posted by Robert Flanagan
Hehehe, of course semicolons r an issue.

The biggest mistake was working on autonomous. It was at nationals and I still dont know what I did wrong but fixed it. As soon as autonomous started the bot drove forward then started spinning to the left firing into the crowds, judges, everywhere else.
Team 95's robot did this in the practice pits at Manchester. It was rather entertaining, which helped offset the frustration.
  #57   Spotlight this post!  
Unread 07-08-2006, 15:18
LordTalps LordTalps is offline
Crimson Ninja
AKA: Pat
FRC #1885 (Robocats)
Team Role: Programmer
 
Join Date: Aug 2006
Rookie Year: 2006
Location: Skingrad
Posts: 106
LordTalps is a splendid one to beholdLordTalps is a splendid one to beholdLordTalps is a splendid one to beholdLordTalps is a splendid one to beholdLordTalps is a splendid one to beholdLordTalps is a splendid one to beholdLordTalps is a splendid one to beholdLordTalps is a splendid one to behold
Send a message via AIM to LordTalps
Re: Stupidest Programming Mistakes

Was working on the Marine Biology Study for AP Computer Science AB, and had was running through making a fish (was easy after the first 5 or 6 we made).

All of a sudden, STACK OVERFLOW? What in the world?

isolated it to a method that returned a class variable, myID. That method was one line, it couldn't be the issue. Lo and behold, it was pointed out:

public int myID()
{
return myID();
}

  #58   Spotlight this post!  
Unread 07-08-2006, 15:19
Booger's Avatar
Booger Booger is offline
Registered User
FRC #0637
 
Join Date: Jul 2006
Location: Montville, NJ
Posts: 74
Booger will become famous soon enough
Re: Stupidest Programming Mistakes

i loaded the defualt code from last year, and the robot just started going. It ran into a table and knocked everything over. Luckly it wasnt facing the otherway becasue it would have went down the road.
__________________
Collars up!

637
  #59   Spotlight this post!  
Unread 07-08-2006, 15:24
thegathering's Avatar
thegathering thegathering is offline
Angry Troll Lurking in the MUD
AKA: Ben
FRC #1885 (Robocats)
Team Role: Programmer
 
Join Date: Jul 2006
Rookie Year: 2006
Location: Look around you. What do you see?
Posts: 333
thegathering is a splendid one to beholdthegathering is a splendid one to beholdthegathering is a splendid one to beholdthegathering is a splendid one to beholdthegathering is a splendid one to beholdthegathering is a splendid one to behold
Send a message via AIM to thegathering
Re: Stupidest Programming Mistakes

Quote:
Originally Posted by Booger
i loaded the defualt code from last year, and the robot just started going. It ran into a table and knocked everything over. Luckly it wasnt facing the otherway becasue it would have went down the road.
Related bug, we had a 1 in an assembly level if check instead of a 0 (one of our less experienced coders put it there) and all the motors ran by the method just started running at full speed. Luckily this was early on and the motors were not attached to the bot yet.
__________________

*2006 Champion Rookie All Star Award.
*2 x 2006 Regional Rookie All Star Awards.
  #60   Spotlight this post!  
Unread 07-08-2006, 15:26
Booger's Avatar
Booger Booger is offline
Registered User
FRC #0637
 
Join Date: Jul 2006
Location: Montville, NJ
Posts: 74
Booger will become famous soon enough
Re: Stupidest Programming Mistakes

Quote:
Originally Posted by thegathering
Related bug, we had a 1 in an assembly level if check instead of a 0 (one of our less experienced coders put it there) and all the motors ran by the method just started running at full speed. Luckily this was early on and the motors were not attached to the bot yet.
Yeah we ended up putting the robot on wood blocks just so it doesnt do that again because its a real pain.
__________________
Collars up!

637
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming Vex w/ MPLab dababyjebus FIRST Tech Challenge 27 25-04-2008 09:11
Programming - Getting Started Mark McLeod Programming 80 16-04-2008 23:37
VEX programming Gene F Programming 14 08-08-2006 22:21
Suggestion for Delphi Programming Posts Chris Hibner CD Forum Support 1 27-07-2005 10:02
Robot Programming Education phrontist Programming 11 03-05-2004 07:32


All times are GMT -5. The time now is 22:29.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi