Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Silly Programming screw ups (funny) (http://www.chiefdelphi.com/forums/showthread.php?t=67029)

mgreenley 22-04-2008 17:50

Re: Silly Programming screw ups (funny)
 
I'll contribute with probably my least serious, and most funny programming error I've encountered (outside of FIRST, but we were working in C/C++).
My freshman year, I took an introductory computer science class, and our final project was to design and code a remake of Tetris. We've been working on this project for a little while and it seems as if all the major flaws (that we found) were out of the code. Our team leader maintains this Windows independence, and will only work on his laptop, or, if he has to, in notepad (since MS Visual Studio is "evil" in his eyes). We finish work on the code, and GUI, compile everything, and...it doesn't work.
Try again...
...And it still doesn't work...
...We decide to each look over our parts of the code since the error messages were being less than helpful in figuring out why the code wasn't working...
...Try again...
...Yet another failure...
...Our experienced programmer gives up, calls it a day and checks in the code. I check it out for the rest of the team to work on for a little bit, open MS Visual Studio...
...And it immediately highlights the little " /* " at the top of the page that the senior team member forgot to delete when he took out comment header that described the beta process we had gone through.


We had inadvertently, commented out our declarations and main() since the next instance of a " */ " was below the code. We had used // comments everywhere else.


Proving that notepad, while incredibly useful, is not always the best program to use.

Shadow503 22-04-2008 19:05

Re: Silly Programming screw ups (funny)
 
Quote:

Originally Posted by slavik262 (Post 740835)
This is horribly true. We get the bad rap no matter what the problem is.

The funniest thing to me this year:

While in pits, I was often told to "fix my code" so that the robot would work. My response to this statement was "fix your wiring." 95% of the time our electrical guy would come out with a loose wire or a bad relay, and everything would work beautifully the second he fixed it (of course until the next "code" problem, that is) :D.

Yes, we are always blamed. Although the problem is not often our fault, we can almost always fix it, so we receive the blame :confused:. This year I had to compensate for a messed up control system and the fact that electrical wired up the motors backwards.

The other programmer working with me once threw this into my code while I wasn't looking:
Code:

this line will break your code xD;
It was one of my easier compile errors to fix. It's too bad we don't code in Python, otherwise that would have probably compiled if I included
Code:

import english

Cow Bell Solo 23-04-2008 00:20

Re: Silly Programming screw ups (funny)
 
Quote:

Originally Posted by slavik262 (Post 740835)
This is horribly true. We get the bad rap no matter what the problem is.

The funniest thing to me this year:

While in pits, I was often told to "fix my code" so that the robot would work. My response to this statement was "fix your wiring." 95% of the time our electrical guy would come out with a loose wire or a bad relay, and everything would work beautifully the second he fixed it (of course until the next "code" problem, that is) :D.

And then some of us get blamed for both because I'm the lead on both, 1 out of one for program and 1 out of 2 for electrical. Even if I'm not there its my fault(that is if I am never there cause I always am)

Hint for beginners, make sure the cable is off the robot when going to test hybrid after downloading new changes. Check once, twice, and trice. And never tighten the pins down. You'll thank me later

Vikesrock 23-04-2008 00:26

Re: Silly Programming screw ups (funny)
 
Quote:

Originally Posted by Cow Bell Solo (Post 741501)
And then some of us get blamed for both because I'm the lead on both, 1 out of one for program and 1 out of 2 for electrical. Even if I'm not there its my fault(that is if I am never there cause I always am)

Hint for beginners, make sure the cable is off the robot when going to test hybrid after downloading new changes. Check once, twice, and trice. And never tighten the pins down. You'll thank me later

Except that next year we are moving to a system that can be programmed wirelessly. Problem solved :cool:

lasereyes 23-04-2008 00:54

Re: Silly Programming screw ups (funny)
 
Quote:

Originally Posted by Uberbots (Post 739571)
2006:
not so much a programming error, but i was wearing a bright green shirt while programming the robot. I was tuning the camera at the time, and stood next to the goal. the robot went out, and looked like it had found the target, except it kept running towards it. So, i get out of the way and go towards the disable switch and the thing starts to follow me, and proceeds to chase me around our practice field, shooting balls at me while i attempt to get to the button.
funny thing is, it never shot balls as well at the goal as it did at me. ow.

Now I'm glad we didn't have any of those green lights this year. Something tells me the same thing would've happened to me...

artdutra04 23-04-2008 01:38

Re: Silly Programming screw ups (funny)
 
This isn't robot code related, but it is FIRST related.

Last year (during my senior year of high school), while coding Team 228's content management system, I left a few lines of development code in place in one of my email notification scripts. This particular script would email everyone selected, every time a new event was added to the website.

To make sure that all the emails were being queued up and sent correctly, I added my own email address to the BCC headers of each email, and then I had the script send me another email when everything completed just fine. I tested the code running on my local Apache server with a few email addresses, and everything worked just fine. And then I forgot about those few lines of code.

Fast forward some time later, when I forgot to remove those lines of code when turning the development code into production code for deployment on 228's website.

I then proceeded to have my mailbox flooded with 58 emails every time a new event was added to their website. At the time, since I was busy with classes it took a week before I had the time to go and fix that issue.

fishgurl 23-04-2008 07:50

Re: Silly Programming screw ups (funny)
 
We programed the auntonomus mode, finally, in our regonal comp. Our only problem was that it was driving the wrong way (into the wall), and did a major burn-out, tearing up some of the carpet. I don't think we got any points off, though.

Kevin Sevcik 23-04-2008 11:37

Re: Silly Programming screw ups (funny)
 
Hah, I've got a story from this year that wasn't even my fault. We were debugging out feedback controlled lift in AZ, and had just rewired the feedback pot and screwed it down into the proper place. The soft limits in the code hadn't been reset yet and we hadn't verified that everything was going in the proper directions, so I had the electrical team pull the breaker for the lift as well as for the drive motors since we were testing on the floor. A match came up , so I told the electrical team to replace the drive breakers. We sent the drive team out with the robot and presumably without a functioning lift. They come back 15-20 minutes later after the match, and our coach says "Hey, the lift worked great that match."

After I recovered from my heart attack, we determined that the electrical team misheard me and replaced all of the 40 amp breakers instead of just the lift breaker.

3DWolf 23-04-2008 14:21

Re: Silly Programming screw ups (funny)
 
I can't believe I forgot this one. Well, It turned out NOT to be a programming error which we initially thought it was but.
At St Louis we took the bot over to the practice field and were going to, you know, test. I reached in and turned on the robot and WHAM! The arm that we have on it SLAMS into my temple, making me go woosy for a second and I have since had major headaches (getting that taken care of).
One of our mentors swore it was a code problem even though the bot was in disabled mode through our disable switch box on our OI, and none of the joysticks were moved.
It turns out that our electrician accidentally wired a victor backwards so the arm got direct power and so when I turned it on, it went haywire.
It hurt, a lot.

Viper37 23-04-2008 14:52

Re: Silly Programming screw ups (funny)
 
One time our programming mentor accidentally inverted the autonomous code, so it went the totally opposite way.

He was standing behind the robot holding the tether when we engaged it.

He got nailed, but got out of the way in time.

Everybody laugh, cheered, and yelled things like "MR. PAWLY, SUICIDE IS NOT THE ANSWER!"

SgtMillhouse648 23-04-2008 15:29

Re: Silly Programming screw ups (funny)
 
Well, in general, debugging is always the "funnest" part of season...i'm being sarcastic if you didn't catch that one...well, this year, I made a controller for our arm that I strapped to mine, and where I moved my arm, the robot's arm moved...well when we went to test the arm out on last year's robot, I couldn't understand why it was giving me something like -28451 for the degrees of the controller...spent an entire night trying to figure it out. come saturday, I realized what the problem was...I was using int's for my variables and some of my calculations went outside the limits...changed them to longs, and it worked perfect.
Then came the fun part...testing it on this year's robot.
for those of you who don't know, this year's robot's arm can rotate behind it, and with a FP driving it originally, can turn into a giant baseball bat as it's swinging around. Well, I had the m value reversed, so the robot was driving the arm the opposite way it was supposed to. needless to say, I replaced the lower section of the arm at 11:00 the night before our media days...
Malhon

Chaos in a Can 23-04-2008 15:33

Re: Silly Programming screw ups (funny)
 
Quote:

Originally Posted by gurellia53 (Post 741221)
OY! You never told us that :D

Heh. Yes I did.:D

slavik262 23-04-2008 16:34

Re: Silly Programming screw ups (funny)
 
Quote:

Originally Posted by Shadow503 (Post 741311)
YThis year I had to compensate for a messed up control system and the fact that electrical wired up the motors backwards.

The other programmer working with me once threw this into my code while I wasn't looking:
Code:

this line will break your code xD;
It was one of my easier compile errors to fix. It's too bad we don't code in Python, otherwise that would have probably compiled if I included
Code:

import english

Hehe. Python. I should go out and learn it, to see what everybody is raving about.

Also,

Quote:

Originally Posted by Cow Bell Solo (Post 741501)
Hint for beginners, make sure the cable is off the robot when going to test hybrid after downloading new changes. Check once, twice, and trice. And never tighten the pins down. You'll thank me later

I took the screws out of our cables to prevent a nice suprise if somebody screwed the tether in. I think they're still sitting on my desk :D

FRC4ME 23-04-2008 17:31

Re: Silly Programming screw ups (funny)
 
Well, let's see. During the 2007 season we spent several days trying to figure out why our camera wouldn't track the green light before finally realizing it was mounted upside down.

This year, we had an experience on the field that almost got us a penalty. Due to a short on the RC pins, we lost the 5V bus during one match, which runs the gear tooth sensors. During hybrid mode, the robot went forward full speed and slammed into the opposing alliance's wall.

We got a warning from the refs and determined that we could not fix the problem in time for the next match, so we flipped our disable autonomous switch, slightly disappointed.

The next hybrid mode, we were reminded that the disable autonomous switch also runs on the 5V bus. Fortunately we didn't get a penalty but the refs said we would get a yellow card if we did it again.

ExarKun666 23-04-2008 18:33

Re: Silly Programming screw ups (funny)
 
One of my countless screw ups as a rookie coder was when I was coding for the encoders at one put I changed the sign one positive and one negative, since it was a tank drive, which is logical, and I turned it. First mistake was I left the cable in so it bulled the laptop, but I luckily caught it, and second it span in really fast circles.


All times are GMT -5. The time now is 20:26.

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